directory listing macros ausgelagert

This commit is contained in:
Jörg Thalheim 2014-03-29 21:07:17 +01:00
parent e8262abcd2
commit c5732cf115
2 changed files with 21 additions and 20 deletions

View File

@ -27,26 +27,6 @@
\usepackage{chngcntr} \usepackage{chngcntr}
\newcounter{treeline} \newcounter{treeline}
\newcommand{\treeroot}[1]{% Title
\node[above] at (0,0) {#1};%
\setcounter{treeline}{0}
}
\newcommand{\treeentry}[2]{% Title, Level
\draw[->] (#2-1,-\value{treeline}/2) -- (#2-1,-\value{treeline}/2-0.5) --
(#2+0.5,-\value{treeline}/2-0.5) node[right] {#1};
\stepcounter{treeline}
}
\newcommand{\altentry}[2]{% Title, Level
\draw[->] (#2-1,-\value{treeline}/2) -- (#2-1,-\value{treeline}/2-0.5) --
(#2+0.5,-\value{treeline}/2-0.5) node[right] {#1};
\foreach \x in {1,...,#2}
{ \draw (\x-1,-\value{treeline}/2) -- (\x-1,-\value{treeline}/2-0.5);
}
\stepcounter{treeline}
}
\RequirePackage{mymacros} \RequirePackage{mymacros}
\lstset{basicstyle=\footnotesize\ttfamily,breaklines=true,xleftmargin=1cm} \lstset{basicstyle=\footnotesize\ttfamily,breaklines=true,xleftmargin=1cm}

View File

@ -1 +1,22 @@
\newcommand{\treeroot}[1]{% Title
\node[above] at (0,0) {#1};%
\setcounter{treeline}{0}
}
\newcommand{\treeentry}[2]{% Title, Level
\draw[->] (#2-1,-\value{treeline}/2) -- (#2-1,-\value{treeline}/2-0.5) --
(#2+0.5,-\value{treeline}/2-0.5) node[right] {#1};
\stepcounter{treeline}
}
\newcommand{\altentry}[2]{% Title, Level
\draw[->] (#2-1,-\value{treeline}/2) -- (#2-1,-\value{treeline}/2-0.5) --
(#2+0.5,-\value{treeline}/2-0.5) node[right] {#1};
\foreach \x in {1,...,#2}
{ \draw (\x-1,-\value{treeline}/2) -- (\x-1,-\value{treeline}/2-0.5);
}
\stepcounter{treeline}
}
\newcommand{\shellcmd}[1]{\nopagebreak\hspace{1cm}\texttt{\footnotesize\$ #1}} \newcommand{\shellcmd}[1]{\nopagebreak\hspace{1cm}\texttt{\footnotesize\$ #1}}