diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-tipps-und-tricks/parttoc.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-tipps-und-tricks/parttoc.sty | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/parttoc.sty b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/parttoc.sty new file mode 100644 index 00000000000..5e32eff4276 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/parttoc.sty @@ -0,0 +1,50 @@ +% PARTTOC.STY +% Erzeugt ein Mini-TOC +% Das Layout der Eintraege im Mini-TOC +\newcommand{\l@ptcentry}[2] + {\par\textbf{#1} #2\\\nopagebreak} + +\newcommand{\l@ptctext}[2] + {\small#1\\} + +% Der Befehl zum Vormerken +\newcommand{\ptocentry}[2] + {\addcontentsline{p\the\c@part}{ptcentry} + {$\triangleright$ #1} + \addcontentsline{p\the\c@part}{ptctext}{#2}} + +% Erzeuge das Mini-TOC +% (lies die einzelnen Dateien ein) +\newcommand{\printptoc} + {\rule{\textwidth}{2pt}\vspace{20pt} + \@starttoc{p\the\c@part}} + +% Uebernommen aus LaTeX.ltx. Titelseite +% von \part muss z.T. neu definiert werden +\def\@part[#1]#2{% + \ifnum\c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part} + {\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1} + \fi + \markboth{}{} + {\interlinepenalty \@M + \setlength{\parindent}{0pt} + \ifnum\c@secnumdepth>-2\relax + \textbf{\huge \partname~\thepart} + \par\vspace{20pt} + \fi + \textbf{\Huge #2}\par + \printptoc} + \@endpart\cleardoublepage + } + +\def\@spart#1{% + {\interlinepenalty \@M + \setlength{\parindent}{0pt} + \textbf{\Huge #1}\par + \printptoc} + \@endpart\cleardoublepage + } |