Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/latex/base/ltidxglo.dtx

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


% \iffalse meta-comment
%
% Copyright 1993 1994 1995 1996 1997 1998 1999
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file. 
% 
% This file is part of the LaTeX2e system.
% ----------------------------------------
% 
% It may be distributed under the terms of the LaTeX Project Public
% License, as described in lppl.txt in the base LaTeX distribution.
% Either version 1.0 or, at your option, any later version.
% 
% \fi
% \iffalse
%%% From File: ltidxglo.dtx
%
%<*driver>
% \fi
\ProvidesFile{ltidxglo.dtx}
             [1996/01/20 v1.1e LaTeX Kernel (Index and Glossary)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltidxglo.dtx}
\title{\filename}
\date{\filedate}
 \author{%
  Johannes Braams\and
  David Carlisle\and
  Alan Jeffrey\and
  Leslie Lamport\and
  Frank Mittelbach\and
  Chris Rowley\and
  Rainer Sch\"opf}

\begin{document}
\maketitle
 \DocInput{\filename}
\end{document}
%</driver>
% \fi
%
% \CheckSum{77}
%
% \section{Index and Glossary Generation}
%  Index and Glossary commands.
%
% \DescribeMacro{\makeindex} A preamble command to turn on indexing.
%
% \DescribeMacro{\makeglossary} A preamble command to turn on making
% glossary entries.
%
% \DescribeMacro{\index} Make an index entry for |#1|.
%
% \DescribeMacro{\glossary} Make a glossary entry for |#1|.
%
% \StopEventually{}
%
%
% \changes{v1.0a}{1994/03/31}{Initial version of ltidxbib.dtx,
%                             split from ltherest.dtx}
% \changes{v1.1a}{1994/05/19}{Initial version of ltidxglo.dtx,
%                             split from ltidxbib.dtx}
% \changes{v1.1d}{1995/10/25}{Doc cleanup}
%
%
% \begin{oldcomments}
% \makeindex ==
%   BEGIN
%             \index ==  BEGIN \@bsphack
%                              \begingroup
%                                 \protect{X} == \string X\space
%                                  %% added 3 Feb 87 for \index commands
%                                  %% in \footnotes
%                                  re-\catcode special characters 
%                                  to 'other'
%                                  \@wrindex
%   END
%
%  \@wrindex{ITEM} ==
%    BEGIN
%        write of {\indexentry{ITEM}{page number}}
%      \endgroup
%      \@esphack
%    END
%
%  INITIALIZATION:
%
%  \index == BEGIN \@bsphack
%                  \begingroup
%                     re-\catcode special characters (in case '%' there)
%                     \@index
%            END
%
%  \@index{ITEM} == BEGIN \endgroup \@esphack END
%
% Changes made 14 Apr 89 to write \glossaryentry's instead of
% \indexentry's on the .glo file.
% \end{oldcomments}
%
%    \begin{macrocode}
%<*2ekernel>
\message{index,}
%    \end{macrocode}
%
% \changes{v1.1b}{1994/11/04}{Removed \cs{if@filesw} from
%    \cs{makeindex}.} 
%
% \begin{macro}{\makeindex}
%    \begin{macrocode}
\def\makeindex{%
  \newwrite\@indexfile
  \immediate\openout\@indexfile=\jobname.idx
  \def\index{\@bsphack\begingroup
             \@sanitize
             \@wrindex}\typeout
    {Writing index file \jobname.idx}%
%    \end{macrocode}
% \changes{v1.1e}{1996/01/20}{Make no-op after use pr/2048}
%    Opening the write channel should be done only once
%    since on some OS multiple opens are forbidden and in
%    any case it is useless. So we turn this into a no-op after
%    use.
%    \begin{macrocode}
  \let\makeindex\@empty
}
\@onlypreamble\makeindex 
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@wrindex}
% \changes{v1.1b}{1994/11/04}{Added \cs{protected@write} to
%    \cs{@wrindex}.} 
%    \begin{macrocode}
\def\@wrindex#1{%
   \protected@write\@indexfile{}%
      {\string\indexentry{#1}{\thepage}}%
 \endgroup
 \@esphack}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\index}
%    \begin{macrocode}
\def\index{\@bsphack\begingroup \@sanitize\@index}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@index}
%    \begin{macrocode}
\def\@index#1{\endgroup\@esphack}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\makeglossary}
% \changes{v1.1b}{1994/11/04}{Removed \cs{if@filesw} from
%    \cs{makeglossary}.} 
%    \begin{macrocode}
\def\makeglossary{%
  \newwrite\@glossaryfile
  \immediate\openout\@glossaryfile=\jobname.glo
  \def\glossary{\@bsphack\begingroup
                \@sanitize
                \@wrglossary}\typeout
    {Writing glossary file \jobname.glo }%
%    \end{macrocode}
% \changes{v1.1e}{1996/01/20}{Make no-op after use pr/2048}
%    Opening the write channel should be done only once
%    since on some OS multiple opens are forbidden and in
%    any case it is useless. So we turn this into a no-op after
%    use.
%    \begin{macrocode}
  \let\makeglossary\@empty
}
\@onlypreamble\makeglossary
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@wrglossary}
% \changes{v1.1b}{1994/11/04}{Added \cs{protected@write} to
%    \cs{@wrglossary}.} 
%    \begin{macrocode}
\def\@wrglossary#1{%
   \protected@write\@glossaryfile{}%
      {\string\glossaryentry{#1}{\thepage}}%
 \endgroup
 \@esphack}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\glossary}
%    \begin{macrocode}
\def\glossary{\@bsphack\begingroup\@sanitize\@index}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%</2ekernel>
%    \end{macrocode}
%
%
% \Finale
%

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].