From f178d106a65d06929870917eddad8bdaa1ece706 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 18 Oct 2009 23:59:04 +0000
Subject: revtex 4.1 (14oct09)

git-svn-id: svn://tug.org/texlive/trunk@15832 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/revtex/ltxdocext.dtx   | 440 ++++++++++++---------
 1 file changed, 244 insertions(+), 196 deletions(-)

(limited to 'Master/texmf-dist/source/latex/revtex/ltxdocext.dtx')

diff --git a/Master/texmf-dist/source/latex/revtex/ltxdocext.dtx b/Master/texmf-dist/source/latex/revtex/ltxdocext.dtx
index ee9d71c9c04..a6ca9e78b9a 100644
--- a/Master/texmf-dist/source/latex/revtex/ltxdocext.dtx
+++ b/Master/texmf-dist/source/latex/revtex/ltxdocext.dtx
@@ -1,67 +1,151 @@
-% \iffalse &pdflatex ltxdoc klootch
+% \iffalse meta-comment balanced on line 108
 % ltxdocext.dtx: package to extend the ltxdoc class of standard LaTeX
-% Copyright (c) 1999 Arthur Ogawa
+% Copyright (c) 2008 Arthur Ogawa
 %
 % Disclaimer
 %   This file is distributed WITHOUT ANY WARRANTY;
 %   without even the implied warranty of
 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+% License
+%   You may distribute this file under the conditions of the 
+%   LaTeX Project Public License 1.3 or later 
+%   (http://www.latex-project.org/lppl.txt).
 % ReadMe
 %   For the documentation and more detailed instructions for
 %   installation, typeset this document with \LaTeX.
+% Maintenance Status
+%   This work has the LPPL maintenance status "maintained";
+%   Current Maintainer of this work is Arthur Ogawa.
+%
+% This work consists of the main source file ltxdocext.dtx
+% and the derived files
+%    ltxdocext.sty, ltxdocext.pdf, ltxdocext.ins, ltxdocext.drv.
+% Distribution:
+%    CTAN:macros/latex/contrib/revtex/
+%
+% Unpacking:
+%    tex ltxdocext.dtx
+%
+% Documentation:
+%    latex ltxdocext.dtx; ...
+%
+%    Program calls to get the documentation (example):
+%       pdflatex ltxdocext.dtx
+%       makeindex -s gind.ist ltxdocext.idx
+%       makeindex -s gglo.ist -o ltxdocext.gls ltxdocext.glo
+%       pdflatex ltxdocext.dtx
+%       makeindex -s gind.ist ltxdocext.idx
+%       pdflatex ltxdocext.dtx
+%
+% Installation:
+%    TDS:doc/latex/revtex/
+%    TDS:source/latex/revtex/
+%    TDS:tex/latex/revtex/
+%
+% Thanks, Heiko!
+%    This method of letting a single .dtx file serve as both
+%    documentation (via latex) and installer (via tex) follows
+%    the example of Heiko Oberdiek. Thanks!
+%<*ignore>
+\begingroup
+  \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase
+ 0\expandafter\ifx\csname processbatchFile\endcsname\relax\else1\fi\ifx\fmtname\x\else 1\fi
+ \relax
+\else
+ \csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip
+\preamble
+
+This is a generated file;
+altering it directly is inadvisable;
+instead, modify the original source file.
+See the URL in the file README.
+
+License
+   You may distribute this file under the conditions of the 
+   LaTeX Project Public License 1.3 or later 
+   (http://www.latex-project.org/lppl.txt).
+   
+   This file is distributed WITHOUT ANY WARRANTY; 
+   without even the implied warranty of MERCHANTABILITY 
+   or FITNESS FOR A PARTICULAR PURPOSE.
+
+\endpreamble
+\askforoverwritefalse
+\keepsilent
+ \generate{%
+  %{ignore}
+% \usedir{tex/latex/revtex}%
+  \file{ltxdocext.sty}{%
+   \from{ltxdocext.dtx}{package,kernel}%
+  }%
+  \file{acrofont.sty}{\from{ltxdocext.dtx}{fonts}}%
+ }%
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation, please move}
+\Msg{*    ltxdocext.sty}
+\Msg{* into a directory searched by TeX;}
+\Msg{* in a TDS-compliant installation:}
+\Msg{* texmf/tex/macros/latex/revtex/.}
+\Msg{*}
+\Msg{* To produce the documentation,
+       run ltxdocext.dtx through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
 % \fi
-% \CheckSum{938}
-%% \CharacterTable
-%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%%   Digits        \0\1\2\3\4\5\6\7\8\9
-%%   Exclamation   \!     Double quote  \"     Hash (number) \#
-%%   Dollar        \$     Percent       \%     Ampersand     \&
-%%   Acute accent  \'     Left paren    \(     Right paren   \)
-%%   Asterisk      \*     Plus          \+     Comma         \,
-%%   Minus         \-     Point         \.     Solidus       \/
-%%   Colon         \:     Semicolon     \;     Less than     \<
-%%   Equals        \=     Greater than  \>     Question mark \?
-%%   Commercial at \@     Left bracket  \[     Backslash     \\
-%%   Right bracket \]     Circumflex    \^     Underscore    \_
-%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
-%%   Right brace   \}     Tilde         \~}%
+%
+% \GetFileInfo{ltxdocext.dtx}\CheckSum{941}
 %
 % \iffalse ltxdoc klootch
