summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/lexikon.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-tipps-und-tricks/lexikon.sty')
-rw-r--r--Master/texmf-dist/doc/latex/latex-tipps-und-tricks/lexikon.sty45
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/lexikon.sty b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/lexikon.sty
new file mode 100644
index 00000000000..54bee61e98e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/lexikon.sty
@@ -0,0 +1,45 @@
+% LEXIKON.STY
+\RequirePackage{ifthen}
+
+\newboolean{first}
+\newcommand{\lastchar}{}
+\newcommand{\ps@lexikon}
+{\renewcommand{\@oddhead}
+ {\hfil\textbf{\Large\botmark}%
+ \hspace{1cm}\arabic{page}}
+ \renewcommand{\@evenhead}
+ {\arabic{page}\hspace{1cm}%
+ \textbf{\Large\botmark}\hfil}
+ \renewcommand{\@evenfoot}{}
+ \renewcommand{\@oddfoot}{}
+}
+
+\newenvironment{lexikon}
+ {\setboolean{first}{true}
+ \renewcommand{\lastchar}{}
+ \newpage\twocolumn
+ \let\@oddh\@oddhead \let\@evnh\@evenhead
+ \let\@oddf\@oddfoot \let\@evnf\@evenfoot
+ \pagestyle{lexikon}
+ }
+ {\end{description}
+ \onecolumn
+ \let\@oddhead\@oddh \let\@evenhead\@evnh
+ \let\@oddfoot\@oddf \let\@evenfoot\@evnf
+ \markboth{}{}
+ }
+
+\def\entry[#1#2]
+ {\ifthenelse{\equal{\lastchar}{#1}}
+ {}
+ {\ifthenelse{\boolean{first}}
+ {\setboolean{first}{false}}
+ {\end{description}}
+ \renewcommand{\lastchar}{#1}
+ \medskip
+ \noindent\textbf{\Huge #1}
+ \rule{0.9\columnwidth}{2mm}
+ \begin{description}
+ }
+ \item[#1#2]\mark{#1#2}
+ }