I want to make tree strucrure. I seacrch a lot, but found other structure's solution. But did not solution find fortree. Suggest me tutorial or give me solution here. Help me!
Asked
Active
Viewed 1,330 times
0
2 Answers
6
Note that I think I ought not answer do-it-for-mes, especially do-it- for-mes with a notable absence of ducks and for which there are copious existing and easily found solutions. However, I sometimes do so anyway. When I do, I answer them for me. If my code happens to be useful, so be it; if not, so be that. In particular, I am not at all sympathetic to requests for fine-tuning, adjustments, explanations or modifications. If a request tickles my fancy, I may address it. Otherwise, these are left as exercises for you, gentle reader.
This is based on the Minimal Working Example written by Biki Teron because the OP didn't provide one.
\documentclass[border=10pt]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
forked edges,
for tree={edge+={-Latex}},
[Number
[Real Number
[Rational Numbers
[Fractional]
[Integers]
]
[Irrational Numbers]
]
[Imaginary Number]
]
\end{forest}
\end{document}
cfr
- 198,882
-
-
@ManpreetDhiman Oh. Works fine for me. Possibly the errors tell you what is wrong. Hard to say. Random guess: your TeX installation is old and Forest is old. See my answer to the question Alan Munn linked in that case. Or, preferably, update your TeX installation. Or you don't have Forest. Or you don't have TikZ. Or your compiler can't be found. Or one of indefinitely many other possibilities. Don't use LuaTeX if you compile the code as is. – cfr Jul 06 '17 at 15:05
-
Actually, compilation give error due to \usetikzlibrary{arrows.meta}, forest is fine, you are right problem is due to old version. And in case @Alan Munn, same version error (\usepackage[all]{genealogytree}) comes. And When I run same code on online LaTeX editor, it was working fine. From where I can download \usetikzlibrary{arrows.meta} and \usepackage[all]{genealogytree} package? Any link? – Manpreet Dhiman Jul 07 '17 at 05:30
-
4
Using genealogytree package we can achive tree structure
\documentclass[a4paper]{article}
\usepackage[all]{genealogytree}
\begin{document}
\begin{genealogypicture}[processing=tikznode,
level size=5mm,]
child{
g{Number}
child{
g{Real Number}
child{
g{Rational Numbers} c{Fractional} c{Integers}
}
c{Irrational Numbers}
}
child{
g{Imaginary Number}
}
}
\end{genealogypicture}
\end{document}
Biki Teron
- 3,275


forestpackage. – Alan Munn Jul 05 '17 at 16:31->to the\pathoptions will give you the format above. – Alan Munn Jul 05 '17 at 16:37