+%<*ltxdocext>
 %%%  @LaTeX-file{
 %%%     filename        = "ltxdocext.dtx",
-%%%     version         = "0.0a0",
-%%%     date            = "1999/06/04",
+%%%     version         = "1.0",
+%%%     date            = "2008/08/13",
 %%%     time            = "11:23:00 GMT",
 %%%     checksum        = "929",
-%%%     author          = "Arthur Ogawa (mailto:ogawa@teleport.com)",
-%%%     copyright       = "Copyright (C) 1999 Arthur Ogawa,
-%%%                        all rights reserved.  Copying of this file is
-%%%                        authorized only if either:
-%%%                        (1) you make absolutely no changes to your copy,
-%%%                        including name; OR
-%%%                        (2) if you do make changes, you first rename it
-%%%                        to some other name.",
+%%%     author          = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
+%%%                        commissioned by the American Physical Society.
+%%%                        ",
+%%%     copyright       = "Copyright (C) 1999, 2008 Arthur Ogawa,
+%%%                        distributed under the terms of the 
+%%%                        LaTeX Project Public License, see
+%%%                        ftp://ctan.tug.org/macros/latex/base/lppl.txt
+%%%                        ",
 %%%     address         = "Arthur Ogawa,
 %%%                        USA",
 %%%     telephone       = "",
 %%%     FAX             = "",
-%%%     email           = "ogawa@teleport.com",
+%%%     email           = "mailto colon arthur_ogawa at sbcglobal.net",
 %%%     codetable       = "ISO/ASCII",
 %%%     keywords        = "latex, ltxdoc",
 %%%     supported       = "yes",
 %%%     abstract        = "extensions to the ltxdoc class",
 %%%     docstring       = "The checksum field above generated by ltxdoc",
 %%%  }
+%</ltxdocext>
 % \fi
 %
 % \iffalse ltxdoc klootch
-% The following references the \file{00readme.txt} file,
+% The following references the \file{README} file,
 % which contains basic information about this package.
 % The contents of this file are generated when
 % you typeset the programmer's documentation.
-% Search on "{filecontents*}{00readme.txt}" to locate it.
-% \fi\input{00readme.txt}%
+% Search on "{filecontents*}{README}" to locate it.
+% \fi\input{README}%
 %
 % \subsection{Bill of Materials}
 %
@@ -75,15 +159,15 @@
 %\end{verbatim}
 %
 % \subsubsection{Generated by \texttt{latex ltxdocext.dtx}}%
-% Typesetting the source file under \LaTeX\
-% generates the readme and the installer.
+% Typesetting the source file under pdflatex
+% generates the readme and the documentation.
 %\begin{verbatim}
-%00readme.txt   ltxdocext.ins
+%README ltxdocext.pdf
 %\end{verbatim}
 %
 % \subsubsection{Generated by \texttt{tex ltxdocext.ins}}%
-% Typesetting the installer generates
-% the package files.
+% Typesetting this file with \TeX\ generates
+% the package file.
 %\begin{verbatim}
 %ltxdocext.sty    acrofont.sty
 %\end{verbatim}
@@ -103,8 +187,7 @@
 %
 % \section{Code common to all modules}%
 %
-% The following may look a bit klootchy, but we
-% want to require only one place in this file
+% We want to require only one place in this file
 % where the version number is stated,
 % and we also want to ensure that the version
 % number is embedded into every generated file.
@@ -114,18 +197,18 @@
 % An appropriate message is displayed if
 % a different \TeX{} format is used.
 %    \begin{macrocode}
-%<*doc|extensions|fonts>
+%<*driver|package|fonts>
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]%
-%</doc|extensions|fonts>
+%</driver|package|fonts>
 %    \end{macrocode}
 % As desired, the following modules all
 % take common version information:
 %    \begin{macrocode}
-%<extensions>\ProvidesFile{ltxdocext.sty}%
+%<package>\ProvidesFile{ltxdocext.sty}%
 %<fonts>\ProvidesFile{acrofont.sty}%
-%<*doc>
+%<*driver>
 \expandafter\ProvidesFile\expandafter{\jobname.dtx}%
-%</doc>
+%</driver>
 %    \end{macrocode}
 %
 % The following line contains, for once and for all,
@@ -134,7 +217,7 @@
 % consistently in all generated files and in the
 % typeset documentation.
 %    \begin{macrocode}
- [1999/06/04 0.0a0 ltxdoc extensions package]% \fileversion
+ [2008/08/04 1.1b2 ltxdoc extensions package]% \fileversion
 %    \end{macrocode}
 %
 %
@@ -142,7 +225,7 @@
 %
 % This module, consisting of the present section,
 % typesets the programmer's documentation,
-% generating the \file{.ins} installer and \file{00readme.txt} as required.
+% generating the \file{README} as required.
 %
 % Because the only uncommented-out lines of code at the beginning of
 % this file constitute the \file{doc} module itself,
@@ -155,38 +238,22 @@
 % The \enve{document} command concludes the typesetting run.
 %
 %    \begin{macrocode}
-%<*doc>
-%    \end{macrocode}
-%
-% \subsection{Stubs for \file{ltxdocext.sty} and \file{acrofont.sty}}
-%
-% This \env{filecontents} environment generates stub files
-% \file{ltxdocext.sty} and \file{acrofont.sty}.
-% Stubs are needed because the documentation for this package 
-% requires them and they might not yet be present.
-%
-% A real version of these files will be generated 
-% when you typeset \file{ltxdocext.ins}, at which point
-% the stub file will be overwritten (you will have to give {\sc docstrip} 
-% permission to do this).
-%    \begin{macrocode}
-\begin{filecontents}{ltxdocext.sty}
-% Stub version of ltxdocext.sty
-\end{filecontents}
-\begin{filecontents}{acrofont.sty}
-% Stub version of acrofont.sty
-\end{filecontents}
+%<*driver>
 %    \end{macrocode}
 %
 % \subsection{The Preamble}
 % The programmers documentation is formatted
-% with the \classname{ltxdoc} class with local customizations,
+% with the \classname{ltxdoc} document class, with local customizations,
 % and with the usual code line indexing.
 %    \begin{macrocode}
 \documentclass[draft]{ltxdoc}
 \RequirePackage{ltxdocext}%
-\RequirePackage{acrofont}%
-\CodelineIndex\EnableCrossrefs
+\RequirePackage[colorlinks=true,linkcolor=blue]{hyperref}%
+\expandafter\ifx\csname package@font\endcsname\@undefined\else
+ \expandafter\RequirePackage\expandafter{\csname package@font\endcsname}%
+\fi
+\CodelineIndex\EnableCrossrefs % makeindex -s gind.ist ltxdocext
+\RecordChanges % makeindex -s gglo.ist -o ltxdocext.gls ltxdocext.glo
 %    \end{macrocode}
 %
 % \subsubsection{Docstrip and info directives}
@@ -201,78 +268,6 @@
 \expandafter\GetFileInfo\expandafter{\jobname.dtx}%
 %    \end{macrocode}
 %
