summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls')
-rw-r--r--Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls30
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls b/Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls
index d7b2c8b9d15..4efe1923a29 100644
--- a/Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls
+++ b/Master/texmf-dist/tex/latex/schwalbe-chess/schwalbe.cls
@@ -331,6 +331,7 @@
\stepcounter{@inhalt}%
\inhalt@label\relax%
\let\Abteilung=\sw@lsg@abteilung%
+ \let\Loeser=\cpd@save@Loeser%
% Eintrag im Inhaltsverzeichnis
\bgroup%
\def\@tempb{\Loesungen}%
@@ -352,6 +353,35 @@
\catcode`/=12%
\endgroup%
}
+\newwrite\@cpdfile@loeserkuerzel
+\AtBeginDocument{\immediate\openout\@cpdfile@loeserkuerzel=\jobname.ll}
+\AtEndDocument{\immediate\closeout\@cpdfile@loeserkuerzel}
+
+\newcommand{\x@cpd@saveloeser}[2]{%
+ \immediate\write\@cpdfile@loeserkuerzel{\unexpanded{#1:#2}}
+}
+\newcommand{\y@cpd@saveloeser}[2]{%
+ \x@cpd@saveloeser{#1}{#2}%
+ {#2}%
+}
+\newcommand{\cpd@save@Loeser}{%
+ \@ifstar{\y@cpd@saveloeser}{\x@cpd@saveloeser}%
+}
+
+\newboolean{@cpd@first@loeser}
+
+\newcommand{\cpd@display@loeser}[2]{%
+ \ifthenelse{\boolean{@cpd@first@loeser}}{\setboolean{@cpd@first@loeser}{false}}{, }%
+ #2 (#1)%
+}
+
+\newcommand{\ListeLoeserKuerzel}{%
+ \bgroup%
+ \setboolean{@cpd@first@loeser}{true}%
+ \let\Loeser=\cpd@display@loeser%
+ \InputIfFileExists{\jobname.llx}{}{}%
+ \egroup%
+}
\newenvironment{Loeserliste}[1]{%
\ttitel@skip%
\centerline{\Large\bfseries L\"oserliste #1}%