Debian Codegraph @

texmf-dist/tex/latex/base/lablst.tex

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 1993-2025
4 % The LaTeX Project and any individual authors listed elsewhere
5 % in this file.
6 %
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
9 %
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % https://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2008 or later.
17 %
18 % This file has the LPPL maintenance status "maintained".
19 %
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
22 % information.
23 %
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
27 %
28 % \fi
29 % LABLST.TEX -- A LaTeX input file for printing label definitions.
30 % Copyright (c) 1985, 1994 by Leslie Lamport, Chris Rowley
31 % This file created on 5 November 1994
32 %
33 % Modified December 1994 (DPC) to allow _ ^ etc in label keys and to
34 % input packages used by the main file.
35 %
36 % Modified June 1995 (CAR)
37 %
38 % This version puts all bibilographic entries at the end of the
39 % output. It inputs the .aux file twice.
40
41 % Initial interactions:
42 %
43 \typeout{}
44 \typeout{LABLST version of 10 June 1995}
45 \typeout{}
46 \typeout{*********************************}
47 \typeout{* Enter input file name }
48 \typeout{* \space\space without the .tex extension: }
49 \typein[\lablstfile]{*********************************}
50
51
52 \def\spaces{\space\space\space\space\space}
53 \typeout{}
54 \typeout{********************************************************}
55 \typeout{* Enter document class used in file \lablstfile.tex }
56 \typeout{* \space\space with no options or extension: }
57 \typein[\lablstclass]%
58 {********************************************************}
59
60 \documentclass{\lablstclass}
61
62 % Now ask for packages. The answer should be a comma separated list.
63 % In fact only packages that define commands that are used in
64 % section titles etc need be loaded.
65 % \def\spaces{\space\space\space\space\space}
66 \typeout{}
67 \typeout{**************************************************}
68 \typeout{* Enter packages used in file \lablstfile.tex }
69 \typeout{* \space\space with no options or extensions: }
70 \typein[\lablstpackages]%
71 {**************************************************}
72
73 \usepackage{\lablstpackages}
74
75 \nofiles
76 \parindent 0pt
77
78 \begin{document}
79
80 \mbox{}
81
82 \vspace{-3cm}
83
84 {\LARGE File \textbf{\lablstfile.tex} --- lablst output}
85 {\Large (\today)
86 \\[0.5\baselineskip]
87 Using document class:\quad \lablstclass\\
88 \mbox{\phantom{Using }and packages:\quad \lablstpackages}
89 }
90
91 \vspace{2\baselineskip}
92
93 \makeatletter
94
95 % This is always disabled:
96 %
97 \let \@mlabel \@gobbletwo
98
99 % No protection needed:
100 %
101 \let \protect \relax
102
103 % Better formatting?:
104 %
105 \let \raggedright \relax
106
107 % Only write out toc entries:
108 %
109 \def \@writefile #1#2{%
110 \def\lablst@tempa{#1}%
111 \def\lablst@tempb{toc}%
112 \ifx \lablst@tempa\lablst@tempb
113 \par{#2}\par\nobreak
114 \vspace{3pt}%
115 \fi
116 }
117
118 % Allow characters like ^ _ to be printed `verbatim'.
119 %
120 \def\@lablstverb#1{%
121 \def\lablst@tempa{#1}%
122 {\ttfamily\expandafter\strip@prefix\meaning\lablst@tempa}}%
123
124
125 % For first run:
126 %
127 \def \newlabel #1#2{%
128 \par
129 \hbox to \textwidth{%
130 \hfill\makebox[10em][r]{\@lablstverb{#1}}%
131 \hspace{1em}\makebox[4.5em][l]{\@firstoftwo #2}%
132 Page:
133 \makebox[2.5em][r]{\@secondoftwo #2}%
134 \hspace{4em}}\par
135 }
136
137 \let \bibcite \@gobbletwo
138
139 {\Large \sl Logical labels within sections}
140
141 \input \lablstfile.aux
142
143
144 % For second run:
145 %
146 \def \bibcite #1#2{\par
147 \hbox to \textwidth{%
148 \hfill\makebox[2in][r]{\@lablstverb{#1}}\hspace{1em}[#2]\hspace{4em}}}
149
150 \let \newlabel \@gobbletwo
151 \let \@writefile \@gobbletwo
152
153 \par
154 \vspace{2\baselineskip}
155
156 {\Large \sl Bibliography logical labels}
157
158 \input \lablstfile.aux
159
160 \end{document}