I have to make a literature review taxonomy for my final thesis, highlighting the salient features of each paper referred, its categories etc. I want to represent this diagrammatically using a hierarchy (something similar to the picture below)
How can this be done using Latex? I do not want to use any diagramming software as I have to maintain citations for the papers in the taxonomy. I looked at the forest package example available here (posted by @skpblack), and am trying to use it, but I am not sure how to customize this to the plain style that I need. Can someone please help me with this? Thanks for any help in advance.
EDIT: added a MWE
\documentclass[12pt,a4paper,twoside, index, tikz]{book}
%for drawing lit survey hierarchies
\usepackage{tikz}
\usetikzlibrary{trees}
%for drawing lit survey trees
\usetikzlibrary{arrows.meta, shapes.geometric, calc, shadows}
\colorlet{linecol}{black!75}
\usepackage{forest}
\usepackage{newfloat}
\DeclareFloatingEnvironment[fileext=lod]{Figure} %for adding captions
\forestset{/.style=
{
{for tree=
{parent anchor=south,
child anchor=north,
align=center
l+=1.5cm}
}
}
}
\begin{document}
\pgfkeys{/forest,
my rounded corners/.append style={rounded corners=2pt},
}
\begin{forest}
for tree={
% font=\sffamily,
line width=1pt,
draw=linecol,
% drop shadow,
fit=rectangle,
edge={color=linecol, >={Triangle[]}, ->},
where level=0{%
l sep+=5pt,
calign=child,
calign child=2,
% inner color=green!80,
% outer color=green,
align=center,
my rounded corners,
for descendants={%
calign=first,
},
}{%
where level=1{%
%inner color=green!80,
%outer color=green,
my rounded corners,
align=center,
parent anchor=south west,
tier=three ways,
for descendants={%
child anchor=west,
parent anchor=west,
align=left,
anchor=west,
% inner color=MistyRose1!80,
% outer color=MistyRose1,
edge path={
\noexpand\path[\forestoption{edge}]
(!to tier=three ways.parent anchor) |-
(.child anchor)\forestoption{edge label};
},
},
}{}%
},
}
[Drawing Diagrams
[Defining node\\and arrow styles
[Setting shape
[Choosing colour
[Adding shading]
]
]
]
[Positioning\\the nodes
[Using a matrix
[Absolutely
[Relatively
[Using overlays]
]
]
]
]
[Drawing arrows\\between nodes
[Default arrows
[Arrow library
[Re-sizing tips
[Shortening
[Bending]
]
]
]
]
]
]
\end{forest}
\end{document}
This currently gives me the following output -
I'm not sure how to edit this further to get the display I want. Tried to edit other parts of the code (like that which produces the bounding rectangle etc) but that gave me errors.
EDIT #2: (UPDATE)
I used the exact code provided by @cfr in the edited answer, in my document (book class), and was repeatedly getting a "Missing \endcsname inserted. \bgroup \end{forest}" error.. It worked when I commented out fancyhdr package. But right now I am getting the following display. The horizontal arrows pointing to the level 3 child nodes are too long and hence overlap over each other. What did I do wrong? (Sorry, I did not know how to add the latest screenshot in the comments section.)