summaryrefslogtreecommitdiff
path: root/info/examples/ltt/lexikon.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/ltt/lexikon.sty
Initial commit
Diffstat (limited to 'info/examples/ltt/lexikon.sty')
-rw-r--r--info/examples/ltt/lexikon.sty45
1 files changed, 45 insertions, 0 deletions
diff --git a/info/examples/ltt/lexikon.sty b/info/examples/ltt/lexikon.sty
new file mode 100644
index 0000000000..e200d1e6b5
--- /dev/null
+++ b/info/examples/ltt/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}
+ }