tikz: 5 squares on a row, roman numbered 1 -> 5How can I get Roman numerals in text?Draw open squares in a row with numbers insidePlacing node at path using `midway` in pgfplotsSuper complicated figure, how to proceed? (tikz)Draw open squares in a row with numbers insideTikZ: squares and arrowsHow to draw pictures of surfaces in LaTeXdrawing circles and squares with TikZDrawing many random paths in TikZTikZ: flipping shape without moving anchorsHelp with a node diagramdrawing simple maps with TikZ: filling areas
Can I summon an otherworldly creature with the Gate spell without knowing its true name?
I know that there is a preselected candidate for a position to be filled at my department. What should I do?
Python program to take in two strings and print the larger string
Can I connect my older mathematica front-end to the free wolfram engine?
How to patch glass cuts in a bicycle tire?
Compaq Portable vs IBM 5155 Portable PC
Where have Brexit voters gone?
Dad jokes are fun
Is it legal to have an abortion in another state or abroad?
Do I need full recovery mode when I have multiple daily backup?
Word Transformations
Find the three digit Prime number P from the given unusual relationships
How can I tell if I'm being too picky as a referee?
What was the idiom for something that we take without a doubt?
NIntegrate doesn't evaluate
Construct a word ladder
Of strange atmospheres - the survivable but unbreathable
Convert Byte array into collection of items of different types
USPS Back Room - Trespassing?
Make 24 using exactly three 3s
Who is in charge of Wakanda?
How to ignore kerning of underbrace in math mode
How to respond to upset student?
Why were helmets and other body armour not commonplace in the 1800s?
tikz: 5 squares on a row, roman numbered 1 -> 5
How can I get Roman numerals in text?Draw open squares in a row with numbers insidePlacing node at path using `midway` in pgfplotsSuper complicated figure, how to proceed? (tikz)Draw open squares in a row with numbers insideTikZ: squares and arrowsHow to draw pictures of surfaces in LaTeXdrawing circles and squares with TikZDrawing many random paths in TikZTikZ: flipping shape without moving anchorsHelp with a node diagramdrawing simple maps with TikZ: filling areas
Having never worked with tkiz before, I can't even begin to understand how to draw this simple thing.

I hate to beg for a "can someone make this for me" but after trying to make this solution work for me by fiddling, tweaking, reading and fumbling for hours on end, and not getting anywhere closer to a solution, I have to turn to my internetfriends for help...
So: basically I need the above drawing, lined out to the middle of the page...
Thank you for your help!
tikz-pgf draw
add a comment |
Having never worked with tkiz before, I can't even begin to understand how to draw this simple thing.

I hate to beg for a "can someone make this for me" but after trying to make this solution work for me by fiddling, tweaking, reading and fumbling for hours on end, and not getting anywhere closer to a solution, I have to turn to my internetfriends for help...
So: basically I need the above drawing, lined out to the middle of the page...
Thank you for your help!
tikz-pgf draw
add a comment |
Having never worked with tkiz before, I can't even begin to understand how to draw this simple thing.

I hate to beg for a "can someone make this for me" but after trying to make this solution work for me by fiddling, tweaking, reading and fumbling for hours on end, and not getting anywhere closer to a solution, I have to turn to my internetfriends for help...
So: basically I need the above drawing, lined out to the middle of the page...
Thank you for your help!
tikz-pgf draw
Having never worked with tkiz before, I can't even begin to understand how to draw this simple thing.

I hate to beg for a "can someone make this for me" but after trying to make this solution work for me by fiddling, tweaking, reading and fumbling for hours on end, and not getting anywhere closer to a solution, I have to turn to my internetfriends for help...
So: basically I need the above drawing, lined out to the middle of the page...
Thank you for your help!
tikz-pgf draw
tikz-pgf draw
asked May 18 at 18:42
LooselySubtleLooselySubtle
1317
1317
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
LaTeX allows you do use Roman<counter> that automatically inserts the right roman number.
documentclass[tikz,border=3.14mm]standalone
newcounterpft
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=6mm] (X) at (X,0) setcounterpftXRomanpft;
draw(X.north west) rectangle ([yshift=-3mm]X.south east);
draw([xshift=-1em]1.south west) -- ++ (0,2.5em) -| ([xshift=1em]5.south east);
endtikzpicture
enddocument

