Can I reproduce this in LatexLaTeX (TikZ) image centeringDrawing in Latex or 3rd partyHow to generate this illustration in LaTeX?Reproduce an image using tikz: advanced coding to speed the process up?Drawing U shaped node around another node in tikzHow to reproduce this epsilon delta definition diagram with TikZ?how to reproduce this diagramReproduce bracket polynomialsHelp to reproduce this box?How do you reproduce this composed image with tikz?
Why does the SR-71 Blackbird sometimes have dents in the nose?
What does /r mean in a score?
Noise reduction using multiple recordings of the same signal
draw line according to other angle
Why does Bane's stock exchange robbery actually work to bankrupt Bruce Wayne?
Is it bizarre that a professor asks every student for a 3 inch by 5 inch photograph?
Why are so many cities in the list of 50 most violent cities in the world located in South and Central America?
Is it really more difficult to debug randomized algorithms?
Proof that if covariance is zero then there is no linear relationship
What is a word for the feeling of constantly wanting new possessions?
Why are bagpipes tuned using just intonation?
How do I figure out how many hydrogens my compound actually has using a mass and NMR spectrum?
What should I do if my parents are forcing me to study a career I don't want?
Create a program that prints the amount of characters it has, in words
Intuition behind the paradox of instantaneous heat propagation
A partially ugly group with a casual secret
How can Edward Snowden be denied a jury trial?
Why are there so many subway station signs between Yau Ma Tei station and Mong Kok station on Google Maps?
How does the Gameboy Link Cable work?
Novel in which space traders train a spearman army for a decaying medieval empire
What game(s) does Michael play in Mind Field S2E4?
Can I still travel on the Troika Card even if it goes into a negative balance?
Justification for excluding gravitational energy from the stress-energy tensor
What is more proper notation in piano sheet music to denote that the left hand should be louder?
Can I reproduce this in Latex
LaTeX (TikZ) image centeringDrawing in Latex or 3rd partyHow to generate this illustration in LaTeX?Reproduce an image using tikz: advanced coding to speed the process up?Drawing U shaped node around another node in tikzHow to reproduce this epsilon delta definition diagram with TikZ?how to reproduce this diagramReproduce bracket polynomialsHelp to reproduce this box?How do you reproduce this composed image with tikz?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
Is there an easy way to reproduce the following image in latex?
tikz-pgf tikz-graphdrawing
add a comment
|
Is there an easy way to reproduce the following image in latex?
tikz-pgf tikz-graphdrawing
5
Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
– Stefan Pinnow
Oct 13 at 7:23
add a comment
|
Is there an easy way to reproduce the following image in latex?
tikz-pgf tikz-graphdrawing
Is there an easy way to reproduce the following image in latex?
tikz-pgf tikz-graphdrawing
tikz-pgf tikz-graphdrawing
asked Oct 13 at 7:12
user199255user199255
721 silver badge4 bronze badges
721 silver badge4 bronze badges
5
Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
– Stefan Pinnow
Oct 13 at 7:23
add a comment
|
5
Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
– Stefan Pinnow
Oct 13 at 7:23
5
5
Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
– Stefan Pinnow
Oct 13 at 7:23
Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
– Stefan Pinnow
Oct 13 at 7:23
add a comment
|
3 Answers
3
active
oldest
votes
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
node [dot,above=of n1];
node [dot,above=of n2];
node (d4) [dot,above=of n4];
node [dot,above=of d4];
node [dot,above=of n6];
node (d8) [dot,above=of n8];
node (d8a) [dot,above=of d8];
node [dot, above=of d8a];
node [dot, above=of n9];
node (d11) [dot, above=of n11];
node [dot, above=of d11];
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (1):
you can define nodes styles for two and three dots. With them the code for picture is:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
node contents=,
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
%
node [dot,above=of n1];
node [dot,above=of n2];
node [ddot,above=of n4]; % <---
node [dot,above=of n6];
node [dddot,above=of n8]; % <---
node [dot, above=of n9];
node [ddot, above=of n11];% <---
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (2):
version with dots as labels in the loop. A bit shorter code:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i [count=j from 0] in , dot, dot, ,ddot, , dot,
,dddot,dot, ,ddot, dot, dot,
node (nj) [block, label=[yshift=3pt,i]] j;
draw (n0.north west) -- (n14.north east);
draw (n1.south) -- ++ (0,-0.1) -| (n13.south)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
endtikzpicture
enddocument
Result is the same as before.
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
add a comment
|
Use pic
s. You can define a pic
tower list
which draws the circles. Getting all the x coordinates and circles is then as simple as saying
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
where the integers indicate how many circles should be drawn at 0, 1, 2....
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture[font=sffamily,pics/tower/.style=code=
ifnum#1>0
foreach X in 1,...,#1fill (0,X*0.4) circle[radius=0.17cm];
fi,
pics/tower list/.style=code=path foreach Y [count=Z starting from 0] in #1
(Z*0.5,0)node[below](tower-Z)$mathsfZ$ (Z*0.5,0) pictower=Y;]
beginscope
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
draw (tower-0.west|-0,0) -- (tower-13.east|-0,0);
draw[blue] (tower-1.south) -- ++(0,-0.1)
-| (tower-13.south)
node[pos=0.25,below]Range$=mathsf13-mathsf1=mathsf12$;
endscope
endtikzpicture
enddocument
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
1
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
add a comment
|
You don't really need TiKZ for this. Just marvosym, booktabs
and stackengine
:
documentclassarticle
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagemarvosym
usepackage[svgnames, table]xcolor
newcommandMVTenMVOneMVZero
newcommandMVxiMVOneMVOne
newcommandMVxiiMVOneMVTwo
newcommandMVxiiiMVOneMVThree
newcommandMVxivMVOneMVFour
usepackagearray,booktabs
usepackage[usestackEOL]stackengine
begindocument
setstackgapS0pt
begintabular*15c
& CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & & CircSteel & & ShortstackCircSteel\ CircSteel\ CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & CircSteel & CircSteel \[-0.6ex]
midrule[1pt]
MVZero & MVOne & MVTwo & MVThree & MVFour & MVFive & MVSix & MVSeven & MVEight & MVNine & MVTen & MVxi & MVxii & MVxiii & MVxiv \[-1ex]
arrayrulecolorLightSlateBlue!60 &colorLightSlateBlue!60 rule1pt1.3ex & multicolumn11c & colorLightSlateBlue!60rule1pt1.3ex \[-1.46ex]
cmidrule[1pt](l0.88emr1.19em)2-14addlinespace[-0.3ex]
& multicolumn13csffamilybfseries Range = 13 – 1 = 12
endtabular
enddocument
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/4.0/"u003ecc by-sa 4.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%2f512051%2fcan-i-reproduce-this-in-latex%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
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
node [dot,above=of n1];
node [dot,above=of n2];
node (d4) [dot,above=of n4];
node [dot,above=of d4];
node [dot,above=of n6];
node (d8) [dot,above=of n8];
node (d8a) [dot,above=of d8];
node [dot, above=of d8a];
node [dot, above=of n9];
node (d11) [dot, above=of n11];
node [dot, above=of d11];
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (1):
you can define nodes styles for two and three dots. With them the code for picture is:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
node contents=,
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
%
node [dot,above=of n1];
node [dot,above=of n2];
node [ddot,above=of n4]; % <---
node [dot,above=of n6];
node [dddot,above=of n8]; % <---
node [dot, above=of n9];
node [ddot, above=of n11];% <---
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (2):
version with dots as labels in the loop. A bit shorter code:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i [count=j from 0] in , dot, dot, ,ddot, , dot,
,dddot,dot, ,ddot, dot, dot,
node (nj) [block, label=[yshift=3pt,i]] j;
draw (n0.north west) -- (n14.north east);
draw (n1.south) -- ++ (0,-0.1) -| (n13.south)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
endtikzpicture
enddocument
Result is the same as before.
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
add a comment
|
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
node [dot,above=of n1];
node [dot,above=of n2];
node (d4) [dot,above=of n4];
node [dot,above=of d4];
node [dot,above=of n6];
node (d8) [dot,above=of n8];
node (d8a) [dot,above=of d8];
node [dot, above=of d8a];
node [dot, above=of n9];
node (d11) [dot, above=of n11];
node [dot, above=of d11];
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (1):
you can define nodes styles for two and three dots. With them the code for picture is:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
node contents=,
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
%
node [dot,above=of n1];
node [dot,above=of n2];
node [ddot,above=of n4]; % <---
node [dot,above=of n6];
node [dddot,above=of n8]; % <---
node [dot, above=of n9];
node [ddot, above=of n11];% <---
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (2):
version with dots as labels in the loop. A bit shorter code:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i [count=j from 0] in , dot, dot, ,ddot, , dot,
,dddot,dot, ,ddot, dot, dot,
node (nj) [block, label=[yshift=3pt,i]] j;
draw (n0.north west) -- (n14.north east);
draw (n1.south) -- ++ (0,-0.1) -| (n13.south)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
endtikzpicture
enddocument
Result is the same as before.
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
add a comment
|
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
node [dot,above=of n1];
node [dot,above=of n2];
node (d4) [dot,above=of n4];
node [dot,above=of d4];
node [dot,above=of n6];
node (d8) [dot,above=of n8];
node (d8a) [dot,above=of d8];
node [dot, above=of d8a];
node [dot, above=of n9];
node (d11) [dot, above=of n11];
node [dot, above=of d11];
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (1):
you can define nodes styles for two and three dots. With them the code for picture is:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
node contents=,
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
%
node [dot,above=of n1];
node [dot,above=of n2];
node [ddot,above=of n4]; % <---
node [dot,above=of n6];
node [dddot,above=of n8]; % <---
node [dot, above=of n9];
node [ddot, above=of n11];% <---
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (2):
version with dots as labels in the loop. A bit shorter code:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i [count=j from 0] in , dot, dot, ,ddot, , dot,
,dddot,dot, ,ddot, dot, dot,
node (nj) [block, label=[yshift=3pt,i]] j;
draw (n0.north west) -- (n14.north east);
draw (n1.south) -- ++ (0,-0.1) -| (n13.south)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
endtikzpicture
enddocument
Result is the same as before.
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
node [dot,above=of n1];
node [dot,above=of n2];
node (d4) [dot,above=of n4];
node [dot,above=of d4];
node [dot,above=of n6];
node (d8) [dot,above=of n8];
node (d8a) [dot,above=of d8];
node [dot, above=of d8a];
node [dot, above=of n9];
node (d11) [dot, above=of n11];
node [dot, above=of d11];
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (1):
you can define nodes styles for two and three dots. With them the code for picture is:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
node contents=,
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i in 0,...,14
node (ni) [block] i;
draw (n0.north west) -- (n14.north east);
draw (n1.south west) -- ++ (0,-0.2) -| (n13.south east)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
%
node [dot,above=of n1];
node [dot,above=of n2];
node [ddot,above=of n4]; % <---
node [dot,above=of n6];
node [dddot,above=of n8]; % <---
node [dot, above=of n9];
node [ddot, above=of n11];% <---
node [dot, above=of n12];
node [dot, above=of n13];
endtikzpicture
enddocument
Addedndum (2):
version with dots as labels in the loop. A bit shorter code:
documentclass[tikz, margin=3mm]standalone
usetikzlibrarychains,
positioning
usepackageamsmath
begindocument
begintikzpicture[
node distance = 1pt and 0pt,
start chain = going right,
block/.style = rectangle, minimum width=1.5em, outer sep=0pt,
on chain,
dot/.style = circle, fill, node contents=,
ddot/.style = circle, fill,
append after command=node[dot,above=of tikzlastnode],
dddot/.style = circle, fill,
append after command=node (aux) [dot,above=of tikzlastnode]
node [dot,above=of aux],
node contents=
]
foreach i [count=j from 0] in , dot, dot, ,ddot, , dot,
,dddot,dot, ,ddot, dot, dot,
node (nj) [block, label=[yshift=3pt,i]] j;
draw (n0.north west) -- (n14.north east);
draw (n1.south) -- ++ (0,-0.1) -| (n13.south)
node[pos=0.25,below] $textRange = 13 - 1 = 12$;
endtikzpicture
enddocument
Result is the same as before.
edited Oct 14 at 7:33
answered Oct 13 at 8:11
ZarkoZarko
150k8 gold badges87 silver badges197 bronze badges
150k8 gold badges87 silver badges197 bronze badges
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
add a comment
|
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
"Result is the same" except you corrected an error (the too-short bar below). Excellent!
– user3445853
Oct 15 at 12:35
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
@user3445853, almost the same ... :-), recently I experiences some difficulties to upload images, so I didn't provide the recent one :-( (which not differ very much from showed)
– Zarko
Oct 15 at 12:42
add a comment
|
Use pic
s. You can define a pic
tower list
which draws the circles. Getting all the x coordinates and circles is then as simple as saying
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
where the integers indicate how many circles should be drawn at 0, 1, 2....
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture[font=sffamily,pics/tower/.style=code=
ifnum#1>0
foreach X in 1,...,#1fill (0,X*0.4) circle[radius=0.17cm];
fi,
pics/tower list/.style=code=path foreach Y [count=Z starting from 0] in #1
(Z*0.5,0)node[below](tower-Z)$mathsfZ$ (Z*0.5,0) pictower=Y;]
beginscope
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
draw (tower-0.west|-0,0) -- (tower-13.east|-0,0);
draw[blue] (tower-1.south) -- ++(0,-0.1)
-| (tower-13.south)
node[pos=0.25,below]Range$=mathsf13-mathsf1=mathsf12$;
endscope
endtikzpicture
enddocument
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
1
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
add a comment
|
Use pic
s. You can define a pic
tower list
which draws the circles. Getting all the x coordinates and circles is then as simple as saying
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
where the integers indicate how many circles should be drawn at 0, 1, 2....
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture[font=sffamily,pics/tower/.style=code=
ifnum#1>0
foreach X in 1,...,#1fill (0,X*0.4) circle[radius=0.17cm];
fi,
pics/tower list/.style=code=path foreach Y [count=Z starting from 0] in #1
(Z*0.5,0)node[below](tower-Z)$mathsfZ$ (Z*0.5,0) pictower=Y;]
beginscope
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
draw (tower-0.west|-0,0) -- (tower-13.east|-0,0);
draw[blue] (tower-1.south) -- ++(0,-0.1)
-| (tower-13.south)
node[pos=0.25,below]Range$=mathsf13-mathsf1=mathsf12$;
endscope
endtikzpicture
enddocument
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
1
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
add a comment
|
Use pic
s. You can define a pic
tower list
which draws the circles. Getting all the x coordinates and circles is then as simple as saying
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
where the integers indicate how many circles should be drawn at 0, 1, 2....
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture[font=sffamily,pics/tower/.style=code=
ifnum#1>0
foreach X in 1,...,#1fill (0,X*0.4) circle[radius=0.17cm];
fi,
pics/tower list/.style=code=path foreach Y [count=Z starting from 0] in #1
(Z*0.5,0)node[below](tower-Z)$mathsfZ$ (Z*0.5,0) pictower=Y;]
beginscope
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
draw (tower-0.west|-0,0) -- (tower-13.east|-0,0);
draw[blue] (tower-1.south) -- ++(0,-0.1)
-| (tower-13.south)
node[pos=0.25,below]Range$=mathsf13-mathsf1=mathsf12$;
endscope
endtikzpicture
enddocument
Use pic
s. You can define a pic
tower list
which draws the circles. Getting all the x coordinates and circles is then as simple as saying
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
where the integers indicate how many circles should be drawn at 0, 1, 2....
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture[font=sffamily,pics/tower/.style=code=
ifnum#1>0
foreach X in 1,...,#1fill (0,X*0.4) circle[radius=0.17cm];
fi,
pics/tower list/.style=code=path foreach Y [count=Z starting from 0] in #1
(Z*0.5,0)node[below](tower-Z)$mathsfZ$ (Z*0.5,0) pictower=Y;]
beginscope
pictower list=0,1,1,0,2,0,1,0,3,1,0,2,1,1,0;
draw (tower-0.west|-0,0) -- (tower-13.east|-0,0);
draw[blue] (tower-1.south) -- ++(0,-0.1)
-| (tower-13.south)
node[pos=0.25,below]Range$=mathsf13-mathsf1=mathsf12$;
endscope
endtikzpicture
enddocument
edited Oct 13 at 14:55
answered Oct 13 at 8:26
Schrödinger's catSchrödinger's cat
16k21 silver badges39 bronze badges
16k21 silver badges39 bronze badges
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
1
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
add a comment
|
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
1
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
Hello, then with such a technique you can built an Italian abacus with units, tens, hundreds? +1. Can I ask a question on LaTeX with reference to your code?
– Sebastiano
Oct 13 at 8:32
1
1
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
@Sebastiano Sure you can define an abacus pic (will be back in a bit...)
– Schrödinger's cat
Oct 13 at 8:41
add a comment
|
You don't really need TiKZ for this. Just marvosym, booktabs
and stackengine
:
documentclassarticle
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagemarvosym
usepackage[svgnames, table]xcolor
newcommandMVTenMVOneMVZero
newcommandMVxiMVOneMVOne
newcommandMVxiiMVOneMVTwo
newcommandMVxiiiMVOneMVThree
newcommandMVxivMVOneMVFour
usepackagearray,booktabs
usepackage[usestackEOL]stackengine
begindocument
setstackgapS0pt
begintabular*15c
& CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & & CircSteel & & ShortstackCircSteel\ CircSteel\ CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & CircSteel & CircSteel \[-0.6ex]
midrule[1pt]
MVZero & MVOne & MVTwo & MVThree & MVFour & MVFive & MVSix & MVSeven & MVEight & MVNine & MVTen & MVxi & MVxii & MVxiii & MVxiv \[-1ex]
arrayrulecolorLightSlateBlue!60 &colorLightSlateBlue!60 rule1pt1.3ex & multicolumn11c & colorLightSlateBlue!60rule1pt1.3ex \[-1.46ex]
cmidrule[1pt](l0.88emr1.19em)2-14addlinespace[-0.3ex]
& multicolumn13csffamilybfseries Range = 13 – 1 = 12
endtabular
enddocument
add a comment
|
You don't really need TiKZ for this. Just marvosym, booktabs
and stackengine
:
documentclassarticle
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagemarvosym
usepackage[svgnames, table]xcolor
newcommandMVTenMVOneMVZero
newcommandMVxiMVOneMVOne
newcommandMVxiiMVOneMVTwo
newcommandMVxiiiMVOneMVThree
newcommandMVxivMVOneMVFour
usepackagearray,booktabs
usepackage[usestackEOL]stackengine
begindocument
setstackgapS0pt
begintabular*15c
& CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & & CircSteel & & ShortstackCircSteel\ CircSteel\ CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & CircSteel & CircSteel \[-0.6ex]
midrule[1pt]
MVZero & MVOne & MVTwo & MVThree & MVFour & MVFive & MVSix & MVSeven & MVEight & MVNine & MVTen & MVxi & MVxii & MVxiii & MVxiv \[-1ex]
arrayrulecolorLightSlateBlue!60 &colorLightSlateBlue!60 rule1pt1.3ex & multicolumn11c & colorLightSlateBlue!60rule1pt1.3ex \[-1.46ex]
cmidrule[1pt](l0.88emr1.19em)2-14addlinespace[-0.3ex]
& multicolumn13csffamilybfseries Range = 13 – 1 = 12
endtabular
enddocument
add a comment
|
You don't really need TiKZ for this. Just marvosym, booktabs
and stackengine
:
documentclassarticle
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagemarvosym
usepackage[svgnames, table]xcolor
newcommandMVTenMVOneMVZero
newcommandMVxiMVOneMVOne
newcommandMVxiiMVOneMVTwo
newcommandMVxiiiMVOneMVThree
newcommandMVxivMVOneMVFour
usepackagearray,booktabs
usepackage[usestackEOL]stackengine
begindocument
setstackgapS0pt
begintabular*15c
& CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & & CircSteel & & ShortstackCircSteel\ CircSteel\ CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & CircSteel & CircSteel \[-0.6ex]
midrule[1pt]
MVZero & MVOne & MVTwo & MVThree & MVFour & MVFive & MVSix & MVSeven & MVEight & MVNine & MVTen & MVxi & MVxii & MVxiii & MVxiv \[-1ex]
arrayrulecolorLightSlateBlue!60 &colorLightSlateBlue!60 rule1pt1.3ex & multicolumn11c & colorLightSlateBlue!60rule1pt1.3ex \[-1.46ex]
cmidrule[1pt](l0.88emr1.19em)2-14addlinespace[-0.3ex]
& multicolumn13csffamilybfseries Range = 13 – 1 = 12
endtabular
enddocument
You don't really need TiKZ for this. Just marvosym, booktabs
and stackengine
:
documentclassarticle
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagemarvosym
usepackage[svgnames, table]xcolor
newcommandMVTenMVOneMVZero
newcommandMVxiMVOneMVOne
newcommandMVxiiMVOneMVTwo
newcommandMVxiiiMVOneMVThree
newcommandMVxivMVOneMVFour
usepackagearray,booktabs
usepackage[usestackEOL]stackengine
begindocument
setstackgapS0pt
begintabular*15c
& CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & & CircSteel & & ShortstackCircSteel\ CircSteel\ CircSteel & CircSteel & & ShortstackCircSteel\ CircSteel & CircSteel & CircSteel \[-0.6ex]
midrule[1pt]
MVZero & MVOne & MVTwo & MVThree & MVFour & MVFive & MVSix & MVSeven & MVEight & MVNine & MVTen & MVxi & MVxii & MVxiii & MVxiv \[-1ex]
arrayrulecolorLightSlateBlue!60 &colorLightSlateBlue!60 rule1pt1.3ex & multicolumn11c & colorLightSlateBlue!60rule1pt1.3ex \[-1.46ex]
cmidrule[1pt](l0.88emr1.19em)2-14addlinespace[-0.3ex]
& multicolumn13csffamilybfseries Range = 13 – 1 = 12
endtabular
enddocument
answered Oct 13 at 12:03
BernardBernard
194k8 gold badges87 silver badges232 bronze badges
194k8 gold badges87 silver badges232 bronze badges
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%2f512051%2fcan-i-reproduce-this-in-latex%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
5
Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
– Stefan Pinnow
Oct 13 at 7:23