From c365d78bfcdeb6493a68e35e852244839c1c9ee4 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 29 Dec 2005 00:26:31 +0000
Subject: doc/french+

git-svn-id: svn://tug.org/texlive/trunk@16 c570f23f-e606-0410-a88d-b1316a301751
---
 .../doc/german/latex-tipps-und-tricks/chaptoc.sty  | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Master/texmf-doc/doc/german/latex-tipps-und-tricks/chaptoc.sty

(limited to 'Master/texmf-doc/doc/german/latex-tipps-und-tricks/chaptoc.sty')

diff --git a/Master/texmf-doc/doc/german/latex-tipps-und-tricks/chaptoc.sty b/Master/texmf-doc/doc/german/latex-tipps-und-tricks/chaptoc.sty
new file mode 100644
index 00000000000..7f5d03549d1
--- /dev/null
+++ b/Master/texmf-doc/doc/german/latex-tipps-und-tricks/chaptoc.sty
@@ -0,0 +1,56 @@
+% chaptoc.sty
+% Kapitelstartseite mit Mini-TOC
+% Format Mini-TOC
+\newcommand{\l@chapentry}[2]
+{\renewcommand{\numberline}[1]
+ {\parbox[r]{2em}{##1}}
+  #1\\}
+
+% erweitere Mini-TOC bei jeder \section
+\renewcommand{\sectionmark}[1]
+{\markright{\sffamily\thesection\quad#1}
+ \myaddtocont{\protect\contentsline{chapentry}%
+    {\protect\numberline{\thesection}#1}{\thepage}}
+}
+
+%  Aus LaTeX.ltx mit Aenderungen fuer Mini-TOC
+\renewcommand{\@makechapterhead}[1]
+{\vspace*{3em}\noindent%
+ \textsf{\Large\thechapter\quad #1}\\*[2em]
+ \rule{\textwidth}{0.5pt}
+ \noindent\@mystarttoc{t\thechapter}\par
+ \vspace*{3em}}
+
+% Sternform ohne TOC
+\renewcommand{\@makeschapterhead}[1]
+{\vspace*{3em}\noindent\textsf{\Large#1}\\*[3em]}
+
+% allokiere einen einzigen Ausgabestream
+\newwrite\shorttoc
+
+% Uebernahme aus LaTeX.ltx mit Anpassungen ---
+% liest Mini-TOC ein und setze Ausgabestream
+% auf neue Datei. 
+\newcommand{\@mystarttoc}[1]
+{\begingroup
+ \makeatletter
+ \typeout{input jobname.#1}
+ \@input{\jobname.#1}
+ \protected@write\@auxout
+   {\let\label\@gobble \let\index\@gobble
+    \let\glossary\@gobble}%
+   {\immediate\openout\shorttoc \jobname.#1\relax}
+ \global\@nobreakfalse\endgroup}
+
+\newcommand{\myaddtocont}[1]
+{\protected@write \@auxout
+  {\let\label\@gobble \let\index\@gobble
+   \let\glossary\@gobble}%
+  {\string\@mywritefile{#1}}}
+
+\newcommand{\@mywritefile}[1]
+{\@temptokena{#1}
+ \immediate\write\shorttoc{\the\@temptokena}}
+
+\AtEndDocument{\protected@write\@auxout
+ {}{\immediate\closeout\shorttoc}}
-- 
cgit v1.2.3

