I have a (rather long-ish) hierarchical structure, typeset with the dirtree package. However, I have some issues when breaking the tree over to a new page -- the line may protrude up to the very top of the sheet writeable area, extending into the headings area.
Note that I used the headings here only to better illustrate the issue, they are not necessary to exemplify the problem. But I do have a similar page setup, and it looks particularly unpleasant with the horizontal rule being intersected by the tree lines.
Here's an example:
\documentclass{article}
\usepackage{lipsum}
\usepackage{dirtree}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[C]{\emph{\nouppercase{\rightmark}}}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\begin{document}
\lipsum[1-4]
\dirtree{%
.1 spam.
.2 eggs.
.2 ham.
.3 circus.
.3 parrot.
.4 knights.
.3 spamalot.
.4 ni.
.5 brian.
.5 vikings.
.2 meaning.
}
\end{document}
Now, the package documentation says that a command \DTsplittree is in the To-Do list, that will allow splitting the tree over several pages. Any ideas for a dirty hack or a workaround that I might be able to use in the meantime?
I've used some other tricks from the book, like reducing the line spacing and playing with font size, and I guess I could split it in two a few smaller parts (which I will have to fit again between pages!) if I can't find another way of doing it. But I'm more interested in a TeXnical solution.
Update Let's see if this will get answered if some 100 bonus rep is thrown at it.