TeX - LaTeX Asked on January 29, 2021
I am an undergrad math major learning latex so I can optimize my notes. I would appreciate if someone can help recreate a diagram like this one:
The hardest aspect is persuading tikz-cd
that the top object can overlap the bottom ones.
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=-1em,row sep=2.5ex]
& mbox{13 Total} arrow[dl] arrow[d] arrow[dr] &
3C arrow[d] & 6B arrow[d] & 4E arrow[d]
1C & 2B & 2E
end{tikzcd}
end{document}
You can play with the lengths until the result is what you like best.
Answered by egreg on January 29, 2021
egreg
already gave the best answer, but able to meet the OP
's requirement without using additional packages like tikz
, and the code is:
documentclass{book}
usepackage{mathtools}
begin{document}
[
begin{array}{ccc}
multicolumn{3}{c}{text{13 Total}}
swarrow &downarrow &searrow
3C &6B &4E
downarrow &downarrow &downarrow
1C &2B &2E
end{array}
]
end{document}
Output
Answered by MadyYuvi on January 29, 2021
Since your image resembles a tree diagram, try drawing it with the forest
specialized for such drawings:
documentclass[margin=3mm]{standalone}
usepackage{forest}
begin{document}
begin{forest}
for tree = {math content,
s sep=3mm,
l sep=6mm,
edge={->}}
[mbox{13 Total}
[3C [1C]]
[6B [2B]]
[4E [2E]]
]
end{forest}
end{document}
Addendum: Well, we all have different tastes. While I prefer the original answer (special its simple code), it looks like you like something similar to the picture below:
documentclass[margin=3mm]{standalone}
usepackage{forest}
begin{document}
begin{forest}
for tree = {math content,
s sep=3mm,
l sep=6mm,
edge={->}}
[mbox{13 Total}, name=r
[3C, name=c,no edge [1C]]
[6B [2B]]
[4E, name=e,no edge [2E]]
]
draw[->] ([xshift=+1ex] r.south west) -- (c);
draw[->] ([xshift=-1ex] r.south east) -- (e);
end{forest}
end{document}
Answered by Zarko on January 29, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP