guess we don't want the build dir
[latex2e.git] / trunk / base / lablst.tex
blob9f14f0b0e751068f66f557bec53d648e219abed6
1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 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 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
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.
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.
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
33 % Modified December 1994 (DPC) to allow _ ^ etc in label keys and to
34 % input packages used by the main file.
36 % Modified June 1995 (CAR)
38 % This version puts all bibilographic entries at the end of the
39 % output. It inputs the .aux file twice.
41 % Initial interactions:
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]{*********************************}
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 {********************************************************}
60 \documentclass{\lablstclass}
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 {**************************************************}
73 \usepackage{\lablstpackages}
75 \nofiles
76 \parindent 0pt
78 \begin{document}
80 \mbox{}
82 \vspace{-3cm}
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}
91 \vspace{2\baselineskip}
93 \makeatletter
95 % This is always disabled:
97 \let \@mlabel \@gobbletwo
99 % No protection needed:
101 \let \protect \relax
103 % Better formatting?:
105 \let \raggedright \relax
107 % Only write out toc entries:
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}%
118 % Allow characters like ^ _ to be printed `verbatim'.
120 \def\@lablstverb#1{%
121 \def\lablst@tempa{#1}%
122 {\ttfamily\expandafter\strip@prefix\meaning\lablst@tempa}}%
125 % For first run:
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
137 \let \bibcite \@gobbletwo
139 {\Large \sl Logical labels within sections}
141 \input \lablstfile.aux
144 % For second run:
146 \def \bibcite #1#2{\par
147 \hbox to \textwidth{%
148 \hfill\makebox[2in][r]{\@lablstverb{#1}}\hspace{1em}[#2]\hspace{4em}}}
150 \let \newlabel \@gobbletwo
151 \let \@writefile \@gobbletwo
153 \par
154 \vspace{2\baselineskip}
156 {\Large \sl Bibliography logical labels}
158 \input \lablstfile.aux
160 \end{document}