I have used this awesome reply by the user cfr to edit and come up with a nice tree that I can use. However there are some small things that I wanted to change. I played with some numbers but the code for it is a little bit over my head. I couldn't make any other changes after what I have done and shown below. I feel like I am missing something but I can't figure it out.
I am trying to replicate a tree from another book but my trees don't look quite the same. I would like the first split to also be straight and I want the leaf nodes (sometimes also non-leaf nodes) to not have a box around them. I am using the book Smart Card Handbook 3rd edition by W.Rankl and W. Effing. The trees I am trying to replicate are the ones on pages 18 and 255. Here is what I currently have:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage[edges]{forest}
\forestset{
declare dimen register=gap,
gap'=10mm,
declare count register=twist,
twist'=1,
family tree too/.style={
draw,
forked edges,
for tree={
fill=gray!0,
rounded corners=1pt,
minimum width/.wrap pgfmath arg={##1}{(\textwidth-6(gap))/3},
minimum height=4ex,
font=\sffamily,
text centered,
edge=thick,
},
where={level()<(twist)}{%
parent anchor=children,
l sep+=5pt,
}{%
draw,
folder,
grow'=0,
if={level()==(twist)}{%
before typesetting nodes={child anchor=north},
anchor=north,
edge path'={%
(!u.parent anchor) -- (.child anchor)
},
}{
l sep'+=2pt,
if level=2{
before computing xy={
l/.wrap pgfmath arg={##1}{14pt-((\textwidth-6(gap))/6)}
},
}{}
},
},
},
}
\begin{document}
\begin{figure}[!ht]
\centering
\begin{forest}
family tree too,
[Lorem ipsum dolor sit amet con
[Lorem ips
[Lorem ipsum
[Lorem ipsum dolor sit.]
[Lorem ipsum dolor s]
]
[Lorem ipsum dolor si
[Lorem ipsum dolor s]
[Lorem ipsum dolo]
]
]
[Lorem ipsum dolor sit am
[Lorem ipsum d]
[Lorem ipsum]
[Lorem ipsum]
]
]
\end{forest}
\caption{A small tree}
\label{fig:smart_card_types}
\end{figure}
\end{document}
and here is how it looks:
And here is what I am trying to replicate:
(1): Wolfgang Rankl and Wolfgang Effing, Smart card handbook, 3rd ed. Chichester, West Sussex, England ; Hoboken, NJ, USA: J. Wiley, 2003.