-%
-% \subsection{The installer file}
-%
-% The installer \file{ltxdocext.ins} appears here.
-% If you have retrieved the standard distribution of this package,
-% the installer file is already on your filesystem.
-% If you are bootstrapping,
-% the first typesetting of the \file{.dtx} file
-% will cause the installer to be generated.
-%
-% The following modules are used to direct
-% {\sc docstrip} in generating the external files:
-% \begin{center}
-% \begin{tabular}{lll}
-%   \textbf{Module}&\textbf{File}&\textbf{Description}\\
-%   doc       &\file{ltxdocext.drv}&driver for programmer's documantation\\
-%   extensions&\file{ltxdocext.sty}&ltxdoc extensions package\\
-%   fonts     &\file{acrofont.sty} &package to use only Acrobat fonts
-% \end{tabular}
-% \end{center}
-%
-%    \begin{macrocode}
-\begin{filecontents}{ltxdocext.ins}
-%% This file will generate documentation and runtime files
-%% from ltxdocext.dtx when run through LaTeX or TeX.
-\input docstrip
-\preamble
-
-This is a generated file;
-altering it directly is inadvisable;
-instead, modify the original source file.
-See the URL in the file 00readme.txt.
-
-Copyright notice.
-
-   These files are distributed
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-\endpreamble
-\keepsilent
-  \generate{%
-   \file{ltxdocext.drv}{\from{ltxdocext.dtx}{doc}}%
-   \file{ltxdocext.sty}{\from{ltxdocext.dtx}{extensions}}%
-   \file{acrofont.sty}{\from{ltxdocext.dtx}{fonts}}%
-  }%
-\ifToplevel{
-\Msg{***********************************************************}
-\Msg{*}
-\Msg{* To finish the installation, please move}
-\Msg{*    ltxdocext.sty}
-\Msg{* into a directory searched by TeX.}
-\Msg{*}
-\Msg{* To produce the user documentation,
-       run ltxdocext.tex through LaTeX.}
-\Msg{*}
-\Msg{* To produce the programmer documentation,
-       run ltxdocext.dtx through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing}
-\Msg{***********************************************************}
-}
-\endbatchfile
-\end{filecontents}
-%    \end{macrocode}
-% Note that, because all of the files generated by the installer
-% are part of the standard distribution, it will
-% be necessary to run the installer only when bootstrapping
-% (or, of course, during development).
-% Note, too, that it is rare to generate the \file{doc}
-% module because it suffices to simply typeset the \file{.dtx} file itself.
-%
 % \subsection{The ``Read Me'' File}
 % As promised above, here is the contents of the
 % ``Read Me'' file. That file serves a double purpose,
@@ -297,29 +292,41 @@ Copyright notice.
 % begin the programmer's manual.
 %
 %    \begin{macrocode}
-\begin{filecontents*}{00readme.txt}
+\begin{filecontents*}{README}
 \title{%
  Extensions to the \classname{ltxdoc} class%
  \thanks{%
   This file has version number \fileversion,
   last revised \filedate.%
-  % For version number and date, search on "\fileversion" in the .dtx file,
-  % or see the end of the 00readme.txt file.
+ }%
+ \thanks{%
+  Version \fileversion\ \copyright\ 2008 The American Physical Society
  }%
 }%
-
 \author{%
-Arthur Ogawa (\texttt{mailto:ogawa@teleport.com}),
-\fileversion\\Copyright (C) 1999 Arthur Ogawa
+Arthur Ogawa%
+ \thanks{\texttt{mailto:arthur\_ogawa at sbcglobal.net}}%
 }%
+%\iffalse
+% For version number and date,
+% search on "\fileversion" in the .dtx file,
+% or see the end of the README file.
+%\fi
+
 \maketitle
 
 This file embodies the \classname{ltxdocext} package,
 the implementation and its user documentation.
 
 The distribution point for this work is
