How to typeset a code in LaTeX for the following image












2















I want to typeset the following image in LaTeX. Is it possible?



enter image description here










share|improve this question




















  • 5





    Of course it is possible to do :). 1) "Bla Bla ..." is the exact text that we have to add or do you mean another thing? 2) What have you tried so far? Could you add a MWE, please?

    – manooooh
    Mar 10 at 12:08











  • Sir, I don't have any idea how to do this. That is why I asked.

    – Sachchidanand Prasad
    Mar 10 at 16:40











  • @SachchidanandPrasad You have an alternative with my code below (1 answer).

    – Sebastiano
    Mar 10 at 16:50






  • 1





    @Sebastiano Thanks for the help.

    – Sachchidanand Prasad
    Mar 10 at 16:53











  • @SachchidanandPrasad I have deleted my answer because is the bad than the two best now answers.

    – Sebastiano
    Mar 10 at 20:42
















2















I want to typeset the following image in LaTeX. Is it possible?



enter image description here










share|improve this question




















  • 5





    Of course it is possible to do :). 1) "Bla Bla ..." is the exact text that we have to add or do you mean another thing? 2) What have you tried so far? Could you add a MWE, please?

    – manooooh
    Mar 10 at 12:08











  • Sir, I don't have any idea how to do this. That is why I asked.

    – Sachchidanand Prasad
    Mar 10 at 16:40











  • @SachchidanandPrasad You have an alternative with my code below (1 answer).

    – Sebastiano
    Mar 10 at 16:50






  • 1





    @Sebastiano Thanks for the help.

    – Sachchidanand Prasad
    Mar 10 at 16:53











  • @SachchidanandPrasad I have deleted my answer because is the bad than the two best now answers.

    – Sebastiano
    Mar 10 at 20:42














2












2








2


0






I want to typeset the following image in LaTeX. Is it possible?



enter image description here










share|improve this question
















I want to typeset the following image in LaTeX. Is it possible?



enter image description here







formatting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 10 at 15:47









Sebastiano

11k42164




11k42164










asked Mar 10 at 11:50









Sachchidanand PrasadSachchidanand Prasad

1355




1355








  • 5





    Of course it is possible to do :). 1) "Bla Bla ..." is the exact text that we have to add or do you mean another thing? 2) What have you tried so far? Could you add a MWE, please?

    – manooooh
    Mar 10 at 12:08











  • Sir, I don't have any idea how to do this. That is why I asked.

    – Sachchidanand Prasad
    Mar 10 at 16:40











  • @SachchidanandPrasad You have an alternative with my code below (1 answer).

    – Sebastiano
    Mar 10 at 16:50






  • 1





    @Sebastiano Thanks for the help.

    – Sachchidanand Prasad
    Mar 10 at 16:53











  • @SachchidanandPrasad I have deleted my answer because is the bad than the two best now answers.

    – Sebastiano
    Mar 10 at 20:42














  • 5





    Of course it is possible to do :). 1) "Bla Bla ..." is the exact text that we have to add or do you mean another thing? 2) What have you tried so far? Could you add a MWE, please?

    – manooooh
    Mar 10 at 12:08











  • Sir, I don't have any idea how to do this. That is why I asked.

    – Sachchidanand Prasad
    Mar 10 at 16:40











  • @SachchidanandPrasad You have an alternative with my code below (1 answer).

    – Sebastiano
    Mar 10 at 16:50






  • 1





    @Sebastiano Thanks for the help.

    – Sachchidanand Prasad
    Mar 10 at 16:53











  • @SachchidanandPrasad I have deleted my answer because is the bad than the two best now answers.

    – Sebastiano
    Mar 10 at 20:42








5




5





Of course it is possible to do :). 1) "Bla Bla ..." is the exact text that we have to add or do you mean another thing? 2) What have you tried so far? Could you add a MWE, please?

– manooooh
Mar 10 at 12:08





Of course it is possible to do :). 1) "Bla Bla ..." is the exact text that we have to add or do you mean another thing? 2) What have you tried so far? Could you add a MWE, please?

– manooooh
Mar 10 at 12:08













Sir, I don't have any idea how to do this. That is why I asked.

– Sachchidanand Prasad
Mar 10 at 16:40