Or using text depth from Joule V's answer and Martin Scharrer's answer without counter and even more automatic.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=8mm,text depth=2ex,draw] (X) at (1.2*X,0)
uppercaseexpandafterromannumeralXrelax;
draw([xshift=-1em]1.west) -- ++ (0,2.5em) -| ([xshift=1em]5.east);
endtikzpicture
enddocument

I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
@LooselySubtlenodeis a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.
– marmot
May 18 at 19:40
1
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
add a comment |
documentclass[tikz]standalone
tikzsetmynode/.style=draw,minimum size=1.5cm,text depth=2baselineskip
begindocument
begintikzpicture
foreach i/ins in 1/I,2/II,3/III,4/IV,5/V
node[mynode] (i) at (2*i,0) ins;
draw ([xshift=-.5cm]1.west) |- ([shift=(.5cm,.5cm)]5.north east) -- ++ (0,-1);
endtikzpicture
enddocument

add a comment |
With employing of TikZ libraries chains and positioning:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:#1,
on chain=A
]
foreach i in I, II, III, IV, V
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |- ([yshift=5mm] A-1.north) -| ([xshift=5mm] A-5.east);
endtikzpicture
enddocument

and with use of Stefan Kottwitz answer on for Roman numerals, which enable to draw arbitrary long chain of nodes:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
makeatletter
newcommand*rom[1]expandafter@slowromancapromannumeral #1@
makeatother
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:rom#1, % <---
on chain=A
]
defNmax5 % <---
foreach i in 1,...,Nmax % <---
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |-
([yshift=5mm] A-1.north) -| ([xshift=5mm] A-Nmax.east); % <---
endtikzpicture
enddocument
Result is the same as before.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f491520%2ftikz-5-squares-on-a-row-roman-numbered-1-5%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
LaTeX allows you do use Roman<counter> that automatically inserts the right roman number.
documentclass[tikz,border=3.14mm]standalone
newcounterpft
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=6mm] (X) at (X,0) setcounterpftXRomanpft;
draw(X.north west) rectangle ([yshift=-3mm]X.south east);
draw([xshift=-1em]1.south west) -- ++ (0,2.5em) -| ([xshift=1em]5.south east);
endtikzpicture
enddocument

Or using text depth from Joule V's answer and Martin Scharrer's answer without counter and even more automatic.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=8mm,text depth=2ex,draw] (X) at (1.2*X,0)
uppercaseexpandafterromannumeralXrelax;
draw([xshift=-1em]1.west) -- ++ (0,2.5em) -| ([xshift=1em]5.east);
endtikzpicture
enddocument

I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
@LooselySubtlenodeis a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.
– marmot
May 18 at 19:40
1
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
add a comment |
LaTeX allows you do use Roman<counter> that automatically inserts the right roman number.
documentclass[tikz,border=3.14mm]standalone
newcounterpft
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=6mm] (X) at (X,0) setcounterpftXRomanpft;
draw(X.north west) rectangle ([yshift=-3mm]X.south east);
draw([xshift=-1em]1.south west) -- ++ (0,2.5em) -| ([xshift=1em]5.south east);
endtikzpicture
enddocument

Or using text depth from Joule V's answer and Martin Scharrer's answer without counter and even more automatic.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=8mm,text depth=2ex,draw] (X) at (1.2*X,0)
uppercaseexpandafterromannumeralXrelax;
draw([xshift=-1em]1.west) -- ++ (0,2.5em) -| ([xshift=1em]5.east);
endtikzpicture
enddocument

I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
@LooselySubtlenodeis a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.
– marmot
May 18 at 19:40
1
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
add a comment |
LaTeX allows you do use Roman<counter> that automatically inserts the right roman number.
documentclass[tikz,border=3.14mm]standalone
newcounterpft
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=6mm] (X) at (X,0) setcounterpftXRomanpft;
draw(X.north west) rectangle ([yshift=-3mm]X.south east);
draw([xshift=-1em]1.south west) -- ++ (0,2.5em) -| ([xshift=1em]5.south east);
endtikzpicture
enddocument

