From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/xdoc/README | 67 + macros/latex/contrib/xdoc/docindex.dtx | 2100 +++++++++++++ macros/latex/contrib/xdoc/docindex.ins | 48 + macros/latex/contrib/xdoc/docindex.pdf | Bin 0 -> 284629 bytes macros/latex/contrib/xdoc/xdoc2.dtx | 5166 ++++++++++++++++++++++++++++++++ macros/latex/contrib/xdoc/xdoc2.ins | 37 + macros/latex/contrib/xdoc/xdoc2.pdf | Bin 0 -> 482233 bytes macros/latex/contrib/xdoc/xdocdemo.pdf | Bin 0 -> 181813 bytes macros/latex/contrib/xdoc/xdocdemo.tex | 2599 ++++++++++++++++ 9 files changed, 10017 insertions(+) create mode 100644 macros/latex/contrib/xdoc/README create mode 100644 macros/latex/contrib/xdoc/docindex.dtx create mode 100644 macros/latex/contrib/xdoc/docindex.ins create mode 100644 macros/latex/contrib/xdoc/docindex.pdf create mode 100644 macros/latex/contrib/xdoc/xdoc2.dtx create mode 100644 macros/latex/contrib/xdoc/xdoc2.ins create mode 100644 macros/latex/contrib/xdoc/xdoc2.pdf create mode 100644 macros/latex/contrib/xdoc/xdocdemo.pdf create mode 100644 macros/latex/contrib/xdoc/xdocdemo.tex (limited to 'macros/latex/contrib/xdoc') diff --git a/macros/latex/contrib/xdoc/README b/macros/latex/contrib/xdoc/README new file mode 100644 index 0000000000..58744d4985 --- /dev/null +++ b/macros/latex/contrib/xdoc/README @@ -0,0 +1,67 @@ +README for the xdoc and docindex packages. + +The standard LaTeX doc package is well-known to all LaTeX hackers. +Without its support for the .dtx-file style of literate programming, +the TeX world would probably be much more plagued by the horrors of +poorly commented and mysterious code than it is today. The past good +decade that doc has been with us has been -- good. But even the sun +has spots; doc is an old package and, as old code often tends to do, +it breaks if you try to bend it into doing something new. The xdoc +package is (or rather is meant to be) a rewrite from scratch +which both can take a lot more bending and is ready for LaTeX2e*. + +What exists so far is only xdoc2: the "second prototype" for the xdoc +package. xdoc2 is not a complete rewrite of doc, but rather an add-on +to doc which reimplements many of its mechanisms (more precisely those +mechanisms which I think should be possible to "bend" into doing new +things, but have found to be fixed to their present behaviour) and +provides a few new features of its own. Even though xdoc2 is a +prototype and some of the code in it is experimental, I consider it to +be safe enough to build productive applications on, as I intend to +keep xdoc2 available even after the final xdoc package is released. + +Among the features of xdoc2 are: + - new commands for describing things (cf. \DescribeMacro) and a + package/class writer's interface for defining new such commands. + - new environments for defining things in (cf. the macro + environment) and a package/class writer's interface for defining + new such environments. + - support for two-sided document designs. + - support for external cross-referencing. + - improved sorting of macros, with support for defining prefixes + that should be ignored when sorting. + - support for CVS-style version numbering. +The other new features are of little interest to the mere user, but +they may be ever so useful to those who are in the habit of hacking +doc. Here we have for example: + - basic commands implementing a robust "string" datatype. + - an abstract command interface for making index entries; + this would simplify supporting a different index sorting + program. + +Besides xdoc2, there are also the docindex/docidx2e packages. These +provide mechanisms for a more flexible formatting of the index and list of +changes than is possible with the mechanisms for this in the doc package. +In particular docindex/docidx2e provides for automatic collapsing of +trivial index levels, something which often happens in automatically +generated multilevel indices such as the list of changes. The reason there +are two packages is that docindex is a LaTeX2e* package, whereas docidx2e +is a "downgraded" variant which runs on a normal LaTeX2e installation. +Both do however follow the same internal logic. + + +The files in this directory are: + +README.txt - this file +docindex.dtx - the source for the docindex and docidx2e packages +docindex.ins - the docstrip installation script for the docindex and + docidx2e packages +xdoc2.dtx - the source for the xdoc2 package +xdoc2.ins - the docstrip installation script for the xdoc2 package +xdocdemo.tex - a document which demonstrates some of the features in + the xdoc2 package + +2003/07/06, +Lars Hellstr\"om + + diff --git a/macros/latex/contrib/xdoc/docindex.dtx b/macros/latex/contrib/xdoc/docindex.dtx new file mode 100644 index 0000000000..47139d32b1 --- /dev/null +++ b/macros/latex/contrib/xdoc/docindex.dtx @@ -0,0 +1,2100 @@ +% \CheckSum{893} +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\usepackage{xdoc2} + +\makeatletter +\NewMacroEnvironment{templatetype}{\XD@grab@harmless\relax}{1}% + {\MacroFont#1\ \normalfont type}% + {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} template type}}}% + {{#1}{\texttt{#1} template type}}% + {}% +\NewMacroEnvironment*{template}{% + \XD@grab@harmless\relax\XD@grab@harmless\relax +}{2}% + {\XDParToMargin{\MacroFont #1\textnormal{\slash}#2 \normalfont + template}}% + {\XDMainIndex{ + \LevelSorted{#1}{\texttt{#1} template type}% + \LevelSorted{#2}{\texttt{#2} template}% + }}% + {{#1/#2}{\texttt{#1}\slash\texttt{#2} template}}% + {\def\XD@template@sort{% + \LevelSorted{#1}{\texttt{#1} template type}% + \LevelSorted{#2}{\texttt{#2} template}% + }}% +\NewMacroEnvironment*{instance}{% + \XD@grab@harmless\relax\XD@grab@harmless\relax +}{2}% + {\XDParToMargin{\MacroFont #1\textnormal{\slash}#2 \normalfont + instance}}% + {\XDMainIndex{ + \LevelSorted{#1}{\texttt{#1} template type}% + \LevelSorted{#2}{\texttt{#2} instance}% + }}% + {{#1/#2}{\texttt{#1}\slash\texttt{#2} instance}}% + {}% +\NewMacroEnvironment*{collectioninstance}{% + \XD@grab@harmless\relax\XD@grab@harmless\relax\XD@grab@harmless\relax +}{3}% + {\XDParToMargin{\MacroFont #2\textnormal{\slash}#3 \normalfont + instance (\texttt{#1} collection)}}% + {\XDMainIndex{ + \LevelSorted{#2}{\texttt{#2} template type}% + \LevelSorted{#3}{\texttt{#3} instance}% + \LevelSorted{#1}{\texttt{#1} collection}% + }}% + {{#2/#3/#1}% + {\texttt{#2}\slash\texttt{#3} instance (\texttt{#1} collection)}}% + {}% +\@namedef{XD@harmless\string\break}{% + \toks@=\expandafter{\the\toks@ \protect\nolinebreak[3]}% + \XD@harmless@ +} +\newcommand\keyvalitem[2]{% + \item[#1 (#2)% + \IndexEntry{\XD@template@sort + \LevelSorted{#1}{\textit{#1} keyval (#2)}% + }{usage}{\thepage}% + ]% +} +\newcommand{\xrefoff}{\scan@allowedfalse} +\newcommand{\xrefon}{\scan@allowedtrue} +\makeatother + +\newenvironment{syntax}{% + \let\\=\break + \list{}{% + \setlength\topsep{\medskipamount}% + \setlength\partopsep{0pt}% + \setlength\itemsep{0pt plus 1pt}% + \setlength\parsep{\itemsep}% + \setlength\leftmargin{3em}% + \setlength\listparindent{1em}% + \setlength\itemindent{-2em}% + \setlength\labelwidth{0pt}% + \setlength\labelsep{0pt}% + \csname @endparpenalty\endcsname=500 + \def\makelabel##1{\mbox{\meta{##1}${}\longrightarrow{}$}}% + }% + \addtolength\rightskip{0pt plus 1fil}% + \linepenalty=300% +}{\endlist} +\newcommand\branch{\({}\mid{}\)\ignorespaces} + +\DeclareRobustCommand{\package}[1]{\textsf{#1}} +\DeclareRobustCommand{\program}[1]{\textsf{#1}} +\DeclareRobustCommand\LaTeXplus{\LaTeXe$*$} + +\DoNotIndex{\addvspace,\@backslashchar,\begin,\begingroup,\bgroup} +\DoNotIndex{\csname,\DeclareInstance,\DeclareOption} +\DoNotIndex{\DeclareTemplate,\DeclareTemplateType,\def} +\DoNotIndex{\DoParameterAssignments,\edef,\egroup,\@eha} +\DoNotIndex{\@empty,\end,\endcsname,\endgroup,\endinput,\expandafter} +\DoNotIndex{\@firstofone,\@firstoftwo,\global,\@gobble,\hb@xt@,\hfil} +\DoNotIndex{\hsize,\hspace,\IfNoValueTF,\@ifpackageloaded} +\DoNotIndex{\@ifpackagewith,\@ifundefined,\ignorespaces,\@input@} +\DoNotIndex{\jobname,\leftskip,\let,\MessageBreak,\@namedef,\@ne} +\DoNotIndex{\NeedsTeXFormat,\newcommand,\nobreak,\@nobreakfalse} +\DoNotIndex{\nopagebreak,\normalsize,\NoValue,\number,\outer} +\DoNotIndex{\p@,\PackageError,\PackageInfo,\PackageWarningNoLine} +\DoNotIndex{\pagestyle,\par,\parfillskip,\parindent,\parskip} +\DoNotIndex{\@plus,\ProcessOptions,\protect,\protected@edef} +\DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand} +\DoNotIndex{\RequirePackage,\rightskip,\romannumeral,\@secondoftwo} +\DoNotIndex{\small,\space,\textbf,\thispagestyle,\thr@@,\tw@} +\DoNotIndex{\vadjust,\vspace,\z@,\z@skip} +\DoNotIndex{\iffalse,\ifnum,\ifx,\else,\fi} % \fi \fi +\DoNotIndexBy{@} +\DoNotIndexBy{DI@} + +\CodelineIndex +\EnableCrossrefs +\RecordChanges +\setcounter{IndexColumns}{2} +\setcounter{StandardModuleDepth}{2} + + +\begin{document} +\DocInput{docindex.dtx} +\PrintChanges +\PrintIndex +\end{document} +% +% \fi +% +% \title{The \package{docindex} package} +% \author{Lars Hellstr\"om} +% \date{8 July 2003} +% \maketitle +% +% \begin{abstract} +% The \package{docindex} package implements template-based formatting +% of indices and lists of changes\slash glossaries. In addition to this, +% the control structures employed also provide for a couple of new +% features, such as automatic collapsing of trivial index levels. +% \end{abstract} +% +% \tableofcontents +% +% +% \section{Introduction} +% +% In automatically generated indices with multi-level entries, such as the +% list of changes of a \package{doc} document, it often happens that some +% entries are uniquely identified by their primary level sort keys, +% although there are sort keys and text for additional levels. If then +% the formatting is designed for entries that are uniquely identified +% only when their secondary or tertiary sort keys are considered, one +% ends up with a couple of entries that look rather peculiar (building +% a tree which never branches) and usually take up much more space than +% they need to. The remedy for this is of course to make the formatting +% smart enough to recognise this situation when it occurs and flexible +% enough to format the text is a more suitable manner. +% +% An example of this is that if a document contains the index +% entries\footnote{I'm using the default \program{makeindex} +% metacharacters in these examples, but the style file provided for +% this package actually uses the same metacharacters as those style files +% provided by the \package{doc} package---hence the `\package{doc}' +% in `\package{docindex}'. } +% \begin{quote} +% |\index{Bernoulli!Jacob}\index{Bernoulli!Johann}| +% \end{quote} +% then it is probably reasonable to format this as +% \begin{quote} +% Bernoulli,\\ +% \vadjust{}\quad Jacob\\ +% \vadjust{}\quad Johann +% \end{quote} +% but if the index entries instead were +% \begin{quote} +% |\index{Jacobi!Carl}\index{Bernoulli!Jacob}| +% \end{quote} +% then it is probably better to format this as +% \begin{quote} +% Bernoulli, Jacob\\ +% Jacobi, Carl +% \end{quote} +% than as +% \begin{quote} +% Bernoulli,\\ +% \vadjust{}\quad Jacob\\ +% Jacobi,\\ +% \vadjust{}\quad Carl +% \end{quote} +% +% The \program{makeindex} program has some features in this direction, +% but they only allow dependence on the previous item in the index, not +% the next item, which is what you need to know when deciding whether +% `Jacob' should go on the same line as `Bernoulli'. Therefore +% \package{docindex} pretty much ignores these features in +% \program{makeindex} and instead sees to that each command that is to +% typeset an index item knows what kind of items were before and after it. +% +% Another reason for writing this package was to try out the template +% mechanisms as provided by the \LaTeXplus\ \package{template} +% package.\footnote{\LaTeXplus\ is the name of the \LaTeX\ version after +% \LaTeXe. Rather than being a completely different kernel\slash format, +% \LaTeXplus\ is (will be) implemented as a collection of \LaTeXe\ +% packages which replace parts of the kernel. More information and +% package code can be found on the \LaTeX-project website~^^A +% \cite{LaTeX-project}.} My impression is that this experiment turned +% out strikingly well. I have always found the more layout-oriented +% aspects of \TeX\ programming a bit cumbersome, but the separation of +% layout details from control structures that becomes natural when +% employing template mechanisms seems to have made it much easier. I'm +% not sure why this is so, but it could be as simple as that the layout +% settings are no longer diluted in the control structures. In any +% case, I would recommend people creating new \LaTeXe\ packages to +% employ template mechanisms in at least the initial development +% versions of the package, for the following reasons: (i) it reduces the +% work of updating the package for \LaTeXplus, (ii) it furthers the +% development of \LaTeXplus, and (iii) it might actually become a +% better package. +% +% A third reason for writing the \package{docindex} package was to get +% the \LaTeX\ document ``back in control'' of how the index is formatted. +% Certainly it is the document which has the final say about what +% the command in the \texttt{.ind} file actually do, but the traditional +% \program{makeindex} style files that are used place severe restrictions +% on the formatting of the index simply because they control where the +% commands are put. \package{docindex} tries to reduce these +% restrictions by making all texts in the index arguments of commands. +% Certainly there is a lot more that could be done in this direction---in +% particular, the (page) numbers in the index could be coded as a +% |\do|-type list rather than as an explicitly comma-separated list as is +% done now---but what is in \package{docindex} at the moment seems to +% satisfy all my current needs. +% +% +% \section{Usage} +% +% \subsection{Straightforward usage} +% +% To make use of the \package{docindex} package in formatting the index +% and list of changes of a \package{doc}-type \LaTeX\ document, you must +% do the following: +% \begin{enumerate} +% \item Load the \package{docindex} package (or probably +% rather the \package{docidx2e} package---see below). +% \item Make sure that the index entries does not use any commands, +% such as |\verb|, that rely on changing catcodes or otherwise +% need to be executed before the entire entry text has been +% tokenized. +% \item Generate the \texttt{.ind} and \texttt{.gls} files using +% \texttt{docindex.ist} as style file for \program{make\-index}. +% \end{enumerate} +% (Item~2 may seem like a monumental task if one considers what the +% indices of \package{doc} documents traditionally looks like---there's +% a |\verb| for every macro name in the index---but it is really not +% that bad. \package{docindex} loads the \package{xdoc} package~^^A +% \cite{xdoc} which redefines \texttt{macro}, the cross-referencing +% mechanism, etc.\ so that the index entries generated by these no +% longer uses |\verb|. What is left for you to deal with are merely +% the possible uses of |\verb| in explicit |\index| or |\SortIndex| +% commands.) +% +% What advantages are there then for the normal user in having +% \package{docindex} formatting the index and list of changes, as +% opposed to using the default mechanisms in the \package{doc} package? +% I can only think of two: the index or list of changes may be typeset in +% a single column and the same \program{makeindex} style file can be +% used for both index and list of changes. Neither advantage is +% significant. Instead the advantage of \package{docindex} lies in that +% it becomes much simpler to change the formatting, which is rather an +% advantage for advanced users which have special needs, and +% in particular one can do this without having to supply e.g.\ extra +% \program{makeindex} style files. +% +% Another important point is that what you will want to use is probably +% not the \LaTeXplus\ \package{docindex} package, but the ``downgraded'' +% \LaTeXe\ version \package{docidx2e}, as the former uses the +% \package{galley2} package which currently wrecks pretty much all +% justification in all existing document classes. \package{docidx2e} +% provides the same features as \package{docindex}, but configuring it +% is somewhat more cumbersome since \package{template} won't do most of +% the coding for you. It is however rather straightforward to convert +% a definition using the \package{docindex} package to something which +% achieves the same results with the \package{docidx2e} package. +% +% +% \subsection{Multiple indices} +% +% The \package{docindex} package makes it comparatively simple to +% include several indices in the same document: all one has to do is +% use an instance or template of type \texttt{docindex} for each index +% one wishes to typeset. The syntax for using such an instance is +% \begin{quote} +% |\UseInstance{docindex}|\marg{instance}\marg{prologue}^^A +% \marg{epilogue} +% \end{quote} +% The \meta{prologue} and \meta{epilogue} are texts which will be +% printed just before and after the index, respectively, and either may +% be empty. The text for the index itself is read from another file, +% the name and extentsion of which are specified by the instance. The +% \texttt{std} template prints the \meta{prologue} and \meta{epilogue} +% in one-column mode, whereas the index itself can be printed in one- or +% multicolumn mode (the default is three columns). +% +% The \package{doc} commands |\PrintIndex| and |\PrintGlossary| are +% redefined to be +% \begin{quote} +% |\UseInstance{docindex}{index}{\index@prologue}{}| +% \end{quote} +% and +% \begin{quote} +% |\UseInstance{docindex}{changes}{\glossary@prologue}{}| +% \end{quote} +% respectively. The \texttt{index} and \texttt{changes} instances of +% type \texttt{docindex} give the same formatting as the \package{doc} +% defaults. (The \package{docidx2e} definitions even use the +% \package{doc} package parameters where applicable, but in +% \package{docindex} it is much simpler to redefine the instance from +% scratch.) +% +% The format of the sorted index files (\texttt{.ind}, \texttt{.gls}, +% etc.) that a \texttt{docindex} instance inputs is rather complicated +% and I would suggest that the generation of these files is left to the +% \program{makeindex} program, but the complete syntax is described in +% Subsection~\ref{Ssec:ist}. The syntax of the unsorted index files +% (\texttt{.idx}, \texttt{.glo}, etc.) is simpler; there are only a few +% things that are different from the index files of the \package{doc} +% package. +% +% The foremost difference is that the index entries should begin not +% with |\indexentry| or |\glossaryentry|, but with |\docindexentry|. The +% \package{xdoc} package provides hooks with which one can change these +% texts in entries generated using the |\index| and |\glossary| commands +% (as well as higher-level commands built on these, such as the +% |\SortIndex| and |\changes| commands) and \package{docindex} will use +% these hooks unless it gets passed the \describeoption{oldkeywords} +% \texttt{oldkeywords} option. If you are creating a third unsorted +% index file then you will have to make sure that the command for writing +% to that file uses |\docindexentry| in the right place. +% +% The other difference concerns the composite page numbers. The string +% which separates the parts of a composite page number is not a +% hyphen `|-|', but the string `|\+|'. (The |\+| command is locally +% defined for the typesetting of each index by the \texttt{docindex} +% template being used, and the default is to typeset a hyphen.) Again +% the \package{xdoc} package provides a hook for this, and this hook is +% used by \package{docindex} unless it gets passed the +% \texttt{oldkeywords} option. +% +% It also deserves to be listed which the metacharacters are that are +% the same as in \package{doc} indices. The level separator is `|>|', +% the sort~key\slash item~text separator is `|=|', and the quote +% character is `|!|'. All other \program{makeindex} metacharacter +% parameters have their default values. +% +% +% +% \subsection{Configuration} +% +% Configuration of the layout provided by the \package{docindex} +% package is primarily done by redefining the \texttt{index} and +% \texttt{changes} instances of type \texttt{docindex}, since these are +% the instances that are used by the |\PrintIndex| and |\PrintChanges| +% commands. +% +% The index in the \texttt{source2e.tex} file (the main driver for the +% \LaTeXe\ source) differs from the default in three respects: it is set +% in two columns rather than three, there is no seperator character +% between the parts of a composite page number, and the pagestyle is set +% to \texttt{docindex} during the index. This is set up by the +% redefinition +%\begin{verbatim} +%\DeclareInstance{docindex}{index}{std}{ +% columns=2, page-compositor={}, pagestyle=docindex +%} +%\end{verbatim} +% (There are however also some changes of parameters related to +% linebreaking; more on that in connection to configuration of the +% \texttt{changes} instance below.) +% +% Another kind of modification can be found in the \package{tclldoc} +% package~\cite{tclldoc}. Here the primary level in the index is used for +% names of procedures and variables, whereas the secondary level for the +% namespace of the same (the same name may have different definitions +% in different namespaces). If there is only one namespace for a given +% name then it is probably overkill to format them as two different +% index items, but better to join them. This can be achieved through +% the redefinition +%\begin{verbatim} +%\DeclareInstance{docindex}{index}{std}{% +% item1=fixed-r1a, item2=aloneaccept2 +%}% +%\end{verbatim} +% An item handled by the \texttt{fixed-r1a} instance (of type +% \texttt{indexitem}) always tries to join with the following item but +% rejects to join with the preceeding one. An item handled by the +% \texttt{aloneaccept2} instance accepts to join with the preceeding +% item if neither that nor the following item is a secondary level item. +% Thus an item for a name will join with the following item for a +% namespace if there is only one such item. As the reader no doubt +% realises, this also solves the problem with the Bernoullis that was +% described in the introduction. +% +% \pagebreak[1] +% +% As for configuring the list of changes formatting, it is instructive +% to start by considering its default definition: +%\begin{verbatim} +%\DeclareInstance{docindex}{changes}{std}{ +% file-extension = gls, +% item2 = fixed-r2a-nocomma, +% item3 = fixed-a3r, +% columns = 2, +% letter-format = , +% letter-skip = 0pt +%} +%\end{verbatim} +% In the list of changes a secondary level item (which contains the name +% of the macro or whatever which was changed) is joined with the +% following tertiary level item (which details the change that was made). +% There are two columns and letter groups are not given any special +% formatting. +% +% The definition of \texttt{changes} that would be used for +% \texttt{source2e.tex} differs from the above in only one keyval, +% namely \textit{body-setup}, but that contains quite a lot of material. +% To begin with there is the default |\small| which selects the font. +% Then there is a |\makeatletter| which is needed because some |\changes| +% entries in the \LaTeX\ sources include commands (e.g.~|\TeX|) that +% (when written to file) expand to other commands whose names include the +% |@| character. If these are to be tokenized correctly, |@| must be a +% letter when the \texttt{.gls} file is being inputted. Last, but not +% least, there is a modification of the linebreaking parameters: +%\begin{verbatim} +%\UseTemplate{linebreak}{TeX}{ +%\end{verbatim} +% The file \texttt{source2e.tex} explicitly sets \textit{hbadness} and +% \textit{hfuzz} to make \TeX\ shut up about over- and underfull hboxes. +%\begin{verbatim} +% hbadness=10000, hfuzz=\maxdimen, +%\end{verbatim} +% In addition to this, there are a couple of parameters that are set by +% the \texttt{multicols} environment to values quite different from the +% defaults of the \texttt{TeX} template and thus must be set too. Here +% they are shown with their default values. The value of +% \textit{emergency\-stretch} could probably be increased. +%\begin{verbatim} +% pretolerance=-1, tolerance=9999, emergencystretch=8pt +%} +%\end{verbatim} +% Summing that up, we arrive at the following definition of the +% \texttt{changes} instance for \texttt{source2e.tex}. +%\begin{verbatim} +%\DeclareInstance{docindex}{changes}{std}{ +% file-extension = gls, +% item2 = fixed-r2a-nocomma, +% item3 = fixed-a3r, +% columns = 2, +% letter-format = , +% letter-skip = 0pt, +% body-setup = \small\makeatletter +% \UseTemplate{linebreak}{TeX}{ +% hbadness=10000, hfuzz=\maxdimen, +% pretolerance=-1, tolerance=9999, emergencystretch=8pt +% } +%} +%\end{verbatim} +% +% Another example can be found in the \package{fisource} +% package\footnote{It should probably rather be made a document class, +% but I haven't found it that necessary to change that aspect of it.}^^A +% ~(v\,2.10 or later), which sets up formatting for the \program{fontinst} +% source. There the list of changes should be set in one column, with +% items from the tertiary level being joined with their parent +% secondary level items iff the tertiary item is the only one having +% that particular parent item. This is achieved through the definition +%\begin{verbatim} +%\DeclareInstance{docindex}{changes}{std}{% +% file-extension = gls, +% item2 = fixed-r2a-nocomma, +% item3 = aloneaccept3, +% columns = 1, +% letter-format = {}, +% letter-skip = 0pt +% } +%\end{verbatim} +% where the difference to the default definition is in the values for +% the \textit{item3} and \textit{columns} keys. +% +% For details on what they various keys mean, see the declaration of +% the \texttt{std} template of type \texttt{docindex} on +% page~\pageref{docindex:std}. +% +% With the \package{docidx2e} package, configuration follows the same +% logic, even though it is much more technical as one has to define +% the instances without the help of a template. The default instance +% definitions for the \package{docidx2e} package are the +% \begin{quote} +% |\@namedef{TP@I{}{docindex}{index}}#1#2{|\dots|}|\\ +% |\@namedef{TP@I{}{docindex}{changes}}#1#2{|\dots|}| +% \end{quote} +% that begin on pages~\pageref{p:index-instance} +% and~\pageref{p:changes-instance} respectively. +% +% +% +% +% +% \StopEventually{ +% % \begin{thebibliography}{9} +% \bibitem{xindex} +% Achim Blumensath: \textit{The \package{xindex} package}; +% \textsc{http:}/\slash +% \texttt{www-mgi.\nolinebreak[3]informatik.\nolinebreak[3]^^A +% rwth-aachen.de}\slash \texttt{\textasciitilde blume}/. +% \bibitem{makeindex-paper} +% Pehong Chen, Michael A. Harrison: +% \textit{Index Preparation and Processing}, +% Software: practice \& experience, vol. \textbf{19}, no. 9 (1988), +% 897--915; +% Computer Science Tech. Report 87/347, University of California, +% Berkeley, March 1987; +% \textsc{ctan:}\discretionary{}{}{\thinspace}\texttt{indexing}^^A +% \slash\texttt{makeindex}\slash\texttt{paper}\slash +% \texttt{ind.tex}. +% \bibitem{tclldoc} +% Lars Hellstr\"om: +% \textit{The \package{tclldoc} package and class}, +% v\,2.20 or newer; +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{contrib}\slash +% \texttt{tclldoc}\slash \texttt{tclldoc.dtx}. +% Note: At the time of writing, this has not yet been uploaded +% to CTAN. +% \bibitem{xdoc} +% Lars Hellstr\"om: +% \textit{The \package{xdoc} package --- experimental +% reimplementations of features from \package{doc}, +% second~prototype}, 2000--2003; +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{contrib}\slash \texttt{xdoc}\slash +% \texttt{xdoc2.dtx}. +% \bibitem{xindy} +% Roger Kehr: +% \textit{\program{xindy} --- A Flexible Indexing System}; +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{indexing}^^A +% \slash\texttt{xindy}/. +% \bibitem{LaTeX-project} +% The \LaTeX3 Project: \textit{The \LaTeX\ Project Home Page}; +% \textsc{http:}/\slash\texttt{www.latex-project.org}/. +% \bibitem{multicol} +% Frank Mittelbach: \textit{An environment for multicolumn output}; +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{required}\slash \texttt{tools}\slash +% \texttt{multicol.dtx}. +% \bibitem{doc} +% Frank Mittelbach, B.~Hamilton Kelly, Andrew Mills, Dave Love, and +% Joachim \mbox{Schrod}: \textit{The \package{doc} and +% \package{shortvrb} Packages}, The \LaTeX3 Project; ^^A , 1993~ff. +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{base}\slash \texttt{doc.dtx}. +% \end{thebibliography} +% } +% +% +% +% +% \section{Implementation} +% +% \subsection{\package{docstrip} modules} +% +% This file contains a number of \package{docstrip} module directives, +% and many of these guard code that is not going to be used. In part +% this mirrors the development of the code (and may get cleared up +% eventually), but most of this duplication has to do with making the +% code work in many different set-ups (some of which involve other +% packages whose interface is rapidly changing). +% +% The modules which control \LaTeX\ code are: +% \begin{description} +% \item[\textsf{pkg}] +% Main guard for code that is to end up in some \LaTeX\ package. +% \item[\textsf{template}] +% Guard for code which uses features of the \package{template} +% package. This code will end up in the \package{docindex} package, +% whereas the equivalent code which avoids using templates ends up +% in the \package{docidx2e} package. +% \item[\textsf{default}] +% This code protects the default values for template keys. The +% syntax for this is changing, so the default values are currently +% being assigned in the template bodies instead. +% \end{description} +% +% The modules which control \program{makeindex} style files are: +% \begin{description} +% \item[\textsf{ist}] +% Code for the main style file \texttt{docindex.ist}. +% \item[\textsf{idx}] +% Code for a style file which is like the main one, but the input +% parameters are set to the same values as in the standard \LaTeX\ +% \texttt{gind.ist}. +% \item[\textsf{glo}] +% Code for a style file which is like the main one, but the input +% parameters are set to the same values as in the standard \LaTeX\ +% \texttt{gglo.ist}. +% \end{description} +% +% +% \subsection{Initial stuff} +% +% \begin{macrocode} +%<*pkg> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage +% +% \end{macrocode} +% \label{p:changes-instance} +% \begin{macrocode} +%<*!template> +\@namedef{TP@I{}{docindex}{changes}}#1#2{% + \begingroup + \@letinstance\DI@indexitem@i{indexitem}{fixed1}% + \@letinstance\DI@indexitem@ii{indexitem}{fixed-r2a-nocomma}% + \@letinstance\DI@indexitem@iii{indexitem}{fixed-a3r}% + \columnsep=10pt% + \parskip=0pt plus 1pt% + \def\DI@letter@skip{\z@skip}% + \let\DI@letter@format\@gobble + \def\+{-}% + \IfFileExists{\jobname.gls}{% + \ifnum \c@GlossaryColumns>\@ne + \begin{multicols}{\c@GlossaryColumns}[#1][\GlossaryMin]% + \else + \enough@room{\GlossaryMin}% + #1\par + \addvspace\multicolsep + \fi + \small + \makeatletter + \@nobreakfalse + \DI@ind@setup + \input{\jobname.gls}% + \DI@item@nojoin + \ifnum \c@GlossaryColumns>\@ne + \end{multicols}% + \else + \enough@room\postmulticols + \addvspace\multicolsep + \fi + \normalsize #2\par + }{\typeout{No file \jobname.gls.}} + \endgroup +} +% +% \end{macrocode} +% \end{instance} +% +% \begin{macro}{\PrintIndex} +% \begin{macro}{\PrintChanges} +% The |\PrintIndex| and |\PrintChanges| commands are redefined to use +% the respective instances of template type \texttt{docindex}. +% \begin{macrocode} +\renewcommand\PrintIndex{% + \UseInstance{docindex}{index}{\index@prologue}{}% + \global\let\PrintIndex\@empty +} +\renewcommand\PrintChanges{% + \UseInstance{docindex}{changes}{\glossary@prologue}{}% + \global\let\PrintChanges\@empty +} +% +% \end{macrocode} +% \end{macro}\end{macro} +% +% +% \section{Notes and acknowledgements} +% +% The exact descriptions of the parameters of the \program{makeindex} +% program is the paper \cite{makeindex-paper} by Chen and Harrison, but +% I have seen claims that there are parameters not listed there +% (presumably becuase they were added after this paper was written). +% \texttt{docindex.ist} does not change any such undocumented +% parameter, however. +% +% There are other index sorting programs than \package{makeindex} +% around, such as for example \program{x\r{\i}ndy}~\cite{xindy}. +% Should someone create index style files for such systems that are +% equivalent (or superior, for that matter) to \texttt{docindex.ist} +% then I would be happy to add them to the \package{docindex} +% distribution. +% +% Most of the actual layout parameter settings used by the +% \package{docindex} package are not of my design, but copied from +% various other \LaTeX\ packages such as~\cite{multicol,doc} (mainly by +% Frank Mittelbach). I have however tried to sort out which parameters +% are actually in force under the various conditions---something which +% turned out to be less obvious than I originally suspected. +% +% The idea to have the \texttt{docindex} type templates input the sorted +% index file (rather than simply setting up the formatting of it as was +% the case in v\,0.03) was taken from the \package{xindex} +% package~\cite{xindex} by Achim Blumensath. +% +% \hbadness=10000 +% +% \Finale +% +% +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/xdoc/docindex.ins b/macros/latex/contrib/xdoc/docindex.ins new file mode 100644 index 0000000000..d5d85cc6c3 --- /dev/null +++ b/macros/latex/contrib/xdoc/docindex.ins @@ -0,0 +1,48 @@ +% This file is the docstrip installation script for the docindex package. +% +% It may be distributed under the conditions of the LaTeX +% Project Public License, either version 1.2 of this license or +% (at your option) any later version. The latest version of this +% license is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% Copyright 2001 Lars Hellstr\"om + +\input docstrip + +\keepsilent + +\preamble + +This file may be distributed and/or modified under the conditions +of the LaTeX Project Public License, either version 1.2 of this +license or (at your option) any later version. The latest version +of this license is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions of LaTeX +version 1999/12/01 or later. + +This file may only be distributed together with a copy of the source +file from which it was generated. You may distribute that source file +without this generated file. + +\endpreamble + +\declarepostamble\noendinput +\endpostamble + +\generate{% + \usedir{tex/latex/misc} + \file{docindex.sty}{\from{docindex.dtx}{pkg,template}}% + \file{docidx2e.sty}{\from{docindex.dtx}{pkg}}% + \usepostamble\noendinput + \usedir{makeindex/latex} + \file{docindex.ist}{\from{docindex.dtx}{ist}}% +% \file{ngind.ist}{\from{docindex.dtx}{idx}}% +% \file{ngglo.ist}{\from{docindex.dtx}{glo}}% +} + +\endbatchfile +\end diff --git a/macros/latex/contrib/xdoc/docindex.pdf b/macros/latex/contrib/xdoc/docindex.pdf new file mode 100644 index 0000000000..0c3c937956 Binary files /dev/null and b/macros/latex/contrib/xdoc/docindex.pdf differ diff --git a/macros/latex/contrib/xdoc/xdoc2.dtx b/macros/latex/contrib/xdoc/xdoc2.dtx new file mode 100644 index 0000000000..c0d4a22d3d --- /dev/null +++ b/macros/latex/contrib/xdoc/xdoc2.dtx @@ -0,0 +1,5166 @@ +% \CheckSum{2952} +% +% \iffalse meta-comment +% +% This file may be distributed and/or modified under the conditions +% of the LaTeX Project Public License, either version 1.2 of this +% license or (at your option) any later version. The latest version +% of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% Copyright 2000 2001 2002 Lars Hellstr\"om +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{array,longtable} + +\makeatletter +\IfFileExists{xdoc2.sty}{% + \usepackage[dolayout]{xdoc2} + \NewMacroEnvironment{xrefcmd}{\XD@grab@harmless\relax}{1}% + {\MacroFont##1 \normalfont XXR-command}% + {\XDMainIndex{% + \levelsorted{##1 (XXR-command)}{\texttt{##1} (XXR-command)}% + }% + \XDMainIndex{% + \levelsame{XXR-commands:}\levelsorted{##1}{\texttt{##1}}% + }}% + {{##1}{XXR-command \texttt{##1}}}% + {}% + \@namedef{XD@harmless\string\Bslash}{% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@92\endcsname}% + \XD@harmless@ + }% + \IfFileExists{docidx2e.sty}{% + \usepackage{docidx2e}% + \AtEndDocument{% + \typeout{*********************************}% + \typeout{* Use docindex.ist when sorting *}% + \typeout{* xdoc2.idx and xdoc2.glo. \@spaces\space*}% + \typeout{*********************************}% + }% + }% +}{% + \newenvironment{option}[1]{\trivlist\item[]}{\endtrivlist}% + \newenvironment{xrefcmd}[1]{\trivlist\item[]}{\endtrivlist}% + \@ifpackagelater{doc}{2000/05/20}{}{% + \let\XD@fragile@meta=\meta + \def\meta{% + \ifx \protect\@typeset@protect + \expandafter\futurelet \expandafter\@let@token + \expandafter\XD@fragile@meta + \else + \noexpand\meta + \fi + }% + }% +} +\makeatother + +\providecommand\describecsfamily[1]{% + \leavevmode + \GenericDescribePrint{\MacroFont\Bslash#1}% + \ignorespaces +} +\providecommand\describeoption[1]{% + \leavevmode + \GenericDescribePrint{\MacroFont#1 \normalfont option}% + \ignorespaces +} +\providecommand\GenericDescribePrint[1]{% + \marginpar{\raggedleft\strut #1}% +} +\providecommand\Bslash{\bslash} +\providecommand\DoNotIndexBy[1]{} +\DoNotIndexBy{@} +\DoNotIndexBy{@@} +\DoNotIndexBy{XD@} + +\DeclareRobustCommand\package[1]{\textsf{#1}} +\DeclareRobustCommand\LaTeXplus{\LaTeXe$*$} +\newcommand\B{\penalty\exhyphenpenalty} +\ProvideTextCommandDefault\textminus{\textendash} + +\hfuzz=15pt + +\AlsoImplementation +\setcounter{IndexColumns}{2} + +\CodelineIndex +\EnableCrossrefs +\RecordChanges + +\begin{document} + +\DocInput{xdoc2.dtx} + +\PrintChanges +\PrintIndex + +\end{document} +% +% \fi +% +% \title{The \package{xdoc} package --- experimental reimplementations +% of features from \package{doc}, second~prototype} +% \author{Lars Hellstr\"om^^A +% \thanks{E-mail: \texttt{Lars.Hellstrom@math.umu.se}}} +% \date{2003/07/07} +% \maketitle +% +% \DoNotIndex{\,,\-,\/,\ ,\#,\%,\&,\\,\^,\|} +% \DoNotIndex{\@addtoreset,\@auxout,\@bsphack,\@cclv,\@ctrerr} +% \DoNotIndex{\@eha,\@empty,\@esphack,\@evenfoot} +% \DoNotIndex{\@firstofone,\@firstoftwo,\@for} +% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo} +% \DoNotIndex{\@ifclassloaded,\@ifdefinable,\@ifpackagewith,\@ifundefined} +% \DoNotIndex{\@input,\@latexerr,\@mainaux,\@mparswitchtrue} +% \DoNotIndex{\@namedef,\@nameuse,\@ne,\@next,\@nil,\@oddfoot,\@partaux} +% \DoNotIndex{\@partlist,\@secondoftwo,\@sptoken} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@totalleftmargin} +% \DoNotIndex{\@typeset@protect,\@unexpandable@protect} +% \DoNotIndex{\@vobeyspaces,\@writeckpt,\@xxxii} +% \DoNotIndex{\active,\addto@hook,\addtolength,\advance,\AtBeginDocument} +% \DoNotIndex{\baselineskip,\begingroup,\bgroup,\box,\boxmaxdepth} +% \DoNotIndex{\catcode,\char,\clearpage,\closeout,\color@begingroup} +% \DoNotIndex{\color@endgroup,\copy,\csname} +% \DoNotIndex{\deadcycles,\DeclareOption,\DeclareRobustCommand,\def} +% \DoNotIndex{\discretionary,\divide,\do@space,\dp} +% \DoNotIndex{\edef,\egroup,\else,\em,\endcsname,\endgroup,\ensuremath} +% \DoNotIndex{\escapechar,\everypar,\expandafter} +% \DoNotIndex{\fi,\font,\footnotesize,\frenchspacing,\futurelet} +% \DoNotIndex{\g@addto@macro,\gdef,\global} +% \DoNotIndex{\hb@xt@,\hbox,\hfill,\hss,\ht,\hyphenchar} +% \DoNotIndex{\if,\if@filesw,\if@inlabel,\if@mparswitch,\if@partsw} +% \DoNotIndex{\if@reversemargin,\if@tempswa,\ifcase,\ifcat,\iffalse} +% \DoNotIndex{\ifmmode,\ifnum,\ifodd,\iftrue,\ifx,\ignorespaces} +% \DoNotIndex{\immediate,\include,\indexentry,\input,\inputlineno,\item} +% \DoNotIndex{\itshape,\kern} +% \DoNotIndex{\labelsep,\langle,\language,\leavevmode,\let,\long,\loop} +% \DoNotIndex{\m@ne,\m@ta,\makelabel,\marginpar,\marginparsep,\maxdimen} +% \DoNotIndex{\MessageBreak,\multiply} +% \DoNotIndex{\NeedsTeXFormat,\newcommand,\newdimen,\newlanguage} +% \DoNotIndex{\nfss@text,\noexpand,\normalfont,\normalmarginpar,\number} +% \DoNotIndex{\obeyspaces,\openout,\or} +% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning} +% \DoNotIndex{\PackageWarningNoLine,\pagestyle,\paperwidth,\parbox,\part} +% \DoNotIndex{\ProcessOptions,\protect,\protected@edef,\protected@write} +% \DoNotIndex{\protected@xdef,\ProvidesPackage} +% \DoNotIndex{\raggedleft,\raggedright,\rangle,\relax,\renewcommand} +% \DoNotIndex{\repeat,\RequirePackage} +% \DoNotIndex{\setbox,\setlength,\sixt@@n,\space,\string,\strut,\strutbox} +% \DoNotIndex{\textasciicircum,\textasciitilde,\textbackslash,\textbar} +% \DoNotIndex{\textbf,\textbraceleft,\textbraceright,\textdollar} +% \DoNotIndex{\textgreater,\textless,\textquotedbl,\textquoteleft} +% \DoNotIndex{\textquoteright,\texttt,\textunderscore,\textvisiblespace} +% \DoNotIndex{\textwidth,\the,\topsep,\trivlist,\tw@} +% \DoNotIndex{\uccode,\unhbox,\unrestored@protected@xdef,\unvbox} +% \DoNotIndex{\uppercase} +% \DoNotIndex{\vbox,\vss,\vtop,\write,\xdef,\z@} +% +% \changes{prot1}{2000/06/15}{Started writing first prototype. (LH)} +% \changes{prot2}{2000/07/13}{Began work on the second prototype. (LH)} +% +% \begin{abstract} +% The \package{xdoc} package contains reimplementations of some of +% the features found in the standard \LaTeX\ \package{doc} +% package~\cite{doc} by Mittelbach \emph{et~al. }The ultimate goals +% for these reimplementations are that the commands should be better, +% easily configurable, and be easy to extend, but this is only a +% second prototype implementation and nothing in it is guaranteed to +% be the same in the third prototype.\footnote{But there are no +% guarantees there will ever be a third prototype either.} +% \end{abstract} +% +% \tableofcontents +% +% +% \section{Usage} +% +% When I began working on this package I thought that there would be no +% need for a usage section (at least on the prototype stage)---either you +% are interested in using the new features and then you might just as +% well read the descriptions of the commands in the implementation part +% of this document (they are written as specifications of what the +% commands do), or else you can simply insert a |\usepackage|\B|{xdoc2}| +% in the preamble and see how things work a little better than when you +% simply use \package{doc}---but with some features it became natural +% to introduce incompatible changes and some new features ought to be +% mentioned. Hence I wrote a short section on usage after all. +% +% It is my intention that this document will eventually evolve into the +% source for a package \package{xdoc}\footnote{The name \package{doc2} +% has also been discussed; we'll see when we get there.} which will +% either build on the \package{doc} package and provide better +% implementations of many of its features, or replace it completely, +% but this document is still only the source for a prototype for that +% package. As I believe that the need for some improvement in this area +% is rather large however, I have decided to release this prototype so +% that other people can use it in their documents or create packages that +% are based on it. In doing so, one must of course bear in mind that this +% prototype needs not be compatible with the final \package{xdoc} +% package, and to overcome most incompatibility problems I therefore +% release it under the variant name \package{xdoc2}. This way, documents +% based on this prototype can still be typeset using the package they +% were written for long after the next \package{xdoc} prototype (or final +% version) is released. +% +% Thus although this document frequently speaks of \package{xdoc}, you +% might just as well read it as \package{xdoc2}. +% +% +% \subsection{Changes to old features} +% +% Whereas \package{doc} more or less assumes that all pages have the +% same layout, \package{xdoc} takes measures to ensure that the +% \package{doc} features support two-sided document designs. If the +% left margin has been widened to better accommodate long macro names +% however (like for example the \package{ltxdoc} document class does), +% then you may find that the outer margin on right (odd) pages is too +% narrow for printing macro names in. The remedy for this is the +% \GenericDescribePrint{\MacroFont dolayout \normalfont option}^^A +% \SortIndex{dolayout}{\texttt{dolayout} option\encapchar +% usage}\texttt{dolayout} option; in two-sided mode it causes +% \package{xdoc} to recompute the |\oddsidemargin| so that the outer +% margin has the same size on right pages as it previously did on left +% pages. In documents which are not processed in two-sided mode the +% \texttt{dolayout} option has no effect. +% +% |\DocInput| has been changed to not make percent a comment character +% upon return unless it was before the |\DocInput|. This makes |\DocInput| +% nestable and I recommend that \texttt{.dtx} files which input other +% \texttt{.dtx} files use |\DocInput| for this. +% +% The |\DocInclude| command, which is defined by the \package{ltxdoc} +% document class rather than \package{doc}, is also by default +% redefined in an incompatible manner by \package{xdoc}, but you can +% stop \package{xdoc} from making incompatible changes if you pass it the +% option \GenericDescribePrint{\MacroFont olddocinclude \normalfont +% option}\SortIndex{olddocinclude}{\texttt{olddocinclude} option^^A +% \encapchar usage}\texttt{olddocinclude}. The main incompatibility +% lies in that the default redefinition of |\DocInclude| behaves purely +% as an |\include| command which |\DocInput|s a \texttt{.dtx} file rather +% than merely |\input|ting a \texttt{.tex} file---you must pass the +% \GenericDescribePrint{\MacroFont fileispart \normalfont option}^^A +% \SortIndex{fileispart}{\texttt{fileispart} option\encapchar +% usage}\texttt{fileispart} option to \package{xdoc} to get the |\part| +% headings etc.\ for each new file---but there are also minor changes +% in the appearance of these headings, in how page styles are set, and +% in how the information presented in the page footer is obtained. +% +% Other changes are as far as I can tell minor and within the bounds of +% expected behaviour, but code that relies on the implementation of some +% feature in \package{doc} may of course behave differently or break +% completely. Note in particular that the formats of the internal +% \package{doc} variables |\saved@macroname|, |\macro@namepart|, and +% |\index@excludelist| have changed completely (see +% Section~\ref{Sec:Changes}, Subsection~\ref{Ssec:Scanning macrocode}, +% and Subsection~\ref{Ssec:Index-exclude} respectively)---hence any hack +% involving one of these must be revised before it is used with +% \package{xdoc}. These are however exceptions; in my experience the most +% noticeable changes not listed above are that the index exclude +% mechanism actually works for control sequences whose names consist of +% a single non-letter and that symbols get sorted in a different order. +% +% +% \subsection{Some notable new features} +% +% The main new feature is the \DescribeMacro\NewMacroEnvironment +% |\NewMacroEnvironment| command, which defines a new \texttt{macro}-like +% environment. The command offers complete control of the argument +% structure, the formatting of the marginal heading, the code for making +% index entries, and the change entry sorting and formatting, but the +% syntax is too complex to explain here. Those who are interested in +% using it should read Section~\ref{Sec:Macro-environments}. In +% particular, Subsections~\ref{Ssec:Macro&environment}--^^A +% \ref{Ssec:More macros} contain several examples of how it can be +% used. In addition to using |\New|\-|Macro|\-|Environment| for +% redefining the \DescribeEnv{macro}\texttt{macro} and +% \DescribeEnv{environment}\texttt{environment} environments, +% \package{xdoc} also defines an \DescribeEnv{option}\texttt{option} +% environment (which is intended for document class and package +% options) and a \DescribeEnv{switch}\texttt{switch} environment (which +% is intended for switches defined using |\newif|; the argument should +% not include the |\if|). +% +% There is also a companion command \DescribeMacro\NewDescribeCommand +% |\NewDescribeCommand| which defines new commands similar to +% |\Describe|\-|Macro| and |\Describe|\-|Env|. The syntax of +% |\New|\-|Describe|\-|Command| is also too complex to explain here, so +% I have to refer readers who want to use it to Section~^^A +% \ref{Sec:Describing}. Two more commands which are defined in that +% section are \DescribeMacro\describeoption|\describe|\-|option|, which +% is the \texttt{describe}\dots\ companion of the \texttt{option} +% environment, and \DescribeMacro\describecsfamily +% |\describe|\-|cs|\-|family| which is meant for describing control +% sequence families (see the table on page~\pageref{Tab:CS-families} for +% examples of what I mean). The argument of this latter command is simply +% the material you would put between |\csname| and |\endcsname|. Variant +% parts are written as |\meta|\B\marg{text} and print as one would expect +% them to (but notice that the \meta{text} is a moving argument) whereas +% most other characters can be written verbatim without any special +% quoting (but |\|, |{|, |}|, and |%| need quoting; see the comments to +% the definition of |\describe|\-|cs|\-|family| for information on how +% to do that). +% +% The \DescribeMacro\DoNotIndexBy|\DoNotIndexBy| command tells the +% commands that make index entries for macros to ignore a certain +% character sequence when the index entries are sorted. The +% |\DoNotIndexBy| command takes one argument: the character sequence to +% ignore. If |\DoNotIndexBy| is used more than once then the indexing +% commands will look for, and if it finds it ignore, each of the +% character sequences given to it, starting with the one specified last. +% +% It has already been mentioned that the |\DocInclude| command has been +% changed. What has not been mentioned is its companion +% \DescribeMacro\setfileinfo|\setfileinfo|, +% which the partfiles should use for setting the date and version +% information presented in the page footer, but that is explained in +% detail in Subsection~\ref{Ssec:New DocInclude}. +% +% Finally there is a new variant of the |\changes| command which is +% intended for changes that, although not limited to a single macro and +% thus being ``general'' changes in the \package{doc} terminology, affect +% only a few (probably widely dispersed) macros (or whatever). The basic +% idea is that you can define a change with a specific version, date, +% and text using the \DescribeMacro{\definechange}|\definechange| command +% and then recall those parameters later using the +% \DescribeMacro{\usechange}|\usechange| command. Primarily this ensures +% that the entry texts are identical so that \package{makeindex} will +% combine them into one entry, but it is also specified which macro +% was changed at which page. See Section~\ref{Sec:Changes} for more +% details. Another new feature concerning |\changes| is that there is +% now support for sorting version numbers according to mathematical +% order rather than ASCII order. Traditionally the version numbers +% \texttt{2}, \texttt{11}, and \texttt{100} would have been sorted so +% that \texttt{100}${}<{}$\texttt{11}${}<{}$\texttt{2}, but if they are +% entered as \DescribeMacro{\uintver}|\uintver{2}|, |\uintver{11}|, and +% |\uintver{100}| then they will be sorted as +% \texttt{2}${}<{}$\texttt{11}${}<{}$\texttt{100}. The argument of +% |\uintver| must be a \TeX\ \meta{number}. +% +% \medskip +% +% \package{xdoc} also contains several features which are of little use +% as direct user commands, but which can simplify the definitions of other +% commands. The foremost of these are the `harmless character strings', +% which can be seen as a datatype for (short pieces of) verbatim text. +% \TeX\ typesets a harmless character string in pretty much the same way +% as the corresponding string of `other' tokens, but the harmless +% character string can also be written to file and read back arbitrarily +% many times without getting garbled, it doesn't make \package{makeindex} +% choke, and it survives being fed to a |\protected@edef|. The most +% important commands related to harmless character strings are +% \DescribeMacro\PrintChar|\PrintChar|, which is used for representing +% problematic characters, and \DescribeMacro\MakeHarmless|\MakeHarmless|, +% which converts arbitrary \TeX\ code to the corresponding harmless +% character string. +% +% The superfluity of indexing commands in \package{doc} has been +% replaced by the single command \DescribeMacro\IndexEntry|\IndexEntry|, +% which has been designed with the intention that it should provide a +% clear interface between the user level macros and the index sorting +% program. It takes three arguments: the index entry specification, the +% name of the encapsulation scheme that should be used, and the number to +% put in the index. The index entry specification is a sequence of +% |\LevelSame| and\slash or |\LevelSorted| commands, which have the +% respective syntaxes +% \begin{quote} +% \DescribeMacro\LevelSame|\LevelSame|\marg{text}\\ +% \DescribeMacro\LevelSorted|\LevelSorted|\marg{sort key}\marg{text} +% \end{quote} +% Each such command specifies one level of the index entry. In the case of +% |\LevelSorted|, the \meta{text} is what will be written in the sorted +% index at that level and \meta{sort key} is what the index-sorting +% program should look at when sorting the entry (at that level). In the +% case of |\LevelSame|, the \meta{text} is used both as sort key and +% contents of entry in the sorted index. The first command is for the +% topmost level and each subsequent command is for the next sublevel. +% The complete description appears in Subsection~\ref{Ssec:IndexEntry}. +% +% \package{xdoc} also contains support for external cross-referencing +% programs (see Subsection~\ref{Ssec:XXR} for details) and a system for +% determining whether a piece of text falls on an even or an odd page +% (see Section~\ref{Sec:Twoside} for details). I expect that the latter +% system will eventually migrate out of \package{xdoc}, either to a +% package of its own, or into oblivion because the \LaTeXplus\ output +% routine makes it obsolete. +% +% +% \subsection{The \package{docindex} package} +% +% As of prototype version 2.2, the \package{xdoc} package has a companion +% package \package{docindex}~\cite{docindex} which provides improved +% formatting of the index and list of changes. \package{xdoc} works fine +% without \package{docindex}, however. +% +% +% \subsection{A note on command names} +% +% The \package{doc} package defines several commands with mixed-case +% names which (IMHO) should really have all-lower-case names (according +% to the rule of thumb spelled out in \cite[Ssec.~2.4]{clsguide}) since +% people use them in the capacity of being the author of a \texttt{.dtx} +% file rather than in the capacity of being the writer of a class or +% package. The names in question are +% \begin{longtable}{ll} +% \textbf{Name in \package{doc}}& \textbf{Better (?) name}\endhead +% \cs{AlsoImplementation}& \cs{alsoimplementation}\\ +% \cs{CharacterTable}& \cs{charactertable}\\ +% \cs{CharTableChanges}& \cs{chartablechanges}\\ +% \cs{CheckModules}& \cs{checkmodules}\\ +% \cs{CheckSum}& \cs{checksum}\\ +% \cs{CodelineIndex}& \cs{codelineindex}\\ +% \texttt{CodelineNo} (counter)& \texttt{codelineno}\\ +% \cs{CodelineNumbered}& \cs{codelinenumbered}\\ +% \cs{DeleteShortVerb}& \cs{deleteshortverb}\\ +% \cs{DescribeEnv}& \cs{describeenv}\\ +% \cs{DescribeMacro}& \cs{describemacro}\\ +% \cs{DisableCrossrefs}& \cs{disablecrossrefs}\\ +% \cs{DocInput}& \cs{docinput}\\ +% \cs{DoNotIndex}& \cs{donotindex}\\ +% \cs{DontCheckModules}& \cs{dontcheckmodules}\\ +% \cs{EnableCrossrefs}& \cs{enablecrossrefs}\\ +% \cs{Finale}& \cs{finale}\\ +% \texttt{GlossaryColumns} (counter)& \texttt{glossarycolumns}\\ +% \cs{GlossaryPrologue}& \cs{glossaryprologue}\\ +% \texttt{IndexColumns} (counter)& \texttt{indexcolumns}\\ +% \cs{IndexInput}& \cs{indexinput}\\ +% \cs{IndexPrologue}& \cs{indexprologue}\\ +% \cs{MakePrivateLetters}& \cs{makeprivateletters}\\ +% \cs{MakeShortVerb}& \cs{makeshortverb}\\ +% \cs{OnlyDescription}& \cs{onlydescription}\\ +% \cs{PageIndex}& \cs{pageindex}\\ +% \cs{PrintChanges}& \cs{printchanges}\\ +% \cs{PrintIndex}& \cs{printindex}\\ +% \cs{RecordChanges}& \cs{recordchanges}\\ +% \cs{SortIndex}& \cs{sortindex}\\ +% \cs{SpecialEscapechar}& \cs{specialescapechar}\\ +% \texttt{StandardModuleDepth} (counter)& \texttt{standardmoduledepth}\\ +% \cs{StopEventually}& \cs{stopeventually} +% \end{longtable} +% \noindent With the exception for \texttt{CodelineNo},\footnote{Where I +% recommend using \texttt{codelineno} instead of \texttt{CodelineNo}, +% \cs{PrintCodelineNo} instead of \cs{theCodelineNo}, and +% \cs{thecodelineno} instead of \cs{number}\cs{c@CodelineNo}; see +% Subsection~\ref{Ssec:CodelineNo}.} I haven't changed any of the +% \package{doc} names in this \package{xdoc} prototype, nor introduced any +% of the ``better names'' as alternatives, but I think the matter should +% be given a bit of thought during the future development of +% \package{doc}\slash \package{xdoc}. +% +% For completeness, I should also remark that there are several macros +% that \package{doc} gives mixed-case names which I haven't listed above. +% The logo command names have special capitalizing rules by tradition. +% Some macros and named registers---for example |\Docstyle|\-|Parms|, +% |\Index|\-|Parms|, |\Macro|\-|Font|, |\Macro|\-|Topsep|, +% |\Make|\-|Percent|\-|Ignore|, and |\Print|\-|Macro|\-|Name|---are part +% of the package or document class writer's interface to \package{doc}, +% although I cannot claim it to be obvious that for example +% |\Index|\-|Parms| and the \texttt{IndexColumns} counter should belong +% to different classes here (but several of these control sequences will +% probably disappear from the interface in \LaTeXplus\ anyway, so the +% problem isn't that important). The |\Special|\dots\B|Index| commands +% (and their even more special variants, such as +% |\Left|\-|Brace|\-|Index|) are internal commands rather than user level +% commands. Finally there is the |\Get|\-|File|\-|Info| command, which I +% doubt there is any point in having. +% +% +% \StopEventually{} +% +% +% \subsection{\package{docstrip} modules} +% +% The \package{docstrip} modules in \texttt{xdoc2.dtx} are: +% \begin{description} +% \item[\textsf{pkg}] +% This module directive surrounds the code for the \package{xdoc} +% package. +% \item[\textsf{driver}] +% The driver. +% \item[\textsf{internals}] +% This module contains an alternative replacement text for the +% |\Print|\-|Visible|\-|Char| command that uses ``\LaTeX\ internal +% character representation'' (i.e., as much as possible +% encoding-specific commands---|\text|\textellipsis\ commands and +% the like) rather than the primitive |\char| command for +% typesetting visible characters. +% It is provided as a separate module mainly for compability with +% prototype version~2.0, as this alternative definition can (as of +% prot.\,2.1) be chosen by passing the option +% \describeoption{notrawchar}\texttt{notrawchar} to \package{xdoc}. +% \item[\textsf{economical}] +% There is little point in storing the harmless representations of +% the 161 non-visible-ASCII characters as these representations are +% always the same and can be formed on the fly whenever they are +% needed. The \textsf{economical} modules contain some alternative +% code which makes use of this fact to reduce the number of control +% sequences used for storing the table of harmless representations. +% The \Module{economical} module appears inside the \Module{pkg} +% module. +% \item[\textsf{xdoc2}] +% This module contains code for compability with previous releases +% of \package{xdoc2}. It will not be included in \package{xdoc3} +% or \package{xdoc} (whichever is the next major version). +% \item[\textsf{enccmds}] +% This module contains the code for defining two \texttt{macro}-like +% environments for encoding-specific commands. These are not included +% in the \package{xdoc} package since so few \texttt{.dtx} files +% define encoding-specific commands. +% \item[\textsf{rsrccmd}] +% Similar to the \textsf{enccmds} module, but demonstrates the +% |\New|\-|Describe|\-|Command| command instead. +% \item[\textsf{example}] +% This surrounds some code which to \package{docstrip} looks like it +% should be copied, but isn't meant to. +% \end{description} +% +% +% +% \section{Initial stuff} +% +% First there's the usual |\NeedsTeXFormat| and |\ProvidesPackage|. +% \begin{macrocode} +%<*pkg> +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{xdoc2}[2003/07/06 prot2.5 doc reimplementation package] +% \end{macrocode} +% +% \subsection*{Options} +% +% The first option has to do with the page layout. +% Although \package{doc} itself doesn't modify any of the main layout +% parameters, it is well known that using it does tend to restrict +% one's choices in terms of document layout. In particular the +% \texttt{macro} and \texttt{environment} environments require a rather +% large left margin since they will otherwise print long macro names +% partially outside the paper. It is furthermore hard to decrease the +% |\textwidth| as it should be wide enough to contain about 70 columns of +% |\MacroFont| text. Thus the only solution is to do as the +% \package{ltxdoc}~\cite{ltxdoc} document class and enlarge the left +% margin at the expense of the right. +% +% The resulting layout has a left--right asymmetry with the main galley +% (the text rectangle) on the right and a very wide left margin (in +% which marginal headings and marginal notes appears). Although this +% layout is not uncommon in technical manuals, it is inappropriate for +% two-sided designs since the vertical line at which the two pages of a +% spread meet becomes the natural vertical symmetry axis for the entire +% spread and it breaks this symmetry to let the left margin be the +% widest on all pages. It would look better to always let the outer +% margin be the largest. +% +% \begin{option}{dolayout} +% \begin{macro}{\oddsidemargin} +% The \texttt{dolayout} option modifies |\oddsidemargin| so that +% spreads are symmetric around the center in two-sided mode. As size +% of the outer margin is taken the size of the left margin on left +% (even) pages, i.e., |\evensidemargin|${}+1\,\mathrm{in}$. +% +% In one-sided mode, the \texttt{dolayout} option does nothing. +% \begin{macrocode} +\DeclareOption{dolayout}{% + \if@twoside + \setlength\oddsidemargin{\paperwidth} + \addtolength\oddsidemargin{-\textwidth} + \addtolength\oddsidemargin{-\evensidemargin} + \addtolength\oddsidemargin{-2in} + \fi +} +% \end{macrocode} +% \end{macro}\end{option} +% +% \begin{option}{olddocinclude} +% \begin{option}{fileispart} +% The \texttt{olddocinclude} and \texttt{fileispart} options are +% related to the |\DocInclude| command defined by the \package{ltxdoc} +% document class. Some of the code related to that command relies on +% modifying the \package{doc} internal macro |\codeline@wrindex|, but +% that has no effect with \package{xdoc} so in order to get the +% expected results one has to reimplement the |\DocInclude| command as +% well. The \texttt{olddocinclude} and \texttt{fileispart} options +% control how this should be done. +% +% If the \texttt{olddocinclude} option is passed to \package{xdoc} +% then only the parts of the implementation of |\DocInclude| which +% must be altered to make the command work with the \package{xdoc} +% implementation of indexing and cross-referencing are changed. These +% redefinitions will furthermore only be made if the \package{ltxdoc} +% document class has been loaded; nothing is done if the +% \texttt{olddocinclude} option is passed and \package{ltxdoc} hasn't +% been loaded. Passing the \texttt{olddocinclude} option can be +% considered as requesting a ``compatibility mode'' for |\DocInclude|. +% +% If the \texttt{olddocinclude} option is not passed then the +% |\DocInclude| command is reimplemented from scratch, regardless of +% whether some definition of it has already been given or not. The +% basis of this reimplementation is the observation that the +% |\DocInclude| command of \package{ltxdoc} really does two quite +% distinct things at once---it is an |\include| command which +% |\DocInput|s files rather than |\input|ting them, but it also starts +% a new |\part|, sets the pagestyle, and changes how the values of +% some counters are typeset. This latter function is by default +% disabled in the \package{xdoc} implementation of |\DocInclude|, but +% passing the \texttt{fileispart} option enables it. +% +% There is no code for these two options here, as it is rather long; +% instead that code appears in Section~\ref{Sec:DocInclude}. The +% |\Pass|\-|Options|\-|To|\-|Package| commands make sure that these +% options are registered as local options for \package{xdoc}, so that +% one can test for them using |\@if|\-|package|\-|with| below. +% \begin{macrocode} +\DeclareOption{olddocinclude}{% + \PassOptionsToPackage{\CurrentOption}{xdoc2}% +} +\DeclareOption{fileispart}{% + \PassOptionsToPackage{\CurrentOption}{xdoc2}% +} +% \end{macrocode} +% \end{option}\end{option} +% +% \changes{prot2.5}{2003/07/06}{Reregeristing options in case +% they were global. (LH)} +% +% \begin{option}{notrawchar} +% The \texttt{notrawchar} option controls how the |\PrintVisibleChar| +% command is defined, and thereby what method is used for typesetting +% visible characters in e.g.\ macro names. The default is to use the +% |\char| primitive (which is better for \texttt{T1}-encoded fonts and +% non-italic \texttt{OT1}-encoded typewriter fonts), but the +% \texttt{notrawchar} option causes things to go via the ``\LaTeX\ +% internal character representation'' instead (which is necessary +% for e.g.\ \texttt{OT1}-encoded non-typewriter fonts). +% +% There is no code for this option here; instead that code is found +% in the definition of |\Print|\-|Visible|\-|Char|. +% \begin{macrocode} +\DeclareOption{notrawchar}{% + \PassOptionsToPackage{\CurrentOption}{xdoc2}% +} +% \end{macrocode} +% \end{option} +% +% +% Then options are processed. +% \begin{macrocode} +\ProcessOptions\relax +% \end{macrocode} +% And finally the \package{doc} package is loaded. +% \begin{macrocode} +\RequirePackage{doc} +% \end{macrocode} +% +% +% \section{Character strings} +% +% A source of much of the complexity in \package{doc} is that it has to +% be able to deal with rather arbitrary strings of characters (mainly +% the names of control sequences). Once the initial problems with +% characters having troublesome catcodes have been overcome however, it +% is usually no problem to manage such things in \TeX. \package{doc} +% does however complicate things considerably by also putting these +% things in the index and list of changes. Not only must they then be +% formatted so that the \package{makeindex} program doesn't choke on +% them, but they must also be wrapped up in code that allows \TeX\ to +% make sense of them when they are read back. \package{doc} manages the +% \package{makeindex} problems mainly by allowing the user to change what +% characters are used as \package{makeindex} metacharacters and the +% reading back problem by making abundant use of |\verb|. +% +% All this relies on that the author of a document is making sure that +% the metacharacters aren't used for anything else. If for example the +% |\verbatimchar| (by default |+|) is one of the ``private letters'' +% then names of control sequences containing that character will be +% typeset incorrectly because the |\verb| used to typeset it is +% terminated prematurely---control sequence names such as `|\lost+found|' +% will be typeset as `|\lost|found+'. On top of that, one also has to +% make sure that the font used for typesetting these |\verb| sections +% contains all the characters needed. +% +% For \package{xdoc}, I have chosen a completely different approach. +% Instead of allowing the strings (after they have converted to the +% internal format) to contain \TeX\ character tokens with arbitrary +% character codes, they may only contain \TeX\ character tokens which +% are unproblematic---the normal catcode should be 11 (letter) or 12 +% (other), they should not be outside visible ASCII, and they may not +% be one of the \package{makeindex} metacharacters. All other characters +% are represented using a robust command which takes the character code +% (in decimal) as the argument. This takes care of all ``moving +% argument'' type problems that may occur. +% +% An important observation about these character strings is that +% they are strings of \emph{input} characters. This means that rather +% than using the characters in some special font for typesetting +% control sequences like |\^^M| (recall that the |^^| substitutions +% take place before tokenization), one should typeset them using only +% visible ASCII characters. (After all, that's the only way they are +% written in \TeX\ code.) The default definition is to typeset +% invisible characters as precisely the |^^|-sequences that \TeX\ +% normally uses for these characters when they are written to a file. +% +% +% \subsection{Typesetting problematic characters} +% +% \begin{macro}{\PrintChar} +% \begin{macro}{\XD@threedignum} +% The |\PrintChar| command has the syntax +% \begin{quote} +% |\PrintChar|\marg{8-bit number} +% \end{quote} +% where \meta{8-bit number} is a \TeX\ number in the range 0--255. +% For arguments in the range 0--31, |\PrintChar| prints +% `\textit{\ttfamily\string^\string^@}'--`\textit{\ttfamily +% \string^\string^\string_}'. For an argument in the range 32--126, +% |\PrintChar| calls |\Print|\-|Visible|\-|Char| which by default +% simply does |\char| on that argument (but which can be redefined +% if the font set-up requires it); in particular, |\PrintChar{32}| +% should print a ``visible space'' character. |\PrintChar{127}| prints +% `\textit{\ttfamily\string^\string^?}'. For arguments in the range +% 128--255, |\PrintChar| prints +% `\textit{\ttfamily\string^\string^80}'--`\textit{\ttfamily +% \string^\string^ff}'. +% +% |\PrintChar| is robust. |\PrintChar| also has a special behaviour +% when it is written to a file (when |\protect| is |\noexpand|): it +% makes sure that the argument consists of three decimal digits, to +% ensure external sorting gets it right. +% \begin{macrocode} +\@ifundefined{PrintChar}{}{% + \PackageInfo{xdoc2}{Redefining \protect\PrintChar}% +} +\def\PrintChar{% + \ifx \protect\@typeset@protect + \expandafter\XD@PrintChar + \else\ifx \protect\noexpand + \string\PrintChar + \expandafter\expandafter \expandafter\XD@threedignum + \else + \noexpand\PrintChar + \fi\fi +} +% \end{macrocode} +% +% |\XD@threedignum| does a |\number| on its argument, possibly prepends +% a |0| or two, and wraps it all up in a ``group'' (the braces have +% category other, not beginning and end of group). +% \changes{prot2.1}{2000/11/15}{Braces inserted by +% \cs{XD@threedignum} are given catcode other. (LH)} +% \begin{macrocode} +\edef\XD@threedignum#1{% + \string{% + \noexpand\ifnum #1<100 % + \noexpand\ifnum #1<10 0\noexpand\fi + 0% + \noexpand\fi + \noexpand\number#1% + \string}% +} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\XD@PrintChar} +% \begin{macro}{\InvisibleCharPrefix} +% \begin{macro}{\InvisibleCharSuffix} +% |\XD@PrintChar| manages the typesetting for |\PrintChar|. It +% distinguishes between visible characters (code 32--126) and +% invisible characters. The visible characters are typeset directly +% using |\PrintVisibleChar|, whereas the invisible characters are +% typeset as |^^|-sequences. +% +% The macros |\InvisibleCharPrefix| and |\InvisibleCharSuffix| begin +% and end a |^^|-sequence. |\InvisibleCharPrefix| should print the +% actual |^^|, but it may also for example select a new font for +% the |^^|-sequence (such font changes are restored at the end of +% |\XD@PrintChar|). +% \begin{macrocode} +\def\XD@PrintChar#1{% + \leavevmode + \begingroup + \count@=#1\relax + \ifnum \@xxxii>\count@ + \advance \count@ 64% + \InvisibleCharPrefix + \PrintVisibleChar\count@ + \InvisibleCharSuffix + \else\ifnum 127>\count@ + \PrintVisibleChar\count@ + \else + \InvisibleCharPrefix + \ifnum 127=\count@ \PrintVisibleChar{63}\else + \@tempcnta=\count@ + \divide \count@ \sixt@@n + \@tempcntb=\count@ + \multiply \count@ \sixt@@n + \advance \@tempcnta -\count@ + \advance \@tempcntb \ifnum 9<\@tempcntb 87\else 48\fi + \advance \@tempcnta \ifnum 9<\@tempcnta 87\else 48\fi + \char\@tempcntb \char\@tempcnta + \fi + \InvisibleCharSuffix + \fi\fi + \endgroup +} +% \end{macrocode} +% \begin{macrocode} +\newcommand\InvisibleCharPrefix{% + \/\em + \PrintVisibleChar{`\^}\PrintVisibleChar{`\^}% +} +\newcommand\InvisibleCharSuffix{\/} +% \end{macrocode} +% There are some alternative methods for making hexadecimal numbers +% which should perhaps be mentioned. The \LaTeX\ kernel contains a +% macro |\hexnumber@| which uses |\ifcase| to produce one hexadecimal +% digit, but that uses upper case letters, and things like `8E' look +% extremely silly if the upper case letters doesn't line with the +% digits. Applying |\meaning| to a \meta{chardef token} or +% \meta{mathchardef token} expands to |\char"|\meta{hex} and +% |\mathchar"|\meta{hex} respectively, where \meta{hex} is the +% corresponding number in hexadecimal, but that too has upper case A--F +% and leading zeros are removed. +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\PrintVisibleChar} +% \changes{prot2.1}{2000/12/18}{Made it possible to select the +% alternative defintion of \cs{PrintVisibleChar} through an +% \package{xdoc} package option. (LH)} +% The |\PrintVisibleChar| command should print the visible ASCII +% character whose character code is given in the argument. There are +% currently two definitions of this command: one which uses the \TeX\ +% primitive |\char| and one which goes via the ``\LaTeX\ internal +% character representation'' for the character. By default +% \package{xdoc} uses the former definition, but if \package{xdoc} +% is passed the +% \SortIndex{notrawchar}{\texttt{notrawchar} option\encapchar usage} +% \texttt{notrawchar} option then it will use the latter. +% +% The reason there are two definitions is a deficiency in how the NFSS +% encoding attribute has been assigned to fonts; even though the +% encodings of Computer Modern Roman and Computer Modern Typewriter +% are quite different, \LaTeXe\ uses the \texttt{OT1} encoding for +% both. As a result of this, the \LaTeX\ internal representation will +% in some important cases use characters from non-typewriter fonts +% despite the fact that typewriter forms are immediately available. +% Since the cases in which the |\char| primitive produces results as +% least as good as those made through the \LaTeX\ internal +% character representation includes those that the current font is +% \texttt{T1}-encoded or an \texttt{OT1}-encoded nonitalic typewriter +% font, the shorter |\char| primitive defintion has been made the +% default. +% +% For compability with prototype version~2.0 of \package{xdoc}, the +% replacement text for |\Print|\-|Visible|\-|Char| that uses \LaTeX\ +% internal character representation can alternatively be extracted by +% \package{docstrip}ping \texttt{xdoc2.dtx} with the option +% \Module{internals}. +% \begin{macrocode} +\@ifpackagewith{xdoc2}{notrawchar}{% + \newcommand\PrintVisibleChar[1]{% +% +%<*pkg|internals> + \ifcase #1% + \or\or\or\or\or\or\or\or \or\or\or\or\or\or\or\or + \or\or\or\or\or\or\or\or \or\or\or\or\or\or\or\or + % "20 + \textvisiblespace \or!\or\textquotedbl \or\#\or\textdollar + \or\%\or\&\or\textquoteright\or(\or)\or*\or+\or,\or-\or.\or/% + \or % "30 + 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or:\or;\or + \textless\or=\or\textgreater\or?% + \or % "40 + @\or A\or B\or C\or D\or E\or F\or G\or + H\or I\or J\or K\or L\or M\or N\or O% + \or % "50 + P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z\or [\or + \textbackslash \or]\or\textasciicircum \or\textunderscore + \or % "60 + \textquoteleft \or a\or b\or c\or d\or e\or f\or g\or h\or + i\or j\or k\or l\or m\or n\or o% + \or % "70 + p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\or + \textbraceleft \or\textbar \or\textbraceright \or + \textasciitilde + \fi + }% +% +%<*pkg> +}{% + \newcommand\PrintVisibleChar[1]{\char #1\relax}% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\Bslash} +% It turns out that it is very common to say |\PrintChar{92}| +% (backslash), so a macro which expands to that reduces typing. +% \begin{macrocode} +\newcommand\Bslash{\PrintChar{92}} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Rendering character strings harmless} +% +% Replacing all problematic characters with |\PrintChar| calls certainly +% makes the strings easier to manage, but actually making those +% replacements is a rather complicated task. Therefore this subsection +% contains the macros necessary for doing these replacements. +% +% The first problem is how to efficiently recognise the problematic +% characters. A first solution which gets rather far is to mainly look +% in the |\catcode| register for that character and keep the character +% as it is if the category found there is 11 or 12, but replace it with +% a |\PrintChar| command if the category is anything else. Two extra +% tests can be performed to take care of invisible ASCII, and the +% \package{makeindex} metacharacters can be cared for by locally +% changing their catcodes for when the string is processed. +% Unfortunately this doesn't work inside \texttt{macrocode} +% environments (where one would like to use it for the macro +% cross-referencing) since that environment changes the catcodes of +% several characters from being problematic to being unproblematic and +% vice versa.\footnote{As the entire \texttt{macrocode} environment is +% tokenized by the expansion of \cs{xmacro@code} one could alternatively +% solve this problem by reimplementing the \texttt{macrocode} +% environment so that normal catcodes are in force when the contents are +% being typeset.} As furthermore harmless character strings should be +% possible to move to completely different parts of the document, the +% test used for determining whether a character is problematic should +% yield the same result throughout the document. +% +% Because of this, I have chosen a brute strength solution: build a +% table (indexed by character code) that gives the harmless form of +% every character. This table is stored in the +% \describecsfamily{XD@harmless@\meta{code}}^^A +% |\XD@harmless@|\meta{code} family of control sequences, where the +% \meta{code} is in the range |0|--|255|. Assignments to this table are +% global. In principle, the table should not change after the preamble, +% but there is a command |\SetHarmState| which can be used at any time +% for setting a single table entry. This could be useful for documents +% which, like for example~\cite{fontinst}, have nonstandard settings of +% |\catcode|s. +% +% \begin{macro}{\SetHarmState} +% The |\SetHarmState| command takes three arguments: +% \begin{quote} +% |\SetHarmState|\marg{type}\marg{char}\marg{harm} +% \end{quote} +% \meta{char} is the character whose entry should be set. \meta{type} +% is a flag which specifies what format \meta{char} is given in. If +% \meta{type} is |\BooleanTrue| then \meta{char} is the \TeX\ +% \meta{number} of the table entry to set, and if \meta{type} is +% |\BooleanFalse| then \meta{char} is something which expands to a +% single character token whose entry should be set. The expansion is +% carried out by an |\edef|, so it needs not be only one level. +% \meta{harm} is |\BooleanTrue| if the character is problematic and +% |\BooleanFalse| if it is not. +% +% The \meta{type} and \meta{harm} arguments are currently not subject +% to any expansion. In the future they probably should be, but I +% don't want to make assumptions about the actual definitions of +% |\BooleanTrue| and |\BooleanFalse| at this point. +% \begin{macrocode} +\begingroup + \catcode\z@=12 + \@ifdefinable\SetHarmState{ + \gdef\SetHarmState#1#2#3{% + \begingroup + \ifx #1\BooleanTrue + \count@=#2\relax + \else + \protected@edef\@tempa{#2}% + \count@=\expandafter`\@tempa\relax + \fi + \ifx #3\BooleanTrue + \edef\@tempa{\noexpand\PrintChar{\the\count@}}% + \else + \uccode\z@=\count@ + \uppercase{\def\@tempa{^^@}}% + \fi + \global\expandafter\let + \csname XD@harmless@\the\count@ \endcsname \@tempa + \endgroup + }% + } +\endgroup +% \end{macrocode} +% \end{macro} +% +% \begin{trivlist}\item[]\leavevmode ^^A Just for the look of it +% \GenericDescribePrint{\small\cs{XD@harmless@}\meta{code}}^^A +% ^^A There should have been a "main" index entry here as well, +% ^^A but generating that with \package{doc} commands is more than I +% ^^A bother to do right now. +% Initializing the |\XD@harmless@|\meta{code} table is a +% straightforward exercise of |\loop| \dots\ |\repeat|. +% \begin{macrocode} +%<*!economical> +\count@=\z@ +\loop + \expandafter\xdef \csname XD@harmless@\the\count@ \endcsname + {\noexpand\PrintChar{\the\count@}}% + \advance \count@ \@ne +\ifnum 33>\count@ \repeat +% +%\count@=\@xxxii +\begingroup + \catcode\z@=12\relax + \@firstofone{% +\endgroup + \loop + \if \ifnum 11=\catcode\count@ 1\else \ifnum 12=\catcode\count@ + 1\else 0\fi\fi 1% + \uccode\z@=\count@ + \uppercase{\def\@tempa{^^@}}% + \else + \edef\@tempa{\noexpand\PrintChar{\the\count@}}% + \fi + \global\expandafter\let + \csname XD@harmless@\the\count@ \endcsname \@tempa + \advance \count@ \@ne + \ifnum 127>\count@ \repeat +} +%<*!economical> +\loop + \expandafter\xdef \csname XD@harmless@\the\count@ \endcsname + {\noexpand\PrintChar{\the\count@}}% +\ifnum \@cclv>\count@ + \advance \count@ \@ne +\repeat +% +% \end{macrocode} +% Marking the \package{makeindex} metacharacters as harmful is +% deferred until |\begin|\nolinebreak[2]|{document}|, since it is not +% unreasonable that these are changed in the preamble. +% \begin{macrocode} +\AtBeginDocument{% + \SetHarmState\BooleanFalse\actualchar\BooleanTrue + \SetHarmState\BooleanFalse\encapchar\BooleanTrue + \SetHarmState\BooleanFalse\levelchar\BooleanTrue + \SetHarmState\BooleanFalse\quotechar\BooleanTrue +} +% \end{macrocode} +% \package{doc}'s |\verbatimchar| is not harmful, since it isn't used +% at all in \package{xdoc}. +% \end{trivlist} +% +% +% \begin{macro}{\MakeHarmless} +% To render a character string harmless, you do +% \begin{quote} +% |\MakeHarmless|\marg{macro}\marg{string} +% \end{quote} +% This locally assigns to \meta{macro} the harmless character string +% which corresponds to \meta{string}. During the conversion the converted +% part of the string is stored in |\toks@|, but that is local to +% |\MakeHarmless|. +% \begin{macrocode} +\def\MakeHarmless#1#2{% + \begingroup + \toks@={}% + \escapechar=`\\% + \XD@harmless@#2\XD@harmless@ + \expandafter\endgroup \expandafter\def \expandafter#1% + \expandafter{\the\toks@}% +} +% \end{macrocode} +% +% \begin{macro}{\XD@harmless@iii} +% \begin{macro}{\XD@harmless@iv} +% \begin{macro}{\XD@harmless@v} +% \changes{prot2}{2000/07/27}{Moved code for adding to \cs{toks@} here +% and changed it to append the contents of \cs{XD@harmless@32}, not +% necessarily a \cs{PrintChar}. (LH)} +% \begin{macro}{\XD@harmless@vi} +% What one has to be most careful about when rendering strings +% harmless are the space tokens, since many of \TeX's primitives gladly +% snatches an extra space (or more) where you don't want them to in +% this case. Macro parameters can be particularly dangerous, as \TeX\ +% will skip any number of spaces while looking for the replacement +% text for an undelimited macro argument. Therefore the algorithm for +% rendering a character token harmless begins +% (|\XD@|\B|harmless@iii|) with |\string|ing the next token in the +% string---this preserves the character code and sets the category to +% 12 for all characters except the ASCII space, which gets category 10 +% (space)---and then |\futurelet| is used to peek at the next token. If +% it is a space token (|\XD@|\B|harmless@iv|) then the character code +% is 32 and the actual space can be gobbled (|\XD@|\B|harmless@v|), and +% if it isn't then the next token can be grabbed in an undelimited macro +% argument (|\XD@|\B|harmless@vi|). In either case, the harmless form +% is given by the |\XD@|\B|harmless@|\meta{code} table entry +% (in |\XD@|\B|harmless@v| or |\XD@|\B|harmless@vi|). +% \begin{macrocode} +\def\XD@harmless@iii{% + \expandafter\futurelet \expandafter\@let@token + \expandafter\XD@harmless@iv \string +} +% \end{macrocode} +% \begin{macrocode} +\def\XD@harmless@iv{% + \ifx \@let@token\@sptoken + \expandafter\XD@harmless@v + \else + \expandafter\XD@harmless@vi + \fi +} +% \end{macrocode} +% ^^A Hack: +% \begingroup +% \expandafter\def \expandafter\MakePrivateLetters \expandafter{^^A +% \MakePrivateLetters +% \catcode`3=11 +% \catcode`2=11 +% } +% \begin{macrocode} +\begingroup + \catcode`3=\catcode`a + \catcode`2=\catcode`a + \@firstofone{\gdef\XD@harmless@v} {% + \toks@=\expandafter{\the \expandafter\toks@ \XD@harmless@32}% + \XD@harmless@ + } +\endgroup +% \end{macrocode} +% \endgroup +% In the \Module{economical} (with hash table space) variant +% implementation the |\XD@harmless@|\meta{code} table has entries only +% for the characters in visible ASCII. Thus the harmless forms of +% characters outside visible ASCII must be constructed on the fly. +% \begin{macrocode} +\def\XD@harmless@vi#1{% +%<*economical> + \if \ifnum `#1<\@xxxii 1\else \ifnum `#1>126 1\else 0\fi\fi 1% + \toks@=\expandafter{\the\expandafter\toks@ + \expandafter\PrintChar \expandafter{\number`#1}% + }% + \else +% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@\number`#1\endcsname}% +% \fi + \XD@harmless@ +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\XD@harmless@} +% \begin{macro}{\XD@harmless@i} +% \begin{macro}{\XD@harmless@ii} +% But that is not all |\MakeHarmless| can do. In some cases (as for +% example when one is describing a family of control sequences) one +% might want to include things in the string that are not simply +% characters, but more complex items---such as for example |\meta| +% constructions like \meta{code}. To accommodate for this, +% |\XD@harmless@| (which is the first step in converting a token) +% always begins by checking whether the next token to render harmless +% is a control sequence. If it is then it is checked (in +% |\XD@harmless@ii|) whether the control sequence +% \describecsfamily{XD@harmless\Bslash\meta{cs-name}}^^A +% |\XD@harmless\|\meta{cs-name}, where \meta{cs-name} is the name +% without |\| of the control sequence encountered, is defined. If it +% isn't then the encountered control sequence is |\string|ed and +% conversion continues as above, but if it is defined then the +% encountered control sequence begins such a more complex item. +% \begin{macrocode} +\def\XD@harmless@{\futurelet\@let@token \XD@harmless@i} +% \end{macrocode} +% \begin{macrocode} +\def\XD@harmless@i{% + \ifcat \noexpand\@let@token \noexpand\XD@harmless@ + \expandafter\XD@harmless@ii + \else + \expandafter\XD@harmless@iii + \fi +} +% \end{macrocode} +% \begin{macrocode} +\def\XD@harmless@ii#1{% + \@ifundefined{XD@harmless\string#1}{% + \expandafter\XD@harmless@vi \string#1% + }{\csname XD@harmless\string#1\endcsname}% +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\XD@harmless\XD@harmless@} +% A control sequence |\XD@harmless\|\meta{cs-name} is responsible for +% interpreting the string item that begins with the control sequence +% |\|\meta{cs-name} and appending a harmless representation of it to +% |\toks@|. Harmless representations should only contain robust +% control sequences and they must not rely on changing any catcodes. +% Normal |\XD@harmless\|\meta{cs-name} control sequences must also +% end by inserting |\XD@harmless@| in front of what remains of the +% string after the complex string item has been removed. This sees to +% that the rest of the string is also rendered harmless. The only such +% control sequence which does not insert |\XD@harmless@| is +% |\XD@harmless\XD@harmless@|, but that is as it should be since +% |\MakeHarmless| itself appends a |\XD@harmless@| to every character +% string it should convert to mark the end of it. +% \begin{macrocode} +\expandafter\let + \csname XD@harmless\string\XD@harmless@\endcsname \@empty +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\XD@harmless\PrintChar} +% It is occasionally convenient to use a |\PrintChar| command as part +% of a string that is to be rendered harmless instead of using the raw +% character. The definition is very similar to that of +% |\XD@harmless@vi|. +% \begin{macrocode} +\@namedef{XD@harmless\string\PrintChar}#1{% +%<*economical> + \if \ifnum #1<\@xxxii 1\else \ifnum #1>126 1\else 0\fi\fi 1% + \toks@=\expandafter{\the\expandafter\toks@ + \expandafter\PrintChar \expandafter{\number#1}% + }% + \else +% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@\number#1\endcsname}% +% \fi + \XD@harmless@ +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Interaction with mechanisms that make characters +% problematic} +% +% If additional visible characters are made problematic after the +% initial |\XD@harmless@|\meta{code} table is formed then problems may +% indeed arise, because some character which is expected to be +% unproblematic when read from (for example) an \texttt{.ind} file will +% actually not be. In fortunate cases this will only lead to that +% characters will print strangely or not at all, but it can quite +% conceivably lead to errors that prevent further typesetting and it +% should therefore be prevented if possible. +% +% Right now, I can think of two mechanisms that make characters +% problematic, and both do that by making them active. One is the +% shorthand mechanism of \package{babel}, but I think I'll delay +% implementing any interaction with that until some later prototype; I +% don't know it well enough and anyway I don't think it is that likely +% to cause any problems. The other mechanism is the short verb mechanism +% of \package{doc} itself, and this should be taken care of right away. +% +% The main difficulty is that the |\XD@harmless@|\meta{code} table should +% be the same throughout the document body (otherwise you may get more +% than one index entry for the same thing, with index references +% arbitrarily distributed between the two) whereas short verb characters +% can be made and deleted at any time. It would actually be wrong to +% always have the |\XD@harmless@|\meta{code} table entry mirroring the +% current state of the character! Instead a character will be considered +% as problematic even if it is only made problematic temporarily (with +% the exception for characters that are made problematic in +% \texttt{verbatim} environments and the like---the index file isn't +% being read in while those catcodes are active). Since it is impossible +% to know in the beginning of a document whether a character will be made +% a short verb character at some later point, the modifications to the +% |\XD@harmless@|\meta{code} table that will be made because of short verb +% characters will (at least partially) be based on which characters were +% made short verbs on the previous run. +% +% \begin{macro}{\SetCharProblematic} +% \changes{prot2}{2000/07/26}{Command added. (LH)} +% The |\SetCharProblematic| command should be called by commands which +% make a character problematic (e.g.\ makes it active) in the general +% context (commands which make some character problematic only in some +% very special context, such as the \texttt{verbatim} environment, +% need not call |\Set|\-|Char|\-|Problematic|). The syntax is +% \begin{quote} +% |\SetCharProblematic|\marg{code} +% \end{quote} +% and it sets the ``harm state'' of the character whose code is +% \meta{code} to problematic. +% +% When |\SetCharProblematic| is called in the preamble, it sets the +% harm state on the current run. When it is called in the document +% body however, it sets the harm state on the next run by writing a +% |\SetHarmState| command to the \texttt{.aux} file. This is done to +% ensure that the contents of the |\XD@harmless@|\meta{code} table +% doesn't change during the body of a document. +% \begin{macrocode} +\newcommand\SetCharProblematic[1]{% + \SetHarmState\BooleanTrue{#1}\BooleanTrue +} +\AtBeginDocument{% + \gdef\SetCharProblematic#1{% + \if@filesw + \immediate\write\@auxout{\string\SetHarmState + \string\BooleanTrue {\number#1}\string\BooleanTrue}% + \fi + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\add@specials} +% \changes{prot2}{2000/07/26}{Redefinition added. (LH)} +% |\MakeShortVerb|'s call to |\SetCharProblematic| is put in the +% |\add@|\B|specials| macro, which anyway already adds the character +% to the |\dospecials| and |\@sanitize| lists. Only familiar +% definitions of |\add@special| are changed. +% \begin{macrocode} +\def\@tempa#1{% + \rem@special{#1}% + \expandafter\gdef\expandafter\dospecials\expandafter + {\dospecials \do #1}% + \expandafter\gdef\expandafter\@sanitize\expandafter + {\@sanitize \@makeother #1}} +\ifx \@tempa\add@special + \def\add@special#1{% + \rem@special{#1}% + \expandafter\gdef\expandafter\dospecials\expandafter + {\dospecials \do #1}% + \expandafter\gdef\expandafter\@sanitize\expandafter + {\@sanitize \@makeother #1}% + \SetCharProblematic{`#1}% + } +\else + \PackageWarningNoLine{xdoc2}{Unfamiliar definition of + \protect\add@special;\MessageBreak the macro was not patched} +\fi +% \end{macrocode} +% \end{macro} +% +% +% +% \section{Indexing} +% \label{Sec:Indexing} +% +% Each type of index entry \package{doc} produces is implemented through +% a different indexing command.\footnote{Sometimes there are +% even more than one command per entry type---the \cs{SpecialIndex}, +% \cs{LeftBraceIndex}, \cs{RightBraceIndex}, and \cs{PercentIndex} +% commands all generate entries of the same type.} This might be +% manageable when there are only \texttt{macro}s and +% \texttt{environment}s to distinguish between, but it soon gets +% unmanageable if more environments of this type are added. Therefore +% all \package{xdoc} index entries are made with a single +% command---|\IndexEntry|. +% +% +% \subsection{New basic indexing commands} +% \label{Ssec:IndexEntry} +% +% \begin{macro}{\IndexEntry} +% \begin{macro}{\LevelSame} +% \changes{prot2.1}{2000/11/18}{New name for \cs{levelsame}. (LH)} +% \begin{macro}{\LevelSorted} +% \changes{prot2.1}{2000/11/18}{New name for \cs{levelsorted}. (LH)} +% \begin{macro}{\XD@if@index} +% The |\IndexEntry| command writes one index entry to the \texttt{.idx} +% file. It takes three arguments: +% \begin{quote} +% |\IndexEntry|\marg{entry text}\marg{encap}\marg{thenumber} +% \end{quote} +% The \meta{entry text} contains the text for the entry. It is a +% nonempty sequence of commands in which each item is one of +% \begin{quote} +% |\LevelSame|\marg{text}\\ +% |\LevelSorted|\marg{sort key}\marg{text} +% \end{quote} +% Each such item specifies one level of the entry that is to be +% written. In the case of |\LevelSorted|, the \meta{text} is what will +% be written in the sorted index at that level and \meta{sort key} is +% a key which the index-sorting program should use for sorting that +% entry at that level. In the case of |\LevelSame|, the \meta{text} is +% used both as sort key and contents of entry in the sorted index. +% The first item is for the topmost level and each subsequent item is +% for the next sublevel. The \meta{entry text} will be fully expanded +% by the |\IndexEntry| command. +% +% \meta{thenumber} is the number (if any) that the index entry refers +% to. It can consist of explicit characters, but it can also be a +% |\the|\meta{counter} control sequence or a macro containing such +% control sequences. \meta{thenumber} is fully expanded by the +% |\IndexEntry| command, with the exception for occurrences of +% |\thepage|---expansion of |\thepage| will instead be delayed until +% the page is shipped out, so that the page numbers will be right. +% \textbf{Note:} \meta{thenumber} must not contain any formatting that +% will upset the index-sorting program. \package{doc}'s default +% definition of |\theCodelineNo| contains such formatting, so one +% must instead use |\thecodelineno| as \meta{thenumber} in that case. +% +% \meta{encap} is the name of the encapsulation scheme that should be +% applied to \meta{thenumber}. All encapsulation schemes that have been +% implemented instruct the index sorting program to wrap up +% \meta{thenumber} in some code that gives it special formatting when +% the sorted index is written, but one could also use the \meta{encap} +% to specify `beginning of range' and `end of range' index entries. +% Use \GenericDescribePrint{\small\texttt{none}}^^A +% \SortIndex{none}{\texttt{none}\encapchar usage}\texttt{none} as +% \meta{encap} if you don't want any special formatting. +% +% \textbf{Note:} |\IndexEntry| uses |\@tempa| internally, so you +% cannot use that in argument \#2 or \#3. Using it in argument \#1 +% presents no problems, though. +% \begin{macrocode} +\newcommand\IndexEntry[3]{% + \@bsphack + \begingroup + \def\LevelSame##1{\levelchar##1}% + \def\LevelSorted##1##2{\levelchar##1\actualchar##2}% + \protected@edef\@tempa{#1}% + \protected@edef\@tempa{\expandafter\@gobble\@tempa\@empty}% + \@ifundefined{XD@idxencap@#2}{% + \PackageError{xdoc2}{Index entry encap `#2' unknown}\@eha + }{% + \XD@if@index{% + \csname XD@idxencap@#2\endcsname\@tempa{#3}% + }{}% + }% + \endgroup + \@esphack +} +% \end{macrocode} +% |\IndexEntry| does (like |\index|) not contribute any material to the +% current list if indices aren't being made. +% +% |\XD@if@index| is |\@firstoftwo| if index entries are being written +% and |\@second|\-|of|\-|two| if they are not. +% \begin{macrocode} +\let\XD@if@index=\@secondoftwo +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro} +% +% In \LaTeXplus, the \cs{IndexEntry} command should probably be +% implemented using templates, e.g. the \meta{encap}s could be names of +% instances. +% +% \begin{macro}{\levelsame} +% \begin{macro}{\levelsorted} +% These names were used for |\LevelSame| and |\LevelSorted| +% respectively in prototype version~2.0, but the macros should belong +% to the same capitalization class as |\IndexEntry| so their names +% were changed in prototype version~2.1. The old names |\levelsame| +% and |\levelsorted| will continue to work in \package{xdoc2}, though. +% \begin{macrocode} +%<*xdoc2> +\newcommand*\levelsame{\LevelSame} +\newcommand*\levelsorted{\LevelSorted} +% +% \end{macrocode} +% \end{macro}\end{macro} +% +% \describecsfamily{XD@idxencap@\meta{encap}}^^A +% Macros in the family |\XD@idxencap@|\meta{encap} takes two +% arguments as follows +% \begin{quote} +% |\XD@idxencap@|\meta{encap}\,\marg{entry}\,\marg{thenumber} +% \end{quote} +% They should write an entry with the \meta{encap} encapsulation of the +% \meta{thenumber} to the index file. They need not check whether index +% generation is on or not, but they must be subject to the \LaTeX\ kernel +% \texttt{@filesw} switch. They must expand both arguments fully at the +% time of the command, with the exception for the control sequence +% |\thepage|, which should not be expanded until the page on which the +% write appears is output. Both these conditions are met if the macro +% is implemented using |\protected@write|. +% +% \begin{macro}{\XD@idxencap@none} +% \begin{macro}{\XD@idxencap@main} +% \begin{macro}{\XD@idxencap@usage} +% These macros implement the encapsulation schemes that are used in +% \package{doc}. +% \begin{macrocode} +\def\XD@idxencap@none#1#2{% + \protected@write\@indexfile{}{\XD@index@keyword{#1}{#2}}% +} +% \end{macrocode} +% \begin{macrocode} +\def\XD@idxencap@main#1#2{% + \protected@write\@indexfile{}% + {\XD@index@keyword{#1\encapchar main}{#2}}% +} +% \end{macrocode} +% \begin{macrocode} +\def\XD@idxencap@usage#1#2{% + \protected@write\@indexfile{}% + {\XD@index@keyword{#1\encapchar usage}{#2}}% +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\XD@index@keyword} +% \changes{prot2.2}{2001/02/13}{Macro added and \meta{encap} macros +% changed to use it. (LH)} +% The |\XD@index@keyword| is a hook for changing the index entry +% keyword (the text that is put in front of every index entry in the +% \texttt{.idx} file). It is changed by e.g.\ the \package{docindex} +% package~\cite{docindex}. +% \begin{macrocode} +\@ifundefined{XD@index@keyword}{% + \edef\XD@index@keyword{\@backslashchar indexentry}% +}{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\CodelineIndex} +% \changes{prot2.1}{2000/10/08}{Using \cs{thecodelineno}. (LH)} +% \begin{macro}{\PageIndex} +% \begin{macro}{\TheXDIndexNumber} +% The |\CodelineIndex| and |\PageIndex| commands do the same things as +% in \package{doc}, but work with the \package{xdoc} internals instead +% of the \package{doc} ones. |\TheXDIndexNumber| is used as +% \meta{thenumber} argument to |\IndexEntry| by all indexing commands +% that would have used |\special@index| in \package{doc}. +% \begin{macrocode} +\renewcommand\CodelineIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indextrue + \def\TheXDIndexNumber{\thecodelineno}% +} +% \end{macrocode} +% \begin{macrocode} +\renewcommand\PageIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indexfalse + \def\TheXDIndexNumber{\thepage}% +} +% \end{macrocode} +% \begin{macrocode} +\def\TheXDIndexNumber{??} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% +% \subsection{Making good sort keys} +% +% \changes{prot2.1}{2000/11/15}{Sort key making commands added. (LH)} +% A common nuisance in \package{doc} indices is that many macros are +% sorted by parts of the name that do not carry any interesting +% information. In the \LaTeX\ kernel many macro names begin with a +% silent |@|, whereas the names of private macros in many packages +% (including this one) begin with some fixed abbreviation of the +% package name. Since such prefixes usually are harder to remember than +% the rest of the macro name, it is not uncommon that the index position +% one thinks of first isn't the one where the macro actually is put. +% Hence a mechanism for removing such annoying prefixes from the macro +% names might be useful, and that is presicely what is defined below. +% +% The actual mechanism is based on having a set of macros called +% \emph{operators} which operate on the harmless character string that +% is to become the sort key. Each operator has a specific prefix string +% which it tries to match against the beginning of the to-be sort key, +% and if they match then the prefix is moved to the end of the sort key. +% Automatically constructed operators (see below) have names of the form +% \describecsfamily{XD@operatorA@\meta{prefix}}|\XD@operatorA@|^^A +% \meta{prefix}, but operators can be given arbitrary names. +% +% \begin{macro}{\XD@operators@list} +% The |\XD@operators@list| macro contains the list of all currently +% active operators. +% \begin{macrocode} +\let\XD@operators@list\@empty +% \end{macrocode} +% \end{macro} +% +% The operators do all their work at expand-time. When an operator +% macro is expanded, it is in the context +% \begin{quote} +% \meta{operator} \meta{subsequent operators} |\@firstofone| +% \meta{sort key text} |\@empty| +% \end{quote} +% There may not be any |\@empty|s or |\@firstofone|s amongst the +% \meta{subsequent operators} or in the \meta{sort key text}. This should +% expand to +% \begin{quote} +% \meta{subsequent operators} |\@firstofone| \meta{operated-on sort +% key text} |\@empty| +% \end{quote} +% The purpose of the |\@firstofone| after the \meta{subsequent +% operators} is to remove any spaces that some operator might have put +% in front of the sort key. This happens if the entire sort key text has +% been ignored by some operator. +% +% \begin{macro}{\MakeSortKey} +% The |\MakeSortKey| command is called to make the acutal sort key. +% The syntax of this command is +% \begin{quote} +% |\MakeSortKey|\marg{macro}\marg{text}\marg{extras} +% \end{quote} +% This locally defines \meta{macro} to be the sort key that the +% currently active operators manufacture from \meta{text}. The +% \meta{extras} argument can contain additional assignments needed for +% handling macros with special harmless forms, such as |\meta|. +% \begin{macrocode} +\newcommand\MakeSortKey[3]{% + \begingroup + \def\PrintChar{\string\PrintChar\XD@threedignum}% + #3% + \unrestored@protected@xdef\@gtempa{#2}% + \endgroup + \protected@edef#1{% + \expandafter\XD@operators@list \expandafter\@firstofone + \@gtempa\@empty + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XD@make@operator} +% The |\XD@make@operator| macro takes a harmless character sequence as +% argument, constructs the corresponding operator, and returns the +% operator control sequence in the |\toks@| token list register. +% +% More precisely, given a harmless character string \meta{string}, +% |\XD@make@operator| will construct a sequence of other tokens +% \meta{text} from \meta{string} by replacing all |\PrintChar| +% commands in the same way as |\MakeSortKey| does. Then it defines the +% macro |\XD@operatorA@|\meta{text} to be +% \begin{quote} +% \raggedright \spaceskip=0.16666em +% \#1\,|\@firstofone|\,\#2\,|\@empty| \ $\rightarrow$ \ % +% |\XD@operatorB@|\meta{text} |\@firstofone| \#2 +% |\@firstofone| \meta{text} |\@firstofone| |\relax| \#1 |\@empty| +% \end{quote} +% and the macro |\XD@operatorB@|\meta{text} to do +% \begin{quote} +% \raggedright +% \#1\,|\@firstofone|\,\meta{text}\,\#2\,|\@firstofone|\,\#3\,^^A +% |\relax|\,\#4\,|\@empty| $\rightarrow$ +% \#4\,\( \left\{ \begin{array}{ll} +% \mbox{\cs{@firstofone}\,\#2\,\textvisiblespace\,\meta{text}\,^^A +% \cs{@empty}}& \mbox{if \#1 is empty}\\ +% \mbox{\#1\,\cs{@empty}}& \mbox{otherwise} +% \end{array} \right.\) +% \end{quote} +% +% \begin{macrocode} +\def\XD@make@operator#1{% + \begingroup + \def\PrintChar{\string\PrintChar\XD@threedignum}% + \let\protect\@gobble + \xdef\@gtempa{#1}% + \endgroup + \expandafter\edef \csname XD@operatorA@\@gtempa\endcsname + ##1\@firstofone##2\@empty{% + \expandafter\noexpand \csname XD@operatorB@\@gtempa\endcsname + \noexpand\@firstofone ##2\noexpand\@firstofone \@gtempa + \noexpand\@firstofone \relax##1\noexpand\@empty + }% + \expandafter\edef \csname XD@operatorB@\@gtempa \expandafter\endcsname + \expandafter##\expandafter1\expandafter\@firstofone \@gtempa + ##2\@firstofone##3\relax##4\@empty{% + \noexpand\ifx $##1$% + \noexpand\expandafter \noexpand\@firstoftwo + \noexpand\else + \noexpand\expandafter \noexpand\@secondoftwo + \noexpand\fi{% + ##4\noexpand\@firstofone ##2 \@gtempa + }{##4##1}% + \noexpand\@empty + }% + \toks@=\expandafter{\csname XD@operatorA@\@gtempa\endcsname}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DoNotIndexBy} +% The |\DoNotIndexBy| command has the syntax +% \begin{quote} +% |\DoNotIndexBy|\marg{morpheme} +% \end{quote} +% It causes the \meta{morpheme} to be put \emph{last} in the index +% sort key for each macro name which begins by \meta{morpheme}. This +% can be used to ignore e.g.\ ``silent'' |@|s at the beginning of a +% macro name. +% \begin{macrocode} +\newcommand\DoNotIndexBy[1]{% + \MakeHarmless\@tempa{#1}% + \XD@make@operator\@tempa + \expandafter\def \expandafter\XD@operators@list \expandafter{% + \the\expandafter\toks@ \XD@operators@list + }% +} +% \end{macrocode} +% \end{macro} +% +% +% +% +% \subsection{Reimplementations of \package{doc} indexing commands} +% +% The \package{doc} indexing commands aren't that interesting in +% \package{xdoc}, since they take `raw' control sequences as +% arguments rather than the harmless strings that the \package{xdoc} +% commands will want to put in the index. But it can be instructive to +% see how they would be implemented in this context. +% +% \begin{macro}{\SortIndex} +% \changes{prot2.2}{2001/02/13}{Redefinition added. (LH)} +% The |\SortIndex| takes a sort key and an entry text as argument, and +% writes a one-level index entry for that. +% \begin{macrocode} +\renewcommand*\SortIndex[2]{% + \IndexEntry{\LevelSorted{#1}{#2}}{none}{\thepage}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SpecialIndex} +% \begin{macro}{\SpecialMainIndex} +% \begin{macro}{\SpecialUsageIndex} +% The |\SpecialIndex|, |\SpecialMainIndex|, and |\SpecialUsageIndex| +% commands take a control sequence (or more often something which looks +% like a |\string|ed control sequence) as their only argument. The +% entry text is that item verbatim, and the initial backslash is +% ignored in sorting (|\Special|\-|Index| always ignores the first +% character regardless of whether it is a backslash or not, the other +% two checks first). |\Special|\-|Index| has \texttt{none} formatting, +% |\Special|\-|Main|\-|Index| has \texttt{main} formatting, and +% |\Special|\-|Usage|\-|Index| has \texttt{usage} formatting of the +% index number. +% +% Although these definitions will (or at least are supposed to) yield +% the same typeset results as the \package{doc} definitions in the +% mainstream cases, I doubt that they will do so in all cases. At any +% rate, they shouldn't perform worse. +% \begin{macrocode} +\renewcommand\SpecialIndex[1]{% + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#1}% + \IndexEntry{% + \LevelSorted{% + \expandafter\XD@unbackslash \@tempa\@empty + }{\texttt{\@tempa}}% + }{none}{\TheXDIndexNumber}% +} +% \end{macrocode} +% \begin{macrocode} +\renewcommand\SpecialMainIndex[1]{% + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#1}% + \IndexEntry{% + \LevelSorted{% + \expandafter\XD@unbackslash \@tempa\@empty + }{\texttt{\@tempa}}% + }{main}{\TheXDIndexNumber}% +} +% \end{macrocode} +% \begin{macrocode} +\renewcommand\SpecialUsageIndex[1]{% + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#1}% + \IndexEntry{% + \LevelSorted{% + \expandafter\XD@unbackslash \@tempa\@empty + }{\texttt{\@tempa}}% + }{usage}{\thepage}% +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\XD@unbackslash} +% \begin{macro}{\XD@unbackslash@} +% |\XD@unbackslash| is a utility macro which removes the first +% character from a harmless character string if that character is a +% backslash (i.e., if it is |\PrintChar{92}|). The \package{doc} +% commands have traditionally used |\@gobble| for doing this, but the +% \cs{@SpecialIndexHelper@} macro that was comparatively recently added +% tries to do better. +% \begin{macrocode} +\def\XD@unbackslash#1{% + \ifx \PrintChar#1% + \expandafter\XD@unbackslash@ + \else + \expandafter#1% + \fi +} +\def\XD@unbackslash@#1{\ifnum #1=92 \else \PrintChar{#1}\fi} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\SpecialMainEnvIndex} +% \begin{macro}{\SpecialEnvIndex} +% These are similar to the above, but \package{doc} thinks that the +% arguments don't need any special care, and it produces two index +% entries per command. |\Special|\-|Env|\-|Index| should really have +% been called |\Special|\-|Usage|\-|Env|\-|Index|. +% \begin{macrocode} +\renewcommand\SpecialMainEnvIndex[1]{% + \IndexEntry{\LevelSorted{#1}{\texttt{#1} (environment)}}{main}% + {\TheXDIndexNumber}% + \IndexEntry{\LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}}% + {main}{\TheXDIndexNumber}% +} +% \end{macrocode} +% \begin{macrocode} +\renewcommand\SpecialEnvIndex[1]{% + \IndexEntry{\LevelSorted{#1}{\texttt{#1} (environment)}}{usage}% + {\thepage}% + \IndexEntry{\LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}}% + {usage}{\thepage}% +} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\it@is@a} +% \begin{macro}{\XD@special@index} +% The |\it@is@a| macro is a specialized version of |\SpecialIndex|, +% but the format of its argument is quite different. After full +% expansion the argument will become a single category 12 token +% (\meta{t}, say), and the control sequence for which an entry should +% be made is |\|\meta{t}. \package{doc} uses |\it@is@a| for control +% sequences with one-character names. Note: The following +% definition should really have special code for the \Module{economical} +% \package{docstrip} module, but I don't think that is necessary +% since the \package{doc} macros which used |\it@is@a| will be +% redefined so that they don't. +% +% |\XD@special@index| does the same thing as |\SpecialIndex|, but it +% does it with \package{xdoc} datatypes---the argument must be a +% harmless character string that does not include the initial escape +% (backslash). +% \changes{prot2.1}{2000/11/15}{Using \cs{MakeSortKey} to make the +% sort key. (LH)} +% \begin{macrocode} +\def\it@is@a#1{% + \edef\@tempa{#1}% + \XD@special@index{\csname XD@harmless@\number + \expandafter`\@tempa\endcsname}% +} +% \end{macrocode} +% \begin{macrocode} +\def\XD@special@index#1{% + \MakeSortKey\@tempa{#1}{}% + \IndexEntry{\LevelSorted{\@tempa}{\texttt{\Bslash#1}}}{none}% + {\TheXDIndexNumber}% +} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\LeftBraceIndex} +% \begin{macro}{\RightBraceIndex} +% \begin{macro}{\PercentIndex} +% \begin{macro}{\OldMakeIndex} +% More specialised forms of |\SpecialIndex|. The |\OldMakeIndex| +% command can safely be made a no-op. +% \begin{macrocode} +\renewcommand\LeftBraceIndex{\XD@special@index{\PrintChar{123}}} +\renewcommand\RightBraceIndex{\XD@special@index{\PrintChar{125}}} +\renewcommand\PercentIndex{\XD@special@index{\PrintChar{37}}} +\let\OldMakeIndex\relax +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\@wrindex} +% \changes{prot2.2}{2001/02/13}{Redefinition added. (LH)} +% Finally, while we're at redefining indexing commands, let's redefine +% |\@wrindex| as well to ensure that the index entry keyword is the +% same for all indexing commands. +% \begin{macrocode} +\def\@wrindex#1{% + \protected@write\@indexfile{}{\XD@index@keyword{#1}{\thepage}}% + \endgroup + \@esphack +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Cross-referencing} +% +% \subsection{Scanning \texttt{macrocode} for \TeX\ control sequences} +% \label{Ssec:Scanning macrocode} +% +% The cross-referencing mechanism in \package{doc} isn't problematic in +% the same way as the indexing mechanism is, so one could pretty much +% leave it as it is, but there are things that are better done +% differently when the basic indexing commands are based on harmless +% character strings. Rather than storing control sequence names (without +% escape character) as sequences of category 11 tokens, they will be +% stored as the equivalent harmless character strings. +% +% \begin{macro}{\macro@switch} +% As in \package{doc}, |\macro@switch| determines whether the control +% sequence name that follows consists of letters (call |\macro@name|) +% or a single non-letter (call |\short@macro|). Unlike \package{doc}, +% \package{xdoc} accumulates the characters from a multiple-letter +% control sequence name in a token register (|\@toks|), which is why +% that is cleared here. +% \begin{macrocode} +\def\macro@switch{% + \ifcat\noexpand\next a% + \toks@={}% + \expandafter\macro@name + \else + \expandafter\short@macro + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scan@macro} +% Since |\macro@namepart| isn't used as in \package{doc}, I might as +% well remove the command that cleared it from |\scan@macro|. +% \begin{macrocode} +\def\scan@macro{% + \special@escape@char + \step@checksum + \ifscan@allowed + \def\next{\futurelet\next\macro@switch}% + \else \let\next\@empty \fi + \next} +% \end{macrocode} +% \end{macro} +% +% +% +% \begin{macro}{\short@macro} +% This macro will be invoked (with a single character as parameter) +% when a single-character macro name has been spotted whilst +% scanning within the \texttt{macrocode} environment. It will produce +% an index entry for that macro, unless that macro has been excluded +% from indexing, and it will also typeset the character that +% constitutes the name of the macro. +% \begin{macrocode} +\def\short@macro#1{% + \protected@edef\macro@namepart{% +%<*economical> + \ifnum `#1<\@xxxii + \noexpand\PrintChar{\number`#1}% + \else\ifnum `#1>126 + \noexpand\PrintChar{\number`#1}% + \else +% + \csname XD@harmless@\number`#1\endcsname +% \fi\fi + }% + \ifnot@excluded \XD@special@index{\macro@namepart}\fi +% \end{macrocode} +% The cross-referencing mechanism is disabled for when the actual +% character is printed, as it could be the escape character. The index +% entry must be generated before the character is printed to ensure +% that no page break intervenes (recall that a |^^M| will start a new +% line). +% \begin{macrocode} + \scan@allowedfalse #1\scan@allowedtrue +} +% \end{macrocode} +% \end{macro} +% +% There is one mechanism in |\TeX|'s control sequence tokenization that +% |\short@|\B|macro| doesn't cover, and that is the |^^| sequence +% substitution---|\^^M| is (with default catcodes) seen as the three +% tokens |\^|, |^|, and |M|, not as the single control +% sequence token that \TeX\ will make out of it. But this is the way it +% is done in \package{doc}. +% +% +% \begin{macro}{\macro@name} +% \begin{macro}{\more@macroname} +% \begin{macro}{\macro@finish} +% Then there's the macros for assembling a control sequence name which +% consists of one or more letters (category 11 tokens). (This includes +% both the characters which are normally letters in the document and +% those that are made letters by |\MakePrivateLetters|.) They're +% pretty straightforward. +% \begin{macrocode} +\def\macro@name#1{% +%<*economical> + \if \ifnum `#1<\@xxxii 1\else \ifnum `#1>126 1\else 0\fi\fi 1% + \toks@=\expandafter{\the\expandafter\toks@ + \expandafter\PrintChar \expandafter{\number`#1}% + }% + \else +% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@\number`#1\endcsname}% +% \fi + \futurelet\next\more@macroname} +% \end{macrocode} +% \begin{macrocode} +\def\more@macroname{% + \ifcat\noexpand\next a% + \expandafter\macro@name + \else + \macro@finish + \fi +} +% \end{macrocode} +% \begin{macrocode} +\def\macro@finish{% + \edef\macro@namepart{\the\toks@}% + \ifnot@excluded \XD@special@index{\macro@namepart}\fi + \macro@namepart +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% +% +% \subsection{The index exclude list} +% \label{Ssec:Index-exclude} +% +% The index exclude list mechanisms are not quite as simple to convert +% for use with harmless character strings as the construction of macro +% names are. This is because the trick used for searching the exclude +% list for a certain string doesn't work if the string one is looking +% for contains tokens with category 1 or 2 (beginning and end of group), +% as the \meta{parameter text} of a |\def| cannot contain such tokens. +% On the other hand the only groups that can appear in the harmless +% character strings one will be looking for are the ones around the +% argument of some |\PrintChar|, and these can easily be converted to +% something else. Therefore an item in the index exclude list of +% \package{xdoc} will have the format +% \begin{quote} +% |\do|\,\meta{string} +% \end{quote} +% where the \meta{string} is different from a harmless character string +% only in that all |\PrintChar|\marg{num} have been replaced by +% |\PrintChar|\parg{num}. The \meta{string} does not include an escape +% character. The |\do| serves only to separate the item from the one +% before, but it could in principle be used for other purposes as well +% (such as in typesetting the entire exclude list). +% +% \begin{macro}{\XD@paren@PrintChar} +% |\XD@paren@PrintChar| is a definition of |\PrintChar| which, when it +% is used in an |\edef|, merely replaces the group around the argument +% by a parenthesis and normalizes the number in the argument. +% \changes{prot2.1}{2000/09/16}{\cs{number} added. (LH)} +% \begin{macrocode} +\def\XD@paren@PrintChar#1{\noexpand\PrintChar(\number#1)} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DoNotIndex} +% \changes{prot2.1}{2000/09/16}{Also changing catcode of \%. (LH)} +% \begin{macro}{\do@not@index} +% \begin{macro}{\XD@do@not@index} +% These are the macros which add elements to the index exclude list. +% |\DoNotIndex| is pretty much as in \package{doc}, but I have added +% resetting of the catcodes of `|,|' (since |\XD@do@not@index| relies +% on it) and `|#|' (since it can otherwise mess things up for the +% |\def\@tempa| in |\do@not@index|). +% \begin{macrocode} +\renewcommand\DoNotIndex{% + \begingroup + \MakePrivateLetters + \catcode`\#=12\catcode`\\=12\catcode`,=12\catcode`\%=12 + \expandafter\endgroup \do@not@index +} +% \end{macrocode} +% +% |\do@not@index|, on the other hand, is quite different, as it more +% or less has to convert the argument from the format used in +% \package{doc} to that of \package{xdoc}. The bulk of the work is +% done by |\XD@do@not@index|, which grabs one of the elements in the +% argument of |\do@not@index| and converts it (minus the initial +% backslash) to a harmless character string. That harmless character +% string is then converted by |\XD@paren@PrintChar|, so that the +% string can be searched for using |\expanded@notin|. +% +% The reason for using a special loop structure here, as opposed to +% using for example |\@for|, is that one cannot use either of |\| +% or |,| alone as item separators, as they may both be part of control +% sequence names (consider for example |\DoNotIndex{\a,\\,\b,\,,\c}|), +% but they should be sufficient when combined. +% +% The reason for storing new elements in |\toks@| until the end of +% the loop and only then inserting them into the index exclude list +% is speed; the index exclude list can get rather large, so you don't +% want to expand it more often than you have to. I don't know if the +% difference is noticeable, though. +% \begin{macrocode} +\begingroup + \catcode`\|=0 + \catcode`\,=12 + \catcode`\\=12 +% \end{macrocode} +% \SpecialEscapechar{\|} +% \begin{macrocode} + |gdef|do@not@index#1{% + |def|@tempa{#1}% + |ifx |@empty|@tempa |else + |toks@={}% + |expandafter|XD@do@not@index |@gobble #1,\|XD@do@not@index,\% + |fi + } + |gdef|XD@do@not@index#1,\{% + |ifx |XD@do@not@index#1% + |index@excludelist=|expandafter{% + |the|expandafter|index@excludelist |the|toks@ + }% + |expandafter|@gobble + |else + |MakeHarmless|@tempa{#1}% + |begingroup + |let|PrintChar|XD@paren@PrintChar + |unrestored@protected@xdef|@gtempa{|noexpand|do|@tempa}% + |endgroup + |toks@=|expandafter{|the|expandafter|toks@ |@gtempa}% + |fi + |XD@do@not@index + } +|endgroup +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\DoNotIndexHarmless} +% The |\DoNotIndexHarmless| command takes a harmless character string +% as argument and locally adds the control sequence whose name is that +% character string to the index exclude list. +% \begin{macrocode} +\newcommand\DoNotIndexHarmless[1]{% + \begingroup + \let\PrintChar\XD@paren@PrintChar + \unrestored@protected@xdef\@gtempa{\noexpand\do#1}% + \endgroup + \index@excludelist=\expandafter{% + \the\expandafter\index@excludelist \@gtempa + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\index@excludelist} +% In case the index exclude list is not empty, its contents are +% converted to \package{xdoc} format. +% \begin{macrocode} +\edef\@tempa{\the\index@excludelist} +\index@excludelist{} +\ifx \@tempa\@empty \else + \def\@tempb#1,\@nil{\do@not@index{#1}} + \expandafter\@tempb \@tempa \@nil + \let\@tempa\@empty + \let\@tempb\@empty +\fi +% \end{macrocode} +% The fact that the |\XD@|\B|harmless@|\B\meta{code} table has not +% yet reached its final form means that some of these control sequences +% listed in the exclude list might get a different form here than they +% actually should, but there isn't much that can be done about that. It +% is furthermore unusual that control sequence are given such names +% that they would be affected by this. +% \end{macro} +% +% \begin{macro}{\ifnot@excluded} +% The |\ifnot@excluded| macro ultimately boils down to an +% \texttt{if}, which evaluates to true if and only if the string in +% |\macro@namepart| is not one of the items in the index exclude +% list. Before |\expanded@notin| gets to carry out the actual test, +% the |\PrintChar| calls in |\macro@namepart| are converted by +% |\XD@paren@PrintChar| (it's OK to use an unprotected |\edef| for +% this, since |\PrintChar| is the only control sequence that can +% appear in |\macro@namepart|) so that |\expanded@notin| can be used +% to test for its presence. +% \begin{macrocode} +\def\ifnot@excluded{% + \begingroup + \let\PrintChar\XD@paren@PrintChar + \edef\@tempa{\macro@namepart}% + \expandafter\endgroup \expandafter\expanded@notin + \expandafter{\expandafter\do \@tempa\do}% + {\the\index@excludelist}% +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{External cross-referencing} +% \label{Ssec:XXR} +% +% (This subsection is a bit speculatory, but I think the structures it +% describes may come in handy.) +% +% \changes{prot2}{2000/07/31}{I finally decided that it would be better +% to make the XXR-commands look like comments to \TeX. (LH)} +% +% It's rather easy to write macros for scanning \TeX\ code for the names +% of control sequences---just look for the escape (category 0) +% character, and whatever follows is the name of a control sequence. +% Doing the same thing for other languages may lay anywhere between +% ``a~tricky exercise in advanced \TeX\ programming'' and ``possible in +% theory'',\footnote{I.e., you know it can be implemented as a computer +% program (in some language), you know that any computer program can be +% translated to a Turing machine (or if you prefer that, expressed in +% lambda calculus), and you know that a Turing machine can be emulated +% by \TeX, but that's the closest thing to a solution you've managed to +% come up with.} but in most cases the available solutions turn out to be +% too complicated and\slash or slow to be of practical use. When that +% happens, one might instead want to use some external piece of software +% for doing the cross-referencing. +% +% The commands in this subsection implement basic support for such an +% external cross-referencing program (or XXR,\footnote{Maybe not the +% most logical name, but it looks much cooler than ECR.} for short). The +% idea is that an XXR should communicate with \LaTeX\ like \BibTeX\ +% does---scan the \texttt{.aux} file (or files, if we're |\include|ing +% things) for certain ``commands'' and use them to locate the files to +% cross-reference, get parameter settings (like for example entries for +% the index exclude list), and so on. It should then cross-reference the +% file(s) and write the index entries in a suitable format to some file +% (appending them to the \texttt{.idx} file is probably the easiest +% solution). This way, it is (almost) as simple to use as the built-in +% cross-referencing and the extra work for supporting it is (in +% comparison to not supporting it) negligible. +% +% \begin{xrefcmd}{ExternalXRefMsg} +% \begin{macro}{\SendExternalXRefMsg} +% \changes{prot2}{2000/07/28}{Added \cs{if@filesw} test. (LH)} +% It's hardly possible to predict all kinds of information that one +% might want to give to an XXR, and neither can one assume that +% there is only one XXR program that will read the \texttt{.aux} +% file. A complicated project might involve code in several languages, +% and each language might have its own XXR. +% Therefore the general XXR-command (text in an \texttt{.aux} file which +% is used for communicating information to an XXR) simply has the syntax +% \begin{quote} +% \verb*|%%ExternalXRefMsg |\marg{who}\verb*| |\marg{what} +% \end{quote} +% \meta{who} identifies the XXR this message is meant for. It must be +% balanced text to \TeX\ and may not contain any whitespace, but can +% otherwise be rather arbitrary. \meta{what} is the actual message. It +% too must be balanced text to \TeX\ and it may not contain any +% newlines, but it is otherwise arbitrary. +% \index{whitespace restrictions}^^A +% The reason for these restrictions on the contents of \meta{who} and +% \meta{what} is that many (maybe even most) scripting languages +% (which is what at least the \texttt{.aux}-scanning part of an +% XXR will probably be written in) are much better at recognising +% words on a line than they are at recognising a brace-delimited group. +% By accepting these restrictions, one can make sure that all XXRs can +% correctly determine whether a message is for them, even if they see +% the \texttt{.aux} file as a sequence of lines composed of +% whitespace-delimited words. +% +% |\SendExternalXRefMsg| is the basic command for writing +% |ExternalXRefMsg|s to the \texttt{.aux} file, but it might be +% recommendable that XXR writers provide users with a set of commands +% that have more specific purposes. The syntax of the +% |\Send|\-|External|\-|XRef|\-|Msg| command is (hardly surprising) +% \begin{quote} +% |\SendExternalXRefMsg|\marg{who}\marg{what} +% \end{quote} +% |\SendExternalXRefMsg| does a protected full expansion (like +% |\protected@edef|) of its arguments at the time it is called. +% \begin{macrocode} +\newcommand\SendExternalXRefMsg[2]{% + \begingroup + \if@filesw + \let\protect\@unexpandable@protect + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefMsg {#1} {#2}}% + \fi + \endgroup +} +% \end{macrocode} +% \end{macro}\end{xrefcmd} +% +% The remaining commands in this subsection address complications that +% exist because of how \texttt{.dtx} files are generally written, and +% thus constitutes difficulties that all XXRs will have to face. +% +% \begin{xrefcmd}{ExternalXRefFile} +% The usual way to write \texttt{.dtx} files is to include a +% driver---a~short piece of uncommented \LaTeX\ code which contains +% the necessary preamble material and a document body which mainly +% contains a |\DocInput| for the \texttt{.dtx} file itself---but it +% is also usually understood that this driver may be copied to another +% file if necessary and larger projects usually have a completely +% separate driver file. Therefore an XXR cannot be expected to be +% able to find the file(s) to cross-reference simply by changing +% suffix on the name of the \texttt{.aux} file it reads its commands +% from. A more intricate method must be used. +% +% To tell the XXR that ``here I input the file \dots'', one includes +% an |External|\-|XRef|\-|File| XXR-command in the \texttt{.aux} file. +% Its syntax is +% \begin{quote} +% \verb*|%%ExternalXRefFile |\marg{cmd}\verb*| |\marg{file}^^A +% \verb*| |\marg{what} +% \end{quote} +% \meta{file} is the name (as given to |\input| or the like) of the +% file to input. \meta{cmd} is either \texttt{begin} (begin of +% \meta{file}) or \texttt{end} (end of \meta{file}). \meta{what} is a +% declaration of what is in the file; XXRs should use it to determine +% whether they should process this file or not. \meta{what} is empty +% if all XXRs should process the file, but for example |\IndexInput| +% will put \texttt{TeX} here to declare that the contents of this file +% are \TeX\ code and only XXRs that cross-reference \TeX\ code need to +% process this file. +% +% In connection to this, it should be mentioned that XXRs must also look +% for (and act on) |\@input|\penalty\hyphenpenalty\marg{auxfile} commands +% that |\include| or |\DocInclude| has written to the \texttt{.aux} file, +% since these \meta{auxfile}s can also contain commands for the XXR +% that should result in output to the same \texttt{.idx} file. In +% particular, the |ExternalXRefFile| XXR-commands that are written +% because of a |\DocInclude| will be written to such an \meta{auxfile}. +% \end{xrefcmd} +% +% \begin{xrefcmd}{ExternalXRefSync} +% Most XXRs will probably find it an unreasonable task to keep exact +% track of all codelines in all documents, i.e., they will sometimes +% think that a piece of code contains more or fewer numbered +% codelines than it actually does. If for example a document contains +% code such as\iffalse +%<*example> +% \fi +%\begin{verbatim} +%% \iffalse +%% \begin{macrocode} +%Etaoin Shrldu +%% \end{macrocode} +%% \fi +%\end{verbatim}\iffalse +% +%\fi +% then all reasonable XXRs will probably be fooled into thinking that +% the \texttt{Etaoin Shrldu} line is a numbered codeline. This would +% of course be very bad if an XXR thought it should cross-reference +% the contents of this line, but that shouldn't usually be a problem +% since the specifications\footnote{I imagine these specifications +% will consist of a list of \package{docstrip} options (modules), +% possibly used in combination with restrictions on the names of +% surrounding environments.} of what code should be cross-referenced +% will probably make it clear that the above line should not be +% cross-referenced. Code such as the above will still be problematic +% however, as it will cause the XXR to believe that the +% \texttt{codelineno} counter has another value on any following +% line that is indexed than it actually has in the typeset +% document. This will cause index entries to refer to another line +% than it actually should. +% +% To overcome this, the |ExternalXRefSync| XXR-command can be used to +% tell the XXR what the corresponding values of |\inputlineno| and +% \texttt{codelineno} are. Its syntax is +% \begin{quote} +% \verb*|%%ExternalXRefSync |\marg{inputlineno}\verb*| |^^A +% \marg{codelineno} +% \end{quote} +% where \meta{inputlineno} is the expansion of |\the\inputlineno| and +% \meta{codelineno} is the expansion of |\thecodelineno|, both +% expanded at the same point in the program. Note here that the first +% line of a file is line number 1, that line number 0 is used to +% denote ``just before the first line'', and that \texttt{codelineno} +% gets increased immediately before the number is typeset (i.e., +% \texttt{codelineno} contains the number of the last numbered +% codeline). +% \end{xrefcmd} +% +% This doesn't support external cross-referencing by pages, since doing +% that requires that the document outputs a lot more information to the +% \texttt{.aux} file. In principle, one could put a |\mark|\penalty0 +% |{\thecodelineno}| in |\PrintCodelineNo| and a |\write| in the page +% header which outputs to the \texttt{.aux} file which range of +% codelines correspond to a given page, but the \LaTeXe\ sectioning +% commands' use of marks tends to interfere with this. The \LaTeXplus\ +% package \package{xmarks} will probably solve that problem, though. +% +% \begin{macro}{\syncexternalxref} +% \changes{prot2}{2000/07/28}{New name for \cs{SendExternalXRefSync}. +% Also added \cs{if@filesw} test. (LH)} +% ^^A Johann Sebastian Bach: 1685/03/21--1750/07/28 +% The |\syncexternalxref| command writes an |ExternalXRefSync| +% XXR-command for the current line number and value of the +% \texttt{codelineno} counter to \texttt{.aux} file. It is used for +% synchronizing the numbered codeline counter that an XXR maintains with +% the \texttt{codelineno} counter that is used for numbering codelines +% in the typeset document after a piece of code in the document that +% some XXR is likely to misinterpret. |\sync|\-|external|\-|xref| +% shouldn't be used inside \texttt{macrocode} environments (or the +% like) as they tend to read ahead in the file---instead it is best +% placed shortly after such an environment. |\sync|\-|external|\-|xref| +% has no arguments. +% \begin{macrocode} +\newcommand\syncexternalxref{% + \if@filesw + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefSync {\the\inputlineno} {\thecodelineno}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{xrefcmd}{ExternalXRefWrap} +% The |\DocInclude| command complicates matters for XXRs by redefining +% things so that the \texttt{codelineno} counter only makes up a part +% of the line numbers appearing in the index. The purpose of the +% |External|\-|XRef|\-|Wrap| XXR-command is to inform XXRs about such +% changes. The command +% \begin{quote} +% \verb*|%%ExternalXRefWrap {|\meta{prefix}\verb*|} {|^^A +% \meta{suffix}|}| +% \end{quote} +% means that codeline numbers written to the index should have the form +% \begin{quote} +% \meta{prefix}\meta{codelineno}\meta{suffix} +% \end{quote} +% This setting takes effect from the next |External|\-|XRef|\-|Sync| +% and stays in effect until the end of the document or until another +% |External|\-|XRef|\-|Wrap| overrides it. The state at the beginning +% of the document is to have both \meta{prefix} and \meta{suffix} +% empty. +% \end{xrefcmd} +% +% +% \begin{macro}{\XD@input} +% The |\XD@input| command is a version of |\input| which takes care +% to inform XXRs that another file is being |\input|ted. Its syntax is +% \begin{quote} +% |\XD@input|\marg{file}\marg{what} +% \end{quote} +% where \meta{file} is the name of the file to |\input| and \meta{what} +% is the contents of the file, as specified in +% |External|\-|XRef|\-|File| commands. +% \begin{macrocode} +\def\XD@input#1#2{% + \if@filesw + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefFile {begin} {#1} {#2}% + }% + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefSync {0} {\thecodelineno}% + }% + \fi + \input{#1}% + \if@filesw + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefFile {end} {#1} {#2}% + }% + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefSync {\the\inputlineno} {\thecodelineno}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DocInput} +% The |\DocInput| command is redefined so that it writes +% |External|\-|XRef|\-|File| and |External|\-|XRef|\-|Sync| XXR-commands +% to the \texttt{.aux} file. Furthermore, with \package{xdoc} one +% should always use the |\DocInput| command (or some command based on +% it, like |\DocInclude|) for inputting a file where percent is an +% `ignore' character---even when one such file inputs another. (Doing +% that didn't work with the \package{doc} definition, as it always +% called |\MakePercentComment| upon return, but the \package{xdoc} +% definition contains code for dealing with that.) +% \begin{macrocode} +\renewcommand\DocInput[1]{% + \relax + \ifnum \catcode`\%=14 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi{% + \MakePercentIgnore\XD@input{#1}{}\MakePercentComment + }{\XD@input{#1}{}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\IndexInput} +% The |\IndexInput| command also needs to be redefined to write +% XXR-commands to the \texttt{.aux} file. It would +% probably be enough here to write an |External|\-|XRef|\-|Sync| +% after the file has been |\input| since no external +% cross-referencing of |\IndexInput|ted files is needed, but I do the +% more verbose variant here just to exemplify how these things would +% look for other languages. +% \begin{macrocode} +\renewcommand\IndexInput[1]{% + \begingroup + \macro@code + \frenchspacing + \@vobeyspaces + \XD@input{#1}{TeX}% + \endmacrocode + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% +% +% \section{Two-sided printing} +% \label{Sec:Twoside} +% +% The main problem one faces when reimplementing \package{doc} so that +% the marginal material always appears in the outer margin in two-sided +% documents is that the justification of \package{doc}'s marginal +% material is asymmetric; it always extends outwards. This means that +% the justification to use when typesetting the marginal material must +% depend on whether it is to be put on a left or a right +% page---something which cannot be determined for sure when the +% material is typeset! This is a minor difficulty if the marginal material +% is put in place using \LaTeX's |\marginpar| command, as that allows the +% user to supply different versions of the marginal paragraph for left and +% right margin placements. It is however a major difficulty if the +% marginal material is displaced out into the margin from within the main +% galley (like the \texttt{macro} environment of \package{doc} does), +% since the output routine is never involved. +% +% Even though this difficulty provides arguments for using a |\marginpar| +% mechanism for all text that is put in the margin, that will not be +% done in \package{xdoc} (but maybe it will in some successor). +% Instead \package{xdoc} contains a general mechanism which uses data +% written to the \texttt{.aux} file for determining whether a piece of +% text was put on an odd or even numbered page the \emph{last} time the +% document was typeset. By the usual convergence of page breaks in a +% \LaTeX\ document, this will eventually produce a typeset document +% with the marginal material consistently in the outer margin. +% +% The mechanism works as follows. The places in the document (the +% document source) at which it is necessary to determine whether +% something is going to appear on an even (left) or an odd (right) page +% are called ``page situations''\footnote{I know it's not a particularly +% good name. Suggestions for better names are gracefully accepted.} or +% just ``situations''. In each situation, a relatively simple test (is +% the \texttt{page} counter currently even or odd?) which is right more +% often than not is used as a first guess, and both the guess, the +% placement actually used, and the correct answer (determined from the +% value of \texttt{page} when the piece of text is shipped out) are +% recorded in the \texttt{.aux} file. If the guess (for the current +% situation) coincided with the correct answer the last time the +% document was typeset then the guess determined now is used, otherwise +% the opposite of the guess determined now is used. Finally, when at +% |\end{document}| the \texttt{.aux} file is inputted to check for +% changed labels, the placements used are also checked and the user is +% given a suitable warning if there was an incorrect one. +% +% \begin{macro}{\IfOddPageSituation} +% The |\IfOddPageSituation| macro is the user level test for whether +% the current page situation appears on an odd or an even page. It +% has the syntax +% \begin{quote} +% |\IfOddPageSituation|\marg{odd}\marg{even} +% \end{quote} +% and this will expand to \meta{odd} if the current situation is +% expected to end up on an odd page (based on how correct it was to +% look at the value of \texttt{page} last time) and to \meta{even} +% otherwise. In single-sided mode, it always expands to \meta{even}. +% In two-sided mode, |\IfOddPageSituation| is redefined for the new +% situation each time |\StepPageSituation| is called. +% \begin{macrocode} +\let\IfOddPageSituation=\@secondoftwo +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\StepPageSituation} +% \changes{prot2.1}{2000/12/19}{Now also setting +% \cs{IfOddPageSituation}, instead of having that macro performing +% the test each time it is used. This fixes a rarely occuring bug +% which occurs when a page is shipped out between +% \cs{StepPageSituation} and a corresponding +% \cs{IfOddPageSituation}. (LH)} +% \begin{macro}{\macro@cnt} +% \begin{macro}{\XD@next@wrong} +% \begin{macro}{\XD@wrongs@list} +% The |\StepPageSituation| command is called to inform the page +% situation mechanism that a new situation has begun. The rule for +% when you need to use |\Step|\-|Page|\-|Situation| is simple: if you +% use |\IfOdd|\-|Page|\-|Situation| in two places which may end up on +% different pages, then there must be a |\Step|\-|Page|\-|Situation| +% between them. There is no code which automatically calls +% |\Step|\-|Page|\-|Situation|---not even |\clearpage| or other +% macros which force page breaks do this---hence macros which use +% the page situation mechanism must always call |\Step|\-|Page|\-^^A +% |Situation| explicitly when a new situation begins. +% +% Since the |\macro@cnt| count register isn't used for stacking +% marginal headings (``macro'' names) anymore (see below), it is +% employed for enumerating page situation. |\XD@next@wrong| is a macro +% which contains the number of the next situation in which the guess +% was wrong last time. Unless |\XD@next@wrong|${}={}$|\macro@cnt|, the +% guess was right last time. All assignments to |\macro@cnt| and +% |\XD@next@wrong| are global. +% +% |\XD@wrongs@list| is a list of all the wrong guesses. It has the +% syntax +% \begin{quote} +% |\@elt|\marg{guess no.}|\@elt|\marg{guess no.}\dots +% |\@elt|\marg{guess no.} +% \end{quote} +% where the \meta{guess no.}s are the numbers of the wrong guesses, in +% increasing order. The contents of |\XD@wrongs@list| are collected +% when the \texttt{.aux} file is inputted at |\begin|\B|{document}|, +% and they are removed again as \TeX\ passes the situation in the +% document that they apply to. All assignments to |\XD@wrong@list| are +% global. +% +% Calling |\StepPageSituation| increases |\macro@cnt| by one, +% updates |\XD@|\B|next@|\B|wrong| and |\XD@|\B|wrong@|\B|list| +% appropriately, and sets |\IfOdd|\B|Page|\B|Situation| to +% |\@firstoftwo| or |\@secondoftwo| (whichever is correct for this +% situation). |\@next| is a list management macro from the \LaTeX\ +% kernel. +% \begin{macrocode} +\if@twoside + \def\StepPageSituation{% + \global\advance \macro@cnt \@ne + \ifnum \XD@next@wrong<\macro@cnt + \global\@next\XD@next@wrong\XD@wrongs@list{}{% + \let\XD@next@wrong\maxdimen + }% + \fi + \ifnum \ifodd\c@page -\fi \@ne=% + \ifnum \XD@next@wrong=\macro@cnt -\fi \@ne + \global\let\IfOddPageSituation\@secondoftwo + \else + \global\let\IfOddPageSituation\@firstoftwo + \fi + } + \def\XD@next@wrong{-\maxdimen} + \let\XD@wrongs@list\@empty +\else + \let\StepPageSituation=\relax +\fi +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro} +% +% +% \begin{macro}{\RecordPageSituation} +% The |\RecordPageSituation| command generates a |\write| whatsit node +% which records the outcome of the current page situation. It is the +% location of this whatsit node that determines on which page a +% certain situation is considered to occur. If you don't execute this +% macro for a certain page situation, the first guess will always be +% used for that situation and no warnings will be given if that guess +% is incorrect. In single-sided mode, this is a no-op (thus you should +% better place it somewhere where it doesn't affect spacing). +% Furthermore you must make sure that \TeX\ does not change the value +% of the \texttt{page} counter between a |\StepPageSituation| and its +% corresponding |\RecordPageSituation|, since the |\ifodd| test must +% yield the same result in both cases. +% +% \begin{macrocode} +\if@twoside + \def\RecordPageSituation{% + \if@filesw + \edef\@tempa{% + \string\XD@situation{\the\macro@cnt}{% + \ifodd\c@page 1\else 0\fi + }{\IfOddPageSituation{1}{0}}% + }% + \write\@auxout\expandafter{\@tempa{\ifodd\c@page 1\else 0\fi}}% + \fi + }% +\else + \let\RecordPageSituation=\relax +\fi +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\XD@situation} +% \changes{prot2}{2000/07/13}{Changed to allow multiple +% \cs{XD@situation} commands for the same situation. This is +% necessary for coping with documents which \cs{include} files. (LH)} +% \changes{prot2}{2000/07/26}{Made redefinition at begin document +% global. (LH)} +% \begin{macro}{\XD@check@situation} +% |\XD@situation| is the command that will be written to the +% \texttt{.aux} file with the data about how the situation turned out. +% Its syntax is +% \begin{quote} +% |\XD@situation|\marg{number}\marg{guess}\marg{did}\marg{correct} +% \end{quote} +% where \meta{number} is the number of the situation, and +% \meta{guess}, \meta{did}, and \meta{correct} describe what the +% guess, the actual action done, and what the correct action to do +% respectively was. \meta{guess}, \meta{did}, and \meta{correct} are +% either |0| (denoting even page) or |1| (denoting odd page). +% +% The definition for |\XD@situation| set here is the one which will +% be in force when the \texttt{.aux} file is inputted at |\begin|\B +% |{document}|; its purpose is to build the |\XD@wrongs@list|. +% |\XD@check@situation| is the definition for |\XD@situation| which +% will be in force when the \texttt{.aux} file is inputted at +% |\end|\B|{document}|; its purpose is to check if anything was +% incorrectly placed. +% +% The main problem |\XD@situation| has to face is that text in the +% \texttt{.dvi} file needs not appear in exactly the same order as it +% was typeset, and it is therefore possible that |\XD@situation|s in +% the \texttt{.aux} file do not appear in increasing \meta{number} +% order. Because of this, |\XD@situation| must sort the +% |\XD@wrongs@list| while constructing it. The only reasonable +% algorithm for this seems to be insertion sort, but as the items to +% insert are almost surely almost sorted, a special check is done in +% the beginning to see if that is the case. |\XD@next@wrong| is used +% in this to store the number of the last item so far inserted into +% the |\XD@wrongs@list|. By only assigning |\XD@next@wrong| locally +% here, one is relieved of having to reset it in |\AtBeginDocument| +% code. +% +% When sorting is actually applied, a new item |\@elt|\marg{insert} +% is inserted through expanding the list. When doing that, the |\@elt| +% macro has the syntax +% \begin{quote} +% |\@elt|\,\meta{flag}\,\marg{number}\,\meta{next} +% \end{quote} +% where \meta{flag} is |\BooleanTrue| or |\BooleanFalse|, \meta{number} +% is the item that the |\@elt| belong to, and \meta{next} is either the +% next |\@elt| or |\@gobble| (if this is the last). The \meta{flag} +% specifies whether the item has been inserted; |\Boolean|\B|True| means +% that it has. The above |\@elt|-sequence will expand to +% \begin{quote} +% |\noexpand|\,|\@elt|\,\marg{number}\,\meta{next}\,|\BooleanTrue| +% \end{quote} +% if \meta{flag} is |\BooleanTrue|, or \meta{flag} is |\BooleanFalse| +% and \meta{number} is equal to \meta{insert}. It will expand to +% \begin{quote} +% |\noexpand|\,|\@elt|\,\marg{number}\,\meta{next}\,|\BooleanFalse| +% \end{quote} +% if \meta{flag} is |\BooleanFalse| and \meta{number} is less than +% \meta{insert}. It expands to +% \begin{quote} +% |\noexpand|\,|\@elt|\,\marg{insert}\,|\noexpand|\,|\@elt|^^A +% \,\marg{number}\\ +% \meta{next}\,|\BooleanTrue| +% \end{quote} +% if \meta{flag} is |\BooleanFalse| and \meta{number} is greater than +% \meta{insert}. +% +% \begin{macrocode} +\if@twoside + \def\XD@situation#1#2#3#4{% + \if #2#4\else + \ifnum #1<\XD@next@wrong + \begingroup + \def\@elt##1##2##3{% + \noexpand\@elt + \ifcase + \ifx ##1\BooleanTrue 0% + \else\ifnum ##2<#1 1% + \else\ifnum ##2>#1 2% + \else 0% + \fi\fi\fi + \space + {##2}\expandafter\@secondoftwo + \or + {##2}\expandafter\@firstoftwo + \else + {#1}\noexpand\@elt{##2}\expandafter\@secondoftwo + \fi{##3\BooleanFalse}{##3\BooleanTrue}% + }% + \xdef\XD@wrongs@list{% + \expandafter\expandafter \expandafter\@elt + \expandafter\@firstoftwo \expandafter\BooleanFalse + \XD@wrongs@list \@gobble + }% + \endgroup + \else\ifnum #1>\XD@next@wrong + \def\XD@next@wrong{#1}% + \expandafter\gdef \expandafter\XD@wrongs@list + \expandafter{\XD@wrongs@list \@elt{#1}}% + \fi\fi + \fi + } + \def\XD@check@situation#1#2#3#4{% + \if #3#4\else + \PackageWarningNoLine{xdoc2}{Page breaks may have changed.% + \MessageBreak Rerun to get marginal material right}% + \let\XD@situation\@gobblefour + \fi + } + \AtBeginDocument{\global\let\XD@situation\XD@check@situation} +\else + \let\XD@situation\@gobblefour +\fi +% \end{macrocode} +% \end{macro}\end{macro} +% +% +% \begin{macro}{\XD@set@situation} +% \begin{macro}{\XD@write@situation@ckpt} +% \begin{macro}{\cl@@ckpt} +% The page situation counter |\macro@cnt| is closely related to the +% \texttt{page} counter and it needs to be among the counters whose +% values are recorded in |\include| checkpoints, since the enumeration +% of situations will otherwise change when files are added to or +% removed from the |\@partlist|. It is not sufficient to simply set +% the value of |\macro@cnt| however; one must also advance to the +% correct position in the |\XD@wrongs@list| list and set +% |\XD@next@wrong| accordingly. The |\XD@set@situation| command has +% the syntax +% \begin{quote} +% |\XD@set@situation|\marg{number} +% \end{quote} +% It sets |\macro@cnt| to \meta{number} and updates |\XD@wrongs@list| +% and |\XD@|\B|next@|\B|wrong| accordingly. +% \begin{macrocode} +\if@twoside + \def\XD@set@situation#1{% + \global\macro@cnt=#1\relax + \loop \ifnum \XD@next@wrong<\macro@cnt + \global\@next\XD@next@wrong\XD@wrongs@list{}{% + \let\XD@next@wrong\maxdimen + }% + \repeat + } +\else \let\XD@set@situation=\@gobble \fi +% \end{macrocode} +% +% The |\XD@write@situation@ckpt| macro writes an |\XD@set@situation| +% command to the \texttt{.aux} file in the way that |\@wckptelt| +% writes |\setcounter| commands for normal counters. A problem for +% |\XD@write@situation@ckpt| is that it will have to appear in a +% macro which is regularly subjected to the |\xdef| in |\@cons|. For +% that reason, it will simply expand to itself whenever |\@elt| isn't +% |\@wckptelt|. +% \begin{macrocode} +\if@twoside + \def\XD@write@situation@ckpt{% + \ifx \@elt\@wckptelt + \immediate\write\@partaux{% + \string\XD@set@situation{\the\macro@cnt}% + }% + \else + \noexpand\XD@write@situation@ckpt + \fi + } + \expandafter\def \expandafter\cl@@ckpt + \expandafter{\cl@@ckpt \XD@write@situation@ckpt} +\fi +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% +% +% \section{The list of changes} +% \label{Sec:Changes} +% +% Reimplementations elsewhere have required a few modifications related +% to the |\changes| command. There are a lot of other things that could +% and perhaps should be done with these mechanisms, though. +% +% \begin{macro}{\saved@macroname} +% The contents of the |\saved@macroname| macro now have the syntax +% \begin{quote} +% \marg{sort key}\marg{text} +% \end{quote} +% i.e., exactly like the argument sequence of |\LevelSorted|. It's not +% fed to that macro right now, but it is not unlikely that it will in +% the future. The default definition corresponds to the default +% definition in \package{doc}. +% \begin{macrocode} +\def\saved@macroname{{ }{\generalname}} +% \end{macrocode} +% Unlike the case in \package{doc}, the formatting of the text in +% |\saved@macroname| must be included. +% \end{macro} +% +% \begin{macro}{\if@version@key@} +% The |@version@key@| switch is used for supporting intelligent +% sorting of version numbers. It is normally false, but at times +% where the version number argument of |\changes| is being expanded +% because it will be used as a sort key then it is true. This is used +% by the |\uintver| macro. Assignments to this switch are as a rule +% global, since it is never true for any longer time. +% \changes{prot2.4}{2002/11/01}{Switch added. (LH)} +% \begin{macrocode} +\newif\if@version@key@ +\@version@key@false +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\uintver} +% The |\uintver| command can be used in the \meta{version} argument +% of |\changes| to ensure that (unsigned) integers are sorted in +% mathematical rather than ASCII order by \package{makeindex}. Thus +% if for example version |1.10| is later than version |1.9| then one +% should write this as +% \begin{quote} +% |\changes{1.\uintver{10}}{|\dots +% \end{quote} +% The general syntax is +% \begin{quote} +% |\uintver|\marg{number} +% \end{quote} +% and this expands completely in \TeX's mouth. +% \changes{prot2.4}{2002/11/01}{Command added. (LH)} +% +% The idea is that 0--9 are compared as 0--9, whereas 10--99 are +% compared as A10--A99, 100--999 are compared as B100-B999, and so on. +% The comparisons are correct up to 99999, but it could easily be +% extended further. +% \begin{macrocode} +\newcommand*\uintver[1]{% + \if@version@key@ + \ifnum #1>9 + \ifnum #1<100 + A% + \else\ifnum #1<\@m + B% + \else\ifnum #1<\@M + C% + \else + D% + \fi\fi\fi + \fi + \fi + \expandafter\@firstofone \expandafter{\number#1}% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\changes@} +% This |\changes@| is a simple redefinition of the \package{doc} +% macro with the same name. The main difference is that all +% formatting of the second entry level has been taken out---it is +% supposed to be provided in |\saved@macroname|---but in addition to +% that the date is being used as a third level sort key and |\uintver| +% may be used in the version number to correct the data. +% \changes{prot2.4}{2002/11/01}{Added support for \cs{uintver}. (LH)} +% +% The former makes more sense for projects where the date is +% increased faster than the version number and it doesn't change +% anything relevant in the remaining cases. The latter is necessary +% if version numbers are assigned for example by CVS. +% \begin{macrocode} +\def\changes@#1#2#3{% + \global\@version@key@true + \protected@edef\@tempa{#1}% + \global\@version@key@false + \protected@edef\@tempa{% + \noexpand\glossary{% + \@tempa\actualchar#1\levelchar + \expandafter\@firstoftwo\saved@macroname\actualchar + \expandafter\@secondoftwo\saved@macroname:\levelchar + #2\actualchar#3% + }% + }% + \@tempa + \endgroup + \@esphack +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@wrglossary} +% \changes{prot2.2}{2001/02/13}{Redefinition added. (LH)} +% \begin{macro}{\XD@glossary@keyword} +% \changes{prot2.2}{2001/02/13}{Macro added. (LH)} +% The |\@wrglossary| macro is the one which actually writes entries +% to the \texttt{.glo} file. It is redefined by \package{xdoc} to put +% the contents of |\XD@glossary@keyword|, rather than a hardwired +% |\glossaryentry|, in front of the glossary entry. +% |\XD@glossary@keyword| is redefined by the \package{docindex} +% package~\cite{docindex}. +% \begin{macrocode} +\def\@wrglossary#1{% + \protected@write\@glossaryfile{}% + {\XD@glossary@keyword{#1}{\thepage}}% + \endgroup + \@esphack +} +\@ifundefined{XD@glossary@keyword}{% + \edef\XD@glossary@keyword{\@backslashchar glossaryentry}% +}{} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\definechange} +% \begin{macro}{\XD@definechange} +% The |\definechange| command has the syntax +% \begin{quote} +% |\definechange|\marg{name}\marg{version}\marg{date}\marg{text} +% \end{quote} +% The three last arguments are precisely like the arguments of +% |\changes|, but |\definechange| doesn't write the change to the +% \texttt{.glo} file; instead it stores them away as the ``named +% change'' \meta{name}, for later use in the |\usechange| command. +% \begin{macrocode} +\newcommand\definechange{% + \begingroup\@sanitize + \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore + \expandafter\endgroup \XD@definechange +} +\def\XD@definechange#1#2#3#4{\@namedef{XD@ch-#1}{{#2}{#3}{#4}}} +% \end{macrocode} +% \end{macro}\end{macro} +% +% The named changes are stored in the +% \describecsfamily{XD@ch-\meta{name}}|\XD@ch-|\meta{name} family of +% control sequences. These are parameterless macros with replacement +% texts of the form +% \begin{quote} +% \marg{version}\marg{date}\marg{text} +% \end{quote} +% +% \begin{macro}{\usechange} +% \begin{macro}{\XD@usechange} +% \changes{prot2.4}{2002/11/01}{Added support for \cs{uintver}. (LH)} +% To use a named change defined earlier, one of course uses the +% command |\usechange|, which has the syntax +% \begin{quote} +% |\usechange|\marg{name} +% \end{quote} +% The effect of this is similar to that of a general |\changes| +% (i.e., it appears outside all \texttt{macro}-like environments) with +% the arguments specified in the |\definechange|, but this also +% includes the macro (or whatever) name with the page number, using +% the encapsulation mechanism in \package{makeindex}. +% \begin{macrocode} +\newcommand*\usechange[1]{% + \@ifundefined{XD@ch-#1}{% + \PackageError{xdoc2}{Named change `#1' undefined}\@eha + }{% + \expandafter\expandafter \expandafter\XD@usechange + \csname XD@ch-#1\endcsname + }% +} +\def\XD@usechange#1#2#3{% + \def\@tempa{{ }{\generalname}}% + \ifx \@tempa\saved@macroname + \let\@tempa\@empty + \else + \protected@edef\@tempa{% + \encapchar labelednumber% + {\expandafter\@secondoftwo\saved@macroname}% + } + \fi + \global\@version@key@true + \protected@edef\@tempb{#1}% + \global\@version@key@false + \glossary{% + \@tempb\actualchar #1\levelchar + \space\actualchar\generalname:\levelchar + #2\actualchar#3\@tempa + }% +} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\labelednumber} +% The |\labelednumber| macro belongs to the same category as the +% |\main| and |\usage| macros, but it takes an extra argument. The +% syntax is +% \begin{quote} +% |\labelednumber|\marg{extra}\marg{number} +% \end{quote} +% which typesets as +% \begin{quote} +% \meta{number} (\meta{extra}) +% \end{quote} +% \begin{macrocode} +\newcommand*\labelednumber[2]{#2\nolinebreak[2] (#1)} +% \end{macrocode} +% \end{macro} +% +% +% +% \section{\texttt{macro}-like environments} +% \label{Sec:Macro-environments} +% +% There are several reasons one might want to improve the \texttt{macro} +% and \texttt{environment} environments. +% \begin{itemize} +% \item +% The code in them cannot be reused if you want to define other +% things than \TeX\ macros or \LaTeX\ environments. (During the +% last year or so, I have defined \texttt{macro}-like environments +% for over a dozen different things.) +% \item +% They always put the macro\slash environment name to the left of +% the current column. This is inappropriate for two-sided printing, +% as there should be a symmetry over an entire spread in that case. +% \item +% The vertical extent of a macro\slash environment name must not +% exceed that of the |\strut|, since they will otherwise overprint +% each other when stacked. In particular this makes it impossible to +% make line breaks in macro names---something which would otherwise +% be of interest in projects (such as for example \cite{fontinst}) +% where some names are very long and obvious breakpoints are +% available. +% \end{itemize} +% (I'm quite sure there are more things that have annoyed me, but I can't +% remember which they are right now.) The redefinitions below take care +% of the all these problems. +% +% +% \subsection{Grabbing arguments} +% +% A special feature of the \texttt{macro}-like environments is that (at +% least some) of their arguments must be given rather special treatment. +% This special treatment usually consists of making temporary |\catcode| +% changes for the time these arguments are tokenized---since the standard +% |\catcode|s for some important characters tend to be unsatisfactory in +% these cases---but there are other possibilities as well. For that +% reason, the \package{xdoc} package employs a mechanism that is very +% similar to that used in the Mittelbach--Rowley--Carlisle +% \package{xparse} package~\cite{xparse}, although it does not share +% any code with that. I call this mechanism the argument grabber. +% +% The heart of the argument grabber is the macro |\XD@grab@arguments|, +% which has the following syntax: +% \begin{quote} +% |\XD@grab@arguments|\marg{call}\marg{grabber sequence}^^A +% \meta{arguments to grab} +% \end{quote} +% \meta{call} is something which will eventually be placed in front of +% all the arguments grabbed. It can simply be a single macro, but it +% can also contain some arguments for that macro. \meta{grabber sequence} +% is a sequence of grabbers. A \emph{grabber} is typically a macro which +% grabs the next argument and stores it in a token list together with the +% arguments that were grabbed before. A grabber could however be some +% more complex piece of code that performs a similar action. +% +% \begin{table} +% \begin{minipage}{\columnwidth} +% \begin{center}\small +% \begin{tabular}{lll>{\raggedright}p{0.3\linewidth}} +% \textbf{Grabber}& \textbf{Arg.\ type}& +% \textbf{Catcodes\footnote[1]{Catcode settings key: +% --- = no change, PL = changes made by \cs{MakePrivateLetters}, +% OB = set the catcode of backslash to ordinary.}}& +% \textbf{Post-processing}\tabularnewline +% |\XD@grab@marg|& Mandatory& ---& None\tabularnewline +% |\XD@grab@oarg|& Optional& ---& None\tabularnewline +% |\XD@grab@sarg|\marg{char}& 1-char optional& +% ---& Returns |\BooleanTrue| if the character was present +% and |\BooleanFalse| otherwise.\tabularnewline +% |\XD@grab@withprivate|& Mandatory& PL& None\tabularnewline +% |\XD@grab@asmacro|\footnote[2]{This grabber is probably obsolete; +% it is included because it grabs the argument in precisely the +% way that the \texttt{macro} environment of \package{doc} does.}& +% Mandatory& OB+PL& None\tabularnewline +% |\XD@grab@harmless|\meta{proc}& Mandatory& ---& +% |\MakeHarmless| followed by \meta{proc}\tabularnewline +% |\XD@grab@harmless@oarg|& Optional& ---& +% |\MakeHarmless|\tabularnewline +% \multicolumn{3}{l}{\cs{XD@grab@harmless@asmacro}}\tabularnewline +% & Mandatory& OB+PL& +% |\MakeHarmless| followed by |\XD@unbackslash|\tabularnewline +% |\XD@grab@harmless@cs|& Mandatory\footnote[3]{The argument is +% normally precisely one control sequence.}& PL& +% |\string| whilst |\escapechar| is set to \textminus1, +% followed by |\MakeHarmless|\tabularnewline +% \multicolumn{3}{l}{^^A +% \cs{XD@grab@harmless@withprivate}\marg{proc}}\\ +% & Mandatory& PL& |\MakeHarmless| followed by \meta{proc} +% \end{tabular} +% \end{center} +% \end{minipage} +% +% \caption{Grabbers currently defined by \package{xdoc}} +% \label{Tab:Grabbers} +% \end{table} +% +% When arguments are being grabbed, the \meta{call} is stored in |\toks@| +% and the arguments are appended to |\toks@| as they are grabbed. For +% that reason, a grabber may not itself call |\XD@grab@arguments|, nor +% may it use a command defined through \package{xparse}'s +% |\Declare|\-|Document|\-|Command| or anything else which uses this +% token register in a bad way. +% +% When a grabber is expanded, it is in the context +% \begin{quote} +% \meta{grabber}\,\meta{following grabbers}\,|\XD@endgrab|\penalty0 +% \thinspace\meta{ungrabbed arguments} +% \end{quote} +% After it has grabbed its argument, everything of the above should be +% put back except for the \meta{grabber} and the argument it grabbed. +% The argument itself should be wrapped in a group and appended to +% |\toks@|. +% +% \textbf{Note:} In prototype~2 the format in which the argument grabber +% returns the grabbed arguments was changed so that it can now be +% unified with argument grabbing mechanisms of \package{xparse}. I +% think this should be done some time in the future, but for the moment +% it seems best not to rely on \LaTeXplus\ packages like \package{xparse}. +% +% \begin{macro}{\XD@grab@arguments} +% \begin{macro}{\XD@endgrab} +% \changes{prot2}{2000/07/13}{The grabbed arguments are no longer +% returned wrapped up in a group. There is no longer a need for +% storing the base call separately in \cs{toks}\,\texttt{2}. (LH)} +% The |\XD@grab@arguments| and |\XD@endgrab| macros set up and finish +% off argument grabbing. +% \begin{macrocode} +\def\XD@grab@arguments#1#2{% + \toks@={#1}% + #2\XD@endgrab +} +% \end{macrocode} +% \begin{macrocode} +\def\XD@endgrab{\the\toks@} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\XD@grab@marg} +% A grabber for ordinary arguments, like the \texttt{m} arguments of +% \package{xparse}. +% \begin{macrocode} +\long\def\XD@grab@marg#1\XD@endgrab#2{% + \addto@hook\toks@{{#2}}% + #1\XD@endgrab +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XD@grab@oarg} +% \begin{macro}{\XD@grab@oarg@} +% A grabber for optional arguments (\texttt{o} arguments in +% \package{xparse}). It looks ahead for an optional argument and +% grabs that argument if there was one. If it doesn't find anything +% which looks like an optional argument (i.e., if the next character +% isn't a |[|), then the grabber will not grab anything (although it +% may have tokenized the next argument), but it will still append +% |\NoValue| to |\toks@|. +% +% \begin{macrocode} +\def\XD@grab@oarg#1\XD@endgrab{% + \@ifnextchar[{\XD@grab@oarg@{#1}}{% + \addto@hook\toks@\NoValue + #1\XD@endgrab + }% +} +% \end{macrocode} +% |\XD@grab@oarg@| is a helper to remove the brackets around the +% optional argument. +% \begin{macrocode} +\long\def\XD@grab@oarg@#1[#2]{% + \addto@hook\toks@{{#2}}% + #1\XD@endgrab +} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\XD@grab@sarg} +% A grabber for `star'-type arguments (\texttt{s} arguments in +% \package{xparse}). The syntax is +% \begin{quote} +% |\XD@grab@sarg|\marg{char} +% \end{quote} +% It looks ahead to see if the next character is the \meta{char}. In +% that case it gobbles it and adds a |\BooleanTrue| to the grabbed +% arguments, otherwise it adds a |\BooleanFalse| to the grabbed +% arguments. +% \changes{prot2.3}{2001/11/03}{Macro added. (LH)} +% \begin{macrocode} +\def\XD@grab@sarg#1#2\XD@endgrab{% + \@ifnextchar#1{% + \addto@hook\toks@\BooleanTrue + \@firstoftwo{#2\XD@endgrab}% + }{% + \addto@hook\toks@\BooleanFalse + #2\XD@endgrab + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XD@grab@withprivate} +% |\XD@grab@withprivate| is like |\XD@grab@marg| but grabs the +% argument when the catcodes are as set by |\MakePrivateLetters|. +% \begin{macrocode} +\def\XD@grab@withprivate{% + \begingroup\MakePrivateLetters\relax\expandafter\endgroup + \XD@grab@marg +} +% \end{macrocode} +% To think about: Perhaps things like |\XD@grab@withprivate| should +% rather be considered a modifier for a grabber? Instead of having +% |\XD@grab@withprivate| be the entire grabber, one could let the +% grabber be something like +% \begin{quote} +% |\XD@grab@withprivate\XD@grab@marg| +% \end{quote} +% where the |\XD@grab@withprivate| should only expand to +% \begin{quote} +% |\begingroup\MakePrivateLetters\relax\expandafter\endgroup| +% \end{quote} +% \end{macro} +% +% \begin{macro}{\XD@grab@asmacro} +% |\XD@grab@asmacro| is very similar to |\XD@grab@withprivate|, but it +% sees to that the catcode settings are exactly those used by +% \package{doc}'s \texttt{macro} environment. +% \begin{macrocode} +\def\XD@grab@asmacro{% + \begingroup + \catcode`\\=12 \MakePrivateLetters\relax + \expandafter\endgroup + \XD@grab@marg +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XD@grab@harmless} +% \begin{macro}{\XD@grab@harmless@oarg} +% \changes{prot2.1}{2000/09/30}{Macro added. (LH)} +% \begin{macro}{\XD@grab@harmless@oarg@} +% \changes{prot2.1}{2000/09/30}{Macro added. (LH)} +% The |\XD@grab@harmless| grabber grabs one mandatory argument and +% converts it to a harmless character string, which it contributes to +% the list of arguments. The syntax is +% \begin{quote} +% |\XD@grab@harmless|\marg{post-processing} +% \end{quote} +% where \meta{post-processing} are commands that will be performed +% after the grabbed argument has been made harmless, but before it is +% contributed to the list of arguments. Thus the +% \meta{post-processing} can modify the argument some more, but +% \meta{post-processing} can just as well be empty. +% \begin{macrocode} +\def\XD@grab@harmless#1#2\XD@endgrab#3{% + \MakeHarmless\@tempa{#3}% + #1% + \toks@=\expandafter{\the\expandafter\toks@ \expandafter{\@tempa}}% + #2\XD@endgrab +} +% \end{macrocode} +% +% The |\XD@grab@harmless@oarg| grabber grabs one optional argument and +% converts it to a harmless character string. This string is +% contributed to the list of arguments if the optional argument, or +% else the token |\NoValue| is contributed instead. +% \begin{macrocode} +\def\XD@grab@harmless@oarg#1\XD@endgrab{% + \@ifnextchar[{\XD@grab@harmless@oarg@{#1}}{% + \addto@hook\toks@\NoValue + #1\XD@endgrab + }% +} +% \end{macrocode} +% |\XD@grab@harmless@oarg@| is a helper to remove the brackets around +% the optional argument. +% \begin{macrocode} +\long\def\XD@grab@harmless@oarg@#1[#2]{% + \MakeHarmless\@tempa{#2}% + \toks@=\expandafter{\the\expandafter\toks@ \expandafter{\@tempa}}% + #1\XD@endgrab +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\XD@grab@harmless@asmacro} +% \begin{macro}{\XD@grab@harmless@cs} +% \begin{macro}{\XD@grab@harmless@cs@} +% The |\XD@grab@harmless@asmacro| grabber combines the features of +% |\XD@grab@|\B|asmacro| and |\XD@grab@harmless|, since when the +% argument to grab is tokenized the catcode of |\| is set to 12 and +% the catcode assignments in |\MakePrivateLetters| are made. Then the +% grabbed argument is converted to a harmless character sequence, and +% finally the first character is removed if it is a backslash. +% \begin{macrocode} +\def\XD@grab@harmless@asmacro{% + \begingroup + \catcode`\\=12 \MakePrivateLetters\relax + \expandafter\endgroup + \XD@grab@harmless{% + \protected@edef\@tempa{% + \expandafter\XD@unbackslash\@tempa\@empty + }% + }% +} +% \end{macrocode} +% +% The |\XD@grab@harmless@cs| grabber is for use with commands like +% \package{doc}'s |\Describe|\-|Macro|, which take an actual control +% sequence as the argument. It grabs one argument while having +% catcodes changed as indicated by |\Make|\-|Private|\-|Letters|, +% |\string|s the argument while |\escapechar| is |-1| (so that there +% is no escape character inserted), and continues as +% |\XD@grab@harmless|. +% \begin{macrocode} +\def\XD@grab@harmless@cs{% + \begingroup + \MakePrivateLetters\relax + \expandafter\endgroup \XD@grab@harmless@cs@ +} +% \end{macrocode} +% \begin{macrocode} +\long\def\XD@grab@harmless@cs@#1\XD@endgrab#2{% + \begingroup + \escapechar=\m@ne + \expandafter\endgroup + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#2}% + \toks@=\expandafter{\the\expandafter\toks@ \expandafter{\@tempa}}% + #1\XD@endgrab +} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\XD@grab@harmless@withprivate} +% |\XD@grab@harmless@withprivate| is like |\XD@grab@harmless| but +% grabs the argument when the catcodes are as set by +% |\Make|\-|Private|\-|Letters|. +% Like |\XD@|\B|grab@|\B|harmless|, |\XD@grab@|\B|harmless@|\B +% |withprivate| takes an argument which can contain code that +% modifies the harmless character string after it has been formed. +% \begin{macrocode} +\def\XD@grab@harmless@withprivate{% + \begingroup\MakePrivateLetters\relax\expandafter\endgroup + \XD@grab@harmless +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{The \cs{XD@m@cro} and \cs{NewMacroEnvironment} commands} +% +% In \package{doc} the macro that contains most of the code for the +% \texttt{macro} and \texttt{environment} environments is called +% |\m@cro@|. In \package{xdoc} the corresponding macro is |\XD@m@cro|. +% +% At this point, it is helpful to recall what |\m@cro@| actually does. +% It can be summarized in the following four points: +% \begin{itemize} +% \item It starts a |\trivlist|.\footnote{Seriously, can someone +% explain to me why it seems just about every non-math \LaTeX\ +% environment that doesn't start a \cs{list} starts a \cs{trivlist}? +% What good does all these \cs{trivlist}s do? Is it (a)~that people +% just like the basic design, (b)~that there's some deep technical +% reason, or (c)~that people in general doesn't have a clue but all +% other environments do that so it's best to include it just in +% case?} +% \item It prints the name of the macro\slash environment that is +% about to be defined in the margin. +% \item It writes an index entry (and inhibits cross-referencing of +% the macro inside the environment). +% \item It sets |\saved@macroname| to the name of the macro\slash +% environment (for use by |\changes|). +% \end{itemize} +% +% The first and fourth points are simple, and commands for the third +% were defined in Section~\ref{Sec:Indexing}, but the second point +% needs a few helper macros. +% +% +% \begin{macro}{\XDStackItemLabels} +% \changes{prot2}{2000/07/28}{Made it work like a \cs{vtop} (but hide +% the height) if \cs{XD@macro@dimen} is \texttt{-}\cs{maxdimen}. +% (LH)} +% \begin{macro}{\XD@macro@dimen} +% The |\XDStackItemLabels| macro is a definition of |\makelabel| which +% is used in the \texttt{macro}-like environments for stacking the +% names printed by subsequent environments under each other. It makes +% a box which has zero height and depth (it should have zero width as +% well, but that is left as a restriction on the argument) and the +% printed names will be stacked if the reference points of the +% subsequent boxes generated by |\XD|\-|Stack|\-|Item|\-|Labels| +% coincide. +% +% |\XD@macro@dimen| (always assigned globally) stores the vertical +% distance from the reference point of the box that +% |\XD|\-|Stack|\-|Item|\-|Labels| makes to the (bottommost) baseline +% of the previous printed name. |\XD@macro@dimen| is updated by each +% new |\XD|\-|Stack|\-|Item|\-|Labels|. The baseline of the next printed +% name will be put one |\baselineskip| lower than that of the previous +% printed name, except for when |\XD@macro@dimen| is |-\maxdimen| (see +% below). To avoid that printed names clash into each other, this +% additional |\baselineskip| is generated as normal interline glue +% where the upper box has the same depth as a strut and the new value +% of |\XD@macro@dimen| is measured in such a way that the printed +% name's depth below the nominal baseline will not exceed the depth of +% a strut (that's what the |\boxmaxdepth| assignment is for). +% When |\XD@macro@dimen| is |-\maxdimen| the (topmost) baseline of the +% printed name will instead go through the reference point of the box. +% This case is intended for the first item label in a stack. +% +% The reason |\everypar| is cleared is that that is where the list +% environments put the commands which actually insert the item label +% into the paragraph. If that code gets executed inside |\makelabel|, +% the list environments get seriously confused with not at all nice +% consequences. +% \begin{macrocode} +\def\XDStackItemLabels#1{% + \setbox\z@=\vbox{% + \ifdim \XD@macro@dimen=-\maxdimen + \setbox\z@=\vtop{% + \color@begingroup + \everypar={}% + #1% + \color@endgroup + }% + \kern-\ht\z@ + \unvbox\z@ + \else + \color@begingroup + \everypar={}% + \kern\XD@macro@dimen + \setbox\z@=\copy\strutbox \ht\z@=\z@ \box\z@ + #1% + \color@endgroup + \fi + \boxmaxdepth=\dp\strutbox + }% + \global\XD@macro@dimen=\ht\z@ + \vtop to\z@{\unvbox\z@ \vss}% +} +% \end{macrocode} +% \begin{macrocode} +\newdimen\XD@macro@dimen +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\XDToMargin} +% \changes{prot2.1}{2000/11/26}{New name for \cs{XD@to@margin}. (LH)} +% The |\XDToMargin| macro takes one argument, which is assumed to be +% some horizontal material, and puts that material in a |\hbox| of +% width zero, horizontally shifted out into the the outer margin, in +% such a way that longer arguments extend further out. |\marginparsep| +% is used as the distance between the argument and the main galley. All +% these placements assume that the |\hbox| will be put |\labelsep| to +% the left of the beginning of a nonindented paragraph, since that is +% where it will be put by the |\item| of a |\trivlist|. +% +% A question is where the margin should be considered to start if the +% |\@total|\-|left|\-|margin| isn't zero. The corresponding +% \package{doc} action would be to consider the margin as everything +% outside the |\linewidth| width, but I don't think that would be +% appropriate here (especially not since \package{doc} always puts the +% codeline numbers at the edge of the |\textwidth| width). +% \begin{macrocode} +\newcommand\XDToMargin[1]{% + \hb@xt@\z@{% + \IfOddPageSituation{% + \dimen@=-\@totalleftmargin + \advance \dimen@ \labelsep + \advance \dimen@ \textwidth + \advance \dimen@ \marginparsep + \kern\dimen@ + }\hss + #1% + \IfOddPageSituation\hss{% + \dimen@=\@totalleftmargin + \advance \dimen@ -\labelsep + \advance \dimen@ \marginparsep + \kern\dimen@ + }% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XDParToMargin} +% The |\XDParToMargin| command is in syntax and use similar to the +% |\XDToMargin| command, but it will try to linebreak an argument +% that is too long rather than letting it extend outside the paper. +% +% The implementation first tries to break the argument without +% considering justification or positioning, but with a rather high +% |\linepenalty|. If the result of that try is a single line paragraph +% then |\XDToMargin| will be called to actually typeset the argument. +% Otherwise the argument is typeset as a paragraph which gets +% displaced out into the outer margin by giving |\leftskip| and +% |\rightskip| nonzero natural widths. The practical line width in +% the paragraph is the |\marginparwidth|, but the hboxes containing +% the individual lines will have width zero. The first line of the +% paragraph will be set flush outwards, the last line of the paragraph +% will be set flush inwards, and the remaining lines will be centered. +% +% \changes{prot2.1}{2000/11/26}{Command added. (LH)} +% \begin{macrocode} +\newcommand\XDParToMargin[1]{% + \parindent=\z@ + \setbox\z@=\vbox{% + \leftskip=\z@skip + \rightskip=\z@\@plus 1fil% + \parfillskip=\z@skip + \hsize=\marginparwidth + \linepenalty=1000% + \color@begingroup + \noindent\ignorespaces #1\@@par + \color@endgroup + \expandafter}% + \expandafter\ifnum \the\prevgraf<\tw@ + \XDToMargin{#1}% + \else + \hsize=\z@ + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \IfOddPageSituation{% + \dimen@=-\@totalleftmargin + \advance \dimen@ \labelsep + \advance \dimen@ \textwidth + \advance \dimen@ \marginparsep + \advance \leftskip \dimen@ + \advance \rightskip -\dimen@ \@minus \p@ + \advance \rightskip -\marginparwidth + \parfillskip=\z@ \@plus 1fil% + }{% + \dimen@=\@totalleftmargin + \advance \dimen@ -\labelsep + \advance \dimen@ \marginparsep + \advance \leftskip -\dimen@ \@minus \p@ + \advance \leftskip -\marginparwidth + \advance \rightskip \dimen@ + \parfillskip=\z@ \@plus -\marginparwidth% + } + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1\@@par + \fi +} +% \end{macrocode} +% \end{macro} +% +% +% In the following I exploit the implementation of the |\item| command +% in a slightly hackish way. Instead of starting a new paragraph with +% the item label (which is what one at first would believe |\item| +% does), |\item| actually puts the label in the box |\@labels| register, +% and stores code in |\everypar| that inserts that box into the new +% paragraph. Therefore I can make sure that various |\write| whatsits +% that need to be as the same page as an |\item| label will be there by +% adding them to the contents of the |\@labels| box. This seems more +% reliable to me than putting them on the vertical list followed by a +% |\nobreak| as \package{doc} does, but that would probably work as +% well. +% +% [A funny thing in that which confused me a while was the question of +% whether the |\box| command that inserts the box into the paragraph and +% simultaneously clears the register acted globally or locally. It turns +% out that the question was ill-posed, as the distinction between local +% and global assignments is determined by what restore items they put +% on \TeX's save stack. The |\box| command doesn't put anything there, +% so the assignment it makes will essentially appear at the same +% grouping level as the |\setbox| command that set the contents of the +% box register. As all |\setbox|es for the |\@labels| box register are +% global, the box register will be globally void after |\box\@labels|.] +% +% +% \begin{macro}{\XD@m@cro} +% \changes{prot2}{2000/07/24}{Put the \meta{changes} argument before +% the \meta{assign} argument. Executing the \meta{assign} code +% after the \meta{changes} \cs{edef}. Changed the descriptions of +% these arguments a little. (LH)} +% \changes{prot2.1}{2000/11/26}{Removed \cs{XDToMargin} from the +% argument of \cs{item}. It should now be included in \#1 +% instead. (LH)} +% This is the workhorse of all the \texttt{macro}-like environments. +% It calls |\trivlist| and sets related parameters, prints the +% ``macro'' name in the proper place, updates the representation of +% the ``macro'' name that |\changes| will use, and writes appropriate +% index entries (possibly making temporary changes in +% cross-referencing). Exactly what these tasks consist of can vary +% quite a lot between different \texttt{macro}-like environments, and +% therefore the |\XD@m@cro| macro has the following syntax: +% \begin{quote} +% |\XD@m@cro|\marg{print}\marg{index}\marg{changes}\marg{assign} +% \end{quote} +% \meta{print}, \meta{index}, and \meta{assign} are simply the +% commands for printing the ``macro'' name as it should appear in the +% margin, generating the index entries for this \texttt{macro}-like +% environment, and making whatever additional local assignments that +% are needed for this environment (usually a couple of +% |\Do|\-|Not|\-|Index|\-|Harmless| commands, if anything at all) +% respectively. At the time \meta{index} is executed, +% \texttt{codelineno} holds the number of the \emph{next} codeline. +% \meta{changes}, finally, is code that will be put in the context +% \begin{quote} +% |\protected@edef\saved@macroname{|\meta{changes}|}| +% \end{quote} +% to set the |\saved@macroname| macro (for |\changes|). +% \begin{macrocode} +\def\XD@m@cro#1#2#3#4{% + \topsep\MacroTopsep + \trivlist + \global\setbox\@labels=\hbox{% + \unhbox\@labels + \if@inlabel \else + \global\XD@macro@dimen=-\maxdimen + \StepPageSituation + \RecordPageSituation + \fi + \advance \c@codelineno \@ne + #2% + }% + \let\makelabel\XDStackItemLabels + \item[#1]% + \protected@edef\saved@macroname{#3}% + #4% + \ignorespaces +} +% \end{macrocode} +% \end{macro} +% +% In the first \package{xdoc} prototype, the \texttt{macro}-like +% environments were implemented so that each new environment only used +% two control sequences (|\|\meta{env} and |\end|\meta{env}), which is +% the absolute minimum. This implementation worked fine for +% single argument environments, but the number of helper macros that +% would have to be introduced to deal with multiple argument +% environments exceeded what could be considered reasonable. Therefore +% the second prototype claims a third control sequence for the +% implementation of a \texttt{macro}-like environment \meta{env}, namely +% |\\|\meta{env}, which is also used by normal \LaTeXe\ environments +% which take an optional argument. +% +% It should also be mentioned that the implementation in the first +% prototype required that most of the code in |\|\meta{env} had to be +% written in a very special way. Instead of using the |#|\meta{digit} +% notation for the arguments and write straightforward \LaTeX\ code, one +% had to express everything using macros which operate on arguments ``up +% ahead'' (immediately after the code you can specify). This curious +% coding model made it out of the question to create a class designer +% interface for defining new \texttt{macro}-like environments, but in +% the second \package{xdoc} prototype it is quite simple to do something +% of that sort: the command name is |\New|\-|Macro|\-|Environment|. +% +% \begin{macro}{\NewMacroEnvironment} +% \changes{prot2}{2000/07/13}{Command added. (LH)} +% \changes{prot2}{2000/07/24}{Changed syntax in conformity with the +% syntax change in \cs{XD@m@cro}. (LH)} +% \changes{prot2.1}{2000/11/26}{Introduced star form with different +% semanics for the \meta{print} argument. This uses the helper +% macros \cs{XD@NewMacroEnvironment} and +% \cs{XD@NewMacroEnvironment@}. (LH)} +% \begin{macro}{\XD@NewMacroEnvironment} +% \begin{macro}{\XD@NewMacroEnvironment@} +% The |\NewMacroEnvironment| command is used for defining new +% \texttt{macro}-like environments. It has the syntaxes +% \begin{quote} +% |\NewMacroEnvironment|\marg{name}\marg{grabbers}\marg{numargs}\\ +% \vadjust{}\hfill\marg{unjust-print}\marg{index}\marg{changes}^^A +% \marg{assign}\\ +% |\NewMacroEnvironment*|\marg{name}\marg{grabbers}\marg{numargs}\\ +% \vadjust{}\hfill\marg{print}\marg{index}\marg{changes}\marg{assign} +% \end{quote} +% where \meta{name} is the name of the environment to define, +% \meta{grabbers} is a sequence of argument grabbers, \meta{numargs} +% is the number of arguments that the grabbers will grab, and +% \meta{print}, \meta{index}, \meta{changes}, and \meta{assign} are +% code that will be put in the respective arguments of |\XD@m@cro|. +% In the four last arguments, argument specifiers |#1| to +% |#|\meta{numargs} inclusive can be used do mean the arguments that +% were grabbed by the sequence of grabbers. +% +% The argument grabbers that are currently made available by the +% \package{xdoc} package are listed in Table~\ref{Tab:Grabbers} on +% page~\pageref{Tab:Grabbers}. +% +% The \meta{print} code will be executed while \TeX\ is in internal +% vertical mode and it should put one or several hboxes of width zero +% onto the vertical list. The contents of these boxes should be some +% amount of text which will appear displaced out into the outer margin +% on the page when the reference point of the box appears |\labelsep| +% to the left of the left edge of the line. The easiest way of +% achieveing this is to use a \meta{print} of the form +% \begin{quote} +% |\XDToMargin|\marg{unjust-print} +% \end{quote} +% and this is exactly what the non-star form of |\NewMacroEnvironment| +% does by default. +% +% \begin{macrocode} +\newcommand\NewMacroEnvironment{% + \@ifstar\XD@NewMacroEnvironment\XD@NewMacroEnvironment@ +} +\def\XD@NewMacroEnvironment@#1#2#3#4{% + \XD@NewMacroEnvironment{#1}{#2}{#3}{\XDToMargin{#4}}% +} +\def\XD@NewMacroEnvironment#1#2#3#4#5#6#7{% + \expandafter\@ifdefinable\csname#1\endcsname{% + \expandafter\def \csname#1\expandafter\endcsname + \expandafter{\expandafter\XD@grab@arguments + \csname\@backslashchar#1\endcsname{#2}}% + \let\l@ngrel@x\relax + \expandafter\@yargdef \csname\@backslashchar#1\endcsname \@ne + {#3}{\XD@m@cro{#4}{#5}{#6}{#7}}% + \expandafter\let \csname end#1\endcsname \endtrivlist + }% +} +% \end{macrocode} +% The \meta{grabbers} argument---in which one specifies a list of +% internal macros---is not how the interface should really look, but I +% think it will have to do for now. The final interface will probably +% use something like the argument specifications of +% |\Declare|\-|Document|\-|Command|, but there is little point in +% implementing that before \package{xparse} has gotten its final form. +% \end{macro}\end{macro}\end{macro} +% +% The macro |\@yargdef| used above should perhaps be checked so that its +% syntax hasn't changed, but since |\@yargdef| quite recently +% (\texttt{ltdefn.dtx} v\,1.3c, 1999/01/18) was completely reimplemented +% without any change in the syntax (despite the fact that the syntax is +% afterwards rather peculiar), I think it can be assumed that the syntax +% will not change in \LaTeXe. +% +% +% +% \subsection{Reimplementing \texttt{macro} and \texttt{environment}} +% \label{Ssec:Macro&environment} +% +% Well, then how does one reimplement the \texttt{macro} and +% \texttt{environment} environments using |\XD@m@cro|? We shall soon +% see, but first it is convenient to define a utility macro. +% +% \changes{prot2}{2000/07/14}{Lots of utility macros were removed: +% \cs{XDWrapText}, \cs{XDAltWrapText}, \cs{XDSortAndText}, +% \cs{MultipleApply}, \cs{ApplicableUsageIndex}, and +% \cs{XD@index@family}. (LH)} +% +% \begin{macro}{\XDMainIndex} +% \changes{prot2}{2000/07/14}{New name and syntax for +% \cs{ApplicableMainIndex}. (LH)} +% The |\XDMainIndex| macro is an abbreviation to save a couple of +% tokens in a very frequent call to |\IndexEntry|. It has the syntax +% \begin{quote} +% |\XDMainIndex|\marg{argument} +% \end{quote} +% and that expands to +% \begin{quote} +% |\IndexEntry|\marg{argument}|{main}{\TheXDIndexNumber}| +% \end{quote} +% \begin{macrocode} +\newcommand\XDMainIndex[1]{\IndexEntry{#1}{main}{\TheXDIndexNumber}} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{macro} +% \changes{prot2.1}{2000/11/15}{Using \cs{MakeSortKey} to make index +% entry. (LH)} +% \begin{environment}{environment} +% It is very easy to implement \texttt{macro} and \texttt{environment} +% environments which behave pretty much as in \package{doc} using the +% |\New|\-|Macro|\-|Environment| command. The important difference +% is that in \package{doc} everything that distinguished the two +% environments was to be found in various helper macros, but here all +% that code is in the |\\macro| and |\\environment| macros. Thus to +% define one new \texttt{macro}-like environment, one doesn't have to +% define six or so new macros---everything can be handled in one +% definition. +% +% The reason for the |\let| commands below is of course that +% \texttt{macro} and \texttt{environment} are already defined, and +% there is no |\Renew|\-|Macro|\-|Environment| command. It could +% perhaps have been better if |\New|\-|Macro|\-|Environment| had +% behaved like |\Declare|\-|Robust|\-|Command|, but I don't think that +% is an important problem for the moment. +% \begin{macrocode} +\let\macro=\relax +\let\endmacro=\relax +\NewMacroEnvironment{macro}{\XD@grab@harmless@asmacro}{1} + {\MacroFont\Bslash#1} + {\MakeSortKey\@tempa{#1}{}% + \XDMainIndex{\LevelSorted{\@tempa}{\texttt{\Bslash#1}}}} + {{#1}{\texttt{\Bslash#1}}} + {\DoNotIndexHarmless{#1}} +% \end{macrocode} +% \begin{macrocode} +\let\environment=\relax +\let\endenvironment=\relax +\NewMacroEnvironment{environment}{\XD@grab@harmless@asmacro}{1} + {\MacroFont#1} + {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} (environment)}}% + \XDMainIndex{% + \LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}% + }}% + {{#1}{\texttt{#1}}} + {}% +% \end{macrocode} +% \end{environment}\end{environment} +% +% +% \subsection{Further examples of \texttt{macro}-like environments} +% \label{Ssec:More macros} +% +% \begin{environment}{option} +% The \texttt{option} environment is for class\slash package options. +% IMHO, something like this environment should have been added to +% \package{doc} years ago! +% +% \begin{macrocode} +\NewMacroEnvironment{option}{\XD@grab@harmless\relax}{1} + {\MacroFont#1 \normalfont option} + {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} option}}% + \XDMainIndex{% + \LevelSame{options:}\LevelSorted{#1}{\texttt{#1}}% + }}% + {{#1 option}{\texttt{#1} option}} + {}% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{switch} +% \changes{prot2.1}{2000/11/18}{Using \cs{MakeSortKey}. (LH)} +% The \texttt{switch} environment is for switches created by +% |\newif| (\PlainTeX\ style). +% \begin{macrocode} +\NewMacroEnvironment{switch}{\XD@grab@harmless\relax}{1} + {\MacroFont#1 \normalfont switch}% +% \end{macrocode} +% What makes switches different from the other \texttt{macro}-like +% environments defined here is the large number of index entries it +% makes. For a switch \meta{sw} it first makes one under the `switches:' +% heading: +% \begin{macrocode} + {% + \MakeSortKey\XD@last@key{#1}{}% + \XDMainIndex{% + \LevelSame{switches:}\LevelSorted{\XD@last@key}{\texttt{#1}}% + }% +% \end{macrocode} +% Second it makes a `\meta{sw} switch' entry: +% \begin{macrocode} + \XDMainIndex{\LevelSorted{\XD@last@key}{\texttt{#1} switch}}% +% \end{macrocode} +% Third it makes an entry for the macro |\if|\meta{sw}. The sort key +% for this entry is \emph{not} subjected to |\MakeSortKey| because +% no reasonable operator will act on the |if| prefix (an operator +% which acts on |if| could do rather strange things to e.g. |\ifnum|). +% \begin{macrocode} + \XDMainIndex{\LevelSorted{if#1}{\texttt{\Bslash if#1}}}% +% \end{macrocode} +% Fourth it makes an entry for the macro |\|\meta{sw}|false|: +% \begin{macrocode} + \MakeSortKey\@tempa{#1false}{}% + \XDMainIndex{\LevelSorted{\@tempa}{\texttt{\Bslash#1false}}}% +% \end{macrocode} +% Finally it makes an entry for the macro |\|\meta{sw}|true|: +% \begin{macrocode} + \MakeSortKey\@tempa{#1true}{}% + \XDMainIndex{\LevelSorted{\@tempa}{\texttt{\Bslash#1true}}}% + }% +% \end{macrocode} +% The |\changes| heading, on the other hand, is trivial. +% \begin{macrocode} + {{#1}{\texttt{#1} switch}} +% \end{macrocode} +% Finally, \texttt{switch} should turn off indexing of the three macros +% it makes \texttt{main} entries for, since \package{makeindex} will +% otherwise complain. +% \begin{macrocode} + {\DoNotIndexHarmless{if#1}% + \DoNotIndexHarmless{#1false}% + \DoNotIndexHarmless{#1true}}% +% +% \end{macrocode} +% \end{environment} +% +% +% To end this section, there now follows two examples which are not +% part of the package as they are very specific, but which have been +% included here because they illustrate that \texttt{macro}-like +% environments may have several arguments. +% +% \begin{environment}{enccommand} +% \begin{environment}{enccomposite} +% The \texttt{enccommand} and \texttt{enccomposite} environments can +% be used for marking up sources for encoding definition files and the +% like. \texttt{enccommand} is for encoding-specific commands and has +% the syntax +% \begin{quote} +% |\begin{enccommand}|\marg{command}\oarg{encoding} +% \end{quote} +% where \meta{command} is the encoding-specific command and +% \meta{encoding} is the encoding that this definition is for. If the +% \meta{encoding} is omitted then the \texttt{enccommand} is assumed +% to be for the default definition of the command. +% +% \texttt{enccomposite} is for composites of encoding-specific +% commands (defined for example using |\Declare|\-|Text|\-|Composite|). +% It has the syntax +% \begin{quote} +% |\begin{enccomposite}|\marg{command}\marg{encoding}\marg{argument} +% \end{quote} +% where \meta{command} and \meta{encoding} are as for +% \texttt{enccommand} and \meta{argument} is the argument with which +% the command is being composed. +% +% The marginal headings these commands print are the actual control +% sequences in which the definitions are stored. +% \begin{macrocode} +%<*enccmds> +\NewMacroEnvironment{enccommand}{% + \XD@grab@harmless@asmacro \XD@grab@oarg +}{2}{\MacroFont\Bslash \ifx\NoValue#2?\else#2\fi \Bslash #1}{% + \XDMainIndex{% + \LevelSorted{#1}{\texttt{\Bslash#1}}% + \ifx \NoValue#2% + \LevelSame{default}% + \else + \LevelSorted{#2}{\texttt{#2} encoding}% + \fi + }% +}{{#1}{\texttt{\Bslash#1}}}{\DoNotIndexHarmless{#1}} +% \end{macrocode} +% \begin{macrocode} +\NewMacroEnvironment{enccomposite}{% + \XD@grab@harmless@asmacro \XD@grab@marg \XD@grab@harmless\relax +}{3}{\MacroFont\Bslash#2\Bslash#1-#3}{% + \XDMainIndex{% + \LevelSorted{#1}{\texttt{\Bslash#1}}% + \LevelSorted{#2}{\texttt{#2} encoding}% + \LevelSorted{\XD@unbackslash#3\@empty}{\texttt{#3} composite}% + }% +}{{#1}{\texttt{\Bslash#1}}}{\DoNotIndexHarmless{#1}} +% +% \end{macrocode} +% In the file \texttt{cyoutenc.dtx} the definitions of many +% encoding-specific commands are written so that the same line of +% code can work is all four files \texttt{t2aenc.def}, +% \texttt{t2benc.def}, \texttt{t2cenc.def}, and \texttt{x2enc.def}. +% Therefore the \meta{encoding} argument of the \texttt{enccommand} +% and \texttt{enccomposite} environments should perhaps rather be a +% comma-separated list of encodings than a single encoding, but that +% would make this example unnecessarily complicated. +% \end{environment}\end{environment} +% +% +% +% \section{Describing macros and the like} +% \label{Sec:Describing} +% +% \begin{macro}{\if@mparswitch} +% \begin{macro}{\if@reversemargin} +% In two-sided mode, marginal notes should appear in the outer +% margin. The following code takes care of that. +% \begin{macrocode} +%<*pkg> +\if@twoside + \@mparswitchtrue + \normalmarginpar +\fi +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\GenericDescribePrint} +% \changes{prot2}{2000/07/14}{\cs{leavevmode} and \cs{ignorespaces} +% moved to \cs{NewDescribeCommand}. (LH)} +% \changes{prot2}{2000/07/20}{Added \cs{strut}. Removed it from +% arguments passed to \cs{GenericDescribePrint}. (LH)} +% \changes{prot2.3}{2001/06/24}{Changed formatting to match that of +% \cs{XDParToMargin}. (LH)} +% The |\GenericDescribePrint| macro is a utility macro for use in +% commands like |\Describe|\-|Macro|. Its syntax is +% \begin{quote} +% |\GenericDescribePrint|\marg{text} +% \end{quote} +% and it puts \meta{text} in a marginal paragraph, giving it the +% appropriate justification for appearing in that margin. +% +% The first part simply tests whether the argument fits on a single +% line. +% \begin{macrocode} +\newcommand\GenericDescribePrint[1]{% + \setbox\z@=\vbox{% + \parindent=\z@ + \leftskip=\z@skip + \rightskip=\z@\@plus 1fil% + \parfillskip=\z@skip + \hsize=\marginparwidth + \linepenalty=\@m + \color@begingroup + \noindent\ignorespaces #1\@@par + \color@endgroup + \expandafter}% + \expandafter\ifnum \the\prevgraf<\tw@ +% \end{macrocode} +% Then comes the actual typesetting. First the single-line format. +% The braces in the optional argument are there to prevent trouble +% in case |#1| contains a right brace; they will be stripped off when +% the argument is grabbed. +% \begin{macrocode} + \if@twoside + \marginpar[{\raggedleft\strut #1}]{\raggedright\strut #1}% + \else + \marginpar{\raggedleft\strut#1}% + \fi + \else + \if@twoside + \marginpar[{% + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \parfillskip=\z@ \@plus -\marginparwidth + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1% + }]{% + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \parfillskip=\z@ \@plus 1fil% + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1% + }% + \else + \marginpar{% + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \parfillskip=\z@ \@plus -\marginparwidth + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1% + }% + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% The \texttt{describe}-commands are supposed to be invisible---only +% leave a single space even when there are spaces both before and after +% them---but there are problems with the mechanisms for this. I get the +% impression that they have never worked perfectly, but that seems to +% be mainly due to that certain macros in the \LaTeX\ kernel never did +% either, and I suspect that the general problem has been thrashed over +% many times before. +% +% \package{doc}'s |\DescribeMacro| and |\DescribeEnv| are wrapped up in +% a |\@bsphack| \dots\ |\@esphack| ``group'' to become invisible, but +% the |\marginpar| and various index commands they are built on are +% themselves already invisible, so one would suspect that there is no +% need for additional invisibility. There are however two factors which +% create this need. One is that it doesn't do the right thing at +% beginning of lines; here it seems like what the +% \texttt{describe}-commands would need is the |\@vbsphack| macro +% (whose definition appears in \texttt{ltspace.dtx}, but which has been +% commented out) since they should start a new paragraph and leave no +% following space if they are used in vertical mode. The other factor is +% that the standard |\@bsphack|--|\@esphack| can only suppress every +% second intermediate space if several invisible commands appear in +% sequence, as is quite common for the +% \texttt{describe}-commands.\footnote{It would seem that a simple fix +% for this is to have \cs{@esphack} insert \cs{nobreak} +% \cs{hskip}\texttt{-}\cs{@savsk} \cs{hskip}\cs{@savsk} before it +% executes \cs{ignorespaces}, but since that fix hasn't been +% incorporated into the kernel or the \package{fixltx2e} package there +% probably is some problem with it.} +% +% Instead the \package{doc} implementations of |\DescribeMacro| and +% |\DescribeEnv| begin with |\leavevmode| and end with |\ignorespaces|, +% which means that they are only ``invisible'' if they appear on on the +% left of visible material, but that's how it has been for over a decade +% now. +% +% \begin{macro}{\NewDescribeCommand} +% \changes{prot2}{2000/07/14}{Command added. (LH)} +% The |\NewDescribeCommand| command is a relative to the +% |\New|\-|Macro|\-|Environment| command which defines commands +% analogous to |\Describe|\-|Macro| rather than \texttt{macro}-like +% environments. Its syntax is +% \begin{quote} +% |\NewDescribeCommand|\marg{command}\marg{grabbers}\B +% \marg{numargs}\B\marg{definition} +% \end{quote} +% \meta{command} is the control sequence to define. \meta{grabbers} +% and \meta{numargs} are as for the |\NewMacroEnvironment| command. +% \meta{definition} is the command definition. +% In addition to the definition given in the \meta{definition} +% argument and the code for grabbing the arguments, the command +% actually defined by |\New|\-|Describe|\-|Command| will contain a +% |\leavevmode| at the start and an |\ignorespaces| at the end. +% +% The |\NewDescribeCommand| command should really just be a call to +% \package{xparse}'s |\Declare|\-|Document|\-|Command|, but that will +% have to wait until \package{xdoc} becomes based on the +% \package{xparse} package. +% \begin{macrocode} +\newcommand\NewDescribeCommand[4]{% + \@ifdefinable#1{% + \expandafter\def \expandafter#1\expandafter{% + \expandafter\XD@grab@arguments \csname\string#1\endcsname{#2}% + }% + \let\l@ngrel@x\relax + \expandafter\@yargdef \csname\string#1\endcsname \@ne {#3}% + {\leavevmode#4\ignorespaces}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DescribeMacro} +% \changes{prot2.1}{2000/11/18}{Using \cs{MakeSortKey}. (LH)} +% \begin{macro}{\DescribeEnv} +% The |\DescribeMacro| and |\DescribeEnv| commands are as in +% \package{doc}. The argument of |\DescribeMacro| is supposed to be +% the actual control sequence to describe (not as with the +% \texttt{macro} environment something which looks like the control +% sequence after being |\string|ed). +% \begin{macrocode} +\let\DescribeMacro=\relax +\NewDescribeCommand\DescribeMacro{\XD@grab@harmless@cs}{1}{% + \GenericDescribePrint{\MacroFont\Bslash#1}% + \MakeSortKey\@tempa{#1}{}% + \IndexEntry{% + \LevelSorted{\@tempa}{\texttt{\Bslash#1}}% + }{usage}{\thepage}% +} +% \end{macrocode} +% The argument of |\DescribeEnv|, on the other hand, is treated like +% that of the \texttt{environment} environment, but backslash isn't +% given catcode 12---only the catcode assignments in +% |\Make|\-|Private|\-|Letters| are made. +% \begin{macrocode} +\let\DescribeEnv=\relax +\NewDescribeCommand\DescribeEnv{% + \XD@grab@harmless@withprivate\relax +}{1}{% + \GenericDescribePrint{\MacroFont#1}% + \IndexEntry{% + \LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}% + }{usage}{\thepage}% + \IndexEntry{% + \LevelSorted{#1}{\texttt{#1} (environment)}% + }{usage}{\thepage}% +} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\describeoption} +% \changes{prot2}{2000/07/31}{Command added---I realised that the need +% to describe options is probably as large as that to mark out +% their definition. (LH)} +% The |\describeoption| command is the \texttt{describe}-companion to +% the \texttt{option} environment. +% \begin{macrocode} +\NewDescribeCommand\describeoption{\XD@grab@harmless\relax}{1}{% + \GenericDescribePrint{\MacroFont#1 \normalfont option}% + \IndexEntry{% + \LevelSame{options:}\LevelSorted{#1}{\texttt{#1}}% + }{usage}{\thepage}% + \IndexEntry{% + \LevelSorted{#1}{\texttt{#1} option}% + }{usage}{\thepage}% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\describecsfamily} +% \changes{prot2}{2000/07/14}{Renamed \cs{DescribeCSFamily} and +% incorporated the code from \cs{XD@index@family}. (LH)} +% \changes{prot2.1}{2000/11/18}{Using \cs{MakeSortKey}. (LH)} +% The |\describecsfamily| command is for marking out sections in text +% where a particular family of control sequences is described---just +% like |\DescribeMacro| does for individual commands. To clarify what +% I mean by a control sequence family, here are a couple of examples: +% \begin{longtable}{l >{\raggedright}p{0.55\linewidth}} +% |\c@|\meta{counter}\label{Tab:CS-families}& +% countdef token for the |\count| register storing the +% \LaTeX\ counter \meta{counter}\tabularnewline +% |\ps@|\meta{pagestyle}& +% macro storing settings for the pagestyle \meta{pagestyle}^^A +% \tabularnewline +% |\|\meta{enc}|/|\meta{fam}|/|\meta{ser}|/|\meta{sh}|/|\meta{sz}& +% the fontdef token for the font which has encoding \meta{enc}, +% family \meta{fam}, series \meta{ser}, shape \meta{sh}, and +% size \meta{sz} under NFSS\tabularnewline +% |\|\meta{enc}|\|\meta{cmd}& +% the macro containing the definition for encoding \meta{enc} of +% the encoding-specific \LaTeX\ command |\|\meta{cmd}^^A +% \tabularnewline +% |\fps@|\meta{type}& +% the default placement specifier for \LaTeX\ floats of type +% \meta{type}\tabularnewline +% |\l@|\meta{name}& +% a macro which formats table of contents entries for items of +% type \meta{name} (\texttt{chapter}, \texttt{section}, etc.)^^A +% \tabularnewline +% |\l@|\meta{language}& +% the |\language| number \package{babel} has allocated for the +% language \meta{language} (\texttt{english}, \texttt{french}, +% etc.)\tabularnewline +% |\i-|\meta{int}& +% the control sequence (either a mathchardef token or a macro) +% which stores the value of the \package{fontinst} integer +% \meta{int} +% \end{longtable} +% +% The syntax for |\describecsfamily| is +% \begin{quote} +% |\describecsfamily|\marg{cs-fam specification} +% \end{quote} +% The \meta{cs-fam specification} includes only what would be put +% between |\csname| and |\endcsname|; the |\describecsfamily| command +% will add a backslash when printing the name. No special catcodes +% will be in force in the argument, but the |#|, |$|, |&|, |_|, |^|, +% and |~| characters present no problems even if they have their +% ordinary catcodes. All spaces are seen as ASCII space and \TeX\ is +% skipping spaces as usual. Characters with catcode 0, 1, 2, 5, 9, 14, +% or 15 may however be problematic. +% If you need to specify such a problematic character then you can do +% so by writing |\PrintChar|\marg{code}, where \meta{code} is the +% ASCII code for the character, as a valid \TeX\ number in the range +% 0--255. In case you do not remember the ASCII code for some +% character \meta{c}, there is no harm in specifying it as +% |`\|\meta{c}, e.g. |\PrintChar{`\}}| for a right brace. It is even +% possible to write |\PrintChar| commands for characters outside +% visible ASCII (but those are typeset as |^^|-sequences). +% +% The variant parts in the control sequence names are specified as +% \begin{quote} +% |\meta|\marg{text} +% \end{quote} +% and these will be typeset exactly as in normal text. The arguments +% of |\meta|s appearing in a \meta{cs-fam specification} are moving. +% All control sequences other than |\PrintChar| and |\meta| in a +% \meta{cs-fam specification} (and which do not appear in the argument +% of a |\PrintChar| or |\meta|) are essentially treated as if they +% had been |\string|ed. +% +% Apart from the above differences in treatment of the argument, the +% |\describe|\-|cs|\-|family| command is similar to +% |\DescribeMacro|---it prints the control sequence name in the margin +% and makes a \texttt{usage} index entry. +% \begin{macrocode} +\NewDescribeCommand\describecsfamily{\XD@grab@harmless{}}{1}{% + \GenericDescribePrint{% + \MetaNormalfont\MacroFont\Bslash#1% + }% + \MakeSortKey\@tempa{#1}{\def\meta##1{(##1)}}% + \IndexEntry{% + \LevelSorted{\@tempa}{\texttt{\protect\MetaNormalfont\Bslash#1}}% + }{usage}{\thepage}% +} +% +% \end{macrocode} +% \end{macro} +% +% +% As for |\NewMacroEnvironment|, I also give an example of an +% application of |\NewDescribeCommand| which is much too special for +% including in \package{xdoc} in general and therefore the code is +% placed in a special module. I had originally written the code as part +% of another package, but I removed it because I thought it was a bit +% too special even for that context. The commentry below is kept +% unchanged.\changes{prot2.1}{2000/09/16}{Additional +% \cs{NewDescribeCommand} code example added. (LH)} +% +% \begin{quotation} +% +% I believe this feature is primarily of interest for MacOS programs, +% but there might be sufficiently similar structures in other operating +% systems to make it useful even in other contexts. Be as it may, what +% the feature described here does is that it allows the user to put an +% entry in the index for each resource in the code. This gives an easy +% way of checking that no two resources are assigned the same id, even +% though there is no mechanism for especially warning for such +% collisions. +% +% \begin{macro}{\DescribeResource} +% The main command available is +% \begin{quote} +% |\DescribeResource|\marg{type}\marg{id}\marg{text} +% \end{quote} +% \meta{type} is a four-character string. Most special characters are +% treated as ordinary ones (very useful for |#|s), but the visible +% ASCII characters |%|, |{|, |\|, and |}| retain their usual meaning. +% To use such a troublesome character \meta{c} in a resource type, +% write it as |\PrintChar{`\|\meta{c}|}|. \meta{id} is a \TeX\ number; +% it will be used as the number of the resource. \meta{text} is normal +% text that will be put in the index entry to describe the resource; it +% seems a good idea to use the name of the resource for this. \meta{id} +% and \meta{text} are read with normal \LaTeX\ catcodes. Note that +% \meta{text} is a moving argument. +% +% |\DescribeResource| does two things---it prints the \meta{type} and +% \meta{id} of the resource in the margin, and it writes an entry +% \begin{quote} +% \meta{type} resources:\\ +% \vadjust{}\qquad\meta{id}\\ +% \vadjust{}\qquad\qquad\meta{text} +% \end{quote} +% (plus a lot of formatting not shown here) to the \texttt{.idx} file. +% The reference is for the page. +% +% The idea with advancing |\count@| like that when constructing the +% index entry is to get a sort key for which lexicographic order equals +% the wanted order. This would not be the case if the number was simply +% written down. The current code maps numbers to six-digit positive +% integers, but five-digits integers would be sufficient (a resource +% \meta{id} is a signed 16-bits integer). The construction chosen +% here furthermore puts the negative numbers after the positive ones. +% \begin{macrocode} +%<*rsrccmd> +\NewDescribeCommand\DescribeResource{% + \XD@grab@harmless\relax \XD@grab@marg \XD@grab@marg +}{3}{% + \GenericDescribePrint{#1% + \textnormal{:\ifnum#2<\z@ \textminus\number-\else\number\fi#2}% + }% + \count@=#2\relax + \advance \count@ 100000\ifnum \count@<\z@ 0\fi \relax + \protected@edef\@tempa{% + \noexpand\LevelSorted{\the\count@}{% + \ifnum #2<\z@ \string\textminus \number-\else\number\fi#2% + }% + }% + \IndexEntry{% + \LevelSorted{#1 resources:}{\texttt{#1} resources:}% + \@tempa + \LevelSame{#3}% + }{usage}{\thepage}% +} +% +% \end{macrocode} +% \end{macro} +% +% \end{quotation} +% +% +% \section{The \cs{DocInclude} command} +% \label{Sec:DocInclude} +% +% The code in this section is based on code from the \package{ltxdoc} +% document class~\cite{ltxdoc} and it implements a command called +% |\DocInclude|. Two implementations of this command are given: one +% which is essentially that of \package{ltxdoc} (preserving all its +% peculiarities), and one which is a reimplementation from scratch. The +% default is to use the latter, but passing the \texttt{olddocinclude} +% option to \package{xdoc} selects the former. +% +% +% \subsection{Old implementation} +% +% It should be observed that this is not a complete implementation of the +% |\Doc|\-|Include| command---it only redefines the \package{ltxdoc} +% macros that need to be changed if the |\Doc|\-|Include| command is to +% work with \package{xdoc} (it doesn't for example change the definition +% of |\Doc|\-|Include| itself). Furthermore it doesn't define anything if +% the \package{ltxdoc} document class hasn't been loaded, since then the +% details of the definition of |\Doc|\-|Include| (even if it would be +% defined) are unknown. +% +% \begin{macro}{\CodelineIndex} +% \changes{prot2.1}{2000/10/08}{Using \cs{thecodelineno}. (LH)} +% \begin{macro}{\filesep} +% \changes{prot2.2}{2001/02/13}{Redefined to use +% \cs{XD@page@compositor}. (LH)} +% \begin{macro}{\@docinclude} +% \package{ltxdoc} redefines |\codeline@wrindex| so that |\filesep| is +% prepended to each codeline number that is written to the index file. +% That redefinition has no effect unless the |\Codeline|\-|Index| +% command is executed afterwards however, so there is no harm in having +% |\Codeline|\-|Index| itself apply the corresponding change. +% \begin{macrocode} +%<*pkg> +\@ifpackagewith{xdoc2}{olddocinclude}{% + \@ifclassloaded{ltxdoc}{% + \renewcommand\CodelineIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indextrue + \def\TheXDIndexNumber{\filesep\thecodelineno}% + }% +% \end{macrocode} +% The |\filesep| macro is redefined so that the \package{docindex} +% package~\cite{docindex} can use a |page_compositor| string different +% from the default |-| simply by redefining |\XD@page@compositor|. +% This redefinition has to be put in |\docincludeaux| since that macro +% redefines |\filesep| too. +% \begin{macrocode} + \expandafter\def \expandafter\docincludeaux \expandafter{% + \docincludeaux + \gdef\filesep{\thepart\XD@page@compositor}% + } +% \end{macrocode} +% The change to |\@docinclude| merely consists of inserting code for +% writing an |External|\-|XRef|\-|Wrap| to the \texttt{.aux} file to +% record the new value of the \texttt{part} counter. +% \begin{macrocode} + \def\@docinclude#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{#1.aux}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\@tempb{#1}% + \@for\@tempa:=\@partlist\do{% + \ifx\@tempa\@tempb\@tempswatrue\fi + }% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax}% + \fi + \part{#1.dtx}% + \if@filesw + \immediate\write\@partaux{\@percentchar\@percentchar + ExternalXRefWrap {\filesep} {}% + }% + \fi + {% + \let\ttfamily\relax + \xdef\filekey{% + \filekey, \thepart={\ttfamily\currentfile}% + }% + }% + \DocInput{#1.dtx}% + \clearpage + \@writeckpt{#1}% + \if@filesw \immediate\closeout\@partaux \fi + \else + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux + } + }{} +}{} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% +% \subsection{New implementation} +% \label{Ssec:New DocInclude} +% +% The default action of the second implementation is to be precisely an +% |\include| variant of |\DocInput|, but in addition to that it also +% has a (one-argument) hook called |\docincludeaux| which is executed +% before a file is actually |\DocInput|ted, but after it has been +% determined that it should be included, and this hook is only executed +% for the files which should be |\include|d. This hook is normally +% |\@gobble|, but passing the \texttt{fileispart} option to +% \package{xdoc} redefines it to start a new part and set the pagestyle. +% +% \begin{macro}{\DocInclude} +% \begin{macro}{\@docinclude} +% Most of the code for the |\DocInclude| command is put in the +% |\@docinclude| macro; |\DocInclude| simply checks that it hasn't +% been nested. The main difference to |\include| is that a nested +% |\DocInclude| becomes an error plus the corresponding |\DocInput|, +% whereas a nested |\include| simply becomes an error. The rationale +% for this is that it is probably closer to what was intended. +% +% The argument of |\@docinclude| is, oddly enough, space-delimited. +% This is inherited from the |\@include| macro in the \LaTeX\ kernel, +% where it is a hack to make sure that the part \texttt{.aux} file +% that is opened for writing really gets the suffix \texttt{.aux} (in +% the worst case, \TeX\ could start overwriting a \texttt{.tex} file +% instead). +% \begin{macrocode} +\@ifpackagewith{xdoc2}{olddocinclude}{}{% + \def\DocInclude#1{% + \ifnum\@auxout=\@partaux + \@latexerr{\string\include\space cannot be nested}{% + Your \protect\DocInclude\space will be reduced to a + \protect\DocInput.% + }% + \DocInput{#1.dtx}% + \else \@docinclude#1 \fi + }% +% \end{macrocode} +% The only things in this |\@docinclude| that are not precisely as in +% |\@include| are the |\docincludeaux| and |\DocInput| commands. +% \begin{macrocode} + \def\@docinclude#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{#1.aux}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\@tempb{#1}% + \@for\@tempa:=\@partlist\do{% + \ifx\@tempa\@tempb \@tempswatrue \fi + }% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax}% + \fi + \docincludeaux{#1.dtx}% + \DocInput{#1.dtx}% + \clearpage + \@writeckpt{#1}% + \if@filesw \immediate\closeout\@partaux \fi + \else + \deadcycles\z@ + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux + }% +}{} +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{option}{fileispart} +% \begin{macro}{\docincludeaux} +% The \texttt{fileispart} option works by (re)defining a couple of +% macros, of which the |\doc|\-|include|\-|aux| macro is the most +% important. Its syntax is +% \begin{quote} +% |\docincludeaux|\marg{filename} +% \end{quote} +% where \meta{filename} is the name of a file that will be inputted. +% The \texttt{fileispart} definition of this is to set |\currentfile| +% to the harmless character string of \meta{filename}, produce a +% |\part| heading whose text is that \meta{filename}, add the +% \meta{filename} to the |\filekey| macro, set the page style to +% \texttt{docpart}, clear the |\filedate|, |\fileversion|, and +% |\fileinfo| macros, and write an |External|\-|XRef|\-|Wrap| +% XXR-command to the \texttt{.aux} file to record the new codeline +% number prefix. +% \begin{macrocode} +\@ifpackagewith{xdoc2}{olddocinclude}{\iffalse}{ + \@ifpackagewith{xdoc2}{fileispart}{\iftrue}{ + \let\docincludeaux=\@gobble + \iffalse + } +} % If fileispart and not olddocinclude then + \def\docincludeaux#1{% + \MakeHarmless\currentfile{#1}% + \part{\texttt{\currentfile}}% + \pagestyle{docpart}% + \let\filedate\@empty + \let\fileversion\@empty + \let\fileinfo\@empty + \protected@xdef\filekey{% + \filekey, \thepart=\texttt{\currentfile}% + }% + \if@filesw + \immediate\write\@partaux{\@percentchar\@percentchar + ExternalXRefWrap {\thepart\XD@page@compositor} {}% + }% + \fi + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\CodelineIndex} +% \changes{prot2.1}{2000/10/08}{Using \cs{thecodelineno}. (LH)} +% The \texttt{fileispart} option also adds the \texttt{codelineno} +% counter to the reset list for \texttt{part} and changes the format +% of codeline numbers written to the index. +% \begin{macrocode} + \@ifclassloaded{ltxdoc}{}{\@addtoreset{codelineno}{part}}% + \renewcommand\CodelineIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indextrue + \def\TheXDIndexNumber{\thepart\XD@page@compositor\thecodelineno}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\partname} +% \begin{macro}{\thepart} +% \begin{macro}{\IndexParms} +% Finally there are a couple of macros which are redefined for +% aesthetic rather than technical reasons. Passing the +% \texttt{fileispart} option sets |\partname| to \texttt{File}, sets +% |\thepart| to |\aalph{part}|, and adds a setting of pagestyle to +% |\IndexParms|. (The pagestyle setting is added to +% |\index@|\B|prologue| by \package{ltxdoc}, but I think +% |\Index|\-|Parms| is more appropriate.) +% \begin{macrocode} + \def\partname{File} + \def\thepart{\aalph{part}} + \expandafter\def \expandafter\IndexParms + \expandafter{\IndexParms \pagestyle{docindex}} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% +% In case the index formatting is handled by the \package{docindex} +% package~\cite{docindex} (or its \LaTeXe\ incarnation +% \package{docidx2e}), the above addition to |\Index|\-|Parms| won't +% have any effect. Therefore \package{xdoc} also passes the +% \texttt{use}\-\texttt{doc}\-\texttt{index}\-\texttt{ps} option on +% to these packages. +% \begin{macrocode} + \PassOptionsToPackage{usedocindexps}{docindex} + \PassOptionsToPackage{usedocindexps}{docidx2e} +\fi +% \end{macrocode} +% \end{option} +% +% \begin{macro}{\ps@docpart} +% \begin{macro}{\setfileinfo} +% \begin{macro}{\XD@set@file@info} +% The \texttt{docpart} pagestyle is for pages made from the +% |\DocInclude|d files. The page footers contain the page number, the +% part (file) number, and the current file name. It also contains the +% file date and version if that information is available. +% +% \package{ltxdoc} uses |\GetFileInfo| to get the date and version +% information, but that's a very peculiar practice. The data one wants +% to present are about the file being typeset---typically the version +% of the package that is documented in this file---whereas the +% |\GetFileInfo| command really extracts information about +% \emph{unpacked} classes, packages, and similar files---files that +% contribute to the typesetting by defining commands, not by containing +% text. Such information may be of interest for documents which contain +% alternative code for incompatible versions of for example a package, +% but it is of no use for printing version information as above since +% the version of a package used for typesetting a \texttt{.dtx} file +% need not be the version actually contained in that \texttt{.dtx} +% file. Thus the only way to make this work is by doing as the \LaTeX\ +% kernel source and include |\ProvidesFile| commands for the +% \texttt{.dtx} file in each such file, which is a rather peculiar use +% of the |\ProvidesFile| command. +% +% The |\setfileinfo| command provides an equivalent feature in a less +% roundabout way. It has the syntax +% \begin{quote} +% |\setfileinfo[|\meta{date}\verb*+ +\meta{version}\verb*+ +^^A +% \meta{info}|]| +% \end{quote} +% and it sets |\filedate| to \meta{date}, |\fileversion| to +% \meta{version}, and |\fileinfo| to \meta{info} if the optional +% argument is present; if the optional argument is missing or contains +% fewer than three words then the missing fields are set to |?|. +% +% \begin{macrocode} +\@ifpackagewith{xdoc2}{olddocinclude}{}{% + \def\ps@docpart{% + \def\@oddfoot{% + File: \texttt{\currentfile}% + \ifx \filedate\@empty \else \ Date: \filedate\fi + \ifx \fileversion\@empty \else \ Version: \fileversion\fi + \hfill\thepage + }% + \if@twoside + \def\@evenfoot{% + \thepage\hfill + File: \texttt{\currentfile}% + \ifx \filedate\@empty \else \ Date: \filedate\fi + \ifx \fileversion\@empty \else \ Version: \fileversion\fi + }% + \else \let\@evenfoot\@oddfoot \fi + } +% \end{macrocode} +% The corresponding definition in \package{ltxdoc} (there it appears in +% |\docincludeaux|) is peculiar in that the odd page footer is set +% globally but the even page footer only locally. +% +% The definition of |\setfileinfo| follows that of |\GetFileInfo| +% except for the fact that the |\relax|es have been replaced by +% |\@empty|s. +% \begin{macrocode} + \newcommand\setfileinfo[1][]{% + \edef\@tempa{#1}% + \expandafter\XD@set@file@info \@tempa\@empty? ? \@empty\@empty + } + \def\XD@set@file@info#1 #2 #3\@empty#4\@empty{% + \def\filedate{#1}% + \def\fileversion{#2}% + \def\fileinfo{#3}% + } +}{} +% \end{macrocode} +% The reason for making the argument of |\setfileinfo| optional is +% that with the |\Provides|\-|File| practice one can (potentially) put +% all date and version information in one place through tricks like +% \iffalse +%<*example> +% \fi +%\begin{verbatim} +%% \begin{macrocode} +%\ProvidesPackage{foobar} +%% \end{macrocode} +%% \ProvidesFile{foobar.dtx} +% [2000/02/02 v1.0 Silly example package] +%% +%\end{verbatim}\iffalse +% +% \fi +% By making the argument of |\setfileinfo| optional, I make sure that +% people who have used such tricks only have to replace the +% |\ProvidesFile{foobar.dtx}| by |\setfileinfo|. +% \end{macro}\end{macro}\end{macro} +% +% +% \begin{macro}{\ps@docindex} +% \begin{macro}{\filekey} +% The \texttt{docindex} pagestyle is for the index in +% \texttt{fileispart} documents. It prints a file key, which is a +% list of all the included files and their corresponding part letters, +% at the bottom of every page. The file key is stored in the macro +% |\filekey|, which should have been constructed file by file as they +% are included. To add a file to the file key, it is recommended that +% you do +% \begin{quote} +% |\protected@xdef\filekey{\filekey, |\meta{entry for new file}|}| +% \end{quote} +% The \texttt{fileispart} version of |\docincludeaux| already does +% this. The initial value of |\filekey| is |\@gobble| so that the +% comma before the first entry is removed. The |\@empty| below is +% there in case no entry has been inserted. +% \begin{macrocode} +% \@ifpackagewith{xdoc2}{olddocinclude}{}{% + \def\ps@docindex{% + \def\@oddfoot{% + \parbox{\textwidth}{% + \strut\footnotesize\raggedright + \textbf{File Key:} \filekey\@empty + }% + }% + \let\@evenfoot\@oddfoot + }% + \let\filekey\@gobble +% } +% \end{macrocode} +% \end{macro}\end{macro} +% +% It should be observed that since |\ps@docindex| only sets the page +% style locally, the page style will revert to its previous setting at +% the end of the \texttt{theindex} environment. As that previous +% setting is probably that of the \texttt{docpart} page style, you +% might have to set the page style manually. +% +% \begin{macro}{\aalph} +% \begin{macro}{\@aalph} +% |\aalph| is a variant of |\alph| which continues with the upper case +% letters for 27--52. It is defined by \package{ltxdoc}, so it is +% merely provided here. +% \begin{macrocode} +\providecommand*\aalph[1]{\@aalph{\csname c@#1\endcsname}} +\providecommand*\@aalph[1]{% + \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or + j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or + t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or + D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or + N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or + X\or Y\or Z\else\@ctrerr\fi +} +% \end{macrocode} +% In \texttt{source2e.tex} one can see that \package{doc}'s standard +% \texttt{gind.ist} index style file won't sort the 35th file (part +% \texttt{I}) correctly since it causes \package{makeindex} to read an +% \texttt{I} as ``upper case Roman numeral one'', but I doubt very +% many people encounter that problem in their projects. +% \end{macro}\end{macro} +% +% \begin{macro}{\XD@page@compositor} +% \changes{prot2.2}{2001/02/13}{Macro added, other macros changed to +% use it. (LH)} +% The |\XD@page@compositor| macro contains the string which is put +% between the parts of a composite number in the index; it +% corresponds to the |page_compositor| parameter of +% \package{makeindex}. +% \begin{macrocode} +\providecommand*\XD@page@compositor{-} +% \end{macrocode} +% \end{macro} +% +% +% +% \section{Miscellanea} +% +% \subsection{Some \LaTeXplus\ stuff} +% +% \begin{macro}{\BooleanFalse} +% \begin{macro}{\BooleanTrue} +% \begin{macro}{\NoValue} +% These three macros are borrowed from the \package{xparse} +% package~\cite{xparse}, where they work as the three values +% \emph{boolean false}, \emph{boolean true}, and \emph{absence of +% value} respectively. The definitions are taken from +% \package{xparse} v\,0.17 (1999/09/10). +% \begin{macrocode} +\@ifundefined{BooleanFalse}{\def\BooleanFalse{TF}}{} +\@ifundefined{BooleanTrue}{\def\BooleanTrue{TT}}{} +\@ifundefined{NoValue}{\def\NoValue{-NoValue-}}{} +% \end{macrocode} +% By using these macros (rather than some homegrown set of macros +% or tokens) for denoting these values here I hopefully simplify a +% transition to \LaTeXplus, but I don't want to rely on \LaTeXplus\ +% since it hasn't been released yet. +% \end{macro}\end{macro}\end{macro} +% +% +% \subsection{The \cs{meta} command} +% +% A reimplementation which has already (as of v\,2.0k) found its way into +% the \package{doc} package is the one that the |\meta| command is made +% robust, but since some people might still have older +% versions of \package{doc} and since that feature is needed for +% |\describe|\-|cs|\-|family|, I apply it here too. First I check +% whether the definition of |\meta| is the old non-robust definition, +% and only apply the fix if it is. +% \begin{macrocode} +\begingroup +\obeyspaces% +\catcode`\^^M\active% +\gdef\@gtempa{\begingroup\obeyspaces\catcode`\^^M\active% +\let^^M\do@space\let \do@space% +\def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\itshape}% +\m@ta}% +\endgroup +\ifx \meta\@gtempa +% \end{macrocode} +% +% \begin{macro}{\l@nohyphenation} +% The new implementation needs a |\language| without any hyphenation +% patterns. By switching to that language, one can inhibit +% hyphenation in a piece of text regardless of what line-breaking +% parameter settings are in force when the paragraph is actually +% broken. This new language will be called \texttt{nohyphenation} and +% it is only allocated if it isn't already known (since some +% \package{babel} settings files already defines this |\language|). +% \begin{macrocode} + \@ifundefined{l@nohyphenation}{\newlanguage\l@nohyphenation}{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\meta} +% \begin{macro}{\meta@font@select} +% This is the definition of |\meta| from \package{doc} v\,2.0m. For +% an explanation of the implementation, se a \texttt{doc.dtx} at least +% that new or entry \texttt{latex/3170} in the \LaTeX\ bugs database. +% \begin{macrocode} + \DeclareRobustCommand\meta[1]{% + \ensuremath\langle + \ifmmode \expandafter \nfss@text \fi + {% + \meta@font@select + \edef\meta@hyphen@restore + {\hyphenchar\the\font\the\hyphenchar\font}% + \hyphenchar\font\m@ne + \language\l@nohyphenation + #1\/% + \meta@hyphen@restore + }\ensuremath\rangle + } +% \end{macrocode} +% \begin{macrocode} + \let\meta@font@select=\itshape +\fi +% \end{macrocode} +% \end{macro}\end{macro} +% +% \begin{macro}{\MetaNormalfont} +% \changes{prot2}{2000/07/24}{Removed robustness; protected it +% explicitly wherever needed instead. (LH)} +% The |\MetaNormalfont| command redefines |\meta@font@select| to do a +% |\normal|\-|font| before the |\itshape|. It is useful if |\meta| is +% going to be used to make |\rmfamily| interjections in |\ttfamily| +% text. +% \begin{macrocode} +\newcommand\MetaNormalfont{\def\meta@font@select{\normalfont\itshape}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XD@harmless\meta} +% This macro is needed for making |\meta| behave as described in the +% argument of |\describe|\-|cs|\-|family|, i.e., in text which is +% going to be converted into a harmless character string. +% \begin{macrocode} +\@namedef{XD@harmless\string\meta}#1{% + \toks@=\expandafter{\the\toks@ \meta{#1}}% + \XD@harmless@ +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{The checksum feature} +% +% The checksum mechanism in \package{doc} is a remnant from the times +% when file truncation was a common problem and a mechanism for +% detecting this was a great help.\footnote{Even though I suspect that +% the recommended use of it---to put the checking \cs{Finale} at the +% end of the \texttt{.dtx} file---may have reduced its usefulness +% dramatically, as that \cs{Finale} would have been the one thing that +% surely disappears if the file is truncated.} Today its main usefulness +% seems to lie in that it distinguishes versions of a file that are +% ``being worked on'' (where the checksum probably doesn't match) from +% versions of a file that are ``polished and ready for upload'' +% (someone has bothered to fix the checksum), and as it exists it might +% as well stay. There is a problem however with files which do not +% contain \TeX\ code, as simply counting backslashes quite probably +% isn't a good (or even reasonable) way of forming a checksum for these +% files (if the checksum turns out to be zero, \package{doc} will +% complain no matter what you do). +% +% \begin{macro}{\check@checksum} +% \changes{prot2.1}{2000/10/02}{Redefinition added. (LH)} +% For that reason, the |\check@checksum| macro is redefined to only +% write the ``no checksum'' warning to the log file if the checksum +% hasn't been set. +% \begin{macrocode} +\renewcommand\check@checksum{% + \relax + \ifnum \check@sum=\z@ + \PackageInfo{doc}{This macro file has no checksum!\MessageBreak + The checksum should be \the\bslash@cnt}% + \else\ifnum \check@sum=\bslash@cnt + \typeout{*******************}% + \typeout{* Checksum passed *}% + \typeout{*******************}% + \else + \PackageError{doc}{Checksum not passed (\the\check@sum + <>\the\bslash@cnt)}{The file currently documented seems + to be wrong.\MessageBreak Try to get a correct version.}% + \fi\fi + \global\check@sum\z@ +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{The \cs{theCodelineNo} situation} +% \label{Ssec:CodelineNo} +% +% \changes{prot2.1}{2000/10/08}{\cs{theCodelineNo} situation cleared +% up. (LH)} +% \package{doc} incorporates formatting of the value of the +% \texttt{CodelineNo} counter in the |\theCodelineNo| macro, which is a +% bit awkward since it prevents using this macro in making e.g.\ index +% entries. To get around this, \package{xdoc} introduces the alternative +% name \texttt{codelineno} for this counter so that |\thecodelineno| can +% produce the value representation without formatting. +% +% \begin{macro}{\c@codelineno} +% \begin{macro}{\cl@codelineno} +% \begin{macro}{\p@codelineno} +% \begin{macro}{\thecodelineno} +% The control sequences connected to the \texttt{codelineno} counter +% are |\let| so that they refer to the same |\count| register as the +% \texttt{CodelineNo} counter. Note that \texttt{CodelineNo} isn't a +% proper \LaTeX\ counter, so the macros |\cl@CodelineNo| and +% |\p@CodelineNo| are undefined. |\thecodelineno| is set to the default +% value for a new counter. +% \begin{macrocode} +\@ifundefined{c@codelineno}{}{% + \PackageInfo{xdoc2}{Overwriting codelineno counter}% +} +\let\c@codelineno=\c@CodelineNo +\let\cl@codelineno=\@empty +\let\p@codelineno=\@empty +\def\thecodelineno{\@arabic\c@codelineno} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro} +% +% \begin{macro}{\PrintCodelineNo} +% The |\PrintCodelineNo| command is the new recommended command for +% printing the formatted form of the codeline number counter. People +% who write their own \texttt{macrocode}-like environments should use +% |\PrintCodelineNo| instead of \package{doc}'s |\theCodelineNo|. +% \begin{macrocode} +\newcommand\PrintCodelineNo{\reset@font\scriptsize\thecodelineno} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\theCodelineNo} +% Finally |\theCodelineNo| is redefined to reference +% |\PrintCodelineNo|. This is done for the sake of backwards +% compability; I didn't feel like redefining |\macro@code| just for +% the sake of changing the |\theCodelineNo| into a |\PrintCodelineNo|). +% \begin{macrocode} +\def\theCodelineNo{\PrintCodelineNo} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \section{Problems and things to do} +% +% This section lists some problems that exist with the current +% implementations of commands in \package{xdoc}. The list is rather +% unstable---items are added as I realize there is a problem and removed +% when I find a solution---an in parts it is rather esoteric since most +% of the problems have only been found theoretically. +% +% \medskip +% +% One of the less well-known features of the |\verb| command is that +% it automatically inhibits the known syntactic ligatures. There is +% no such mechanism implemented for the harmless character strings, +% so some (in \TeX\ \texttt{macrocode} uncommon) character sequences +% (such as |!`|) may produce unwanted results. The quick hack to +% circumvent this is to use the |\SetHarmState| command to mark one +% of the characters involved as problematic, as the |\PrintChar| +% command is implemented so that the character it prints will not be +% involved in ligaturing or kerning. On the other hand, \package{doc} +% does nothing to suppress syntactic ligatures in macro or environment +% names when they are printed in the margin, so for that material the +% \package{xdoc} implementation might actually improve things, although +% it could perform worse for verbatim material in the index and list of +% changes. +% +% \medskip +% +% Things to do and\slash or think about: +% \begin{itemize} +% \item +% Examine how complicated it would be to convert the +% |\PrintChar| commands for visible characters in a harmless +% character string back to explicit characters, for possible use in +% sort keys. (This could be used to ensure that visible characters +% are sorted in strict ASCII order.) +% \item +% Should those ``letters'' which are commonly used as word +% separators---in \LaTeX\ code mainly |@|---be ignored when sort +% keys are being formed (just like the backslash is)? (This would +% require a change in the implementation of the \texttt{macro} +% environment.) +% +% A mechanism for doing this is included as of prototype version~2.1. +% \item +% Examine how much more efficient it would be to put temporary +% additions to the index exclude list in a separate list instead of +% the main list. This could be advantageous for deeply nested +% \texttt{macro} environments, as \TeX\ will otherwise store as many +% (almost identical and often rather long) copies of the exclude list +% as there are nested environments. +% +% When asked about it, Frank Mittelbach didn't think there was +% any gains worth mentioning in this. On the other hand it might be +% worth investigating reimplementations that avoid calling |\trivlist| +% at the beginning of each \texttt{macro}-like environment when they +% are nested, since |\trivlist| does quite a lot of assignments. +% +% \item +% In an automatically generated index one often faces the problem +% that the entries at the innermost level are best formatted in one +% way when there is only one, but in a completely different way when +% there are several of them. To get optimal formatting in both cases, +% one would like to let the |\item|, |\subitem|, |\subsubitem| or +% corresponding macros detect the situation in this respect and +% choose the optimal formatting at each case. +% +% A mechanism for this is implemented by the \package{docindex} +% package. +% \end{itemize} +% +% +% \begin{thebibliography}{9} +% \bibitem{ltxdoc} +% David Carlisle: +% \textit{The file \texttt{ltxdoc.dtx} for use with \LaTeXe}, +% The \LaTeX3 Project; ^^A , 1993~ff. +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{base}\slash \texttt{ltxdoc.dtx}. +% \bibitem{docindex} +% Lars Hellstr\"om: +% \textit{The \package{docindex} package}, 2001, +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{exptl}\slash \texttt{xdoc}\slash +% \texttt{docindex.dtx}. +% \bibitem{fontinst} +% Alan Jeffrey, Sebastian Rahtz, Ulrik Vieth (and as of v\,1.9 Lars +% Hellstr\"om): \textit{The \package{fontinst} utility}, v\,1.8~ff., +% documented source code, +% \textsc{ctan}:\discretionary{}{}{\thinspace}^^A +% \texttt{fonts}\slash \texttt{utilities}\slash +% \texttt{fontinst}\slash \texttt{source}/ +% \bibitem{clsguide} +% The \LaTeX3 Project: +% \textit{\LaTeXe~for class and package writers}, +% The \LaTeX3 Project; ^^A , 1995~ff. +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{base}\slash \texttt{clsguide.tex}. +% \bibitem{doc} +% Frank Mittelbach, B.~Hamilton Kelly, Andrew Mills, Dave Love, and +% Joachim \mbox{Schrod}: \textit{The \package{doc} and +% \package{shortvrb} Packages}, The \LaTeX3 Project; ^^A , 1993~ff. +% \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash +% \texttt{latex}\slash \texttt{base}\slash \texttt{doc.dtx}. +% \bibitem{xparse} +% Frank Mittelbach, Chris Rowley, and David Carlisle: \textit{The +% \package{xparse} package}, The \LaTeX3 Project, 1999. Currently +% not available by anonymous FTP, but available by HTTP from +% \texttt{www.latex-project.org} (look for ``experimental code''). +% \end{thebibliography} +% +% \Finale +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/xdoc/xdoc2.ins b/macros/latex/contrib/xdoc/xdoc2.ins new file mode 100644 index 0000000000..ff4eb64bc5 --- /dev/null +++ b/macros/latex/contrib/xdoc/xdoc2.ins @@ -0,0 +1,37 @@ +% This file is the docstrip installation script for the xdoc2 package. +% +% It may be distributed under the conditions of the LaTeX +% Project Public License, either version 1.2 of this license or +% (at your option) any later version. The latest version of this +% license is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% Copyright 2000 2001 Lars Hellstr\"om + +\input docstrip + +\keepsilent + +\preamble + +This file may be distributed and/or modified under the conditions +of the LaTeX Project Public License, either version 1.2 of this +license or (at your option) any later version. The latest version +of this license is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions of LaTeX +version 1999/12/01 or later. + +This file may only be distributed together with a copy of the source +file from which it was generated. You may distribute that source file +without this generated file. + +\endpreamble + +\usedir{tex/latex/misc} +\generate{\file{xdoc2.sty}{\from{xdoc2.dtx}{pkg,xdoc2}}} + +\endbatchfile +\end diff --git a/macros/latex/contrib/xdoc/xdoc2.pdf b/macros/latex/contrib/xdoc/xdoc2.pdf new file mode 100644 index 0000000000..c71ef7aac3 Binary files /dev/null and b/macros/latex/contrib/xdoc/xdoc2.pdf differ diff --git a/macros/latex/contrib/xdoc/xdocdemo.pdf b/macros/latex/contrib/xdoc/xdocdemo.pdf new file mode 100644 index 0000000000..a368decfbc Binary files /dev/null and b/macros/latex/contrib/xdoc/xdocdemo.pdf differ diff --git a/macros/latex/contrib/xdoc/xdocdemo.tex b/macros/latex/contrib/xdoc/xdocdemo.tex new file mode 100644 index 0000000000..026afcb9fb --- /dev/null +++ b/macros/latex/contrib/xdoc/xdocdemo.tex @@ -0,0 +1,2599 @@ +%% +%% This file may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.2 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% Copyright 2000 2003 Lars Hellstr\"om +%% +\documentclass[twoside]{ltxdoc} +\usepackage[dolayout]{xdoc2} + +\DeclareRobustCommand\package[1]{\textsf{#1}} + +% I redefine theindex environment so that I can use floats normally +% inside it. Inside the multicolumn environment the float mechanism +% performs worse. This is the non-multicol definition from doc: +\makeatletter +\renewenvironment{theindex}{% + \@restonecoltrue + \if@twocolumn\@restonecolfalse\fi + \columnseprule \z@ + \columnsep 35\p@ + \twocolumn[\index@prologue]% + \IndexParms + \let\item\@idxitem + \ignorespaces +}{\if@restonecol\onecolumn\else\clearpage\fi} +\makeatother + +\begin{document} + +\begin{abstract} + This document contains some demonstrations of features in the + \package{xdoc} package. It's not particularly organised, though. +\end{abstract} + +\section{Describing control sequence families} + +The following piece of code is from the source for \package{fontinst}: +\begin{verbatim} + The kerning information is kept in the macros + \describecsfamily{l-\meta{name}}|\l-|\meta{name} and + \describecsfamily{r-\meta{name}}|\r-|\meta{name}, containing + information about how \meta{name} kerns on the left and on the right, + respectively. The |\l-|\meta{name} macro should expand out to a + series of + \begin{quote} + \DescribeMacro{\k}|\k|\,|\r-|\meta{name}\,|\|\meta{amount} + \end{quote} + control sequences, and vice versa. Examples of + \describecsfamily{\meta{amount}} |\|\meta{amount} + control sequences are: |\0|, |\1|, |\1000|, |\-50|, |\33|; these + corresponds to the kern amounts $0$, $1$, $1000$ (which would be + a very large kern), $-50$, and $33$ respectively. +\end{verbatim} +Now I'm going to write that it typesets as what follows below, but it +looks better if this paragraph is a couple of lines long, since that +enables one to see where the right margin actually begins. But that +seems to be long enough. Thus: +It typesets as +\begin{quote} + The kerning information is kept in the macros + \describecsfamily{l-\meta{name}}|\l-|\meta{name} and + \describecsfamily{r-\meta{name}}|\r-|\meta{name}, containing + information about how \meta{name} kerns on the left and on the right, + respectively. The |\l-|\meta{name} macro should expand out to a + series of + \begin{quote} + \DescribeMacro{\k}|\k|\,|\r-|\meta{name}\,|\|\meta{amount} + \end{quote} + control sequences, and vice versa. Examples of + \describecsfamily{\meta{amount}} |\|\meta{amount} + control sequences are: |\0|, |\1|, |\1000|, |\-50|, |\33|; these + corresponds to the kern amounts $0$, $1$, $1000$ (which would be + a very large kern), $-50$, and $33$ respectively. +\end{quote} + + +\section{Defining new \texttt{macro}-like environments} + +Another example from \package{fontinst}---the \package{fisource} +package (v\,2.02) contains the command +\begin{verbatim} +\NewMacroEnvironment{fistring}{\XD@grab@harmless\relax}{1}% + {\MacroFont#1 \normalfont string}% + {\XDMainIndex{\levelsorted{#1 I}{\texttt{#1} (string)}}% + \XDMainIndex{\levelsame{strings:}\levelsorted{#1}{\texttt{#1}}}}% + {{#1}{\texttt{#1} string}}% + {} +\end{verbatim} +which defines a new \texttt{macro}-like environment called +\texttt{fistring} (for \package{fontinst} string variable). The fourth +argument above specifies how the marginal heading should be formatted, +the fifth argument specifies which index entries should be made on +account of this environment, and the sixth argument gives the list of +changes heading (and its sorting) that should be used inside this +\texttt{macro}-like environment. + +\makeatletter +\NewMacroEnvironment{fistring}{\XD@grab@harmless\relax}{1}% + {\MacroFont#1 \normalfont string}% + {\XDMainIndex{\levelsorted{#1 I}{\texttt{#1} (string)}}% + \XDMainIndex{\levelsame{strings:}\levelsorted{#1}{\texttt{#1}}}}% + {{#1}{\texttt{#1} string}}% + {} +\makeatother + +\MakePercentIgnore +% With the command defined, the code +%\begin{verbatim} +%% \begin{macro}{\make_pltotf} +%% \begin{fistring}{TFMfileprefix} +%% |\make_pltotf| writes a \package{PLtoTF} command for converting the +%% current font's PL file to a TFM file. If set, the string +%% \texttt{TFMfileprefix} will be prepended to the TFM file name---this +%% could be used for putting the TFMs in some directory other than the +%% current. +%% \begin{macrocode} +%\def\make_pltotf{ +% \pout_line\output_pltotf{pltotf~\TeX_font_name.pl~ +% \ifisstr{TFMfileprefix}\then \str{TFMfileprefix}\fi +% \TeX_font_name.tfm +% } +%} +%% \end{macrocode} +%% \end{fistring}\end{macro} +%\end{verbatim} +% will print as +% +% \begin{macro}{\make_pltotf} +% \begin{fistring}{TFMfileprefix} +% |\make_pltotf| writes a \package{PLtoTF} command for converting the +% current font's PL file to a TFM file. If set, the string +% \texttt{TFMfileprefix} will be prepended to the TFM file name---this +% could be used for putting the TFMs in some directory other than the +% current. +% \begin{macrocode} +\def\make_pltotf{ + \pout_line\output_pltotf{pltotf~\TeX_font_name.pl~ + \ifisstr{TFMfileprefix}\then \str{TFMfileprefix}\fi + \TeX_font_name.tfm + } +} +% \end{macrocode} +% \end{fistring}\end{macro} +% +\MakePercentComment + +\clearpage + +\section{Two-sided printing} + +As you may have noticed, marginal material has so far consistently +been put in the \emph{outer} margin, but the examples so far given of +such material that appears in the right margin have been restricted +to marginal material made via the |\marginpar| command (in various +disguises), and that isn't so hard to achieve. It's much harder to +achieve it for marginal material produced as list item labels, so here +are a few examples to illustrate that it works for these as well. (The +filling up text is taken from the \package{fontsmpl} package in the +Tools bundle.) + +\vspace*{0.5\textheight} + +(A bit of space to put the text near the page break.) + +% Hacks to ensure that some marginal text is positioned before the +% previous page is output. +\begingroup +\interlinepenalty=500 +\setlength\MacroTopsep{1\MacroTopsep plus 3\MacroTopsep} + +\begin{environment}{Stanford} + On November 14, 1885, Senator \& Mrs.~Leland Stanford called + together at their San Francisco mansion the 24~prominent men who + had been chosen as the first trustees of The Leland Stanford + Junior University. +\end{environment} + +\begin{environment}{charter} + They handed to the board the Founding Grant + of the University, which they had executed three days before. + This document---with various amendments, legislative acts, and + court decrees---remains as the University's charter. +\end{environment} + +\begin{environment}{objectives} + In bold, sweeping language it stipulates that the objectives of the + University are ``to qualify students for personal success and + direct usefulness in life; +\end{environment} + +\begin{environment}{continuation} + and to promote the publick welfare by + exercising an influence in behalf of humanity and civilization, + teaching the blessings of liberty regulated by law, and + inculcating love and reverence for the great principles of + government as derived from the inalienable rights of man to life, + liberty, and the pursuit of happiness.'' +\end{environment} + +\begin{environment}{CAPITALS} + (!`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS!)' +\end{environment} + +\begin{environment}{accents-and-such} + ?`But aren't Kafka's Schlo\ss\ + and \AE sop's \OE uvres often na\"\i ve vis-\`a-vis the + d\ae monic ph\oe nix's official r\^ole in fluffy s\t ouffl\'es? +\end{environment} + +\endgroup + +As you might have noticed, the first marginal heading on this page was +put on the wrong side the first time the document was typeset. This is +however corrected the next time the document is typeset, and the +\package{xdoc} package gave a warning about it at the end of the run. + + +\section{An enriched index} + +The following index was automatically generated for copies of the +files \texttt{ltoutenc.dtx} and \texttt{cyoutenc.dtx} to which had +been added some extra markup. Most of that extra markup consisted of +\texttt{enccommand} and \texttt{enccomposite} environments (the +definitions of which can be found in Subsection~8.4 of +\texttt{xdoc2.dtx}), but I also added a couple of |\Describe|\-|Macro| +and |\describe|\-|cs|\-|family| commands where it seemed suitable. + + +\let\listenvironmentitem=\item + + + \begin{theindex} + \makeatletter\scan@allowedfalse +{\bfseries\hfil Symbols\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}"}\pfill a-371, a-475, a-666 + \subitem default\pfill \main{a-176} + \subitem \texttt {OT1} encoding\pfill \main{a-335} + \subitem \texttt {OT4} encoding\pfill \main{a-623} + \subitem \texttt {T1} encoding\pfill \main{a-407} + \subsubitem \texttt {A} composite\pfill \main{a-541} + \subsubitem \texttt {a} composite\pfill \main{a-567} + \subsubitem \texttt {E} composite\pfill \main{a-547} + \subsubitem \texttt {e} composite\pfill \main{a-573} + \subsubitem \texttt {I} composite\pfill \main{a-551} + \subsubitem \texttt {i} composite\pfill \main{a-580} + \subsubitem \texttt {\PrintChar{092}i} composite\pfill + \main{a-581} + \subsubitem \texttt {O} composite\pfill \main{a-557} + \subsubitem \texttt {o} composite\pfill \main{a-587} + \subsubitem \texttt {U} composite\pfill \main{a-561} + \subsubitem \texttt {u} composite\pfill \main{a-591} + \subsubitem \texttt {Y} composite\pfill \main{a-506} + \subsubitem \texttt {y} composite\pfill \main{a-533} + \subitem \texttt {T2A} encoding\pfill \main{b-17} + \subsubitem \texttt {\PrintChar{092}CYRE} composite\pfill + \main{b-441} + \subsubitem \texttt {\PrintChar{092}cyre} composite\pfill + \main{b-442} + \subsubitem \texttt {\PrintChar{092}CYRII} composite\pfill + \main{b-445} + \subsubitem \texttt {\PrintChar{092}cyrii} composite\pfill + \main{b-447} + \subitem \texttt {T2B} encoding\pfill \main{b-17} + \subsubitem \texttt {\PrintChar{092}CYRE} composite\pfill + \main{b-441} + \subsubitem \texttt {\PrintChar{092}cyre} composite\pfill + \main{b-442} + \subitem \texttt {T2C} encoding\pfill \main{b-17} + \subsubitem \texttt {\PrintChar{092}CYRE} composite\pfill + \main{b-441} + \subsubitem \texttt {\PrintChar{092}cyre} composite\pfill + \main{b-442} + \subitem \texttt {X2} encoding\pfill \main{b-17} + \subsubitem \texttt {\PrintChar{092}CYRE} composite\pfill + \main{b-441} + \subsubitem \texttt {\PrintChar{092}cyre} composite\pfill + \main{b-442} + \subsubitem \texttt {\PrintChar{092}CYRII} composite\pfill + \main{b-445} + \subsubitem \texttt {\PrintChar{092}cyrii} composite\pfill + \main{b-447} + \item \texttt {\PrintChar{092}'}\pfill a-373, a-477, a-668 + \subitem default\pfill \main{a-177} + \subitem \texttt {OT1} encoding\pfill \main{a-336} + \subitem \texttt {OT4} encoding\pfill \main{a-624} + \subsubitem \texttt {C} composite\pfill \main{a-687} + \subsubitem \texttt {c} composite\pfill \main{a-694} + \subsubitem \texttt {N} composite\pfill \main{a-689} + \subsubitem \texttt {n} composite\pfill \main{a-696} + \subsubitem \texttt {O} composite\pfill \main{a-700} + \subsubitem \texttt {o} composite\pfill \main{a-701} + \subsubitem \texttt {S} composite\pfill \main{a-690} + \subsubitem \texttt {s} composite\pfill \main{a-697} + \subsubitem \texttt {Z} composite\pfill \main{a-691} + \subsubitem \texttt {z} composite\pfill \main{a-698} + \subitem \texttt {T1} encoding\pfill \main{a-404} + \subsubitem \texttt {A} composite\pfill \main{a-538} + \subsubitem \texttt {a} composite\pfill \main{a-564} + \subsubitem \texttt {C} composite\pfill \main{a-486} + \subsubitem \texttt {c} composite\pfill \main{a-513} + \subsubitem \texttt {E} composite\pfill \main{a-545} + \subsubitem \texttt {e} composite\pfill \main{a-571} + \subsubitem \texttt {I} composite\pfill \main{a-549} + \subsubitem \texttt {i} composite\pfill \main{a-576} + \subsubitem \texttt {\PrintChar{092}i} composite\pfill + \main{a-577} + \subsubitem \texttt {L} composite\pfill \main{a-492} + \subsubitem \texttt {l} composite\pfill \main{a-519} + \subsubitem \texttt {N} composite\pfill \main{a-494} + \subsubitem \texttt {n} composite\pfill \main{a-521} + \subsubitem \texttt {O} composite\pfill \main{a-554} + \subsubitem \texttt {o} composite\pfill \main{a-584} + \subsubitem \texttt {R} composite\pfill \main{a-497} + \subsubitem \texttt {r} composite\pfill \main{a-524} + \subsubitem \texttt {S} composite\pfill \main{a-499} + \subsubitem \texttt {s} composite\pfill \main{a-526} + \subsubitem \texttt {U} composite\pfill \main{a-559} + \subsubitem \texttt {u} composite\pfill \main{a-589} + \subsubitem \texttt {Y} composite\pfill \main{a-562} + \subsubitem \texttt {y} composite\pfill \main{a-592} + \subsubitem \texttt {Z} composite\pfill \main{a-507} + \subsubitem \texttt {z} composite\pfill \main{a-534} + \subitem \texttt {T2A} encoding\pfill \main{b-14} + \subitem \texttt {T2B} encoding\pfill \main{b-14} + \subitem \texttt {T2C} encoding\pfill \main{b-14} + \subitem \texttt {X2} encoding\pfill \main{b-14} + \item \texttt {\MetaNormalfont \PrintChar{092}\meta {encoding}-cmd}\pfill + \usage{6} + \item \texttt {\MetaNormalfont \PrintChar{092}\meta {encoding}\PrintChar{092}\meta {command}}\pfill + \usage{6} + \item \texttt {\PrintChar{092}-}\pfill a-367, a-368, a-470, + a-662, a-663 + \item \texttt {\PrintChar{092}.}\efill + \subitem default\pfill \main{a-178} + \subitem \texttt {OT1} encoding\pfill \main{a-337} + \subitem \texttt {OT4} encoding\pfill \main{a-625} + \subsubitem \texttt {Z} composite\pfill \main{a-692} + \subsubitem \texttt {z} composite\pfill \main{a-699} + \subitem \texttt {T1} encoding\pfill \main{a-413} + \subsubitem \texttt {I} composite\pfill \main{a-510} + \subsubitem \texttt {i} composite\pfill \main{a-483} + \subsubitem \texttt {Z} composite\pfill \main{a-509} + \subsubitem \texttt {z} composite\pfill \main{a-536} + \subitem \texttt {T2A} encoding\pfill \main{b-23} + \subsubitem \texttt {i} composite\pfill \main{b-75} + \subitem \texttt {T2B} encoding\pfill \main{b-23} + \subsubitem \texttt {i} composite\pfill \main{b-75} + \subitem \texttt {T2C} encoding\pfill \main{b-23} + \subsubitem \texttt {i} composite\pfill \main{b-75} + \subitem \texttt {X2} encoding\pfill \main{b-23} + \subsubitem \texttt {i} composite\pfill \main{b-75} + \item \texttt {\PrintChar{092}<}\pfill a-471, a-616 + \item \texttt {\MetaNormalfont \PrintChar{092}?\PrintChar{092}\meta {command}}\pfill + \usage{6} + \item \texttt {\PrintChar{092}\PrintChar{036}}\pfill a-251, a-392, + a-399, a-464, a-678, a-685 + \item \texttt {\PrintChar{092}\PrintChar{037}}\pfill a-427, a-429, + b-39, b-41 + \item \texttt {\PrintChar{092}\PrintChar{061}}\efill + \subitem default\pfill \main{a-179} + \subitem \texttt {OT1} encoding\pfill \main{a-338} + \subitem \texttt {OT4} encoding\pfill \main{a-626} + \subitem \texttt {T1} encoding\pfill \main{a-412} + \subitem \texttt {T2A} encoding\pfill \main{b-22} + \subitem \texttt {T2B} encoding\pfill \main{b-22} + \subitem \texttt {T2C} encoding\pfill \main{b-22} + \subitem \texttt {X2} encoding\pfill \main{b-22} + \item \texttt {\PrintChar{092}\PrintChar{062}}\pfill a-468, a-617 + \item \texttt {\PrintChar{092}\PrintChar{092}}\pfill a-459 + \item \texttt {\MetaNormalfont \PrintChar{092}\PrintChar{092}\meta {enc}\PrintChar{092}\meta {cmd}-\meta {arg}}\pfill + \usage{8} + \item \texttt {\PrintChar{092}\PrintChar{094}}\pfill a-233, a-457 + \subitem default\pfill \main{a-181} + \subitem \texttt {OT1} encoding\pfill \main{a-339} + \subitem \texttt {OT4} encoding\pfill \main{a-627} + \subitem \texttt {T1} encoding\pfill \main{a-405} + \subsubitem \texttt {A} composite\pfill \main{a-539} + \subsubitem \texttt {a} composite\pfill \main{a-565} + \subsubitem \texttt {E} composite\pfill \main{a-546} + \subsubitem \texttt {e} composite\pfill \main{a-572} + \subsubitem \texttt {I} composite\pfill \main{a-550} + \subsubitem \texttt {i} composite\pfill \main{a-578} + \subsubitem \texttt {\PrintChar{092}i} composite\pfill + \main{a-579} + \subsubitem \texttt {O} composite\pfill \main{a-555} + \subsubitem \texttt {o} composite\pfill \main{a-585} + \subsubitem \texttt {U} composite\pfill \main{a-560} + \subsubitem \texttt {u} composite\pfill \main{a-590} + \subitem \texttt {T2A} encoding\pfill \main{b-15} + \subitem \texttt {T2B} encoding\pfill \main{b-15} + \subitem \texttt {T2C} encoding\pfill \main{b-15} + \subitem \texttt {X2} encoding\pfill \main{b-15} + \begin{figure*} + A verbatim extract from the index (without \textsf{docidx2e}): + + \let\item=\listenvironmentitem + \expandafter\def \expandafter\MacroFont \expandafter{% + \MacroFont\footnotesize} + \begin{list}{}{\setlength{\leftmargin}{-0.5\marginparwidth}} + \item[] +\begin{verbatim} + \item \texttt {\PrintChar{092}\PrintChar{061}}\efill + \subitem default\pfill \main{a-179} + \subitem \texttt {OT1} encoding\pfill \main{a-338} + \subitem \texttt {OT4} encoding\pfill \main{a-626} + \subitem \texttt {T1} encoding\pfill \main{a-412} + \subitem \texttt {T2A} encoding\pfill \main{b-22} + \subitem \texttt {T2B} encoding\pfill \main{b-22} + \subitem \texttt {T2C} encoding\pfill \main{b-22} + \subitem \texttt {X2} encoding\pfill \main{b-22} + \item \texttt {\PrintChar{092}\PrintChar{062}}\pfill a-468, a-617 + \item \texttt {\PrintChar{092}\PrintChar{092}}\pfill a-459 + \item \texttt {\MetaNormalfont \PrintChar{092}\PrintChar{092}\meta {enc}\PrintChar{092}\meta {cmd}-\meta {arg}}\pfill + \usage{8} + \item \texttt {\PrintChar{092}\PrintChar{094}}\pfill a-233, a-457 + \subitem default\pfill \main{a-181} + \subitem \texttt {OT1} encoding\pfill \main{a-339} + \subitem \texttt {OT4} encoding\pfill \main{a-627} + \subitem \texttt {T1} encoding\pfill \main{a-405} + \subsubitem \texttt {A} composite\pfill \main{a-539} + \subsubitem \texttt {a} composite\pfill \main{a-565} + \subsubitem \texttt {E} composite\pfill \main{a-546} + \subsubitem \texttt {e} composite\pfill \main{a-572} + \subsubitem \texttt {I} composite\pfill \main{a-550} + \subsubitem \texttt {i} composite\pfill \main{a-578} + \subsubitem \texttt {\PrintChar{092}i} composite\pfill + \main{a-579} + \subsubitem \texttt {O} composite\pfill \main{a-555} + \subsubitem \texttt {o} composite\pfill \main{a-585} + \subsubitem \texttt {U} composite\pfill \main{a-560} + \subsubitem \texttt {u} composite\pfill \main{a-590} + \subitem \texttt {T2A} encoding\pfill \main{b-15} + \subitem \texttt {T2B} encoding\pfill \main{b-15} + \subitem \texttt {T2C} encoding\pfill \main{b-15} + \subitem \texttt {X2} encoding\pfill \main{b-15} + \item \texttt {\PrintChar{092}\PrintChar{095}}\pfill a-258 + \item \texttt {\PrintChar{092}\PrintChar{123}}\pfill a-252, a-461 + \item \texttt {\PrintChar{092}\PrintChar{124}}\pfill a-460 + \item \texttt {\PrintChar{092}\PrintChar{125}}\pfill a-253, a-462 + \item \texttt {\PrintChar{092}\PrintChar{126}}\pfill a-234, a-458 + \subitem default\pfill \main{a-189} + \subitem \texttt {OT1} encoding\pfill \main{a-341} + \subitem \texttt {OT4} encoding\pfill \main{a-629} + \subitem \texttt {T1} encoding\pfill \main{a-406} + \subsubitem \texttt {A} composite\pfill \main{a-540} + \subsubitem \texttt {a} composite\pfill \main{a-566} + \subsubitem \texttt {N} composite\pfill \main{a-552} + \subsubitem \texttt {n} composite\pfill \main{a-582} + \subsubitem \texttt {O} composite\pfill \main{a-556} + \subsubitem \texttt {o} composite\pfill \main{a-586} + \subitem \texttt {T2A} encoding\pfill \main{b-16} + \subitem \texttt {T2B} encoding\pfill \main{b-16} + \subitem \texttt {T2C} encoding\pfill \main{b-16} + \subitem \texttt {X2} encoding\pfill \main{b-16} +\end{verbatim} + \end{list} + \end{figure*} + \begin{figure*} + A verbatim extract from the index (with \textsf{docidx2e}): + + \let\item=\listenvironmentitem + \expandafter\def \csname macro@font\expandafter\endcsname + \expandafter{\MacroFont\footnotesize} + \csname codeline@indexfalse\endcsname + \begin{list}{}{% + \setlength{\leftmargin}{-0.5\marginparwidth}% + \setlength{\topsep}{0pt}% + } + \item[] +\begin{macrocode} +\indexitem{1}{\texttt {\PrintChar{092}\PrintChar{095}}}{9}{a\+258}{1} +\indexitem{1}{\texttt {\PrintChar{092}\PrintChar{123}}}{9}{a\+252, + a\+461}{1} +\indexitem{1}{\texttt {\PrintChar{092}\PrintChar{124}}}{9}{a\+460}{1} +\indexitem{1}{\texttt {\PrintChar{092}\PrintChar{125}}}{9}{a\+253, + a\+462}{1} +\indexitem{1}{\texttt {\PrintChar{092}\PrintChar{126}}}{9}{a\+234, + a\+458}{2} + \indexitem{2}{default}{9}{\main{a\+189}}{2} + \indexitem{2}{\texttt {OT1} encoding}{9}{\main{a\+341}}{2} + \indexitem{2}{\texttt {OT4} encoding}{9}{\main{a\+629}}{2} + \indexitem{2}{\texttt {T1} encoding}{9}{\main{a\+406}}{3} + \indexitem{3}{\texttt {A} composite}{9}{\main{a\+540}}{3} + \indexitem{3}{\texttt {a} composite}{9}{\main{a\+566}}{3} + \indexitem{3}{\texttt {N} composite}{9}{\main{a\+552}}{3} + \indexitem{3}{\texttt {n} composite}{9}{\main{a\+582}}{3} + \indexitem{3}{\texttt {O} composite}{9}{\main{a\+556}}{3} + \indexitem{3}{\texttt {o} composite}{9}{\main{a\+586}}{2} + \indexitem{2}{\texttt {T2A} encoding}{9}{\main{b\+16}}{2} + \indexitem{2}{\texttt {T2B} encoding}{9}{\main{b\+16}}{2} + \indexitem{2}{\texttt {T2C} encoding}{9}{\main{b\+16}}{2} + \indexitem{2}{\texttt {X2} encoding}{9}{\main{b\+16}}{1} +\indexitem{1}{\texttt {\PrintChar{092}`}}{9}{a\+372, a\+476, + a\+667}{2} + \indexitem{2}{default}{9}{\main{a\+182}}{2} + \indexitem{2}{\texttt {OT1} encoding}{9}{\main{a\+340}}{2} + \indexitem{2}{\texttt {OT4} encoding}{9}{\main{a\+628}}{2} + \indexitem{2}{\texttt {T1} encoding}{9}{\main{a\+403}}{3} + \indexitem{3}{\texttt {A} composite}{9}{\main{a\+537}}{3} + \indexitem{3}{\texttt {a} composite}{9}{\main{a\+563}}{3} + \indexitem{3}{\texttt {E} composite}{9}{\main{a\+544}}{3} + \indexitem{3}{\texttt {e} composite}{9}{\main{a\+570}}{3} + \indexitem{3}{\texttt {I} composite}{9}{\main{a\+548}}{3} + \indexitem{3}{\texttt {i} composite}{9}{\main{a\+574}}{3} + \indexitem{3}{\texttt {\PrintChar{092}i} composite}{9}{ + \main{a\+575}}{3} + \indexitem{3}{\texttt {O} composite}{9}{\main{a\+553}}{3} + \indexitem{3}{\texttt {o} composite}{9}{\main{a\+583}}{3} + \indexitem{3}{\texttt {U} composite}{9}{\main{a\+558}}{3} + \indexitem{3}{\texttt {u} composite}{9}{\main{a\+588}}{2} + \indexitem{2}{\texttt {T2A} encoding}{9}{\main{b\+13}}{2} + \indexitem{2}{\texttt {T2B} encoding}{9}{\main{b\+13}}{2} + \indexitem{2}{\texttt {T2C} encoding}{9}{\main{b\+13}}{2} + \indexitem{2}{\texttt {X2} encoding}{9}{\main{b\+13}}{0} +%^^A +\indexnewletter{0}{A}{1} +\indexitem{1}{\texttt {\PrintChar{092}a}}{9}{\main{a\+173}}{1} +\indexitem{1}{\texttt {\PrintChar{092}AA}}{9}{a\+190, a\+380, + a\+430}{1} +\indexitem{1}{\texttt {\PrintChar{092}aa}}{9}{a\+195, a\+374, + a\+440}{1} +\indexitem{1}{\texttt {\PrintChar{092}accent}}{9}{a\+71, a\+350, + a\+375, a\+418, a\+640, b\+31}{1} +% \end{macrocode} + \end{list} + \end{figure*} + \item \texttt {\PrintChar{092}\PrintChar{095}}\pfill a-258 + \item \texttt {\PrintChar{092}\PrintChar{123}}\pfill a-252, a-461 + \item \texttt {\PrintChar{092}\PrintChar{124}}\pfill a-460 + \item \texttt {\PrintChar{092}\PrintChar{125}}\pfill a-253, a-462 + \item \texttt {\PrintChar{092}\PrintChar{126}}\pfill a-234, a-458 + \subitem default\pfill \main{a-189} + \subitem \texttt {OT1} encoding\pfill \main{a-341} + \subitem \texttt {OT4} encoding\pfill \main{a-629} + \subitem \texttt {T1} encoding\pfill \main{a-406} + \subsubitem \texttt {A} composite\pfill \main{a-540} + \subsubitem \texttt {a} composite\pfill \main{a-566} + \subsubitem \texttt {N} composite\pfill \main{a-552} + \subsubitem \texttt {n} composite\pfill \main{a-582} + \subsubitem \texttt {O} composite\pfill \main{a-556} + \subsubitem \texttt {o} composite\pfill \main{a-586} + \subitem \texttt {T2A} encoding\pfill \main{b-16} + \subitem \texttt {T2B} encoding\pfill \main{b-16} + \subitem \texttt {T2C} encoding\pfill \main{b-16} + \subitem \texttt {X2} encoding\pfill \main{b-16} + \item \texttt {\PrintChar{092}`}\pfill a-372, a-476, a-667 + \subitem default\pfill \main{a-182} + \subitem \texttt {OT1} encoding\pfill \main{a-340} + \subitem \texttt {OT4} encoding\pfill \main{a-628} + \subitem \texttt {T1} encoding\pfill \main{a-403} + \subsubitem \texttt {A} composite\pfill \main{a-537} + \subsubitem \texttt {a} composite\pfill \main{a-563} + \subsubitem \texttt {E} composite\pfill \main{a-544} + \subsubitem \texttt {e} composite\pfill \main{a-570} + \subsubitem \texttt {I} composite\pfill \main{a-548} + \subsubitem \texttt {i} composite\pfill \main{a-574} + \subsubitem \texttt {\PrintChar{092}i} composite\pfill + \main{a-575} + \subsubitem \texttt {O} composite\pfill \main{a-553} + \subsubitem \texttt {o} composite\pfill \main{a-583} + \subsubitem \texttt {U} composite\pfill \main{a-558} + \subsubitem \texttt {u} composite\pfill \main{a-588} + \subitem \texttt {T2A} encoding\pfill \main{b-13} + \subitem \texttt {T2B} encoding\pfill \main{b-13} + \subitem \texttt {T2C} encoding\pfill \main{b-13} + \subitem \texttt {X2} encoding\pfill \main{b-13} + + \indexspace +{\bfseries\hfil A\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}a}\pfill \main{a-173} + \item \texttt {\PrintChar{092}AA}\pfill a-190, a-380, a-430 + \item \texttt {\PrintChar{092}aa}\pfill a-195, a-374, a-440 + \item \texttt {\PrintChar{092}accent}\pfill a-71, a-350, a-375, + a-418, a-640, b-31 + \item \texttt {\PrintChar{092}accent@spacefactor}\pfill a-70--a-72 + \item \texttt {\PrintChar{092}add@accent}\pfill a-65, \main{a-67} + \item \texttt {\PrintChar{092}AE}\efill + \subitem default\pfill \main{a-191} + \subitem \texttt {OT1} encoding\pfill \main{a-355} + \subitem \texttt {OT4} encoding\pfill \main{a-645} + \subitem \texttt {T1} encoding\pfill \main{a-431} + \item \texttt {\PrintChar{092}ae}\efill + \subitem default\pfill \main{a-196} + \subitem \texttt {OT1} encoding\pfill \main{a-358} + \subitem \texttt {OT4} encoding\pfill \main{a-649} + \subitem \texttt {T1} encoding\pfill \main{a-441} + \item \texttt {\PrintChar{092}afterassignment}\pfill a-162, a-170 + \item \texttt {\PrintChar{092}@autoerr}\pfill a-51 + + \indexspace +{\bfseries\hfil B\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}b}\efill + \subitem default\pfill \main{a-183} + \subitem \texttt {OT1} encoding\pfill \main{a-346} + \subitem \texttt {OT4} encoding\pfill \main{a-636} + \subitem \texttt {T1} encoding\pfill \main{a-414} + \subitem \texttt {T2A} encoding\pfill \main{b-27} + \subitem \texttt {T2B} encoding\pfill \main{b-27} + \subitem \texttt {T2C} encoding\pfill \main{b-27} + \subitem \texttt {X2} encoding\pfill \main{b-27} + + \indexspace +{\bfseries\hfil C\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}C}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-25} + \subitem \texttt {T2B} encoding\pfill \main{b-25} + \subitem \texttt {T2C} encoding\pfill \main{b-25} + \subitem \texttt {X2} encoding\pfill \main{b-25} + \item \texttt {\PrintChar{092}c}\efill + \subitem default\pfill \main{a-184} + \subitem \texttt {OT1} encoding\pfill \main{a-349} + \subitem \texttt {OT4} encoding\pfill \main{a-639} + \subitem \texttt {T1} encoding\pfill \main{a-417} + \subsubitem \texttt {C} composite\pfill \main{a-543} + \subsubitem \texttt {c} composite\pfill \main{a-569} + \subsubitem \texttt {S} composite\pfill \main{a-501} + \subsubitem \texttt {s} composite\pfill \main{a-528} + \subsubitem \texttt {T} composite\pfill \main{a-503} + \subsubitem \texttt {t} composite\pfill \main{a-530} + \subitem \texttt {T2A} encoding\pfill \main{b-30} + \subsubitem \texttt {\PrintChar{092}CYRZ} composite\pfill + \main{b-448} + \subsubitem \texttt {\PrintChar{092}cyrz} composite\pfill + \main{b-449} + \subitem \texttt {T2B} encoding\pfill \main{b-30} + \subitem \texttt {T2C} encoding\pfill \main{b-30} + \subitem \texttt {X2} encoding\pfill \main{b-30} + \subsubitem \texttt {\PrintChar{092}CYRZ} composite\pfill + \main{b-448} + \subsubitem \texttt {\PrintChar{092}cyrz} composite\pfill + \main{b-449} + \item \texttt {\PrintChar{092}capitalacute}\efill + \subitem default\pfill \main{a-848} + \subitem \texttt {TS1} encoding\pfill \main{a-713} + \item \texttt {\PrintChar{092}capitalbreve}\efill + \subitem default\pfill \main{a-855} + \subitem \texttt {TS1} encoding\pfill \main{a-720} + \item \texttt {\PrintChar{092}capitalcaron}\efill + \subitem default\pfill \main{a-854} + \subitem \texttt {TS1} encoding\pfill \main{a-719} + \item \texttt {\PrintChar{092}capitalcedilla}\efill + \subitem default\pfill \main{a-845} + \subitem \texttt {TS1} encoding\pfill \main{a-706} + \item \texttt {\PrintChar{092}capitalcircumflex}\efill + \subitem default\pfill \main{a-849} + \subitem \texttt {TS1} encoding\pfill \main{a-714} + \item \texttt {\PrintChar{092}capitaldieresis}\efill + \subitem default\pfill \main{a-851} + \subitem \texttt {TS1} encoding\pfill \main{a-716} + \item \texttt {\PrintChar{092}capitaldotaccent}\efill + \subitem default\pfill \main{a-857} + \subitem \texttt {TS1} encoding\pfill \main{a-722} + \item \texttt {\PrintChar{092}capitalgrave}\efill + \subitem default\pfill \main{a-847} + \subitem \texttt {TS1} encoding\pfill \main{a-712} + \item \texttt {\PrintChar{092}capitalhungarumlaut}\efill + \subitem default\pfill \main{a-852} + \subitem \texttt {TS1} encoding\pfill \main{a-717} + \item \texttt {\PrintChar{092}capitalmacron}\efill + \subitem default\pfill \main{a-856} + \subitem \texttt {TS1} encoding\pfill \main{a-721} + \item \texttt {\PrintChar{092}capitalnewtie}\efill + \subitem default\pfill \main{a-861} + \subitem \texttt {TS1} encoding\pfill \main{a-726} + \item \texttt {\PrintChar{092}capitalogonek}\efill + \subitem default\pfill \main{a-846} + \subitem \texttt {TS1} encoding\pfill \main{a-709} + \item \texttt {\PrintChar{092}capitalring}\efill + \subitem default\pfill \main{a-853} + \subitem \texttt {TS1} encoding\pfill \main{a-718} + \item \texttt {\PrintChar{092}capitaltie}\efill + \subitem default\pfill \main{a-859} + \subitem \texttt {TS1} encoding\pfill \main{a-724} + \item \texttt {\PrintChar{092}capitaltilde}\efill + \subitem default\pfill \main{a-850} + \subitem \texttt {TS1} encoding\pfill \main{a-715} + \item \texttt {\PrintChar{092}@car}\pfill a-77 + \item \texttt {\PrintChar{092}cf@encoding}\pfill a-29, a-36, a-39, + a-48, a-114 + \item \texttt {\PrintChar{092}@changed@cmd}\pfill \main{a-3}, a-63, + a-173 + \item \texttt {\PrintChar{092}@changed@x}\pfill \main{a-3}, a-161, + a-169 + \item \texttt {\PrintChar{092}@changed@x@mouth}\pfill a-161, a-169 + \item \texttt {\PrintChar{092}char}\pfill a-348, a-351, a-382, a-385, + a-392, a-399, a-416, a-419, a-425, a-427, a-429, a-610, + a-638, a-641, a-671, a-678, a-685, a-708, a-711, a-759, + b-29, b-32, b-37, b-39, b-41 + \item \texttt {\PrintChar{092}chardef}\pfill a-8 + \item \texttt {\PrintChar{092}copyright}\pfill a-232, a-260 + \item \texttt {\PrintChar{092}crcr}\pfill a-347, a-351, a-354, a-415, + a-420, a-423, a-425, a-609, a-637, a-641, a-644, a-708, + a-711, a-758, b-28, b-33, b-35, b-37 + \item \texttt {\PrintChar{092}@curr@enc}\pfill a-114, a-116 + \item \texttt {\PrintChar{092}curr@fontshape}\pfill a-130 + \item \texttt {\PrintChar{092}@current@cmd}\pfill a-20 + \item \texttt {\PrintChar{092}CurrentOption}\pfill a-300, a-302, + a-314 + \item \texttt {\PrintChar{092}CYRA}\pfill a-272 + \subitem \texttt {T2A} encoding\pfill \main{b-76} + \subitem \texttt {T2B} encoding\pfill \main{b-76} + \subitem \texttt {T2C} encoding\pfill \main{b-76} + \subitem \texttt {X2} encoding\pfill \main{b-76} + \item \texttt {\PrintChar{092}cyra}\pfill a-272, a-317 + \subitem \texttt {T2A} encoding\pfill \main{b-77} + \subitem \texttt {T2B} encoding\pfill \main{b-77} + \subitem \texttt {T2C} encoding\pfill \main{b-77} + \subitem \texttt {X2} encoding\pfill \main{b-77} + \item \texttt {\PrintChar{092}CYRABHCH}\pfill a-272, b-458, b-462 + \subitem \texttt {T2C} encoding\pfill \main{b-349} + \subitem \texttt {X2} encoding\pfill \main{b-381} + \item \texttt {\PrintChar{092}cyrabhch}\pfill a-272, b-459, b-463 + \subitem \texttt {T2C} encoding\pfill \main{b-350} + \subitem \texttt {X2} encoding\pfill \main{b-382} + \item \texttt {\PrintChar{092}CYRABHCHDSC}\pfill a-272 + \subitem \texttt {T2C} encoding\pfill \main{b-351} + \subitem \texttt {X2} encoding\pfill \main{b-383} + \item \texttt {\PrintChar{092}cyrabhchdsc}\pfill a-272 + \subitem \texttt {T2C} encoding\pfill \main{b-352} + \subitem \texttt {X2} encoding\pfill \main{b-384} + \item \texttt {\PrintChar{092}CYRABHDZE}\pfill a-273 + \subitem \texttt {T2B} encoding\pfill \main{b-271} + \subitem \texttt {T2C} encoding\pfill \main{b-329} + \subitem \texttt {X2} encoding\pfill \main{b-155} + \item \texttt {\PrintChar{092}cyrabhdze}\pfill a-272 + \subitem \texttt {T2B} encoding\pfill \main{b-272} + \subitem \texttt {T2C} encoding\pfill \main{b-330} + \subitem \texttt {X2} encoding\pfill \main{b-156} + \item \texttt {\PrintChar{092}CYRABHHA}\pfill a-273 + \subitem \texttt {T2C} encoding\pfill \main{b-361} + \subitem \texttt {X2} encoding\pfill \main{b-403} + \item \texttt {\PrintChar{092}cyrabhha}\pfill a-273 + \subitem \texttt {T2C} encoding\pfill \main{b-362} + \subitem \texttt {X2} encoding\pfill \main{b-404} + \item \texttt {\PrintChar{092}CYRAE}\pfill a-273 + \subitem \texttt {T2A} encoding\pfill \main{b-223} + \subitem \texttt {X2} encoding\pfill \main{b-374} + \item \texttt {\PrintChar{092}cyrae}\pfill a-273 + \subitem \texttt {T2A} encoding\pfill \main{b-224} + \subitem \texttt {X2} encoding\pfill \main{b-376} + \item \texttt {\PrintChar{092}CYRB}\pfill a-273 + \subitem \texttt {T2A} encoding\pfill \main{b-78} + \subitem \texttt {T2B} encoding\pfill \main{b-78} + \subitem \texttt {T2C} encoding\pfill \main{b-78} + \subitem \texttt {X2} encoding\pfill \main{b-78} + \item \texttt {\PrintChar{092}cyrb}\pfill a-273 + \subitem \texttt {T2A} encoding\pfill \main{b-79} + \subitem \texttt {T2B} encoding\pfill \main{b-79} + \subitem \texttt {T2C} encoding\pfill \main{b-79} + \subitem \texttt {X2} encoding\pfill \main{b-79} + \item \texttt {\PrintChar{092}CYRBYUS}\pfill a-274 + \subitem \texttt {X2} encoding\pfill \main{b-431} + \item \texttt {\PrintChar{092}cyrbyus}\pfill a-273 + \subitem \texttt {X2} encoding\pfill \main{b-432} + \item \texttt {\PrintChar{092}CYRC}\pfill a-274 + \subitem \texttt {T2A} encoding\pfill \main{b-120} + \subitem \texttt {T2B} encoding\pfill \main{b-120} + \subitem \texttt {T2C} encoding\pfill \main{b-120} + \subitem \texttt {X2} encoding\pfill \main{b-120} + \item \texttt {\PrintChar{092}cyrc}\pfill a-274 + \subitem \texttt {T2A} encoding\pfill \main{b-121} + \subitem \texttt {T2B} encoding\pfill \main{b-121} + \subitem \texttt {T2C} encoding\pfill \main{b-121} + \subitem \texttt {X2} encoding\pfill \main{b-121} + \item \texttt {\PrintChar{092}CYRCH}\pfill a-274 + \subitem \texttt {T2A} encoding\pfill \main{b-122} + \subitem \texttt {T2B} encoding\pfill \main{b-122} + \subitem \texttt {T2C} encoding\pfill \main{b-122} + \subitem \texttt {X2} encoding\pfill \main{b-122} + \item \texttt {\PrintChar{092}cyrch}\pfill a-274 + \subitem \texttt {T2A} encoding\pfill \main{b-123} + \subitem \texttt {T2B} encoding\pfill \main{b-123} + \subitem \texttt {T2C} encoding\pfill \main{b-123} + \subitem \texttt {X2} encoding\pfill \main{b-123} + \item \texttt {\PrintChar{092}CYRCHLDSC}\pfill a-274 + \subitem \texttt {T2B} encoding\pfill \main{b-303} + \subitem \texttt {X2} encoding\pfill \main{b-187} + \item \texttt {\PrintChar{092}cyrchldsc}\pfill a-274 + \subitem \texttt {T2B} encoding\pfill \main{b-304} + \subitem \texttt {X2} encoding\pfill \main{b-188} + \item \texttt {\PrintChar{092}CYRCHRDSC}\pfill a-275 + \subitem \texttt {T2A} encoding\pfill \main{b-247} + \subitem \texttt {T2B} encoding\pfill \main{b-305} + \subitem \texttt {T2C} encoding\pfill \main{b-363} + \subitem \texttt {X2} encoding\pfill \main{b-189} + \item \texttt {\PrintChar{092}cyrchrdsc}\pfill a-274 + \subitem \texttt {T2A} encoding\pfill \main{b-248} + \subitem \texttt {T2B} encoding\pfill \main{b-306} + \subitem \texttt {T2C} encoding\pfill \main{b-364} + \subitem \texttt {X2} encoding\pfill \main{b-190} + \item \texttt {\PrintChar{092}CYRCHVCRS}\pfill a-275 + \subitem \texttt {T2A} encoding\pfill \main{b-245} + \subitem \texttt {X2} encoding\pfill \main{b-423} + \item \texttt {\PrintChar{092}cyrchvcrs}\pfill a-275 + \subitem \texttt {T2A} encoding\pfill \main{b-246} + \subitem \texttt {X2} encoding\pfill \main{b-424} + \item \texttt {\PrintChar{092}CYRD}\pfill a-275 + \subitem \texttt {T2A} encoding\pfill \main{b-84} + \subitem \texttt {T2B} encoding\pfill \main{b-84} + \subitem \texttt {T2C} encoding\pfill \main{b-84} + \subitem \texttt {X2} encoding\pfill \main{b-84} + \item \texttt {\PrintChar{092}cyrd}\pfill a-275 + \subitem \texttt {T2A} encoding\pfill \main{b-85} + \subitem \texttt {T2B} encoding\pfill \main{b-85} + \subitem \texttt {T2C} encoding\pfill \main{b-85} + \subitem \texttt {X2} encoding\pfill \main{b-85} + \item \texttt {\PrintChar{092}cyrdash}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-43} + \subitem \texttt {T2B} encoding\pfill \main{b-43} + \subitem \texttt {T2C} encoding\pfill \main{b-43} + \subitem \texttt {X2} encoding\pfill \main{b-43} + \item \texttt {\PrintChar{092}CYRDELTA}\pfill a-275 + \subitem \texttt {T2B} encoding\pfill \main{b-269} + \subitem \texttt {X2} encoding\pfill \main{b-435} + \item \texttt {\PrintChar{092}cyrdelta}\pfill a-275 + \subitem \texttt {T2B} encoding\pfill \main{b-270} + \subitem \texttt {X2} encoding\pfill \main{b-436} + \item \texttt {\PrintChar{092}CYRDJE}\pfill a-276 + \subitem \texttt {T2A} encoding\pfill \main{b-203} + \subitem \texttt {X2} encoding\pfill \main{b-377} + \item \texttt {\PrintChar{092}cyrdje}\pfill a-276 + \subitem \texttt {T2A} encoding\pfill \main{b-204} + \subitem \texttt {X2} encoding\pfill \main{b-378} + \item \texttt {\PrintChar{092}CYRDZE}\pfill a-276 + \subitem \texttt {T2A} encoding\pfill \main{b-229} + \subitem \texttt {T2B} encoding\pfill \main{b-416} + \subitem \texttt {T2C} encoding\pfill \main{b-416} + \subitem \texttt {X2} encoding\pfill \main{b-416} + \item \texttt {\PrintChar{092}cyrdze}\pfill a-276 + \subitem \texttt {T2A} encoding\pfill \main{b-230} + \subitem \texttt {T2B} encoding\pfill \main{b-417} + \subitem \texttt {T2C} encoding\pfill \main{b-417} + \subitem \texttt {X2} encoding\pfill \main{b-417} + \item \texttt {\PrintChar{092}CYRDZHE}\pfill a-276 + \subitem \texttt {T2A} encoding\pfill \main{b-243} + \subitem \texttt {T2C} encoding\pfill \main{b-359} + \subitem \texttt {X2} encoding\pfill \main{b-421} + \item \texttt {\PrintChar{092}cyrdzhe}\pfill a-276 + \subitem \texttt {T2A} encoding\pfill \main{b-244} + \subitem \texttt {T2C} encoding\pfill \main{b-360} + \subitem \texttt {X2} encoding\pfill \main{b-422} + \item \texttt {\PrintChar{092}CYRE}\pfill a-276, b-441 + \subitem \texttt {T2A} encoding\pfill \main{b-86} + \subitem \texttt {T2B} encoding\pfill \main{b-86} + \subitem \texttt {T2C} encoding\pfill \main{b-86} + \subitem \texttt {X2} encoding\pfill \main{b-86} + \item \texttt {\PrintChar{092}cyre}\pfill a-276, b-442 + \subitem \texttt {T2A} encoding\pfill \main{b-87} + \subitem \texttt {T2B} encoding\pfill \main{b-87} + \subitem \texttt {T2C} encoding\pfill \main{b-87} + \subitem \texttt {X2} encoding\pfill \main{b-87} + \item \texttt {\PrintChar{092}CYREPS}\pfill a-277 + \subitem \texttt {T2B} encoding\pfill \main{b-311} + \subitem \texttt {X2} encoding\pfill \main{b-195} + \item \texttt {\PrintChar{092}cyreps}\pfill a-276 + \subitem \texttt {T2B} encoding\pfill \main{b-312} + \subitem \texttt {X2} encoding\pfill \main{b-196} + \item \texttt {\PrintChar{092}CYREREV}\pfill a-277 + \subitem \texttt {T2A} encoding\pfill \main{b-134} + \subitem \texttt {T2B} encoding\pfill \main{b-134} + \subitem \texttt {T2C} encoding\pfill \main{b-134} + \subitem \texttt {X2} encoding\pfill \main{b-134} + \item \texttt {\PrintChar{092}cyrerev}\pfill a-277 + \subitem \texttt {T2A} encoding\pfill \main{b-135} + \subitem \texttt {T2B} encoding\pfill \main{b-135} + \subitem \texttt {T2C} encoding\pfill \main{b-135} + \subitem \texttt {X2} encoding\pfill \main{b-135} + \item \texttt {\PrintChar{092}CYRERY}\pfill a-277 + \subitem \texttt {T2A} encoding\pfill \main{b-130} + \subitem \texttt {T2B} encoding\pfill \main{b-130} + \subitem \texttt {T2C} encoding\pfill \main{b-130} + \subitem \texttt {X2} encoding\pfill \main{b-130} + \item \texttt {\PrintChar{092}cyrery}\pfill a-277 + \subitem \texttt {T2A} encoding\pfill \main{b-131} + \subitem \texttt {T2B} encoding\pfill \main{b-131} + \subitem \texttt {T2C} encoding\pfill \main{b-131} + \subitem \texttt {X2} encoding\pfill \main{b-131} + \item \texttt {\PrintChar{092}CYRF}\pfill a-277 + \subitem \texttt {T2A} encoding\pfill \main{b-116} + \subitem \texttt {T2B} encoding\pfill \main{b-116} + \subitem \texttt {T2C} encoding\pfill \main{b-116} + \subitem \texttt {X2} encoding\pfill \main{b-116} + \item \texttt {\PrintChar{092}cyrf}\pfill a-277 + \subitem \texttt {T2A} encoding\pfill \main{b-117} + \subitem \texttt {T2B} encoding\pfill \main{b-117} + \subitem \texttt {T2C} encoding\pfill \main{b-117} + \subitem \texttt {X2} encoding\pfill \main{b-117} + \item \texttt {\PrintChar{092}CYRFITA}\pfill a-278 + \item \texttt {\PrintChar{092}cyrfita}\pfill a-277 + \item \texttt {\PrintChar{092}CYRG}\pfill a-278 + \subitem \texttt {T2A} encoding\pfill \main{b-82} + \subitem \texttt {T2B} encoding\pfill \main{b-82} + \subitem \texttt {T2C} encoding\pfill \main{b-82} + \subitem \texttt {X2} encoding\pfill \main{b-82} + \item \texttt {\PrintChar{092}cyrg}\pfill a-278 + \subitem \texttt {T2A} encoding\pfill \main{b-83} + \subitem \texttt {T2B} encoding\pfill \main{b-83} + \subitem \texttt {T2C} encoding\pfill \main{b-83} + \subitem \texttt {X2} encoding\pfill \main{b-83} + \item \texttt {\PrintChar{092}CYRGDSC}\pfill a-278 + \subitem \texttt {T2B} encoding\pfill \main{b-261} + \subitem \texttt {X2} encoding\pfill \main{b-145} + \item \texttt {\PrintChar{092}cyrgdsc}\pfill a-278 + \subitem \texttt {T2B} encoding\pfill \main{b-262} + \subitem \texttt {X2} encoding\pfill \main{b-146} + \item \texttt {\PrintChar{092}CYRGDSCHCRS}\pfill a-278 + \subitem \texttt {T2B} encoding\pfill \main{b-256} + \item \texttt {\PrintChar{092}cyrgdschcrs}\pfill a-278 + \subitem \texttt {T2B} encoding\pfill \main{b-258} + \item \texttt {\PrintChar{092}CYRGHCRS}\pfill a-279 + \subitem \texttt {T2A} encoding\pfill \main{b-201} + \subitem \texttt {T2B} encoding\pfill \main{b-259} + \subitem \texttt {X2} encoding\pfill \main{b-143} + \item \texttt {\PrintChar{092}cyrghcrs}\pfill a-279 + \subitem \texttt {T2A} encoding\pfill \main{b-202} + \subitem \texttt {T2B} encoding\pfill \main{b-260} + \subitem \texttt {X2} encoding\pfill \main{b-144} + \item \texttt {\PrintChar{092}CYRGHK}\pfill a-279 + \subitem \texttt {T2B} encoding\pfill \main{b-263} + \subitem \texttt {T2C} encoding\pfill \main{b-321} + \subitem \texttt {X2} encoding\pfill \main{b-147} + \item \texttt {\PrintChar{092}cyrghk}\pfill a-279 + \subitem \texttt {T2B} encoding\pfill \main{b-264} + \subitem \texttt {T2C} encoding\pfill \main{b-322} + \subitem \texttt {X2} encoding\pfill \main{b-148} + \item \texttt {\PrintChar{092}CYRGUP}\pfill a-279 + \subitem \texttt {T2A} encoding\pfill \main{b-198} + \subitem \texttt {X2} encoding\pfill \main{b-140} + \item \texttt {\PrintChar{092}cyrgup}\pfill a-279 + \subitem \texttt {T2A} encoding\pfill \main{b-200} + \subitem \texttt {X2} encoding\pfill \main{b-142} + \item \texttt {\PrintChar{092}CYRH}\pfill a-279 + \subitem \texttt {T2A} encoding\pfill \main{b-118} + \subitem \texttt {T2B} encoding\pfill \main{b-118} + \subitem \texttt {T2C} encoding\pfill \main{b-118} + \subitem \texttt {X2} encoding\pfill \main{b-118} + \item \texttt {\PrintChar{092}cyrh}\pfill a-279 + \subitem \texttt {T2A} encoding\pfill \main{b-119} + \subitem \texttt {T2B} encoding\pfill \main{b-119} + \subitem \texttt {T2C} encoding\pfill \main{b-119} + \subitem \texttt {X2} encoding\pfill \main{b-119} + \item \texttt {\PrintChar{092}CYRHDSC}\pfill a-280 + \subitem \texttt {T2A} encoding\pfill \main{b-241} + \subitem \texttt {T2B} encoding\pfill \main{b-299} + \subitem \texttt {T2C} encoding\pfill \main{b-357} + \subitem \texttt {X2} encoding\pfill \main{b-183} + \item \texttt {\PrintChar{092}cyrhdsc}\pfill a-280 + \subitem \texttt {T2A} encoding\pfill \main{b-242} + \subitem \texttt {T2B} encoding\pfill \main{b-300} + \subitem \texttt {T2C} encoding\pfill \main{b-358} + \subitem \texttt {X2} encoding\pfill \main{b-184} + \item \texttt {\PrintChar{092}CYRHHCRS}\pfill a-280 + \subitem \texttt {T2B} encoding\pfill \main{b-297} + \item \texttt {\PrintChar{092}cyrhhcrs}\pfill a-280 + \subitem \texttt {T2B} encoding\pfill \main{b-298} + \item \texttt {\PrintChar{092}CYRHHK}\pfill a-280 + \subitem \texttt {T2B} encoding\pfill \main{b-301} + \subitem \texttt {X2} encoding\pfill \main{b-185} + \item \texttt {\PrintChar{092}cyrhhk}\pfill a-280 + \subitem \texttt {T2B} encoding\pfill \main{b-302} + \subitem \texttt {X2} encoding\pfill \main{b-186} + \item \texttt {\PrintChar{092}CYRHRDSN}\pfill a-281 + \subitem \texttt {T2A} encoding\pfill \main{b-128} + \subitem \texttt {T2B} encoding\pfill \main{b-128} + \subitem \texttt {T2C} encoding\pfill \main{b-128} + \subitem \texttt {X2} encoding\pfill \main{b-128} + \item \texttt {\PrintChar{092}cyrhrdsn}\pfill a-280 + \subitem \texttt {T2A} encoding\pfill \main{b-129} + \subitem \texttt {T2B} encoding\pfill \main{b-129} + \subitem \texttt {T2C} encoding\pfill \main{b-129} + \subitem \texttt {X2} encoding\pfill \main{b-129} + \item \texttt {\PrintChar{092}CYRI}\pfill a-281, b-443 + \subitem \texttt {T2A} encoding\pfill \main{b-92} + \subitem \texttt {T2B} encoding\pfill \main{b-92} + \subitem \texttt {T2C} encoding\pfill \main{b-92} + \subitem \texttt {X2} encoding\pfill \main{b-92} + \item \texttt {\PrintChar{092}cyri}\pfill a-281, b-444 + \subitem \texttt {T2A} encoding\pfill \main{b-93} + \subitem \texttt {T2B} encoding\pfill \main{b-93} + \subitem \texttt {T2C} encoding\pfill \main{b-93} + \subitem \texttt {X2} encoding\pfill \main{b-93} + \item \texttt {\PrintChar{092}CYRIE}\pfill a-281 + \subitem \texttt {T2A} encoding\pfill \main{b-249} + \subitem \texttt {X2} encoding\pfill \main{b-191} + \item \texttt {\PrintChar{092}cyrie}\pfill a-281 + \subitem \texttt {T2A} encoding\pfill \main{b-250} + \subitem \texttt {X2} encoding\pfill \main{b-192} + \item \texttt {\PrintChar{092}CYRII}\pfill a-281, b-446 + \subitem \texttt {T2A} encoding\pfill \main{b-392} + \subitem \texttt {T2B} encoding\pfill \main{b-392} + \subitem \texttt {T2C} encoding\pfill \main{b-392} + \subitem \texttt {X2} encoding\pfill \main{b-392} + \item \texttt {\PrintChar{092}cyrii}\pfill a-281, b-447 + \subitem \texttt {T2A} encoding\pfill \main{b-393} + \subitem \texttt {T2B} encoding\pfill \main{b-393} + \subitem \texttt {T2C} encoding\pfill \main{b-393} + \subitem \texttt {X2} encoding\pfill \main{b-393} + \item \texttt {\PrintChar{092}CYRISHRT}\pfill a-281 + \subitem \texttt {T2A} encoding\pfill \main{b-94} + \subitem \texttt {T2B} encoding\pfill \main{b-94} + \subitem \texttt {T2C} encoding\pfill \main{b-94} + \subitem \texttt {X2} encoding\pfill \main{b-94} + \item \texttt {\PrintChar{092}cyrishrt}\pfill a-281 + \subitem \texttt {T2A} encoding\pfill \main{b-95} + \subitem \texttt {T2B} encoding\pfill \main{b-95} + \subitem \texttt {T2C} encoding\pfill \main{b-95} + \subitem \texttt {X2} encoding\pfill \main{b-95} + \item \texttt {\PrintChar{092}CYRISHRTDSC}\pfill a-282 + \subitem \texttt {T2C} encoding\pfill \main{b-355} + \item \texttt {\PrintChar{092}cyrishrtdsc}\pfill a-282 + \subitem \texttt {T2C} encoding\pfill \main{b-356} + \item \texttt {\PrintChar{092}CYRIZH}\pfill a-282 + \subitem \texttt {X2} encoding\pfill \main{b-433} + \item \texttt {\PrintChar{092}cyrizh}\pfill a-282 + \subitem \texttt {X2} encoding\pfill \main{b-434} + \item \texttt {\PrintChar{092}CYRJE}\pfill a-282 + \subitem \texttt {T2A} encoding\pfill \main{b-394} + \subitem \texttt {T2B} encoding\pfill \main{b-394} + \subitem \texttt {T2C} encoding\pfill \main{b-394} + \subitem \texttt {X2} encoding\pfill \main{b-394} + \item \texttt {\PrintChar{092}cyrje}\pfill a-282 + \subitem \texttt {T2A} encoding\pfill \main{b-395} + \subitem \texttt {T2B} encoding\pfill \main{b-395} + \subitem \texttt {T2C} encoding\pfill \main{b-395} + \subitem \texttt {X2} encoding\pfill \main{b-395} + \item \texttt {\PrintChar{092}CYRK}\pfill a-282 + \subitem \texttt {T2A} encoding\pfill \main{b-96} + \subitem \texttt {T2B} encoding\pfill \main{b-96} + \subitem \texttt {T2C} encoding\pfill \main{b-96} + \subitem \texttt {X2} encoding\pfill \main{b-96} + \item \texttt {\PrintChar{092}cyrk}\pfill a-282 + \subitem \texttt {T2A} encoding\pfill \main{b-97} + \subitem \texttt {T2B} encoding\pfill \main{b-97} + \subitem \texttt {T2C} encoding\pfill \main{b-97} + \subitem \texttt {X2} encoding\pfill \main{b-97} + \item \texttt {\PrintChar{092}CYRKBEAK}\pfill a-283 + \subitem \texttt {T2A} encoding\pfill \main{b-219} + \subitem \texttt {X2} encoding\pfill \main{b-161} + \item \texttt {\PrintChar{092}cyrkbeak}\pfill a-283 + \subitem \texttt {T2A} encoding\pfill \main{b-220} + \subitem \texttt {X2} encoding\pfill \main{b-162} + \item \texttt {\PrintChar{092}CYRKDSC}\pfill a-283 + \subitem \texttt {T2A} encoding\pfill \main{b-217} + \subitem \texttt {T2B} encoding\pfill \main{b-275} + \subitem \texttt {T2C} encoding\pfill \main{b-333} + \subitem \texttt {X2} encoding\pfill \main{b-159} + \item \texttt {\PrintChar{092}cyrkdsc}\pfill a-283 + \subitem \texttt {T2A} encoding\pfill \main{b-218} + \subitem \texttt {T2B} encoding\pfill \main{b-276} + \subitem \texttt {T2C} encoding\pfill \main{b-334} + \subitem \texttt {X2} encoding\pfill \main{b-160} + \item \texttt {\PrintChar{092}CYRKHCRS}\pfill a-283 + \subitem \texttt {T2C} encoding\pfill \main{b-337} + \subitem \texttt {X2} encoding\pfill \main{b-387} + \item \texttt {\PrintChar{092}cyrkhcrs}\pfill a-283 + \subitem \texttt {T2C} encoding\pfill \main{b-338} + \subitem \texttt {X2} encoding\pfill \main{b-388} + \item \texttt {\PrintChar{092}CYRKHK}\pfill a-284 + \subitem \texttt {T2B} encoding\pfill \main{b-279} + \subitem \texttt {X2} encoding\pfill \main{b-163} + \item \texttt {\PrintChar{092}cyrkhk}\pfill a-283 + \subitem \texttt {T2B} encoding\pfill \main{b-280} + \subitem \texttt {X2} encoding\pfill \main{b-164} + \item \texttt {\PrintChar{092}CYRKVCRS}\pfill a-284 + \subitem \texttt {T2A} encoding\pfill \main{b-221} + \subitem \texttt {X2} encoding\pfill \main{b-385} + \item \texttt {\PrintChar{092}cyrkvcrs}\pfill a-284 + \subitem \texttt {T2A} encoding\pfill \main{b-222} + \subitem \texttt {X2} encoding\pfill \main{b-386} + \item \texttt {\PrintChar{092}CYRL}\pfill a-284 + \subitem \texttt {T2A} encoding\pfill \main{b-98} + \subitem \texttt {T2B} encoding\pfill \main{b-98} + \subitem \texttt {T2C} encoding\pfill \main{b-98} + \subitem \texttt {X2} encoding\pfill \main{b-98} + \item \texttt {\PrintChar{092}cyrl}\pfill a-284 + \subitem \texttt {T2A} encoding\pfill \main{b-99} + \subitem \texttt {T2B} encoding\pfill \main{b-99} + \subitem \texttt {T2C} encoding\pfill \main{b-99} + \subitem \texttt {X2} encoding\pfill \main{b-99} + \item \texttt {\PrintChar{092}cyrlangle}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-69} + \subitem \texttt {T2B} encoding\pfill \main{b-69} + \subitem \texttt {T2C} encoding\pfill \main{b-69} + \subitem \texttt {X2} encoding\pfill \main{b-69} + \item \texttt {\PrintChar{092}CYRLDSC}\pfill a-284 + \subitem \texttt {T2B} encoding\pfill \main{b-277} + \subitem \texttt {T2C} encoding\pfill \main{b-335} + \subitem \texttt {X2} encoding\pfill \main{b-389} + \item \texttt {\PrintChar{092}cyrldsc}\pfill a-284 + \subitem \texttt {T2B} encoding\pfill \main{b-278} + \subitem \texttt {T2C} encoding\pfill \main{b-336} + \subitem \texttt {X2} encoding\pfill \main{b-390} + \item \texttt {\PrintChar{092}CYRLHK}\pfill a-285 + \subitem \texttt {T2B} encoding\pfill \main{b-281} + \subitem \texttt {T2C} encoding\pfill \main{b-339} + \subitem \texttt {X2} encoding\pfill \main{b-165} + \item \texttt {\PrintChar{092}cyrlhk}\pfill a-284 + \subitem \texttt {T2B} encoding\pfill \main{b-282} + \subitem \texttt {T2C} encoding\pfill \main{b-340} + \subitem \texttt {X2} encoding\pfill \main{b-166} + \item \texttt {\PrintChar{092}CYRLJE}\pfill a-285 + \subitem \texttt {T2A} encoding\pfill \main{b-213} + \subitem \texttt {T2B} encoding\pfill \main{b-273} + \subitem \texttt {X2} encoding\pfill \main{b-396} + \item \texttt {\PrintChar{092}cyrlje}\pfill a-285 + \subitem \texttt {T2A} encoding\pfill \main{b-214} + \subitem \texttt {T2B} encoding\pfill \main{b-274} + \subitem \texttt {X2} encoding\pfill \main{b-398} + \item \texttt {\PrintChar{092}CYRM}\pfill a-285 + \subitem \texttt {T2A} encoding\pfill \main{b-100} + \subitem \texttt {T2B} encoding\pfill \main{b-100} + \subitem \texttt {T2C} encoding\pfill \main{b-100} + \subitem \texttt {X2} encoding\pfill \main{b-100} + \item \texttt {\PrintChar{092}cyrm}\pfill a-285 + \subitem \texttt {T2A} encoding\pfill \main{b-101} + \subitem \texttt {T2B} encoding\pfill \main{b-101} + \subitem \texttt {T2C} encoding\pfill \main{b-101} + \subitem \texttt {X2} encoding\pfill \main{b-101} + \item \texttt {\PrintChar{092}CYRMDSC}\pfill a-285 + \subitem \texttt {T2C} encoding\pfill \main{b-331} + \subitem \texttt {X2} encoding\pfill \main{b-399} + \item \texttt {\PrintChar{092}cyrmdsc}\pfill a-285 + \subitem \texttt {T2C} encoding\pfill \main{b-332} + \subitem \texttt {X2} encoding\pfill \main{b-400} + \item \texttt {\PrintChar{092}CYRMHK}\pfill a-285 + \subitem \texttt {T2C} encoding\pfill \main{b-343} + \item \texttt {\PrintChar{092}cyrmhk}\pfill a-285 + \subitem \texttt {T2C} encoding\pfill \main{b-344} + \item \texttt {\PrintChar{092}CYRN}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-102} + \subitem \texttt {T2B} encoding\pfill \main{b-102} + \subitem \texttt {T2C} encoding\pfill \main{b-102} + \subitem \texttt {X2} encoding\pfill \main{b-102} + \item \texttt {\PrintChar{092}cyrn}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-103} + \subitem \texttt {T2B} encoding\pfill \main{b-103} + \subitem \texttt {T2C} encoding\pfill \main{b-103} + \subitem \texttt {X2} encoding\pfill \main{b-103} + \item \texttt {\PrintChar{092}CYRNDSC}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-225} + \subitem \texttt {T2B} encoding\pfill \main{b-283} + \subitem \texttt {T2C} encoding\pfill \main{b-341} + \subitem \texttt {X2} encoding\pfill \main{b-167} + \item \texttt {\PrintChar{092}cyrndsc}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-226} + \subitem \texttt {T2B} encoding\pfill \main{b-284} + \subitem \texttt {T2C} encoding\pfill \main{b-342} + \subitem \texttt {X2} encoding\pfill \main{b-168} + \item \texttt {\PrintChar{092}CYRNG}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-227} + \subitem \texttt {T2B} encoding\pfill \main{b-285} + \subitem \texttt {X2} encoding\pfill \main{b-169} + \item \texttt {\PrintChar{092}cyrng}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-228} + \subitem \texttt {T2B} encoding\pfill \main{b-286} + \subitem \texttt {X2} encoding\pfill \main{b-170} + \item \texttt {\PrintChar{092}CYRNHK}\pfill a-286 + \subitem \texttt {T2B} encoding\pfill \main{b-287} + \subitem \texttt {T2C} encoding\pfill \main{b-345} + \subitem \texttt {X2} encoding\pfill \main{b-171} + \item \texttt {\PrintChar{092}cyrnhk}\pfill a-286 + \subitem \texttt {T2B} encoding\pfill \main{b-288} + \subitem \texttt {T2C} encoding\pfill \main{b-346} + \subitem \texttt {X2} encoding\pfill \main{b-172} + \item \texttt {\PrintChar{092}CYRNJE}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-253} + \subitem \texttt {T2B} encoding\pfill \main{b-307} + \subitem \texttt {X2} encoding\pfill \main{b-401} + \item \texttt {\PrintChar{092}cyrnje}\pfill a-286 + \subitem \texttt {T2A} encoding\pfill \main{b-254} + \subitem \texttt {T2B} encoding\pfill \main{b-308} + \subitem \texttt {X2} encoding\pfill \main{b-402} + \item \texttt {\PrintChar{092}CYRNLHK}\pfill a-287 + \subitem \texttt {T2C} encoding\pfill \main{b-365} + \subitem \texttt {X2} encoding\pfill \main{b-437} + \item \texttt {\PrintChar{092}cyrnlhk}\pfill a-287 + \subitem \texttt {T2C} encoding\pfill \main{b-366} + \subitem \texttt {X2} encoding\pfill \main{b-438} + \item \texttt {\PrintChar{092}CYRO}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-104} + \subitem \texttt {T2B} encoding\pfill \main{b-104} + \subitem \texttt {T2C} encoding\pfill \main{b-104} + \subitem \texttt {X2} encoding\pfill \main{b-104} + \item \texttt {\PrintChar{092}cyro}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-105} + \subitem \texttt {T2B} encoding\pfill \main{b-105} + \subitem \texttt {T2C} encoding\pfill \main{b-105} + \subitem \texttt {X2} encoding\pfill \main{b-105} + \item \texttt {\PrintChar{092}CYROTLD}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-231} + \subitem \texttt {T2B} encoding\pfill \main{b-289} + \subitem \texttt {T2C} encoding\pfill \main{b-347} + \subitem \texttt {X2} encoding\pfill \main{b-173} + \item \texttt {\PrintChar{092}cyrotld}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-232} + \subitem \texttt {T2B} encoding\pfill \main{b-290} + \subitem \texttt {T2C} encoding\pfill \main{b-348} + \subitem \texttt {X2} encoding\pfill \main{b-174} + \item \texttt {\PrintChar{092}CYRP}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-106} + \subitem \texttt {T2B} encoding\pfill \main{b-106} + \subitem \texttt {T2C} encoding\pfill \main{b-106} + \subitem \texttt {X2} encoding\pfill \main{b-106} + \item \texttt {\PrintChar{092}cyrp}\pfill a-287 + \subitem \texttt {T2A} encoding\pfill \main{b-107} + \subitem \texttt {T2B} encoding\pfill \main{b-107} + \subitem \texttt {T2C} encoding\pfill \main{b-107} + \subitem \texttt {X2} encoding\pfill \main{b-107} + \item \texttt {\PrintChar{092}CYRpalochka}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-68} + \subitem \texttt {T2B} encoding\pfill \main{b-68} + \subitem \texttt {T2C} encoding\pfill \main{b-68} + \subitem \texttt {X2} encoding\pfill \main{b-68} + \item \texttt {\PrintChar{092}CYRPHK}\pfill a-288 + \subitem \texttt {T2C} encoding\pfill \main{b-314} + \subitem \texttt {X2} encoding\pfill \main{b-405} + \item \texttt {\PrintChar{092}cyrphk}\pfill a-288 + \subitem \texttt {T2C} encoding\pfill \main{b-316} + \subitem \texttt {X2} encoding\pfill \main{b-406} + \item \texttt {\PrintChar{092}CYRQ}\pfill a-288 + \subitem \texttt {T2A} encoding\pfill \main{b-410} + \subitem \texttt {T2B} encoding\pfill \main{b-410} + \subitem \texttt {T2C} encoding\pfill \main{b-410} + \subitem \texttt {X2} encoding\pfill \main{b-410} + \item \texttt {\PrintChar{092}cyrq}\pfill a-288 + \subitem \texttt {T2A} encoding\pfill \main{b-411} + \subitem \texttt {T2B} encoding\pfill \main{b-411} + \subitem \texttt {T2C} encoding\pfill \main{b-411} + \subitem \texttt {X2} encoding\pfill \main{b-411} + \item \texttt {\PrintChar{092}CYRR}\pfill a-288 + \subitem \texttt {T2A} encoding\pfill \main{b-108} + \subitem \texttt {T2B} encoding\pfill \main{b-108} + \subitem \texttt {T2C} encoding\pfill \main{b-108} + \subitem \texttt {X2} encoding\pfill \main{b-108} + \item \texttt {\PrintChar{092}cyrr}\pfill a-288 + \subitem \texttt {T2A} encoding\pfill \main{b-109} + \subitem \texttt {T2B} encoding\pfill \main{b-109} + \subitem \texttt {T2C} encoding\pfill \main{b-109} + \subitem \texttt {X2} encoding\pfill \main{b-109} + \item \texttt {\PrintChar{092}cyrrangle}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-70} + \subitem \texttt {T2B} encoding\pfill \main{b-70} + \subitem \texttt {T2C} encoding\pfill \main{b-70} + \subitem \texttt {X2} encoding\pfill \main{b-70} + \item \texttt {\PrintChar{092}CYRRDSC}\pfill a-288 + \subitem \texttt {T2C} encoding\pfill \main{b-325} + \subitem \texttt {X2} encoding\pfill \main{b-407} + \item \texttt {\PrintChar{092}cyrrdsc}\pfill a-288 + \subitem \texttt {T2C} encoding\pfill \main{b-326} + \subitem \texttt {X2} encoding\pfill \main{b-408} + \item \texttt {\PrintChar{092}CYRRHK}\pfill a-289 + \subitem \texttt {T2C} encoding\pfill \main{b-369} + \item \texttt {\PrintChar{092}cyrrhk}\pfill a-288 + \subitem \texttt {T2C} encoding\pfill \main{b-370} + \item \texttt {\PrintChar{092}CYRRTICK}\pfill a-289 + \subitem \texttt {T2C} encoding\pfill \main{b-327} + \item \texttt {\PrintChar{092}cyrrtick}\pfill a-289 + \subitem \texttt {T2C} encoding\pfill \main{b-328} + \item \texttt {\PrintChar{092}CYRS}\pfill a-289, b-450 + \subitem \texttt {T2A} encoding\pfill \main{b-110} + \subitem \texttt {T2B} encoding\pfill \main{b-110} + \subitem \texttt {T2C} encoding\pfill \main{b-110} + \subitem \texttt {X2} encoding\pfill \main{b-110} + \item \texttt {\PrintChar{092}cyrs}\pfill a-289, b-451 + \subitem \texttt {T2A} encoding\pfill \main{b-111} + \subitem \texttt {T2B} encoding\pfill \main{b-111} + \subitem \texttt {T2C} encoding\pfill \main{b-111} + \subitem \texttt {X2} encoding\pfill \main{b-111} + \item \texttt {\PrintChar{092}CYRSACRS}\pfill a-289 + \subitem \texttt {T2B} encoding\pfill \main{b-291} + \item \texttt {\PrintChar{092}cyrsacrs}\pfill a-289 + \subitem \texttt {T2B} encoding\pfill \main{b-292} + \item \texttt {\PrintChar{092}CYRSCHWA}\pfill a-290 + \subitem \texttt {T2A} encoding\pfill \main{b-251} + \subitem \texttt {T2B} encoding\pfill \main{b-309} + \subitem \texttt {T2C} encoding\pfill \main{b-367} + \subitem \texttt {X2} encoding\pfill \main{b-193} + \item \texttt {\PrintChar{092}cyrschwa}\pfill a-290 + \subitem \texttt {T2A} encoding\pfill \main{b-252} + \subitem \texttt {T2B} encoding\pfill \main{b-310} + \subitem \texttt {T2C} encoding\pfill \main{b-368} + \subitem \texttt {X2} encoding\pfill \main{b-194} + \item \texttt {\PrintChar{092}CYRSDSC}\pfill a-290 + \subitem \texttt {T2A} encoding\pfill \main{b-233} + \subitem \texttt {X2} encoding\pfill \main{b-175} + \item \texttt {\PrintChar{092}cyrsdsc}\pfill a-290 + \subitem \texttt {T2A} encoding\pfill \main{b-234} + \subitem \texttt {X2} encoding\pfill \main{b-176} + \item \texttt {\PrintChar{092}CYRSEMISFTSN}\pfill a-290 + \subitem \texttt {T2C} encoding\pfill \main{b-353} + \item \texttt {\PrintChar{092}cyrsemisftsn}\pfill a-290 + \subitem \texttt {T2C} encoding\pfill \main{b-354} + \item \texttt {\PrintChar{092}CYRSFTSN}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-132} + \subitem \texttt {T2B} encoding\pfill \main{b-132} + \subitem \texttt {T2C} encoding\pfill \main{b-132} + \subitem \texttt {X2} encoding\pfill \main{b-132} + \item \texttt {\PrintChar{092}cyrsftsn}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-133} + \subitem \texttt {T2B} encoding\pfill \main{b-133} + \subitem \texttt {T2C} encoding\pfill \main{b-133} + \subitem \texttt {X2} encoding\pfill \main{b-133} + \item \texttt {\PrintChar{092}CYRSH}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-124} + \subitem \texttt {T2B} encoding\pfill \main{b-124} + \subitem \texttt {T2C} encoding\pfill \main{b-124} + \subitem \texttt {X2} encoding\pfill \main{b-124} + \item \texttt {\PrintChar{092}cyrsh}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-125} + \subitem \texttt {T2B} encoding\pfill \main{b-125} + \subitem \texttt {T2C} encoding\pfill \main{b-125} + \subitem \texttt {X2} encoding\pfill \main{b-125} + \item \texttt {\PrintChar{092}CYRSHCH}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-126} + \subitem \texttt {T2B} encoding\pfill \main{b-126} + \subitem \texttt {T2C} encoding\pfill \main{b-126} + \subitem \texttt {X2} encoding\pfill \main{b-126} + \item \texttt {\PrintChar{092}cyrshch}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-127} + \subitem \texttt {T2B} encoding\pfill \main{b-127} + \subitem \texttt {T2C} encoding\pfill \main{b-127} + \subitem \texttt {X2} encoding\pfill \main{b-127} + \item \texttt {\PrintChar{092}CYRSHHA}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-207} + \subitem \texttt {T2B} encoding\pfill \main{b-265} + \subitem \texttt {T2C} encoding\pfill \main{b-323} + \subitem \texttt {X2} encoding\pfill \main{b-149} + \item \texttt {\PrintChar{092}cyrshha}\pfill a-291 + \subitem \texttt {T2A} encoding\pfill \main{b-208} + \subitem \texttt {T2B} encoding\pfill \main{b-266} + \subitem \texttt {T2C} encoding\pfill \main{b-324} + \subitem \texttt {X2} encoding\pfill \main{b-150} + \item \texttt {\PrintChar{092}CYRT}\pfill a-292 + \subitem \texttt {T2A} encoding\pfill \main{b-112} + \subitem \texttt {T2B} encoding\pfill \main{b-112} + \subitem \texttt {T2C} encoding\pfill \main{b-112} + \subitem \texttt {X2} encoding\pfill \main{b-112} + \item \texttt {\PrintChar{092}cyrt}\pfill a-292 + \subitem \texttt {T2A} encoding\pfill \main{b-113} + \subitem \texttt {T2B} encoding\pfill \main{b-113} + \subitem \texttt {T2C} encoding\pfill \main{b-113} + \subitem \texttt {X2} encoding\pfill \main{b-113} + \item \texttt {\PrintChar{092}CYRTDSC}\pfill a-292 + \subitem \texttt {T2C} encoding\pfill \main{b-319} + \subitem \texttt {X2} encoding\pfill \main{b-412} + \item \texttt {\PrintChar{092}cyrtdsc}\pfill a-292 + \subitem \texttt {T2C} encoding\pfill \main{b-320} + \subitem \texttt {X2} encoding\pfill \main{b-414} + \item \texttt {\PrintChar{092}CYRTETSE}\pfill a-292 + \subitem \texttt {T2C} encoding\pfill \main{b-317} + \subitem \texttt {X2} encoding\pfill \main{b-418} + \item \texttt {\PrintChar{092}cyrtetse}\pfill a-292 + \subitem \texttt {T2C} encoding\pfill \main{b-318} + \subitem \texttt {X2} encoding\pfill \main{b-420} + \item \texttt {\PrintChar{092}CYRTSHE}\pfill a-292 + \subitem \texttt {T2A} encoding\pfill \main{b-205} + \subitem \texttt {X2} encoding\pfill \main{b-379} + \item \texttt {\PrintChar{092}cyrtshe}\pfill a-292 + \subitem \texttt {T2A} encoding\pfill \main{b-206} + \subitem \texttt {X2} encoding\pfill \main{b-380} + \item \texttt {\PrintChar{092}CYRU}\pfill a-293, b-454 + \subitem \texttt {T2A} encoding\pfill \main{b-114} + \subitem \texttt {T2B} encoding\pfill \main{b-114} + \subitem \texttt {T2C} encoding\pfill \main{b-114} + \subitem \texttt {X2} encoding\pfill \main{b-114} + \item \texttt {\PrintChar{092}cyru}\pfill a-293, b-455 + \subitem \texttt {T2A} encoding\pfill \main{b-115} + \subitem \texttt {T2B} encoding\pfill \main{b-115} + \subitem \texttt {T2C} encoding\pfill \main{b-115} + \subitem \texttt {X2} encoding\pfill \main{b-115} + \item \texttt {\PrintChar{092}CYRUSHRT}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-235} + \subitem \texttt {T2B} encoding\pfill \main{b-293} + \subitem \texttt {X2} encoding\pfill \main{b-177} + \item \texttt {\PrintChar{092}cyrushrt}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-236} + \subitem \texttt {T2B} encoding\pfill \main{b-294} + \subitem \texttt {X2} encoding\pfill \main{b-178} + \item \texttt {\PrintChar{092}CYRV}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-80} + \subitem \texttt {T2B} encoding\pfill \main{b-80} + \subitem \texttt {T2C} encoding\pfill \main{b-80} + \subitem \texttt {X2} encoding\pfill \main{b-80} + \item \texttt {\PrintChar{092}cyrv}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-81} + \subitem \texttt {T2B} encoding\pfill \main{b-81} + \subitem \texttt {T2C} encoding\pfill \main{b-81} + \subitem \texttt {X2} encoding\pfill \main{b-81} + \item \texttt {\PrintChar{092}CYRW}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-426} + \subitem \texttt {T2B} encoding\pfill \main{b-426} + \subitem \texttt {T2C} encoding\pfill \main{b-426} + \subitem \texttt {X2} encoding\pfill \main{b-426} + \item \texttt {\PrintChar{092}cyrw}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-427} + \subitem \texttt {T2B} encoding\pfill \main{b-427} + \subitem \texttt {T2C} encoding\pfill \main{b-427} + \subitem \texttt {X2} encoding\pfill \main{b-427} + \item \texttt {\PrintChar{092}CYRY}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-237} + \subitem \texttt {T2B} encoding\pfill \main{b-295} + \subitem \texttt {X2} encoding\pfill \main{b-179} + \item \texttt {\PrintChar{092}cyry}\pfill a-293 + \subitem \texttt {T2A} encoding\pfill \main{b-238} + \subitem \texttt {T2B} encoding\pfill \main{b-296} + \subitem \texttt {X2} encoding\pfill \main{b-180} + \item \texttt {\PrintChar{092}CYRYA}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-138} + \subitem \texttt {T2B} encoding\pfill \main{b-138} + \subitem \texttt {T2C} encoding\pfill \main{b-138} + \subitem \texttt {X2} encoding\pfill \main{b-138} + \item \texttt {\PrintChar{092}cyrya}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-139} + \subitem \texttt {T2B} encoding\pfill \main{b-139} + \subitem \texttt {T2C} encoding\pfill \main{b-139} + \subitem \texttt {X2} encoding\pfill \main{b-139} + \item \texttt {\PrintChar{092}CYRYAT}\pfill a-294 + \subitem \texttt {X2} encoding\pfill \main{b-428} + \item \texttt {\PrintChar{092}cyryat}\pfill a-294 + \subitem \texttt {X2} encoding\pfill \main{b-430} + \item \texttt {\PrintChar{092}CYRYHCRS}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-239} + \subitem \texttt {X2} encoding\pfill \main{b-181} + \item \texttt {\PrintChar{092}cyryhcrs}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-240} + \subitem \texttt {X2} encoding\pfill \main{b-182} + \item \texttt {\PrintChar{092}CYRYI}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-215} + \subitem \texttt {X2} encoding\pfill \main{b-157} + \item \texttt {\PrintChar{092}cyryi}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-216} + \subitem \texttt {X2} encoding\pfill \main{b-158} + \item \texttt {\PrintChar{092}CYRYO}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-372} + \subitem \texttt {T2B} encoding\pfill \main{b-372} + \subitem \texttt {T2C} encoding\pfill \main{b-372} + \subitem \texttt {X2} encoding\pfill \main{b-372} + \item \texttt {\PrintChar{092}cyryo}\pfill a-294 + \subitem \texttt {T2A} encoding\pfill \main{b-373} + \subitem \texttt {T2B} encoding\pfill \main{b-373} + \subitem \texttt {T2C} encoding\pfill \main{b-373} + \subitem \texttt {X2} encoding\pfill \main{b-373} + \item \texttt {\PrintChar{092}CYRYU}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-136} + \subitem \texttt {T2B} encoding\pfill \main{b-136} + \subitem \texttt {T2C} encoding\pfill \main{b-136} + \subitem \texttt {X2} encoding\pfill \main{b-136} + \item \texttt {\PrintChar{092}cyryu}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-137} + \subitem \texttt {T2B} encoding\pfill \main{b-137} + \subitem \texttt {T2C} encoding\pfill \main{b-137} + \subitem \texttt {X2} encoding\pfill \main{b-137} + \item \texttt {\PrintChar{092}CYRZ}\pfill a-295, b-448 + \subitem \texttt {T2A} encoding\pfill \main{b-90} + \subitem \texttt {T2B} encoding\pfill \main{b-90} + \subitem \texttt {T2C} encoding\pfill \main{b-90} + \subitem \texttt {X2} encoding\pfill \main{b-90} + \item \texttt {\PrintChar{092}cyrz}\pfill a-295, b-449 + \subitem \texttt {T2A} encoding\pfill \main{b-91} + \subitem \texttt {T2B} encoding\pfill \main{b-91} + \subitem \texttt {T2C} encoding\pfill \main{b-91} + \subitem \texttt {X2} encoding\pfill \main{b-91} + \item \texttt {\PrintChar{092}CYRZDSC}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-211} + \subitem \texttt {X2} encoding\pfill \main{b-153} + \item \texttt {\PrintChar{092}cyrzdsc}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-212} + \subitem \texttt {X2} encoding\pfill \main{b-154} + \item \texttt {\PrintChar{092}CYRZH}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-88} + \subitem \texttt {T2B} encoding\pfill \main{b-88} + \subitem \texttt {T2C} encoding\pfill \main{b-88} + \subitem \texttt {X2} encoding\pfill \main{b-88} + \item \texttt {\PrintChar{092}cyrzh}\pfill a-295 + \subitem \texttt {T2A} encoding\pfill \main{b-89} + \subitem \texttt {T2B} encoding\pfill \main{b-89} + \subitem \texttt {T2C} encoding\pfill \main{b-89} + \subitem \texttt {X2} encoding\pfill \main{b-89} + \item \texttt {\PrintChar{092}CYRZHDSC}\pfill a-296 + \subitem \texttt {T2A} encoding\pfill \main{b-209} + \subitem \texttt {T2B} encoding\pfill \main{b-267} + \subitem \texttt {X2} encoding\pfill \main{b-151} + \item \texttt {\PrintChar{092}cyrzhdsc}\pfill a-296 + \subitem \texttt {T2A} encoding\pfill \main{b-210} + \subitem \texttt {T2B} encoding\pfill \main{b-268} + \subitem \texttt {X2} encoding\pfill \main{b-152} + + \indexspace +{\bfseries\hfil D\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}d}\efill + \subitem default\pfill \main{a-185} + \subitem \texttt {OT1} encoding\pfill \main{a-352} + \subitem \texttt {OT4} encoding\pfill \main{a-642} + \subitem \texttt {T1} encoding\pfill \main{a-421} + \subitem \texttt {T2A} encoding\pfill \main{b-34} + \subitem \texttt {T2B} encoding\pfill \main{b-34} + \subitem \texttt {T2C} encoding\pfill \main{b-34} + \subitem \texttt {X2} encoding\pfill \main{b-34} + \item \texttt {\PrintChar{092}dag}\pfill a-256 + \item \texttt {\PrintChar{092}dagger}\pfill a-256 + \item \texttt {\PrintChar{092}ddag}\pfill a-257 + \item \texttt {\PrintChar{092}ddagger}\pfill a-257 + \item \texttt {\PrintChar{092}@dec@text@cmd}\pfill \main{a-3} + \item \texttt {\PrintChar{092}DeclareFontEncoding}\pfill a-334, + a-402, a-595, a-615, a-621, a-704, b-8--b-11 + \item \texttt {\PrintChar{092}DeclareFontSubstitution}\pfill a-622, + a-705, b-12 + \item \texttt {\PrintChar{092}DeclareOption}\pfill a-299 + \item \texttt {\PrintChar{092}DeclareRobustCommand}\pfill + a-251--a-258, a-260, a-262, a-264 + \item \texttt {\PrintChar{092}DeclareTextAccent}\pfill \usage{2}, + \main{a-64}, a-335--a-345, a-403--a-413, a-618, + a-623--a-633, a-712--a-726, b-13--b-26 + \item \texttt {\PrintChar{092}DeclareTextAccentDefault}\pfill + \usage{3}, \main{a-135}, a-176--a-189, a-226, a-229, + a-844--a-861 + \item \texttt {\PrintChar{092}DeclareTextCommand}\pfill \usage{1}, + \main{a-3}, a-58, a-65, a-346, a-349, a-352, a-374, + a-376, a-378, a-380, a-386, a-393, a-414, a-417, a-421, + a-424, a-426, a-428, a-607, a-634, a-636, a-639, a-642, + a-672, a-679, a-706, a-709, a-756, b-27, b-30, b-34, + b-36, b-38, b-40 + \item \texttt {\PrintChar{092}DeclareTextCommandDefault}\pfill + \usage{3}, \main{a-57}, a-136, a-138, a-230, + a-233--a-236, a-238, a-242, a-246--a-250 + \item \texttt {\PrintChar{092}DeclareTextComposite}\pfill \usage{2}, + \main{a-74}, a-483--a-592, a-686--a-701, b-75, + b-441--b-444, b-446--b-451, b-454, b-455, b-458, b-459, + b-462, b-463 + \item \texttt {\PrintChar{092}DeclareTextCompositeCommand}\pfill + \usage{2}, \main{a-74}, a-383, a-669 + \item \texttt {\PrintChar{092}DeclareTextSymbol}\pfill \usage{1}, + \main{a-3}, a-355--a-373, a-430--a-482, a-596--a-606, + a-616, a-617, a-645--a-668, a-727--a-755, a-762--a-841, + b-42--b-74, b-76--b-139, b-141--b-196, b-199--b-254, + b-257--b-312, b-315--b-370, b-372, b-373, b-375--b-390, + b-392--b-395, b-397--b-408, b-410, b-411, b-413, b-414, + b-416, b-417, b-419--b-424, b-426, b-427, b-429--b-438 + \item \texttt {\PrintChar{092}DeclareTextSymbolDefault}\pfill + \usage{3}, \main{a-135}, a-190--a-225, a-227, a-228, + a-862--a-970 + \item \texttt {\PrintChar{092}DH}\efill + \subitem \texttt {T1} encoding\pfill \main{a-432} + \item \texttt {\PrintChar{092}dh}\efill + \subitem \texttt {T1} encoding\pfill \main{a-442} + \item \texttt {\PrintChar{092}dimen@}\pfill a-381, a-382, + a-384, a-385, a-670, a-671 + \item \texttt {\PrintChar{092}DJ}\efill + \subitem \texttt {T1} encoding\pfill \main{a-433} + \item \texttt {\PrintChar{092}dj}\efill + \subitem \texttt {T1} encoding\pfill \main{a-443} + \item \texttt {\PrintChar{092}dots}\pfill a-264, a-266 + + \indexspace +{\bfseries\hfil E\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}@eha}\pfill a-49 + \item \texttt {\PrintChar{092}@@enc@update}\pfill a-133 + \item \texttt {\PrintChar{092}encodingdefault}\pfill a-300, a-326 + + \indexspace +{\bfseries\hfil F\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}f}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-24} + \subitem \texttt {T2B} encoding\pfill \main{b-24} + \subitem \texttt {T2C} encoding\pfill \main{b-24} + \subitem \texttt {X2} encoding\pfill \main{b-24} + \item \texttt {\PrintChar{092}f@encoding}\pfill a-128 + \item \texttt {\PrintChar{092}f@size}\pfill a-130 + \item \texttt {\PrintChar{092}@firstofone}\pfill a-68, a-113 + \item \texttt {\PrintChar{092}@firstoftwo}\pfill a-97 + \item \texttt {\PrintChar{092}font}\pfill a-243--a-245, a-387, a-394, + a-673, a-680 + \item \texttt {\PrintChar{092}font@name}\pfill a-129, a-132 + \item \texttt {\PrintChar{092}fontdimen}\pfill a-243--a-245, a-387, + a-394, a-673, a-680 + \item \texttt {\PrintChar{092}fontencoding}\pfill a-326 + \item \texttt {\PrintChar{092}fontshape}\pfill a-397, a-683 + + \indexspace +{\bfseries\hfil G\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}@gobble}\pfill a-24 + \item \texttt {\PrintChar{092}guillemotleft}\efill + \subitem \texttt {OT4} encoding\pfill \main{a-650} + \subitem \texttt {T1} encoding\pfill \main{a-444} + \subitem \texttt {T2A} encoding\pfill \main{b-71} + \subitem \texttt {T2B} encoding\pfill \main{b-71} + \subitem \texttt {T2C} encoding\pfill \main{b-71} + \subitem \texttt {X2} encoding\pfill \main{b-71} + \item \texttt {\PrintChar{092}guillemotright}\efill + \subitem \texttt {OT4} encoding\pfill \main{a-651} + \subitem \texttt {T1} encoding\pfill \main{a-445} + \subitem \texttt {T2A} encoding\pfill \main{b-72} + \subitem \texttt {T2B} encoding\pfill \main{b-72} + \subitem \texttt {T2C} encoding\pfill \main{b-72} + \subitem \texttt {X2} encoding\pfill \main{b-72} + \item \texttt {\PrintChar{092}guilsinglleft}\efill + \subitem \texttt {T1} encoding\pfill \main{a-446} + \item \texttt {\PrintChar{092}guilsinglright}\efill + \subitem \texttt {T1} encoding\pfill \main{a-447} + + \indexspace +{\bfseries\hfil H\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}H}\efill + \subitem default\pfill \main{a-180} + \subitem \texttt {OT1} encoding\pfill \main{a-342} + \subitem \texttt {OT4} encoding\pfill \main{a-630} + \subitem \texttt {T1} encoding\pfill \main{a-408} + \subsubitem \texttt {O} composite\pfill \main{a-496} + \subsubitem \texttt {o} composite\pfill \main{a-523} + \subsubitem \texttt {U} composite\pfill \main{a-504} + \subsubitem \texttt {u} composite\pfill \main{a-531} + \subitem \texttt {T2A} encoding\pfill \main{b-18} + \subitem \texttt {T2B} encoding\pfill \main{b-18} + \subitem \texttt {T2C} encoding\pfill \main{b-18} + \subitem \texttt {X2} encoding\pfill \main{b-18} + \item \texttt {\PrintChar{092}hb@xt@}\pfill a-377 + \item \texttt {\PrintChar{092}@height}\pfill a-239, a-241 + \item \texttt {\PrintChar{092}hidewidth}\pfill a-347, a-348, a-351, + a-354, a-415, a-416, a-419, a-423, a-425, a-637, a-638, + a-641, a-644, a-708, a-711, b-28, b-29, b-32, b-35, + b-37 + \item \texttt {\PrintChar{092}hmode@bgroup}\pfill a-67, \main{a-73}, + a-347, a-353, a-379, a-386, a-393, a-415, a-422, a-607, + a-637, a-643, a-672, a-679, a-707, a-710, a-756 + \item \texttt {\PrintChar{092}hmode@start@before@group}\pfill a-68, + a-111, a-113, a-119, \main{a-134} + \item \texttt {\PrintChar{092}hrule}\pfill a-237, a-240 + \item \texttt {\PrintChar{092}hyphenation}\pfill \main{a-155} + \item \texttt {\PrintChar{092}@@hyphenation}\pfill \main{a-155} + + \indexspace +{\bfseries\hfil I\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}i}\pfill a-483, a-575, a-577, a-579, + a-581, b-75 + \subitem default\pfill \main{a-197} + \subitem \texttt {OT1} encoding\pfill \main{a-359} + \subitem \texttt {OT4} encoding\pfill \main{a-652} + \subitem \texttt {T1} encoding\pfill \main{a-448} + \subitem \texttt {T2A} encoding\pfill \main{b-73} + \subitem \texttt {T2B} encoding\pfill \main{b-73} + \subitem \texttt {T2C} encoding\pfill \main{b-73} + \item \texttt {\PrintChar{092}@ifdefinable}\pfill a-16 + \item \texttt {\PrintChar{092}ifin@}\pfill a-316, a-319 + \item \texttt {\PrintChar{092}@ifl@ter}\pfill a-330, a-331 + \item \texttt {\PrintChar{092}@ifl@ter@@}\pfill a-330, a-331 + \item \texttt {\PrintChar{092}in@}\pfill a-314, a-317 + \item \texttt {\PrintChar{092}@inmathwarn}\pfill \main{a-3} + \item \texttt {\PrintChar{092}input}\pfill a-971 + \item \texttt {\PrintChar{092}InputIfFileExists}\pfill a-304 + \item \texttt {\PrintChar{092}itshape}\pfill a-395, a-681 + + \indexspace +{\bfseries\hfil J\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}j}\efill + \subitem default\pfill \main{a-198} + \subitem \texttt {OT1} encoding\pfill \main{a-360} + \subitem \texttt {OT4} encoding\pfill \main{a-653} + \subitem \texttt {T1} encoding\pfill \main{a-449} + \subitem \texttt {T2A} encoding\pfill \main{b-74} + \subitem \texttt {T2B} encoding\pfill \main{b-74} + \subitem \texttt {T2C} encoding\pfill \main{b-74} + + \indexspace +{\bfseries\hfil K\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}k}\efill + \subitem \texttt {OT4} encoding\pfill \main{a-634} + \subsubitem \texttt {A} composite\pfill \main{a-686} + \subsubitem \texttt {a} composite\pfill \main{a-693} + \subsubitem \texttt {E} composite\pfill \main{a-688} + \subsubitem \texttt {e} composite\pfill \main{a-695} + \subitem \texttt {T1} encoding\pfill \main{a-424} + \subsubitem \texttt {A} composite\pfill \main{a-485} + \subsubitem \texttt {a} composite\pfill \main{a-512} + \subsubitem \texttt {E} composite\pfill \main{a-490} + \subsubitem \texttt {e} composite\pfill \main{a-517} + \subitem \texttt {T2A} encoding\pfill \main{b-36} + \subsubitem \texttt {\PrintChar{092}CYRS} composite\pfill + \main{b-450} + \subsubitem \texttt {\PrintChar{092}cyrs} composite\pfill + \main{b-451} + \subitem \texttt {T2B} encoding\pfill \main{b-36} + \subitem \texttt {T2C} encoding\pfill \main{b-36} + \subsubitem \texttt {\PrintChar{092}CYRABHCH} composite\pfill + \main{b-461} + \subsubitem \texttt {\PrintChar{092}cyrabhch} composite\pfill + \main{b-463} + \subitem \texttt {X2} encoding\pfill \main{b-36} + \subsubitem \texttt {\PrintChar{092}CYRABHCH} composite\pfill + \main{b-457} + \subsubitem \texttt {\PrintChar{092}cyrabhch} composite\pfill + \main{b-459} + \subsubitem \texttt {\PrintChar{092}CYRS} composite\pfill + \main{b-450} + \subsubitem \texttt {\PrintChar{092}cyrs} composite\pfill + \main{b-451} + + \indexspace +{\bfseries\hfil L\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}L}\efill + \subitem default\pfill \main{a-192} + \subitem \texttt {OT1} encoding\pfill \main{a-376} + \subitem \texttt {OT4} encoding\pfill \main{a-648} + \subitem \texttt {T1} encoding\pfill \main{a-434} + \item \texttt {\PrintChar{092}l}\efill + \subitem default\pfill \main{a-199} + \subitem \texttt {OT1} encoding\pfill \main{a-378} + \subitem \texttt {OT4} encoding\pfill \main{a-654} + \subitem \texttt {T1} encoding\pfill \main{a-450} + \item \texttt {\PrintChar{092}LastDeclaredEncoding}\pfill b-12--b-27, + b-30, b-34, b-36, b-38, b-40, b-42--b-139, + b-372, b-373, b-392--b-395, b-410, b-411, b-416, b-417, + b-426, b-427, b-441--b-444, b-446--b-451, b-454, b-455 + \item \texttt {\PrintChar{092}@latex@error}\pfill a-47 + \item \texttt {\PrintChar{092}@latex@warning}\pfill a-55 + \item \texttt {\PrintChar{092}lbrace}\pfill a-252 + \item \texttt {\PrintChar{092}lccode}\pfill a-104 + \item \texttt {\PrintChar{092}ldots}\pfill a-266 + \item \texttt {\PrintChar{092}leavevmode}\pfill a-73, a-134, a-235, + a-237, a-350, a-377, a-381, a-384, a-418, a-640, a-670, + b-31 + \item \texttt {\PrintChar{092}lowercase}\pfill a-105, a-302 + + \indexspace +{\bfseries\hfil M\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}mathchardef}\pfill a-70 + \item \texttt {\PrintChar{092}mathdollar}\pfill a-251 + \item \texttt {\PrintChar{092}mathellipsis}\pfill a-265 + \item \texttt {\PrintChar{092}mathparagraph}\pfill a-254 + \item \texttt {\PrintChar{092}mathsection}\pfill a-255 + \item \texttt {\PrintChar{092}mathsterling}\pfill a-263 + \item \texttt {\PrintChar{092}mbox}\pfill a-239 + \item \texttt {\PrintChar{092}MessageBreak}\pfill a-121, a-307, + a-310 + + \indexspace +{\bfseries\hfil N\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}NeedsTeXFormat}\pfill b-2 + \item \texttt {\PrintChar{092}newcommand}\pfill a-4 + \item \texttt {\PrintChar{092}newtie}\efill + \subitem default\pfill \main{a-860} + \subitem \texttt {TS1} encoding\pfill \main{a-725} + \item \texttt {\PrintChar{092}nfss@text}\pfill a-259, a-261 + \item \texttt {\PrintChar{092}NG}\efill + \subitem \texttt {T1} encoding\pfill \main{a-435} + \item \texttt {\PrintChar{092}ng}\efill + \subitem \texttt {T1} encoding\pfill \main{a-451} + \item \texttt {\PrintChar{092}@nil}\pfill a-77 + \item \texttt {\PrintChar{092}null}\pfill a-425, a-708, a-711, b-37 + + \indexspace +{\bfseries\hfil O\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}O}\efill + \subitem default\pfill \main{a-194} + \subitem \texttt {OT1} encoding\pfill \main{a-357} + \subitem \texttt {OT4} encoding\pfill \main{a-647} + \subitem \texttt {T1} encoding\pfill \main{a-437} + \item \texttt {\PrintChar{092}o}\efill + \subitem default\pfill \main{a-201} + \subitem \texttt {OT1} encoding\pfill \main{a-362} + \subitem \texttt {OT4} encoding\pfill \main{a-655} + \subitem \texttt {T1} encoding\pfill \main{a-453} + \item \texttt {\PrintChar{092}o@lign}\pfill a-347, a-354, a-415, + a-423, a-637, a-644, b-28, b-35 + \item \texttt {\PrintChar{092}oalign}\pfill a-425, b-37 + \item \texttt {\PrintChar{092}OE}\efill + \subitem default\pfill \main{a-193} + \subitem \texttt {OT1} encoding\pfill \main{a-356} + \subitem \texttt {OT4} encoding\pfill \main{a-646} + \subitem \texttt {T1} encoding\pfill \main{a-436} + \item \texttt {\PrintChar{092}oe}\efill + \subitem default\pfill \main{a-200} + \subitem \texttt {OT1} encoding\pfill \main{a-361} + \subitem \texttt {OT4} encoding\pfill \main{a-656} + \subitem \texttt {T1} encoding\pfill \main{a-452} + \item \texttt {\PrintChar{092}@onlypreamble}\pfill a-18, a-19, + a-61, a-62, a-66, a-89, a-109, a-139, a-140, a-154 + \item \texttt {\PrintChar{092}ooalign}\pfill a-351, a-419, a-608, + a-641, a-708, a-711, a-757, b-32 + + \indexspace +{\bfseries\hfil P\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}P}\pfill a-254 + \item \texttt {\PrintChar{092}PackageError}\pfill a-305 + \item \texttt {\PrintChar{092}patterns}\pfill \main{a-155} + \item \texttt {\PrintChar{092}@@patterns}\pfill \main{a-155} + \item \texttt {\PrintChar{092}pickup@font}\pfill a-131 + \item \texttt {\PrintChar{092}pounds}\pfill a-262 + \item \texttt {\PrintChar{092}ProcessOptions}\pfill a-325 + \item \texttt {\PrintChar{092}protect}\pfill a-21, a-27, a-48, a-55, + a-159, a-167 + \item \texttt {\PrintChar{092}providecommand}\pfill a-6 + \item \texttt {\PrintChar{092}ProvidesFile}\pfill b-3--b-6 + \item \texttt {\PrintChar{092}ProvideTextCommand}\pfill \usage{1}, + \main{a-3}, a-60 + \item \texttt {\PrintChar{092}ProvideTextCommandDefault}\pfill + \usage{3}, \main{a-57} + + \indexspace +{\bfseries\hfil Q\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}quotedblbase}\efill + \subitem \texttt {OT4} encoding\pfill \main{a-657} + \subitem \texttt {T1} encoding\pfill \main{a-454} + \subitem \texttt {T2A} encoding\pfill \main{b-67} + \subitem \texttt {T2B} encoding\pfill \main{b-67} + \subitem \texttt {T2C} encoding\pfill \main{b-67} + \subitem \texttt {X2} encoding\pfill \main{b-67} + \item \texttt {\PrintChar{092}quotesinglbase}\efill + \subitem \texttt {T1} encoding\pfill \main{a-455} + + \indexspace +{\bfseries\hfil R\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}r}\efill + \subitem default\pfill \main{a-186} + \subitem \texttt {OT1} encoding\pfill \main{a-345} + \subsubitem \texttt {A} composite\pfill \main{a-383} + \subitem \texttt {OT4} encoding\pfill \main{a-633} + \subsubitem \texttt {A} composite\pfill \main{a-669} + \subitem \texttt {T1} encoding\pfill \main{a-409} + \subsubitem \texttt {A} composite\pfill \main{a-542} + \subsubitem \texttt {a} composite\pfill \main{a-568} + \subsubitem \texttt {U} composite\pfill \main{a-505} + \subsubitem \texttt {u} composite\pfill \main{a-532} + \subitem \texttt {T2A} encoding\pfill \main{b-19} + \subitem \texttt {T2B} encoding\pfill \main{b-19} + \subitem \texttt {T2C} encoding\pfill \main{b-19} + \subitem \texttt {X2} encoding\pfill \main{b-19} + \item \texttt {\PrintChar{092}raise}\pfill a-382, a-385, a-609, + a-671, a-758 + \item \texttt {\PrintChar{092}rbrace}\pfill a-253 + \item \texttt {\PrintChar{092}@rc@ifdefinable}\pfill a-16 + \item \texttt {\PrintChar{092}reserved@a}\pfill a-75, a-77, a-85, + a-102, a-107 + \item \texttt {\PrintChar{092}reserved@b}\pfill a-78, a-85 + \item \texttt {\PrintChar{092}reserved@f}\pfill a-301--a-304, a-306, + a-313 + \item \texttt {\PrintChar{092}rlap}\pfill a-382, a-385, a-671 + + \indexspace +{\bfseries\hfil S\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}S}\pfill a-255 + \item \texttt {\PrintChar{092}scshape}\pfill a-246 + \item \texttt {\PrintChar{092}@secondoftwo}\pfill a-95 + \item \texttt {\PrintChar{092}selectfont}\pfill a-326, a-397, a-683 + \item \texttt {\PrintChar{092}sh@ft}\pfill a-347, a-354, a-415, + a-423, a-637, a-644, b-28, b-35 + \item \texttt {\PrintChar{092}slshape}\pfill a-388, a-674 + \item \texttt {\PrintChar{092}spacefactor}\pfill a-70, a-71 + \item \texttt {\PrintChar{092}SS}\efill + \subitem default\pfill \main{a-248} + \subitem \texttt {T1} encoding\pfill \main{a-438} + \item \texttt {\PrintChar{092}ss}\efill + \subitem default\pfill \main{a-202} + \subitem \texttt {OT1} encoding\pfill \main{a-363} + \subitem \texttt {OT4} encoding\pfill \main{a-658} + \subitem \texttt {T1} encoding\pfill \main{a-456} + \item \texttt {\PrintChar{092}@strip@args}\pfill \main{a-74} + \item \texttt {\PrintChar{092}symbol}\pfill a-122 + + \indexspace +{\bfseries\hfil T\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}t}\efill + \subitem default\pfill \main{a-229}, \main{a-858} + \subitem \texttt {OML} encoding\pfill \main{a-618} + \subitem \texttt {TS1} encoding\pfill \main{a-723} + \item \texttt {\PrintChar{092}@tabacckludge}\pfill a-173, a-175 + \item \texttt {\PrintChar{092}@tempboxa}\pfill a-69 + \item \texttt {\PrintChar{092}@text@composite}\pfill \main{a-74} + \item \texttt {\PrintChar{092}@text@composite@x}\pfill \main{a-74} + \item \texttt {\PrintChar{092}textacutedbl}\efill + \subitem default\pfill \main{a-908} + \subitem \texttt {TS1} encoding\pfill \main{a-778} + \item \texttt {\PrintChar{092}textascendercompwordmark}\efill + \subitem default\pfill \main{a-863} + \subitem \texttt {TS1} encoding\pfill \main{a-728} + \item \texttt {\PrintChar{092}textasciiacute}\efill + \subitem default\pfill \main{a-957} + \subitem \texttt {TS1} encoding\pfill \main{a-828} + \item \texttt {\PrintChar{092}textasciibreve}\efill + \subitem default\pfill \main{a-905} + \subitem \texttt {TS1} encoding\pfill \main{a-776} + \item \texttt {\PrintChar{092}textasciicaron}\efill + \subitem default\pfill \main{a-906} + \subitem \texttt {TS1} encoding\pfill \main{a-777} + \item \texttt {\PrintChar{092}textasciicircum}\efill + \subitem default\pfill \main{a-233} + \subitem \texttt {T1} encoding\pfill \main{a-457} + \subitem \texttt {T2A} encoding\pfill \main{b-53} + \subitem \texttt {T2B} encoding\pfill \main{b-53} + \subitem \texttt {T2C} encoding\pfill \main{b-53} + \subitem \texttt {X2} encoding\pfill \main{b-53} + \item \texttt {\PrintChar{092}textasciidieresis}\efill + \subitem default\pfill \main{a-945} + \subitem \texttt {TS1} encoding\pfill \main{a-816} + \item \texttt {\PrintChar{092}textasciigrave}\efill + \subitem default\pfill \main{a-896} + \subitem \texttt {TS1} encoding\pfill \main{a-767} + \item \texttt {\PrintChar{092}textasciimacron}\efill + \subitem default\pfill \main{a-952} + \subitem \texttt {TS1} encoding\pfill \main{a-823} + \item \texttt {\PrintChar{092}textasciitilde}\efill + \subitem default\pfill \main{a-234} + \subitem \texttt {T1} encoding\pfill \main{a-458} + \subitem \texttt {T2A} encoding\pfill \main{b-58} + \subitem \texttt {T2B} encoding\pfill \main{b-58} + \subitem \texttt {T2C} encoding\pfill \main{b-58} + \subitem \texttt {X2} encoding\pfill \main{b-58} + \item \texttt {\PrintChar{092}textasteriskcentered}\efill + \subitem default\pfill \main{a-215}, \main{a-873} + \subitem \texttt {OMS} encoding\pfill \main{a-596} + \subitem \texttt {TS1} encoding\pfill \main{a-738} + \item \texttt {\PrintChar{092}textbackslash}\efill + \subitem default\pfill \main{a-216} + \subitem \texttt {OMS} encoding\pfill \main{a-597} + \subitem \texttt {T1} encoding\pfill \main{a-459} + \subitem \texttt {T2A} encoding\pfill \main{b-52} + \subitem \texttt {T2B} encoding\pfill \main{b-52} + \subitem \texttt {T2C} encoding\pfill \main{b-52} + \subitem \texttt {X2} encoding\pfill \main{b-52} + \item \texttt {\PrintChar{092}textbaht}\efill + \subitem default\pfill \main{a-931} + \subitem \texttt {TS1} encoding\pfill \main{a-802} + \item \texttt {\PrintChar{092}textbar}\efill + \subitem default\pfill \main{a-217} + \subitem \texttt {OMS} encoding\pfill \main{a-598} + \subitem \texttt {T1} encoding\pfill \main{a-460} + \subitem \texttt {T2A} encoding\pfill \main{b-56} + \subitem \texttt {T2B} encoding\pfill \main{b-56} + \subitem \texttt {T2C} encoding\pfill \main{b-56} + \subitem \texttt {X2} encoding\pfill \main{b-56} + \item \texttt {\PrintChar{092}textbardbl}\efill + \subitem default\pfill \main{a-911} + \subitem \texttt {TS1} encoding\pfill \main{a-782} + \item \texttt {\PrintChar{092}textbigcircle}\efill + \subitem default\pfill \main{a-890} + \subitem \texttt {TS1} encoding\pfill \main{a-755} + \item \texttt {\PrintChar{092}textblank}\efill + \subitem default\pfill \main{a-870} + \subitem \texttt {TS1} encoding\pfill \main{a-735} + \item \texttt {\PrintChar{092}textborn}\efill + \subitem default\pfill \main{a-897} + \subitem \texttt {TS1} encoding\pfill \main{a-768} + \item \texttt {\PrintChar{092}textbraceleft}\pfill a-252 + \subitem default\pfill \main{a-218} + \subitem \texttt {OMS} encoding\pfill \main{a-599} + \subitem \texttt {T1} encoding\pfill \main{a-461} + \subitem \texttt {T2A} encoding\pfill \main{b-55} + \subitem \texttt {T2B} encoding\pfill \main{b-55} + \subitem \texttt {T2C} encoding\pfill \main{b-55} + \subitem \texttt {X2} encoding\pfill \main{b-55} + \item \texttt {\PrintChar{092}textbraceright}\pfill a-253 + \subitem default\pfill \main{a-219} + \subitem \texttt {OMS} encoding\pfill \main{a-600} + \subitem \texttt {T1} encoding\pfill \main{a-462} + \subitem \texttt {T2A} encoding\pfill \main{b-57} + \subitem \texttt {T2B} encoding\pfill \main{b-57} + \subitem \texttt {T2C} encoding\pfill \main{b-57} + \subitem \texttt {X2} encoding\pfill \main{b-57} + \item \texttt {\PrintChar{092}textbrokenbar}\efill + \subitem default\pfill \main{a-943} + \subitem \texttt {TS1} encoding\pfill \main{a-814} + \item \texttt {\PrintChar{092}textbullet}\efill + \subitem default\pfill \main{a-220}, \main{a-913} + \subitem \texttt {OMS} encoding\pfill \main{a-601} + \subitem \texttt {TS1} encoding\pfill \main{a-784} + \item \texttt {\PrintChar{092}textcapitalcompwordmark}\efill + \subitem default\pfill \main{a-862} + \subitem \texttt {TS1} encoding\pfill \main{a-727} + \item \texttt {\PrintChar{092}textcelsius}\efill + \subitem default\pfill \main{a-914} + \subitem \texttt {TS1} encoding\pfill \main{a-785} + \item \texttt {\PrintChar{092}textcent}\efill + \subitem default\pfill \main{a-939} + \subitem \texttt {TS1} encoding\pfill \main{a-810} + \item \texttt {\PrintChar{092}textcentoldstyle}\efill + \subitem default\pfill \main{a-916} + \subitem \texttt {TS1} encoding\pfill \main{a-787} + \item \texttt {\PrintChar{092}textcircled}\pfill a-230, a-246 + \subitem default\pfill \main{a-226}, \main{a-843} + \subitem \texttt {OMS} encoding\pfill \main{a-607} + \subitem \texttt {TS1} encoding\pfill \main{a-756} + \item \texttt {\PrintChar{092}textcircledP}\efill + \subitem default\pfill \main{a-950} + \subitem \texttt {TS1} encoding\pfill \main{a-821} + \item \texttt {\PrintChar{092}textcolonmonetary}\efill + \subitem default\pfill \main{a-918} + \subitem \texttt {TS1} encoding\pfill \main{a-789} + \item \texttt {\PrintChar{092}textcompwordmark}\efill + \subitem default\pfill \main{a-235} + \subitem \texttt {T1} encoding\pfill \main{a-463} + \subitem \texttt {T2A} encoding\pfill \main{b-45} + \subitem \texttt {T2B} encoding\pfill \main{b-45} + \subitem \texttt {T2C} encoding\pfill \main{b-45} + \subitem \texttt {X2} encoding\pfill \main{b-45} + \item \texttt {\PrintChar{092}textcopyleft}\efill + \subitem default\pfill \main{a-948} + \subitem \texttt {TS1} encoding\pfill \main{a-819} + \item \texttt {\PrintChar{092}textcopyright}\pfill a-261 + \subitem default\pfill \main{a-230}, \main{a-946} + \subitem \texttt {TS1} encoding\pfill \main{a-817} + \item \texttt {\PrintChar{092}textcurrency}\efill + \subitem default\pfill \main{a-941} + \subitem \texttt {T2A} encoding\pfill \main{b-60} + \subitem \texttt {T2B} encoding\pfill \main{b-60} + \subitem \texttt {T2C} encoding\pfill \main{b-60} + \subitem \texttt {TS1} encoding\pfill \main{a-812} + \subitem \texttt {X2} encoding\pfill \main{b-60} + \item \texttt {\PrintChar{092}textdagger}\pfill a-256 + \subitem default\pfill \main{a-222}, \main{a-909} + \subitem \texttt {OMS} encoding\pfill \main{a-603} + \subitem \texttt {TS1} encoding\pfill \main{a-780} + \item \texttt {\PrintChar{092}textdaggerdbl}\pfill a-257 + \subitem default\pfill \main{a-221}, \main{a-910} + \subitem \texttt {OMS} encoding\pfill \main{a-602} + \subitem \texttt {TS1} encoding\pfill \main{a-781} + \item \texttt {\PrintChar{092}textdblhyphen}\efill + \subitem default\pfill \main{a-874} + \subitem \texttt {TS1} encoding\pfill \main{a-739} + \item \texttt {\PrintChar{092}textdblhyphenchar}\efill + \subitem default\pfill \main{a-904} + \subitem \texttt {TS1} encoding\pfill \main{a-775} + \item \texttt {\PrintChar{092}textdegree}\efill + \subitem default\pfill \main{a-953} + \subitem \texttt {TS1} encoding\pfill \main{a-824} + \item \texttt {\PrintChar{092}textdied}\efill + \subitem default\pfill \main{a-899} + \subitem \texttt {TS1} encoding\pfill \main{a-770} + \item \texttt {\PrintChar{092}textdiscount}\efill + \subitem default\pfill \main{a-933} + \subitem \texttt {TS1} encoding\pfill \main{a-804} + \item \texttt {\PrintChar{092}textdiv}\efill + \subitem default\pfill \main{a-970} + \subitem \texttt {TS1} encoding\pfill \main{a-841} + \item \texttt {\PrintChar{092}textdivorced}\efill + \subitem default\pfill \main{a-898} + \subitem \texttt {TS1} encoding\pfill \main{a-769} + \item \texttt {\PrintChar{092}textdollar}\pfill a-251, a-973, a-975 + \subitem default\pfill \main{a-203}, \main{a-871} + \subitem \texttt {OT1} encoding\pfill \main{a-386} + \subitem \texttt {OT4} encoding\pfill \main{a-672} + \subitem \texttt {T1} encoding\pfill \main{a-464} + \subitem \texttt {T2A} encoding\pfill \main{b-47} + \subitem \texttt {T2B} encoding\pfill \main{b-47} + \subitem \texttt {T2C} encoding\pfill \main{b-47} + \subitem \texttt {TS1} encoding\pfill \main{a-736} + \subitem \texttt {X2} encoding\pfill \main{b-47} + \item \texttt {\PrintChar{092}textdollaroldstyle}\efill + \subitem default\pfill \main{a-915} + \subitem \texttt {TS1} encoding\pfill \main{a-786} + \item \texttt {\PrintChar{092}textdong}\efill + \subitem default\pfill \main{a-927} + \subitem \texttt {TS1} encoding\pfill \main{a-798} + \item \texttt {\PrintChar{092}textdownarrow}\efill + \subitem default\pfill \main{a-895} + \subitem \texttt {TS1} encoding\pfill \main{a-766} + \item \texttt {\PrintChar{092}texteightoldstyle}\efill + \subitem default\pfill \main{a-884} + \subitem \texttt {TS1} encoding\pfill \main{a-749} + \item \texttt {\PrintChar{092}textellipsis}\pfill a-265 + \subitem default\pfill \main{a-242} + \item \texttt {\PrintChar{092}textemdash}\efill + \subitem default\pfill \main{a-204} + \subitem \texttt {OT1} encoding\pfill \main{a-364} + \subitem \texttt {OT4} encoding\pfill \main{a-659} + \subitem \texttt {T1} encoding\pfill \main{a-465} + \subitem \texttt {T2A} encoding\pfill \main{b-44} + \subitem \texttt {T2B} encoding\pfill \main{b-44} + \subitem \texttt {T2C} encoding\pfill \main{b-44} + \subitem \texttt {X2} encoding\pfill \main{b-44} + \item \texttt {\PrintChar{092}textendash}\efill + \subitem default\pfill \main{a-205} + \subitem \texttt {OT1} encoding\pfill \main{a-365} + \subitem \texttt {OT4} encoding\pfill \main{a-660} + \subitem \texttt {T1} encoding\pfill \main{a-466} + \subitem \texttt {T2A} encoding\pfill \main{b-42} + \subitem \texttt {T2B} encoding\pfill \main{b-42} + \subitem \texttt {T2C} encoding\pfill \main{b-42} + \subitem \texttt {X2} encoding\pfill \main{b-42} + \item \texttt {\PrintChar{092}textestimated}\efill + \subitem default\pfill \main{a-934} + \subitem \texttt {TS1} encoding\pfill \main{a-805} + \item \texttt {\PrintChar{092}texteuro}\efill + \subitem default\pfill \main{a-968} + \subitem \texttt {TS1} encoding\pfill \main{a-839} + \item \texttt {\PrintChar{092}textexclamdown}\efill + \subitem default\pfill \main{a-206} + \subitem \texttt {OT1} encoding\pfill \main{a-366} + \subitem \texttt {OT4} encoding\pfill \main{a-661} + \subitem \texttt {T1} encoding\pfill \main{a-467} + \item \texttt {\PrintChar{092}textfiveoldstyle}\efill + \subitem default\pfill \main{a-881} + \subitem \texttt {TS1} encoding\pfill \main{a-746} + \item \texttt {\PrintChar{092}textflorin}\efill + \subitem default\pfill \main{a-917} + \subitem \texttt {TS1} encoding\pfill \main{a-788} + \item \texttt {\PrintChar{092}textfouroldstyle}\efill + \subitem default\pfill \main{a-880} + \subitem \texttt {TS1} encoding\pfill \main{a-745} + \item \texttt {\PrintChar{092}textfractionsolidus}\efill + \subitem default\pfill \main{a-875} + \subitem \texttt {TS1} encoding\pfill \main{a-740} + \item \texttt {\PrintChar{092}textgravedbl}\efill + \subitem default\pfill \main{a-907} + \subitem \texttt {TS1} encoding\pfill \main{a-779} + \item \texttt {\PrintChar{092}textgreater}\efill + \subitem default\pfill \main{a-228} + \subitem \texttt {OML} encoding\pfill \main{a-617} + \subitem \texttt {T1} encoding\pfill \main{a-468} + \subitem \texttt {T2A} encoding\pfill \main{b-49} + \subitem \texttt {T2B} encoding\pfill \main{b-49} + \subitem \texttt {T2C} encoding\pfill \main{b-49} + \subitem \texttt {X2} encoding\pfill \main{b-49} + \item \texttt {\PrintChar{092}textguarani}\efill + \subitem default\pfill \main{a-921} + \subitem \texttt {TS1} encoding\pfill \main{a-792} + \item \texttt {\PrintChar{092}texthyphen}\pfill a-208, a-368, a-470, + a-663, b-51 + \item \texttt {\PrintChar{092}texthyphenchar}\pfill a-207, a-367, + a-469, a-662, b-50 + \item \texttt {\PrintChar{092}textinterrobang}\efill + \subitem default\pfill \main{a-925} + \subitem \texttt {TS1} encoding\pfill \main{a-796} + \item \texttt {\PrintChar{092}textinterrobangdown}\efill + \subitem default\pfill \main{a-926} + \subitem \texttt {TS1} encoding\pfill \main{a-797} + \item \texttt {\PrintChar{092}textlangle}\efill + \subitem default\pfill \main{a-886} + \subitem \texttt {TS1} encoding\pfill \main{a-751} + \item \texttt {\PrintChar{092}textlbrackdbl}\efill + \subitem default\pfill \main{a-892} + \subitem \texttt {TS1} encoding\pfill \main{a-763} + \item \texttt {\PrintChar{092}textleaf}\efill + \subitem default\pfill \main{a-900} + \subitem \texttt {TS1} encoding\pfill \main{a-771} + \item \texttt {\PrintChar{092}textleftarrow}\efill + \subitem default\pfill \main{a-868} + \subitem \texttt {TS1} encoding\pfill \main{a-733} + \item \texttt {\PrintChar{092}textless}\efill + \subitem default\pfill \main{a-227} + \subitem \texttt {OML} encoding\pfill \main{a-616} + \subitem \texttt {T1} encoding\pfill \main{a-471} + \subitem \texttt {T2A} encoding\pfill \main{b-48} + \subitem \texttt {T2B} encoding\pfill \main{b-48} + \subitem \texttt {T2C} encoding\pfill \main{b-48} + \subitem \texttt {X2} encoding\pfill \main{b-48} + \item \texttt {\PrintChar{092}textlira}\efill + \subitem default\pfill \main{a-923} + \subitem \texttt {TS1} encoding\pfill \main{a-794} + \item \texttt {\PrintChar{092}textlnot}\efill + \subitem default\pfill \main{a-949} + \subitem \texttt {TS1} encoding\pfill \main{a-820} + \item \texttt {\PrintChar{092}textlquill}\efill + \subitem default\pfill \main{a-937} + \subitem \texttt {TS1} encoding\pfill \main{a-808} + \item \texttt {\PrintChar{092}textmarried}\efill + \subitem default\pfill \main{a-901} + \subitem \texttt {TS1} encoding\pfill \main{a-772} + \item \texttt {\PrintChar{092}textmho}\efill + \subitem default\pfill \main{a-889} + \subitem \texttt {TS1} encoding\pfill \main{a-754} + \item \texttt {\PrintChar{092}textminus}\efill + \subitem default\pfill \main{a-887} + \subitem \texttt {TS1} encoding\pfill \main{a-752} + \item \texttt {\PrintChar{092}textmu}\efill + \subitem default\pfill \main{a-958} + \subitem \texttt {TS1} encoding\pfill \main{a-829} + \item \texttt {\PrintChar{092}textmusicalnote}\efill + \subitem default\pfill \main{a-902} + \subitem \texttt {TS1} encoding\pfill \main{a-773} + \item \texttt {\PrintChar{092}textnaira}\efill + \subitem default\pfill \main{a-920} + \subitem \texttt {TS1} encoding\pfill \main{a-791} + \item \texttt {\PrintChar{092}textnineoldstyle}\efill + \subitem default\pfill \main{a-885} + \subitem \texttt {TS1} encoding\pfill \main{a-750} + \item \texttt {\PrintChar{092}textnumero}\efill + \subitem default\pfill \main{a-932} + \subitem \texttt {T2A} encoding\pfill \main{b-59} + \subitem \texttt {T2B} encoding\pfill \main{b-59} + \subitem \texttt {T2C} encoding\pfill \main{b-59} + \subitem \texttt {TS1} encoding\pfill \main{a-803} + \subitem \texttt {X2} encoding\pfill \main{b-59} + \item \texttt {\PrintChar{092}textohm}\efill + \subitem default\pfill \main{a-891} + \subitem \texttt {TS1} encoding\pfill \main{a-762} + \item \texttt {\PrintChar{092}textonehalf}\efill + \subitem default\pfill \main{a-966} + \subitem \texttt {TS1} encoding\pfill \main{a-837} + \item \texttt {\PrintChar{092}textoneoldstyle}\efill + \subitem default\pfill \main{a-877} + \subitem \texttt {TS1} encoding\pfill \main{a-742} + \item \texttt {\PrintChar{092}textonequarter}\efill + \subitem default\pfill \main{a-965} + \subitem \texttt {TS1} encoding\pfill \main{a-836} + \item \texttt {\PrintChar{092}textonesuperior}\efill + \subitem default\pfill \main{a-962} + \subitem \texttt {TS1} encoding\pfill \main{a-833} + \item \texttt {\PrintChar{092}textopenbullet}\efill + \subitem default\pfill \main{a-935} + \subitem \texttt {TS1} encoding\pfill \main{a-806} + \item \texttt {\PrintChar{092}textordfeminine}\efill + \subitem default\pfill \main{a-249}, \main{a-947} + \subitem \texttt {TS1} encoding\pfill \main{a-818} + \item \texttt {\PrintChar{092}textordmasculine}\efill + \subitem default\pfill \main{a-250}, \main{a-963} + \subitem \texttt {TS1} encoding\pfill \main{a-834} + \item \texttt {\PrintChar{092}textparagraph}\pfill a-254 + \subitem default\pfill \main{a-223}, \main{a-959} + \subitem \texttt {OMS} encoding\pfill \main{a-604} + \subitem \texttt {TS1} encoding\pfill \main{a-830} + \item \texttt {\PrintChar{092}textperiodcentered}\efill + \subitem default\pfill \main{a-224}, \main{a-960} + \subitem \texttt {OMS} encoding\pfill \main{a-605} + \subitem \texttt {TS1} encoding\pfill \main{a-831} + \item \texttt {\PrintChar{092}textpertenthousand}\pfill a-977 + \subitem default\pfill \main{a-929} + \subitem \texttt {T1} encoding\pfill \main{a-428} + \subitem \texttt {T2A} encoding\pfill \main{b-40} + \subitem \texttt {T2B} encoding\pfill \main{b-40} + \subitem \texttt {T2C} encoding\pfill \main{b-40} + \subitem \texttt {TS1} encoding\pfill \main{a-800} + \subitem \texttt {X2} encoding\pfill \main{b-40} + \item \texttt {\PrintChar{092}textperthousand}\pfill a-976 + \subitem default\pfill \main{a-912} + \subitem \texttt {T1} encoding\pfill \main{a-426} + \subitem \texttt {T2A} encoding\pfill \main{b-38} + \subitem \texttt {T2B} encoding\pfill \main{b-38} + \subitem \texttt {T2C} encoding\pfill \main{b-38} + \subitem \texttt {TS1} encoding\pfill \main{a-783} + \subitem \texttt {X2} encoding\pfill \main{b-38} + \item \texttt {\PrintChar{092}textpeso}\efill + \subitem default\pfill \main{a-922} + \subitem \texttt {TS1} encoding\pfill \main{a-793} + \item \texttt {\PrintChar{092}textpilcrow}\efill + \subitem default\pfill \main{a-930} + \subitem \texttt {TS1} encoding\pfill \main{a-801} + \item \texttt {\PrintChar{092}textpm}\efill + \subitem default\pfill \main{a-954} + \subitem \texttt {TS1} encoding\pfill \main{a-825} + \item \texttt {\PrintChar{092}textquestiondown}\efill + \subitem default\pfill \main{a-209} + \subitem \texttt {OT1} encoding\pfill \main{a-369} + \subitem \texttt {OT4} encoding\pfill \main{a-664} + \subitem \texttt {T1} encoding\pfill \main{a-472} + \item \texttt {\PrintChar{092}textquotedbl}\efill + \subitem \texttt {T1} encoding\pfill \main{a-475} + \subitem \texttt {T2A} encoding\pfill \main{b-62} + \subitem \texttt {T2B} encoding\pfill \main{b-62} + \subitem \texttt {T2C} encoding\pfill \main{b-62} + \subitem \texttt {X2} encoding\pfill \main{b-62} + \item \texttt {\PrintChar{092}textquotedblleft}\efill + \subitem default\pfill \main{a-210} + \subitem \texttt {OT1} encoding\pfill \main{a-370} + \subitem \texttt {OT4} encoding\pfill \main{a-665} + \subitem \texttt {T1} encoding\pfill \main{a-473} + \subitem \texttt {T2A} encoding\pfill \main{b-65} + \subitem \texttt {T2B} encoding\pfill \main{b-65} + \subitem \texttt {T2C} encoding\pfill \main{b-65} + \subitem \texttt {X2} encoding\pfill \main{b-65} + \item \texttt {\PrintChar{092}textquotedblright}\efill + \subitem default\pfill \main{a-211} + \subitem \texttt {OT1} encoding\pfill \main{a-371} + \subitem \texttt {OT4} encoding\pfill \main{a-666} + \subitem \texttt {T1} encoding\pfill \main{a-474} + \subitem \texttt {T2A} encoding\pfill \main{b-66} + \subitem \texttt {T2B} encoding\pfill \main{b-66} + \subitem \texttt {T2C} encoding\pfill \main{b-66} + \subitem \texttt {X2} encoding\pfill \main{b-66} + \item \texttt {\PrintChar{092}textquoteleft}\efill + \subitem default\pfill \main{a-212} + \subitem \texttt {OT1} encoding\pfill \main{a-372} + \subitem \texttt {OT4} encoding\pfill \main{a-667} + \subitem \texttt {T1} encoding\pfill \main{a-476} + \subitem \texttt {T2A} encoding\pfill \main{b-63} + \subitem \texttt {T2B} encoding\pfill \main{b-63} + \subitem \texttt {T2C} encoding\pfill \main{b-63} + \subitem \texttt {X2} encoding\pfill \main{b-63} + \item \texttt {\PrintChar{092}textquoteright}\efill + \subitem default\pfill \main{a-213} + \subitem \texttt {OT1} encoding\pfill \main{a-373} + \subitem \texttt {OT4} encoding\pfill \main{a-668} + \subitem \texttt {T1} encoding\pfill \main{a-477} + \subitem \texttt {T2A} encoding\pfill \main{b-64} + \subitem \texttt {T2B} encoding\pfill \main{b-64} + \subitem \texttt {T2C} encoding\pfill \main{b-64} + \subitem \texttt {X2} encoding\pfill \main{b-64} + \item \texttt {\PrintChar{092}textquotesingle}\efill + \subitem default\pfill \main{a-872} + \subitem \texttt {TS1} encoding\pfill \main{a-737} + \item \texttt {\PrintChar{092}textquotestraightbase}\efill + \subitem default\pfill \main{a-864} + \subitem \texttt {TS1} encoding\pfill \main{a-729} + \item \texttt {\PrintChar{092}textquotestraightdblbase}\efill + \subitem default\pfill \main{a-865} + \subitem \texttt {TS1} encoding\pfill \main{a-730} + \item \texttt {\PrintChar{092}textrangle}\efill + \subitem default\pfill \main{a-888} + \subitem \texttt {TS1} encoding\pfill \main{a-753} + \item \texttt {\PrintChar{092}textrbrackdbl}\efill + \subitem default\pfill \main{a-893} + \subitem \texttt {TS1} encoding\pfill \main{a-764} + \item \texttt {\PrintChar{092}textrecipe}\efill + \subitem default\pfill \main{a-924} + \subitem \texttt {TS1} encoding\pfill \main{a-795} + \item \texttt {\PrintChar{092}textreferencemark}\efill + \subitem default\pfill \main{a-961} + \subitem \texttt {TS1} encoding\pfill \main{a-832} + \item \texttt {\PrintChar{092}textregistered}\efill + \subitem default\pfill \main{a-246}, \main{a-951} + \subitem \texttt {TS1} encoding\pfill \main{a-822} + \item \texttt {\PrintChar{092}textrightarrow}\efill + \subitem default\pfill \main{a-869} + \subitem \texttt {TS1} encoding\pfill \main{a-734} + \item \texttt {\PrintChar{092}textrquill}\efill + \subitem default\pfill \main{a-938} + \subitem \texttt {TS1} encoding\pfill \main{a-809} + \item \texttt {\PrintChar{092}textsection}\pfill a-255 + \subitem default\pfill \main{a-225}, \main{a-944} + \subitem \texttt {OMS} encoding\pfill \main{a-606} + \subitem \texttt {T1} encoding\pfill \main{a-478} + \subitem \texttt {T2A} encoding\pfill \main{b-61} + \subitem \texttt {T2B} encoding\pfill \main{b-61} + \subitem \texttt {T2C} encoding\pfill \main{b-61} + \subitem \texttt {TS1} encoding\pfill \main{a-815} + \subitem \texttt {X2} encoding\pfill \main{b-61} + \item \texttt {\PrintChar{092}textservicemark}\efill + \subitem default\pfill \main{a-936} + \subitem \texttt {TS1} encoding\pfill \main{a-807} + \item \texttt {\PrintChar{092}textsevenoldstyle}\efill + \subitem default\pfill \main{a-883} + \subitem \texttt {TS1} encoding\pfill \main{a-748} + \item \texttt {\PrintChar{092}textsixoldstyle}\efill + \subitem default\pfill \main{a-882} + \subitem \texttt {TS1} encoding\pfill \main{a-747} + \item \texttt {\PrintChar{092}textsterling}\pfill a-263, a-972, + a-974 + \subitem default\pfill \main{a-214}, \main{a-940} + \subitem \texttt {OT1} encoding\pfill \main{a-393} + \subitem \texttt {OT4} encoding\pfill \main{a-679} + \subitem \texttt {T1} encoding\pfill \main{a-479} + \subitem \texttt {TS1} encoding\pfill \main{a-811} + \item \texttt {\PrintChar{092}textsuperscript}\pfill a-247, + a-249, a-250 + \item \texttt {\PrintChar{092}textsurd}\efill + \subitem default\pfill \main{a-964} + \subitem \texttt {TS1} encoding\pfill \main{a-835} + \item \texttt {\PrintChar{092}TextSymbolUnavailable}\pfill + \main{a-3}, a-635 + \item \texttt {\PrintChar{092}textthreeoldstyle}\efill + \subitem default\pfill \main{a-879} + \subitem \texttt {TS1} encoding\pfill \main{a-744} + \item \texttt {\PrintChar{092}textthreequarters}\efill + \subitem default\pfill \main{a-967} + \subitem \texttt {TS1} encoding\pfill \main{a-838} + \item \texttt {\PrintChar{092}textthreequartersemdash}\efill + \subitem default\pfill \main{a-867} + \subitem \texttt {TS1} encoding\pfill \main{a-732} + \item \texttt {\PrintChar{092}textthreesuperior}\efill + \subitem default\pfill \main{a-956} + \subitem \texttt {TS1} encoding\pfill \main{a-827} + \begin{figure*}[tp] + A verbatim extract from the index (without \textsf{docidx2e}): + + \let\item=\listenvironmentitem + \expandafter\def \expandafter\MacroFont \expandafter{% + \MacroFont\footnotesize} +\begin{verbatim} + \item \texttt {\PrintChar{092}U}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill \main{b-444} + \subsubitem \texttt {\PrintChar{092}CYRU} composite\pfill \main{b-453} + \subsubitem \texttt {\PrintChar{092}cyru} composite\pfill \main{b-455} + \subitem \texttt {T2B} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill \main{b-444} + \subsubitem \texttt {\PrintChar{092}CYRU} composite\pfill \main{b-453} + \subsubitem \texttt {\PrintChar{092}cyru} composite\pfill \main{b-455} + \subitem \texttt {T2C} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill \main{b-444} + \subitem \texttt {X2} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill \main{b-444} + \subsubitem \texttt {\PrintChar{092}CYRU} composite\pfill \main{b-453} + \subsubitem \texttt {\PrintChar{092}cyru} composite\pfill \main{b-455} + \item \texttt {\PrintChar{092}u}\efill + \subitem default\pfill \main{a-187} + \subitem \texttt {OT1} encoding\pfill \main{a-343} + \subitem \texttt {OT4} encoding\pfill \main{a-631} + \subitem \texttt {T1} encoding\pfill \main{a-411} + \subsubitem \texttt {A} composite\pfill \main{a-484} + \subsubitem \texttt {a} composite\pfill \main{a-511} + \subsubitem \texttt {G} composite\pfill \main{a-491} + \subsubitem \texttt {g} composite\pfill \main{a-518} + \subitem \texttt {T2A} encoding\pfill \main{b-21} + \subitem \texttt {T2B} encoding\pfill \main{b-21} + \subitem \texttt {T2C} encoding\pfill \main{b-21} + \subitem \texttt {X2} encoding\pfill \main{b-21} + \item \texttt {\PrintChar{092}@uclclist}\pfill a-270, a-271, a-318 + \item \texttt {\PrintChar{092}UndeclareTextCommand}\pfill \usage{4}, + \main{a-141}, a-972--a-977 + \item \texttt {\PrintChar{092}@undefined}\pfill a-145, a-147 + \item \texttt {\PrintChar{092}update@uclc@with@cyrillic}\pfill a-269, + a-297, a-321, a-327 + \item \texttt {\PrintChar{092}upshape}\pfill a-390, a-609, a-676, a-758 + \item \texttt {\PrintChar{092}@use@text@encoding}\pfill \main{a-110} + \item \texttt {\PrintChar{092}UseTextAccent}\pfill \usage{3}, + \main{a-110}, a-138 + \item \texttt {\PrintChar{092}UseTextSymbol}\pfill \usage{2}, + \main{a-110}, a-136 +\end{verbatim} + \end{figure*} + \item \texttt {\PrintChar{092}texttildelow}\efill + \subitem default\pfill \main{a-903} + \subitem \texttt {TS1} encoding\pfill \main{a-774} + \item \texttt {\PrintChar{092}texttimes}\efill + \subitem default\pfill \main{a-969} + \subitem \texttt {TS1} encoding\pfill \main{a-840} + \item \texttt {\PrintChar{092}texttrademark}\efill + \subitem default\pfill \main{a-247}, \main{a-928} + \subitem \texttt {TS1} encoding\pfill \main{a-799} + \item \texttt {\PrintChar{092}texttwelveudash}\efill + \subitem default\pfill \main{a-866} + \subitem \texttt {TS1} encoding\pfill \main{a-731} + \item \texttt {\PrintChar{092}texttwooldstyle}\efill + \subitem default\pfill \main{a-878} + \subitem \texttt {TS1} encoding\pfill \main{a-743} + \item \texttt {\PrintChar{092}texttwosuperior}\efill + \subitem default\pfill \main{a-955} + \subitem \texttt {TS1} encoding\pfill \main{a-826} + \item \texttt {\PrintChar{092}textunderscore}\pfill a-259 + \subitem default\pfill \main{a-236} + \subitem \texttt {T1} encoding\pfill \main{a-480} + \subitem \texttt {T2A} encoding\pfill \main{b-54} + \subitem \texttt {T2B} encoding\pfill \main{b-54} + \subitem \texttt {T2C} encoding\pfill \main{b-54} + \subitem \texttt {X2} encoding\pfill \main{b-54} + \item \texttt {\PrintChar{092}textuparrow}\efill + \subitem default\pfill \main{a-894} + \subitem \texttt {TS1} encoding\pfill \main{a-765} + \item \texttt {\PrintChar{092}textvisiblespace}\efill + \subitem default\pfill \main{a-238} + \subitem \texttt {T1} encoding\pfill \main{a-481} + \subitem \texttt {T2A} encoding\pfill \main{b-46} + \subitem \texttt {T2B} encoding\pfill \main{b-46} + \subitem \texttt {T2C} encoding\pfill \main{b-46} + \subitem \texttt {X2} encoding\pfill \main{b-46} + \item \texttt {\PrintChar{092}textwon}\efill + \subitem default\pfill \main{a-919} + \subitem \texttt {TS1} encoding\pfill \main{a-790} + \item \texttt {\PrintChar{092}textyen}\efill + \subitem default\pfill \main{a-942} + \subitem \texttt {TS1} encoding\pfill \main{a-813} + \item \texttt {\PrintChar{092}textzerooldstyle}\efill + \subitem default\pfill \main{a-876} + \subitem \texttt {TS1} encoding\pfill \main{a-741} + \item \texttt {\PrintChar{092}TH}\efill + \subitem \texttt {T1} encoding\pfill \main{a-439} + \item \texttt {\PrintChar{092}th}\efill + \subitem \texttt {T1} encoding\pfill \main{a-482} + \item \texttt {\PrintChar{092}@thirdofthree}\pfill a-147 + \item \texttt {\PrintChar{092}@typeset@protect}\pfill a-21, a-27, + a-160, a-168 + + \indexspace +{\bfseries\hfil U\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}U}\efill + \subitem \texttt {T2A} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill + \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill + \main{b-444} + \subsubitem \texttt {\PrintChar{092}CYRU} composite\pfill + \main{b-453} + \subsubitem \texttt {\PrintChar{092}cyru} composite\pfill + \main{b-455} + \subitem \texttt {T2B} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill + \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill + \main{b-444} + \subsubitem \texttt {\PrintChar{092}CYRU} composite\pfill + \main{b-453} + \subsubitem \texttt {\PrintChar{092}cyru} composite\pfill + \main{b-455} + \subitem \texttt {T2C} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill + \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill + \main{b-444} + \subitem \texttt {X2} encoding\pfill \main{b-26} + \subsubitem \texttt {\PrintChar{092}CYRI} composite\pfill + \main{b-443} + \subsubitem \texttt {\PrintChar{092}cyri} composite\pfill + \main{b-444} + \subsubitem \texttt {\PrintChar{092}CYRU} composite\pfill + \main{b-453} + \subsubitem \texttt {\PrintChar{092}cyru} composite\pfill + \main{b-455} + \item \texttt {\PrintChar{092}u}\efill + \subitem default\pfill \main{a-187} + \subitem \texttt {OT1} encoding\pfill \main{a-343} + \subitem \texttt {OT4} encoding\pfill \main{a-631} + \subitem \texttt {T1} encoding\pfill \main{a-411} + \subsubitem \texttt {A} composite\pfill \main{a-484} + \subsubitem \texttt {a} composite\pfill \main{a-511} + \subsubitem \texttt {G} composite\pfill \main{a-491} + \subsubitem \texttt {g} composite\pfill \main{a-518} + \subitem \texttt {T2A} encoding\pfill \main{b-21} + \subitem \texttt {T2B} encoding\pfill \main{b-21} + \subitem \texttt {T2C} encoding\pfill \main{b-21} + \subitem \texttt {X2} encoding\pfill \main{b-21} + \item \texttt {\PrintChar{092}@uclclist}\pfill a-270, a-271, a-318 + \item \texttt {\PrintChar{092}UndeclareTextCommand}\pfill \usage{4}, + \main{a-141}, a-972--a-977 + \item \texttt {\PrintChar{092}@undefined}\pfill a-145, a-147 + \item \texttt {\PrintChar{092}update@uclc@with@cyrillic}\pfill a-269, + a-297, a-321, a-327 + \item \texttt {\PrintChar{092}upshape}\pfill a-390, a-609, a-676, + a-758 + \item \texttt {\PrintChar{092}@use@text@encoding}\pfill \main{a-110} + \item \texttt {\PrintChar{092}UseTextAccent}\pfill \usage{3}, + \main{a-110}, a-138 + \item \texttt {\PrintChar{092}UseTextSymbol}\pfill \usage{2}, + \main{a-110}, a-136 + + \indexspace +{\bfseries\hfil V\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}v}\efill + \subitem default\pfill \main{a-188} + \subitem \texttt {OT1} encoding\pfill \main{a-344} + \subitem \texttt {OT4} encoding\pfill \main{a-632} + \subitem \texttt {T1} encoding\pfill \main{a-410} + \subsubitem \texttt {C} composite\pfill \main{a-487} + \subsubitem \texttt {c} composite\pfill \main{a-514} + \subsubitem \texttt {D} composite\pfill \main{a-488} + \subsubitem \texttt {d} composite\pfill \main{a-515} + \subsubitem \texttt {E} composite\pfill \main{a-489} + \subsubitem \texttt {e} composite\pfill \main{a-516} + \subsubitem \texttt {L} composite\pfill \main{a-493} + \subsubitem \texttt {l} composite\pfill \main{a-520} + \subsubitem \texttt {N} composite\pfill \main{a-495} + \subsubitem \texttt {n} composite\pfill \main{a-522} + \subsubitem \texttt {R} composite\pfill \main{a-498} + \subsubitem \texttt {r} composite\pfill \main{a-525} + \subsubitem \texttt {S} composite\pfill \main{a-500} + \subsubitem \texttt {s} composite\pfill \main{a-527} + \subsubitem \texttt {T} composite\pfill \main{a-502} + \subsubitem \texttt {t} composite\pfill \main{a-529} + \subsubitem \texttt {Z} composite\pfill \main{a-508} + \subsubitem \texttt {z} composite\pfill \main{a-535} + \subitem \texttt {T2A} encoding\pfill \main{b-20} + \subitem \texttt {T2B} encoding\pfill \main{b-20} + \subitem \texttt {T2C} encoding\pfill \main{b-20} + \subitem \texttt {X2} encoding\pfill \main{b-20} + \item \texttt {\PrintChar{092}vrule}\pfill a-239, a-241 + + \indexspace +{\bfseries\hfil W\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}@width}\pfill a-237, a-240 + \item \texttt {\PrintChar{092}@wrong@font@char}\pfill a-121 + + \indexspace +{\bfseries\hfil X\hfil}\nopagebreak + + \item \texttt {\PrintChar{092}@xxxii}\pfill a-377, a-379 + + \end{theindex} + +\end{document} -- cgit v1.2.3