From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- info/examples/ltt/poem.sty | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 info/examples/ltt/poem.sty (limited to 'info/examples/ltt/poem.sty') diff --git a/info/examples/ltt/poem.sty b/info/examples/ltt/poem.sty new file mode 100644 index 0000000000..8561826471 --- /dev/null +++ b/info/examples/ltt/poem.sty @@ -0,0 +1,39 @@ +% poem.sty +% Gedichte mit Verzeichniseintrag +\RequirePackage{ifthen} + +% Der Zaehler. +\newcounter{poemcnt} +\renewcommand{\thepoemcnt}{\Roman{poemcnt}} + +% Formatiert die Eintraege im Verzeichnis. +\newcommand{\l@poem}[2] + {{\renewcommand{\numberline}[1] + {\makebox[1cm][l]{##1}} + \itshape #1\dotfill#2}\\} + +% Erzeugt die Eintraege im Verzeichnis und druckt +% den Gedichtkopf in einem bestimmen Format. +\newenvironment{poem}[1] + {\refstepcounter{poemcnt} + \addcontentsline{lop}{poem} + {\protect\numberline{\thepoemcnt} #1} + \begin{verse} + \flushleft{\itshape\thepoemcnt{} #1} + } + {\end{verse}} + +% Erzeugt das Verzeichnis. +\newcommand{\lopname}{Die Gedichte} +\newcommand{\tableofpoems} + {\setboolean{@restonecol}{false} + \ifthenelse{\boolean{@twocolumn}} + {\setboolean{@restonecol}{true}\onecolumn} + {} + \chapter*{\lopname\@mkboth{\lopname}{\lopname}} + {\setlength{\parindent}{0pt} + \@starttoc{lop}} + \ifthenelse{\boolean{@restonecol}} + {\twocolumn} + {} + } -- cgit v1.2.3