summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/listlbls
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2014-07-30 06:11:52 +0000
committerNorbert Preining <preining@logic.at>2014-07-30 06:11:52 +0000
commit140a0deaab224b67f5831952d607e278f29261c9 (patch)
tree86a1c0fda62477069a10914a460e0f207214ce4b /Master/texmf-dist/tex/latex/listlbls
parent8058bd27fa381c2e259ce7387b40737d752a405b (diff)
listlbls (29Jul)
git-svn-id: svn://tug.org/texlive/trunk@34773 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/listlbls')
-rw-r--r--Master/texmf-dist/tex/latex/listlbls/listlbls.sty47
1 files changed, 41 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/listlbls/listlbls.sty b/Master/texmf-dist/tex/latex/listlbls/listlbls.sty
index f20e430e534..c94c1be6855 100644
--- a/Master/texmf-dist/tex/latex/listlbls/listlbls.sty
+++ b/Master/texmf-dist/tex/latex/listlbls/listlbls.sty
@@ -15,14 +15,48 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{listlbls}
- [2014/07/25 v1.01 Creates a list of all labels used throughout a document]
-\DeclareOption{draft}{\newcommand\@draftmode{true}}
-\DeclareOption{final}{\let\@draftmode=\@undefined}
-\ProcessOptions\relax
+ [2014/07/27 v1.02 Creates a list of all labels used throughout a document]
+\newif\if@draft\@draftfalse
+\newif\if@totoc\@totocfalse
+\newif\if@numtoc\@numtocfalse
+\DeclareOption{draft}{\@drafttrue}
+\DeclareOption{final}{\@draftfalse}
+\DeclareOption{totoc}{\@totoctrue}
+\DeclareOption{notoc}{\@totocfalse}
+\DeclareOption{numtoc}{\@numtoctrue}
+\ProcessOptions*\relax
+\RequirePackage{translations}
+\DeclareTranslationFallback{llbls-listoflabels}{List of Labels}
+\DeclareTranslationFallback{llbls-onpage}{on page}
+\DeclareTranslation{English}{llbls-listoflabels}{List of Labels}
+\DeclareTranslation{English}{llbls-onpage}{on page}
+\DeclareTranslation{German}{llbls-listoflabels}{Sprungmarkenverzeichnis}
+\DeclareTranslation{German}{llbls-onpage}{auf Seite}
+\DeclareTranslation{French}{llbls-listoflabels}{Liste des \'etiquettes}
+\DeclareTranslation{French}{llbls-onpage}{\`a la page}
+\ifdefined\chapter*
+ \if@numtoc
+ \def\llbls@headline{\chapter{List of Labels}\label{special:listoflabels}}
+ \else
+ \def\llbls@toccommand{\chapter*}
+ \def\llbls@tocgroup{chapter}
+ \fi
+\else
+ \if@numtoc
+ \def\llbls@headline{\section{List of Labels}\label{special:listoflabels}}
+ \else
+ \def\llbls@toccommand{\section*}
+ \def\llbls@tocgroup{section}
+ \fi
+\fi
+\ifdefined\llbls@headline\else
+ \def\llbls@headline{\llbls@toccommand{\GetTranslation{llbls-listoflabels}}\label{special:listoflabels}%
+ \if@totoc\addcontentsline{toc}{\llbls@tocgroup}{\GetTranslation{llbls-listoflabels}}\relax\fi}
+\fi
\long\def\@findlabel#1#2\@findlabel{%
\ifx\newlabel#1\lablist\expandafter{\the\lablist\@showlabel#2}\fi}
\def\@showlabel#1#2{%
- \par\noindent Label: \texttt{\detokenize{#1}}\dotfill\ref{#1} on page \pageref{#1}}
+ \par\noindent Label: \texttt{\detokenize{#1}}\dotfill\ref{#1}~\GetTranslation{llbls-onpage}~\pageref{#1}}
\newtoks\lablist
\newread\zz
\immediate\openin\zz=\jobname.aux
@@ -31,8 +65,9 @@
\read\zz to \tmp
\expandafter\@findlabel\tmp\relax\@findlabel
\repeat
-\ifdefined\@draftmode
+\if@draft
\newcommand\listoflabels{%
+ \llbls@headline%
\the\lablist}
\else
\let\listoflabels=\relax