Or using text depth from Joule V's answer and Martin Scharrer's answer without counter and even more automatic.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=8mm,text depth=2ex,draw] (X) at (1.2*X,0)
uppercaseexpandafterromannumeralXrelax;
draw([xshift=-1em]1.west) -- ++ (0,2.5em) -| ([xshift=1em]5.east);
endtikzpicture
enddocument

LaTeX allows you do use Roman<counter> that automatically inserts the right roman number.
documentclass[tikz,border=3.14mm]standalone
newcounterpft
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=6mm] (X) at (X,0) setcounterpftXRomanpft;
draw(X.north west) rectangle ([yshift=-3mm]X.south east);
draw([xshift=-1em]1.south west) -- ++ (0,2.5em) -| ([xshift=1em]5.south east);
endtikzpicture
enddocument

Or using text depth from Joule V's answer and Martin Scharrer's answer without counter and even more automatic.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
foreach X in 1,...,5
node[minimum width=8mm,text depth=2ex,draw] (X) at (1.2*X,0)
uppercaseexpandafterromannumeralXrelax;
draw([xshift=-1em]1.west) -- ++ (0,2.5em) -| ([xshift=1em]5.east);
endtikzpicture
enddocument

edited May 18 at 19:14
answered May 18 at 18:52
marmotmarmot
129k6163310
129k6163310
I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
@LooselySubtlenodeis a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.
– marmot
May 18 at 19:40
1
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
add a comment |
I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
@LooselySubtlenodeis a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.
– marmot
May 18 at 19:40
1
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
I have no idea what I just copy/pasted but it works. Could you kind of explain what you and @JouleV did? I understand the foreach, but what is `node and how do you get the |----| around it?
– LooselySubtle
May 18 at 19:36
@LooselySubtle
node is a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.– marmot
May 18 at 19:40
@LooselySubtle
node is a TikZ command that, well, defines a node. This node has a main argument, its content, which is often a text (but can also be a graphics etc.). And these nodes have anchors, which we are using when we draw the hat over them. TikZ has a lot of functions, but the good news is that the pgfmanual has a nice tutorial, and this site many examples from which one can learn.– marmot
May 18 at 19:40
1
1
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
@LooselySubtle, the TikZ manual can be a bit scary for its size, but I think you should at least read the first tutorial. It has been my starting point and it's so well written you can't not understand it (double negative on purpose).
– Rmano
May 18 at 19:49
add a comment |
documentclass[tikz]standalone
tikzsetmynode/.style=draw,minimum size=1.5cm,text depth=2baselineskip
begindocument
begintikzpicture
foreach i/ins in 1/I,2/II,3/III,4/IV,5/V
node[mynode] (i) at (2*i,0) ins;
draw ([xshift=-.5cm]1.west) |- ([shift=(.5cm,.5cm)]5.north east) -- ++ (0,-1);
endtikzpicture
enddocument

add a comment |
documentclass[tikz]standalone
tikzsetmynode/.style=draw,minimum size=1.5cm,text depth=2baselineskip
begindocument
begintikzpicture
foreach i/ins in 1/I,2/II,3/III,4/IV,5/V
node[mynode] (i) at (2*i,0) ins;
draw ([xshift=-.5cm]1.west) |- ([shift=(.5cm,.5cm)]5.north east) -- ++ (0,-1);
endtikzpicture
enddocument

add a comment |
documentclass[tikz]standalone
tikzsetmynode/.style=draw,minimum size=1.5cm,text depth=2baselineskip
begindocument
begintikzpicture
foreach i/ins in 1/I,2/II,3/III,4/IV,5/V
node[mynode] (i) at (2*i,0) ins;
draw ([xshift=-.5cm]1.west) |- ([shift=(.5cm,.5cm)]5.north east) -- ++ (0,-1);
endtikzpicture
enddocument

documentclass[tikz]standalone
tikzsetmynode/.style=draw,minimum size=1.5cm,text depth=2baselineskip
begindocument
begintikzpicture
foreach i/ins in 1/I,2/II,3/III,4/IV,5/V
node[mynode] (i) at (2*i,0) ins;
draw ([xshift=-.5cm]1.west) |- ([shift=(.5cm,.5cm)]5.north east) -- ++ (0,-1);
endtikzpicture
enddocument

answered May 18 at 18:50
JouleVJouleV
19.1k33072
19.1k33072
add a comment |
add a comment |
With employing of TikZ libraries chains and positioning:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:#1,
on chain=A
]
foreach i in I, II, III, IV, V
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |- ([yshift=5mm] A-1.north) -| ([xshift=5mm] A-5.east);
endtikzpicture
enddocument

and with use of Stefan Kottwitz answer on for Roman numerals, which enable to draw arbitrary long chain of nodes:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
makeatletter
newcommand*rom[1]expandafter@slowromancapromannumeral #1@
makeatother
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:rom#1, % <---
on chain=A
]
defNmax5 % <---
foreach i in 1,...,Nmax % <---
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |-
([yshift=5mm] A-1.north) -| ([xshift=5mm] A-Nmax.east); % <---
endtikzpicture
enddocument
Result is the same as before.
add a comment |
With employing of TikZ libraries chains and positioning:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:#1,
on chain=A
]
foreach i in I, II, III, IV, V
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |- ([yshift=5mm] A-1.north) -| ([xshift=5mm] A-5.east);
endtikzpicture
enddocument

and with use of Stefan Kottwitz answer on for Roman numerals, which enable to draw arbitrary long chain of nodes:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
makeatletter
newcommand*rom[1]expandafter@slowromancapromannumeral #1@
makeatother
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:rom#1, % <---
on chain=A
]
defNmax5 % <---
foreach i in 1,...,Nmax % <---
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |-
([yshift=5mm] A-1.north) -| ([xshift=5mm] A-Nmax.east); % <---
endtikzpicture
enddocument
Result is the same as before.
add a comment |
With employing of TikZ libraries chains and positioning:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:#1,
on chain=A
]
foreach i in I, II, III, IV, V
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |- ([yshift=5mm] A-1.north) -| ([xshift=5mm] A-5.east);
endtikzpicture
enddocument

and with use of Stefan Kottwitz answer on for Roman numerals, which enable to draw arbitrary long chain of nodes:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
makeatletter
newcommand*rom[1]expandafter@slowromancapromannumeral #1@
makeatother
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:rom#1, % <---
on chain=A
]
defNmax5 % <---
foreach i in 1,...,Nmax % <---
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |-
([yshift=5mm] A-1.north) -| ([xshift=5mm] A-Nmax.east); % <---
endtikzpicture
enddocument
Result is the same as before.
With employing of TikZ libraries chains and positioning:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:#1,
on chain=A
]
foreach i in I, II, III, IV, V
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |- ([yshift=5mm] A-1.north) -| ([xshift=5mm] A-5.east);
endtikzpicture
enddocument

and with use of Stefan Kottwitz answer on for Roman numerals, which enable to draw arbitrary long chain of nodes:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains, positioning
makeatletter
newcommand*rom[1]expandafter@slowromancapromannumeral #1@
makeatother
begindocument
begintikzpicture[
node distance = 4mm,
start chain = A going right,
box/.style = draw, minimum size=1.5cm,
label=[anchor=north,font=large]:rom#1, % <---
on chain=A
]
defNmax5 % <---
foreach i in 1,...,Nmax % <---
node[box=i] ;
draw ([xshift=-5mm] A-1.west) |-
([yshift=5mm] A-1.north) -| ([xshift=5mm] A-Nmax.east); % <---
endtikzpicture
enddocument
Result is the same as before.
edited May 18 at 20:15
answered May 18 at 19:41
ZarkoZarko
135k872179
135k872179
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f491520%2ftikz-5-squares-on-a-row-roman-numbered-1-5%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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