% \iffalse meta-comment
%
% Copyright 1994 the LaTeX3 project and the individual authors.
% All rights reserved. For further copyright information see the file
% legal.txt, and any other copyright indicated in this file.
% 
% This file is part of the LaTeX2e system.
% ----------------------------------------
% 
%  This system is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see bugs.txt.
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
% LABLST.TEX -- A LaTeX input file for printing label definitions.
% Copyright (c) 1985, 1994 by Leslie Lamport.
% This file created on 14 February 1994


\typeout{}
\typeout{LABLST version of 14 February 1994}
\typeout{}
\typeout{**************************}
\typeout{* Enter input file name. *}
\typein[\inputfilename]{**************************}


\def\spaces{\space\space\space\space\space}
\typeout{}
\typeout{************************************************}
\typeout{* Enter document class used in file \inputfilename.tex, *}
\typeout{* with no options. \spaces\spaces\spaces\spaces\spaces *}
\typein[\documentclassname]%
       {************************************************}

\documentclass{\documentclassname}
\nofiles
\parindent 0pt
\newwrite \labfile \relax
\immediate\openout \labfile =lablst.lab\relax
\begin{document}
\makeatletter

\def\toc{toc}
\def\@writefile#1#2{\def\temp{#1}\ifx\temp\toc \immediate\write\labfile
   {#2}\fi}
\def\newlabel#1#2{\immediate\write\labfile{\string\newlabel{#1}{#2}}}
\def\bibcite#1#2{\immediate\write\labfile{\string\bibcite{#1}{#2}}}

\input \inputfilename.aux

\immediate\closeout\labfile

\def\newlabel#1#2{\par 
\hbox to \textwidth{%
  \hfill\makebox[10em][l]{\ttfamily #1}\makebox[3.5em][l]{\first 
   #2}\hspace{1em}Page:\makebox[3em][r]{\second #2}\hspace{4em}}}
\def\first#1#2{#1}
\def\second#1#2{#2}

\def\bibcite#1#2{\par\makebox[2in][l]{\ttfamily #1}[#2]}

\input lablst.lab

\end{document}




