summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/lablst.tex
blob: 195d578f8c8798a829d28f6bd6ab3cd6c14790a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
% \iffalse meta-comment
%
% Copyright (C) 1993-2020
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
% -------------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%    https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%
% This file has the LPPL maintenance status "maintained".
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
%
% \fi
% LABLST.TEX -- A LaTeX input file for printing label definitions.
% Copyright (c) 1985, 1994 by Leslie Lamport, Chris Rowley
% This file created on 5 November 1994
%
% Modified December 1994 (DPC) to allow _ ^ etc in label keys and to
%                              input packages used by the main file.
%
% Modified June 1995 (CAR)
%
% This version puts all bibilographic entries at the end of the
% output.  It inputs the .aux file twice.

% Initial interactions:
%
\typeout{}
\typeout{LABLST version of 10 June 1995}
\typeout{}
\typeout{*********************************}
\typeout{* Enter input file name }
\typeout{* \space\space without the .tex extension: }
\typein[\lablstfile]{*********************************}


\def\spaces{\space\space\space\space\space}
\typeout{}
\typeout{********************************************************}
\typeout{* Enter document class used in file \lablstfile.tex }
\typeout{* \space\space with no options or extension: }
\typein[\lablstclass]%
        {********************************************************}

\documentclass{\lablstclass}

% Now ask for packages. The answer should be a comma separated list.
% In fact only packages that define commands that are used in
% section titles etc need be loaded.
% \def\spaces{\space\space\space\space\space}
\typeout{}
\typeout{**************************************************}
\typeout{* Enter packages used in file \lablstfile.tex }
\typeout{* \space\space with no options or extensions: }
\typein[\lablstpackages]%
        {**************************************************}

\usepackage{\lablstpackages}

\nofiles
\parindent 0pt

\begin{document}

\mbox{}

\vspace{-3cm}

{\LARGE  File \textbf{\lablstfile.tex} --- lablst output}
{\Large (\today)
\\[0.5\baselineskip]
Using document class:\quad \lablstclass\\
  \mbox{\phantom{Using }and packages:\quad \lablstpackages}
 }

\vspace{2\baselineskip}

\makeatletter

% This is always disabled:
%
\let \@mlabel \@gobbletwo

% No protection needed:
%
\let \protect \relax

% Better formatting?:
%
\let \raggedright  \relax

% Only write out toc entries:
%
\def \@writefile #1#2{%
  \def\lablst@tempa{#1}%
  \def\lablst@tempb{toc}%
  \ifx \lablst@tempa\lablst@tempb
    \par{#2}\par\nobreak
    \vspace{3pt}%
  \fi
}

% Allow characters like ^ _ to be printed `verbatim'.
%
\def\@lablstverb#1{%
  \def\lablst@tempa{#1}%
  {\ttfamily\expandafter\strip@prefix\meaning\lablst@tempa}}%


% For first run:
%
\def \newlabel #1#2{%
  \par
  \hbox to \textwidth{%
    \hfill\makebox[10em][r]{\@lablstverb{#1}}%
    \hspace{1em}\makebox[4.5em][l]{\@firstoftwo #2}%
    Page:
    \makebox[2.5em][r]{\@secondoftwo #2}%
    \hspace{4em}}\par
}

\let \bibcite \@gobbletwo

{\Large \sl Logical labels within sections}

\input \lablstfile.aux


% For second run:
%
\def \bibcite #1#2{\par
  \hbox to \textwidth{%
  \hfill\makebox[2in][r]{\@lablstverb{#1}}\hspace{1em}[#2]\hspace{4em}}}

\let \newlabel \@gobbletwo
\let \@writefile \@gobbletwo

\par
\vspace{2\baselineskip}

{\Large \sl Bibliography logical labels}

\input \lablstfile.aux

\end{document}