I am struggling with reducing the vertical space of a directory tree using the forest class. My code is based on this SO-Answer (https://tex.stackexchange.com/a/328890/32924). Although, I added inner ysep=0pt for the styling of the tree and the styling of the file the resulting tree is unevenly spaced (see image).
Moreover, I would like to ask you if you have any idea on how to remove the root element (i.e. system) of the directory tree and show config, lib, and files as root elements of the directory.
The code I am using is:
\begin{document}
\begin{forest}
for tree={
font=\ttfamily,
grow'=0,
child anchor=west,
parent anchor=south,
anchor=west,
calign=first,
inner xsep=7pt,
inner ysep=0pt,
edge path={
\noexpand\path [draw, \forestoption{edge}]
(!u.south west) +(7.5pt,0) |- (.child anchor) pic {folder} \forestoption{edge label};
},
% style for your file node
file/.style={edge path={\noexpand\path [draw, \forestoption{edge}]
(!u.south west) +(7.5pt,0) |- (.child anchor) \forestoption{edge label};},
inner xsep=2pt,inner ysep=0pt,font=\small\ttfamily
},
before typesetting nodes={
if n=1
{insert before={[,phantom]}}
{}
},
fit=band,
before computing xy={l=15pt},
}
[/
[config
]
[lib
[Access
]
[file.txt,file
]
]
[file2.txt,file
]
[gzipfile.txt,file
]
[gzipfile2.txt,file
]
]
\end{forest}
\end{document}


\documentclass, includes all relevant\usepackagecommands, ends with\end{document}and compiles without errors, even if it does not produce your desired output. – Sandy G Nov 11 '22 at 00:10