Sir, I don't have any idea how to do this. That is why I asked.

– Sachchidanand Prasad
Mar 10 at 16:40













@SachchidanandPrasad You have an alternative with my code below (1 answer).

– Sebastiano
Mar 10 at 16:50





@SachchidanandPrasad You have an alternative with my code below (1 answer).

– Sebastiano
Mar 10 at 16:50




1




1





@Sebastiano Thanks for the help.

– Sachchidanand Prasad
Mar 10 at 16:53





@Sebastiano Thanks for the help.

– Sachchidanand Prasad
Mar 10 at 16:53













@SachchidanandPrasad I have deleted my answer because is the bad than the two best now answers.

– Sebastiano
Mar 10 at 20:42





@SachchidanandPrasad I have deleted my answer because is the bad than the two best now answers.

– Sebastiano
Mar 10 at 20:42










2 Answers
2






active

oldest

votes


















6














Maybe you're thinking to something like this:



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

usepackage{lipsum} % for mock text

newenvironment{step}[2]
{%
$% start math mode
sbox0{rotatebox[origin=c]{90}{quad#1quad}}%
vcenter{hbox{copy0}}%
mkern3mu
begin{pmatrix}
mkern3mu
vphantom{vcenter{hbox{copy0}}}%
begin{minipage}{#2}
}
{end{minipage}mkern3muend{pmatrix}$}

begin{document}

begin{center}
begin{step}{Step 1}{8cm}
lipsum[1][1-5]
end{step}
end{center}

begin{center}
begin{step}{Step 2}{10cm}
lipsum[2]
end{step}
end{center}

end{document}


enter image description here






share|improve this answer
























  • Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

    – Sebastiano
    Mar 10 at 20:40





















3














With a tcolorbox:



documentclass{book}
usepackage{lipsum}
usepackage{xcolor}
%usepackage{showframe}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[2]{%
enhanced,
boxsep=4pt,
opacityback=0,
frame hidden,% from https://tex.stackexchange.com/a/247509/101651
left skip=.7cm,
% copied from https://tex.stackexchange.com/a/431760/101651
overlay unbroken and first ={%
node[rotate=90,
anchor=south,
font=Large,
inner sep=0pt,
yshift=.3cm,
]
at (frame.west) {#2};
draw[rounded corners=10, thick] ([xshift=12pt]frame.north west) -- (frame.north west) -- (frame.south west) -- ([xshift=12pt]frame.south west);
draw[rounded corners=10, thick] ([xshift=-12pt]frame.north east) -- (frame.north east) -- (frame.south east) -- ([xshift=-12pt]frame.south east);
}
}
begin{document}
begin{mybox}{STEP 1}
Bla bla bla
end{mybox}
begin{mybox}{STEP 2}
lipsum[2]
end{mybox}
end{document}


enter image description here






share|improve this answer
























  • Ohh I like how the braces bend in "Step 1" <3.

    – manooooh
    Mar 10 at 19:12






  • 1





    @manooooh It's the same of step 2 :)

    – CarLaTeX
    Mar 10 at 19:15











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478717%2fhow-to-typeset-a-code-in-latex-for-the-following-image%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














Maybe you're thinking to something like this:



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

usepackage{lipsum} % for mock text

newenvironment{step}[2]
{%
$% start math mode
sbox0{rotatebox[origin=c]{90}{quad#1quad}}%
vcenter{hbox{copy0}}%
mkern3mu
begin{pmatrix}
mkern3mu
vphantom{vcenter{hbox{copy0}}}%
begin{minipage}{#2}
}
{end{minipage}mkern3muend{pmatrix}$}

begin{document}

begin{center}
begin{step}{Step 1}{8cm}
lipsum[1][1-5]
end{step}
end{center}

begin{center}
begin{step}{Step 2}{10cm}
lipsum[2]
end{step}
end{center}

end{document}


enter image description here






share|improve this answer
























  • Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

    – Sebastiano
    Mar 10 at 20:40


















6














Maybe you're thinking to something like this:



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

usepackage{lipsum} % for mock text

newenvironment{step}[2]
{%
$% start math mode
sbox0{rotatebox[origin=c]{90}{quad#1quad}}%
vcenter{hbox{copy0}}%
mkern3mu
begin{pmatrix}
mkern3mu
vphantom{vcenter{hbox{copy0}}}%
begin{minipage}{#2}
}
{end{minipage}mkern3muend{pmatrix}$}

begin{document}

begin{center}
begin{step}{Step 1}{8cm}
lipsum[1][1-5]
end{step}
end{center}

begin{center}
begin{step}{Step 2}{10cm}
lipsum[2]
end{step}
end{center}

end{document}


enter image description here






share|improve this answer
























  • Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

    – Sebastiano
    Mar 10 at 20:40
















6












6








6







Maybe you're thinking to something like this:



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

usepackage{lipsum} % for mock text

newenvironment{step}[2]
{%
$% start math mode
sbox0{rotatebox[origin=c]{90}{quad#1quad}}%
vcenter{hbox{copy0}}%
mkern3mu
begin{pmatrix}
mkern3mu
vphantom{vcenter{hbox{copy0}}}%
begin{minipage}{#2}
}
{end{minipage}mkern3muend{pmatrix}$}

begin{document}

begin{center}
begin{step}{Step 1}{8cm}
lipsum[1][1-5]
end{step}
end{center}

begin{center}
begin{step}{Step 2}{10cm}
lipsum[2]
end{step}
end{center}

end{document}


enter image description here






share|improve this answer













Maybe you're thinking to something like this:



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

usepackage{lipsum} % for mock text

newenvironment{step}[2]
{%
$% start math mode
sbox0{rotatebox[origin=c]{90}{quad#1quad}}%
vcenter{hbox{copy0}}%
mkern3mu
begin{pmatrix}
mkern3mu
vphantom{vcenter{hbox{copy0}}}%
begin{minipage}{#2}
}
{end{minipage}mkern3muend{pmatrix}$}

begin{document}

begin{center}
begin{step}{Step 1}{8cm}
lipsum[1][1-5]
end{step}
end{center}

begin{center}
begin{step}{Step 2}{10cm}
lipsum[2]
end{step}
end{center}

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 10 at 17:28









egregegreg

727k8819223231




727k8819223231













  • Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

    – Sebastiano
    Mar 10 at 20:40





















  • Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

    – Sebastiano
    Mar 10 at 20:40



















Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

– Sebastiano
Mar 10 at 20:40







Is there a correlation with this link for the question :-)? tex.stackexchange.com/questions/227292/…

– Sebastiano
Mar 10 at 20:40













3














With a tcolorbox:



documentclass{book}
usepackage{lipsum}
usepackage{xcolor}
%usepackage{showframe}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[2]{%
enhanced,
boxsep=4pt,
opacityback=0,
frame hidden,% from https://tex.stackexchange.com/a/247509/101651
left skip=.7cm,
% copied from https://tex.stackexchange.com/a/431760/101651
overlay unbroken and first ={%
node[rotate=90,
anchor=south,
font=Large,
inner sep=0pt,
yshift=.3cm,
]
at (frame.west) {#2};
draw[rounded corners=10, thick] ([xshift=12pt]frame.north west) -- (frame.north west) -- (frame.south west) -- ([xshift=12pt]frame.south west);
draw[rounded corners=10, thick] ([xshift=-12pt]frame.north east) -- (frame.north east) -- (frame.south east) -- ([xshift=-12pt]frame.south east);
}
}
begin{document}
begin{mybox}{STEP 1}
Bla bla bla
end{mybox}
begin{mybox}{STEP 2}
lipsum[2]
end{mybox}
end{document}


enter image description here






share|improve this answer
























  • Ohh I like how the braces bend in "Step 1" <3.

    – manooooh
    Mar 10 at 19:12






  • 1





    @manooooh It's the same of step 2 :)

    – CarLaTeX
    Mar 10 at 19:15
















3














With a tcolorbox:



documentclass{book}
usepackage{lipsum}
usepackage{xcolor}
%usepackage{showframe}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[2]{%
enhanced,
boxsep=4pt,
opacityback=0,
frame hidden,% from https://tex.stackexchange.com/a/247509/101651
left skip=.7cm,
% copied from https://tex.stackexchange.com/a/431760/101651
overlay unbroken and first ={%
node[rotate=90,
anchor=south,
font=Large,
inner sep=0pt,
yshift=.3cm,
]
at (frame.west) {#2};
draw[rounded corners=10, thick] ([xshift=12pt]frame.north west) -- (frame.north west) -- (frame.south west) -- ([xshift=12pt]frame.south west);
draw[rounded corners=10, thick] ([xshift=-12pt]frame.north east) -- (frame.north east) -- (frame.south east) -- ([xshift=-12pt]frame.south east);
}
}
begin{document}
begin{mybox}{STEP 1}
Bla bla bla
end{mybox}
begin{mybox}{STEP 2}
lipsum[2]
end{mybox}
end{document}


enter image description here






share|improve this answer
























  • Ohh I like how the braces bend in "Step 1" <3.

    – manooooh
    Mar 10 at 19:12






  • 1





    @manooooh It's the same of step 2 :)

    – CarLaTeX
    Mar 10 at 19:15














3












3








3







With a tcolorbox:



documentclass{book}
usepackage{lipsum}
usepackage{xcolor}
%usepackage{showframe}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[2]{%
enhanced,
boxsep=4pt,
opacityback=0,
frame hidden,% from https://tex.stackexchange.com/a/247509/101651
left skip=.7cm,
% copied from https://tex.stackexchange.com/a/431760/101651
overlay unbroken and first ={%
node[rotate=90,
anchor=south,
font=Large,
inner sep=0pt,
yshift=.3cm,
]
at (frame.west) {#2};
draw[rounded corners=10, thick] ([xshift=12pt]frame.north west) -- (frame.north west) -- (frame.south west) -- ([xshift=12pt]frame.south west);
draw[rounded corners=10, thick] ([xshift=-12pt]frame.north east) -- (frame.north east) -- (frame.south east) -- ([xshift=-12pt]frame.south east);
}
}
begin{document}
begin{mybox}{STEP 1}
Bla bla bla
end{mybox}
begin{mybox}{STEP 2}
lipsum[2]
end{mybox}
end{document}


enter image description here






share|improve this answer













With a tcolorbox:



documentclass{book}
usepackage{lipsum}
usepackage{xcolor}
%usepackage{showframe}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[2]{%
enhanced,
boxsep=4pt,
opacityback=0,
frame hidden,% from https://tex.stackexchange.com/a/247509/101651
left skip=.7cm,
% copied from https://tex.stackexchange.com/a/431760/101651
overlay unbroken and first ={%
node[rotate=90,
anchor=south,
font=Large,
inner sep=0pt,
yshift=.3cm,
]
at (frame.west) {#2};
draw[rounded corners=10, thick] ([xshift=12pt]frame.north west) -- (frame.north west) -- (frame.south west) -- ([xshift=12pt]frame.south west);
draw[rounded corners=10, thick] ([xshift=-12pt]frame.north east) -- (frame.north east) -- (frame.south east) -- ([xshift=-12pt]frame.south east);
}
}
begin{document}
begin{mybox}{STEP 1}
Bla bla bla
end{mybox}
begin{mybox}{STEP 2}
lipsum[2]
end{mybox}
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 10 at 19:08









CarLaTeXCarLaTeX

33.7k551137




33.7k551137













  • Ohh I like how the braces bend in "Step 1" <3.

    – manooooh
    Mar 10 at 19:12






  • 1





    @manooooh It's the same of step 2 :)

    – CarLaTeX
    Mar 10 at 19:15



















  • Ohh I like how the braces bend in "Step 1" <3.

    – manooooh
    Mar 10 at 19:12






  • 1





    @manooooh It's the same of step 2 :)

    – CarLaTeX
    Mar 10 at 19:15

















Ohh I like how the braces bend in "Step 1" <3.

– manooooh
Mar 10 at 19:12





Ohh I like how the braces bend in "Step 1" <3.

– manooooh
Mar 10 at 19:12




1




1





@manooooh It's the same of step 2 :)

– CarLaTeX
Mar 10 at 19:15





@manooooh It's the same of step 2 :)

– CarLaTeX
Mar 10 at 19:15


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478717%2fhow-to-typeset-a-code-in-latex-for-the-following-image%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?