-\url{ftp://ftp.teleport.com/users/ogawa/macros/latex/contrib/supported/ltxdocext...},
-which contains fully unpacked, prebuilt runtime files and documentation.
+\url{publish.aps.org/revtex},
+which contains prebuilt runtime files, documentation, and full source, 
+ready to add to a TDS-compliant \TeX\ installation.
+
+The \classname{ltxdocext} package was commissioned by the American Physical Society
+and is distributed under the terms of the \LaTeX\ Project Public License,
+the same license under which all the portions of \LaTeX\ itself are distributed.
+Please see \url{http://ctan.tug.org/macros/latex/base/lppl.txt} for details.
 
 To use this document class, you must have a working
 \TeX\ installation equipped with \LaTeXe\ 
@@ -348,8 +355,8 @@ package and the \classname{acrofont} package.
 
 The package files \file{ltxdocext.sty} and \file{acrofont.sty}
 are generated from this file, \file{ltxdocext.dtx},
-via the {\sc docstrip} facility of \LaTeX
-via |tex ltxdocext.ins|.
+using the {\sc docstrip} facility of \LaTeX
+via |tex ltxdocext.dtx| (Note: do \emph{not} use \LaTeX\ for this step).
 The typeset documentation that you are now reading is generated from
 the same file by typesetting it with \LaTeX\ or pdftex
 via |latex ltxdocext.dtx| or |pdflatex ltxdocext.dtx|.
@@ -362,26 +369,41 @@ then carry out the following steps:
 \begin{enumerate}
 \item
 Within an otherwise empty directory,
-typeset \file{ltxdocext.dtx} with \LaTeX\ or pdflatex;
-you will obtain the typeset documentation you are now reading,
-along with
-the installer \file{ltxdocext.ins},
-and the file \file{00readme.txt}.
-\item
-Now typeset \file{ltxdocext.ins},
+typeset \file{ltxdocext.dtx} with \TeX\ or pdftex;
 thereby generating the package file \file{ltxdocext.sty},
 and the package file \file{acrofont.sty}.
 Make sure that {\sc docstrip} receives permission
 to overwrite existing versions of these packages.
 \item
-Install \classname{ltxdocext.sty} and \classname{acrofont.sty}
-by moving them to a location
-in your filesystem where they will be found by \LaTeX.
-\item
-Now complete the typesetting of the documentation by 
-retypesetting \file{ltxdocext.dtx}.
-Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
+Now
+typeset \file{ltxdocext.dtx} with \LaTeX\ or pdflatex;
+you will obtain the typeset documentation you are now reading,
+along with
+the file \file{README}.
+
+Note: you will have to run \LaTeX, then 
+\file{makeindex} \texttt{-s gind.ist ltxdocext.idx}, then
+\file{makeindex} \texttt{-s gglo.ist -o ltxdocext.gls ltxdocext.glo}, then
 \LaTeX\ again in order to obtain a valid index and table of contents.
+\item
+Install the following files into indicated locations within your 
+TDS-compliant \texttt{texmf} tree (you may need root access):
+\begin{itemize}
+\item
+\file{$TEXMF/}\file{tex/}\file{latex/}\file{revtex/}\classname{ltxdocext.sty} and
+\file{$TEXMF/}\file{tex/}\file{latex/}\file{revtex/}\classname{acrofont.sty}
+\item
+\file{$TEXMF/}\file{source/}\file{latex/}\file{revtex/}\classname{ltxdocext.dtx}
+\item
+\file{$TEXMF/}\file{doc/}\file{latex/}\file{revtex/}\classname{ltxdocext.pdf}
+\end{itemize}
+where \file{$TEXMF/} stands for \file{texmf-local/}, or some other \texttt{texmf} tree
+in your installation.
+\item
+Run \texttt{mktexlsr} on \file{$TEXMF/} (you may need root access).
+\item
+Build and installation are now complete; 
+now put a \cmd\usepackage\texttt{\{ltxutil\}} in your document preamble!
 \end{enumerate}
 \end{filecontents*}
 %    \end{macrocode}
@@ -394,12 +416,9 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 %    \begin{macrocode}
 \begin{document}%
 \expandafter\DocInput\expandafter{\jobname.dtx}%
-% ^^A\PrintChanges
+\PrintChanges
 \end{document}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-%</doc>
+%</driver>
 %    \end{macrocode}
 %
 % \section{Using the \classname{ltxdoc} and \classname{acrofont} packages}%
@@ -458,7 +477,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 %
 % \begin{unnumtable}
 % \begin{tabular}{ll}
-% meta-text         &\cmd\m\arg{text}\\
+% meta-text         &\cmd\marg\arg{text}\\
 % command           &\cmd\cmd\cmd\csname\\
 % environment name  &\cmd\env\arg{name}\\
 % \cmd\begin\verb`{foo}`&\cmd\envb\arg{foo}\\
@@ -535,18 +554,28 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 %\StopEventually{}
 %
 % \section{Extensions to the ltxdoc class}
-% The \file{extensions} {\sc docstrip} module comprises the 
+% The \file{package} {\sc docstrip} module comprises the 
 % package \classname{ltxdocext.sty}, which provides extensions
 % to the standard \LaTeX\ \classname{ltxdoc} class.
 %
-% \subsection{Beginning of the \file{extensions} {\sc docstrip} module}
+% \subsection{Beginning of the \file{package} {\sc docstrip} module}
+%  This portion of code is only present in the \LaTeX\ package (\texttt{.sty} file),
+% not in the kernel portion.
 %    \begin{macrocode}
-%<*extensions>
+%<*package>
 \def\class@name{ltxdocext}%
 \expandafter\PackageInfo\expandafter{\class@name}{%
  An extension to the \protect\LaTeXe\space ltxdoc class
- by A. Ogawa (ogawa@teleport.com)%
+ by A. Ogawa (arthur\_ogawa sbcglobal.net)%
 }%
+%</package>
+%    \end{macrocode}
+%
+% \subsection{Beginning of the \file{kernel} {\sc docstrip} module}
+%
+% The bulk of the code is the kernel portion; a brief tail of \file{package} code then follows.
+%    \begin{macrocode}
+%<*kernel>
 %    \end{macrocode}
 %
 % \subsection{Incorporate \classname{ltxguide.cls} extensions}
@@ -596,7 +625,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
   \catcode`\>=\active
   \gdef<{\@ifnextchar<\@lt\@meta}
   \gdef>{\@ifnextchar>\@gt\@gtr@err}
-  \gdef\@meta#1>{\m{#1}}
+  \gdef\@meta#1>{\marg{#1}}
   \gdef\@lt<{\char`\<}
   \gdef\@gt>{\char`\>}
 \endgroup
@@ -630,7 +659,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 %
 % Various forms of self-indexing commands:
 %    \begin{macrocode}
-\DeclareRobustCommand{\m}[1]{%
+\DeclareRobustCommand{\marg}[1]{%
  \meta{#1}%
  \index{#1=\string\meta{#1} placeholder}\index{placeholder>#1=\string\meta{#1}}%
 }%
@@ -652,7 +681,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
  \index{argument, optional>#1=\string\ttt{#1}}%
 }%
 \DeclareRobustCommand\cmd{\begingroup\makeatletter\@cmd}%
-\def\@cmd#1{%
+\long\def\@cmd#1{%
  \endgroup
  \cs{\expandafter\cmd@to@cs\string#1}%
  \expandafter\cmd@to@index\string#1\@nil
@@ -675,7 +704,8 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
  {\ttfamily\string\begin\string{}\env{#1}{\ttfamily\string}}%
 }%
 \DeclareRobustCommand\enve[1]{{\ttfamily\string\end\string{}\env{#1}{\ttfamily\string}}}%
-\DeclareRobustCommand*{\file}[1]{%
+\DeclareRobustCommand{\file}{\begingroup\@sanitize\@file}%
+\long\def\@file#1{\endgroup
  {\ttfamily#1}%
  \index{#1=\string\ttt{#1}}\index{file>#1=\string\ttt{#1}}%
 }%
@@ -723,9 +753,10 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
                 \columnsep 35\p@
 \def\see##1##2{\textit{See} ##1}%
 \def\seealso##1##2{\textit{See also} ##1}%
-\def\cmd##1{\cs{\expandafter\cmd@to@cs\string##1}}%
+\long\def\cmd##1{\cs{\expandafter\cmd@to@cs\string##1}}%
 \def\@url##1{\url@break\ttt{##1}\endgroup}%
-\def\ttt##1{{\ttfamily##1}}%
+\def\ttt{\begingroup\@sanitize\ttfamily\@ttt}%
+\def\@ttt##1{##1\endgroup}%
 \mathchardef\save@secnumdepth\c@secnumdepth
 \c@secnumdepth\m@ne
                 \twocolumn[\section{\indexname}]%
@@ -799,9 +830,9 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 %
 % Emulate \cmd\toprule\ and friends
 %    \begin{macrocode}
-\newcommand\toprule{\hline\hline}%
-\newcommand\colrule{\\\hline}%
-\newcommand\botrule{\\\hline\hline}%
+\providecommand\toprule{\hline\hline}%
+\providecommand\colrule{\\\hline}%
+\providecommand\botrule{\\\hline\hline}%
 %    \end{macrocode}
 %
 % Define sectioning command below \cmd\subsubsection.
@@ -860,7 +891,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 %
 % Direct \classname{ltxdoc} to produce an index.
 %    \begin{macrocode}
-\AtEndDocument{\PrintIndex}%
+\AtEndDocument{\PrintIndex\PrintChanges}%
 %    \end{macrocode}
 %
 % \subsection{Extension to \LaTeX's \env{filecontents} Environment}
@@ -901,10 +932,20 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 \setlength\arraycolsep{0pt}%
 %    \end{macrocode}
 %
-% \subsection{End of the \file{extensions} {\sc docstrip} module}
-% Here ends the module.
+% \subsection{End of the \file{kernel} {\sc docstrip} module}
+%
+%    \begin{macrocode}
+%</kernel>
+%    \end{macrocode}
+%
+% \subsection{Tail of the \file{package} {\sc docstrip} module}
+% Here is the remainder of the package code.
+%    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
+% Currently, there is little. 
 %    \begin{macrocode}
-%</extensions>
+%</package>
 %    \end{macrocode}
 %
 %
@@ -933,7 +974,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 \def\class@name{ltxdocext}%
 \expandafter\ClassInfo\expandafter{\class@name}{%
  Written for \protect\LaTeXe\space
- by A. Ogawa (ogawa@teleport.com)%
+ by A. Ogawa (arthur_ogawa at sbcglobal.net)%
 }%
 %    \end{macrocode}
 % \end{macro}
@@ -1085,8 +1126,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 % \begin{itemize}
 % \item
 % Each new macro definition or register assignment begins a new line.
-% Therefore, \cmd\def, \cmd\newcommand, and their ilk will start in column
-% 1.
+% Therefore, \cmd\def, \cmd\newcommand, and their ilk will start in column~1.
 % \item
 % Code is indented one space for each level of nesting within braces
 % \verb|{}|.
@@ -1108,11 +1148,19 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 % small monitors.
 % But \classname{ltxdoc} output looks better with the shorter lines, too.
 % \item
-% Extraneous whitespace is avoided by using the comment character |%|.
+% Extraneous whitespace in the replacement part of a macro definition 
+% is avoided by using the comment character |%|. 
 % In most cases, if falling at the end of a line of code,
 % a brace will be immediately followed by a comment character,
 % as will the macro parameter |#1| and any one-letter control sequence,
 % like |\\|.
+% \item
+% Extraneous whitespace in the package file is also avoided.
+% When \TeX\ reads in the .sty file, it will process \cmd\def s, and other commands,
+% but will not process blank spaces. 
+% This practice is simply a discipline. You don't need to do this.
+% But sometimes \TeX\ has to read in a file while it is in horizontal mode,
+% at which point this practice is essential.
 % \end{itemize}
 % These conventions taken together are illustrated by the following:
 % \begin{verbatim}
@@ -1172,7 +1220,7 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 % is very useful and produces code that executes nicely.
 % Using it also helps avoid your having to debug problems where
 % \cmd\if\dots\ and \cmd\fi\ are not properly balanced
-% (a nightmare in case you didn't already experience it).
+% (a nightmare, in case you have not already experienced it).
 %
 % \end{itemize}
 %
@@ -1200,9 +1248,9 @@ Note: you will have to run \LaTeX\ twice, then \file{makeindex}, then
 % I cannot help but notice that much of the code of \LaTeX\ itself fails
 % to comply with many of the coding recommendations of Team \LaTeX.
 %
-%
 % \Finale
-% %Here ends the programmer's documentation.
+% \iffalse Here ends the programmer's documentation.\fi
 % \endinput
 %
 \endinput
+%%EOF
-- 
cgit v1.2.3

