1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
30 % This document will typeset the LaTeX sources as a single document.
31 % This will produce quite a large file (roughly 555 pages) and may
34 % Some notes on processing this document are contained at the end
35 % of this document, after \end{document}
39 % First a special index style for makeindex
42 \begin{filecontents
}{source2e.ist
}
47 "
\n \
\begin{theindex
} \n \
\makeatletter\
\scan@allowedfalse
\n"
49 "
\n\n \
\end{theindex
}\n"
50 item_x1 "\
\efill \n \
\subitem "
51 item_x2 "\
\efill \n \
\subsubitem "
55 % The next lines will produce some warnings when
56 % running Makeindex as they try to cover two different
57 % versions of the program:
58 lethead_prefix "
{\
\bfseries\
\hfil "
59 lethead_suffix "\
\hfil}\
\nopagebreak\n"
61 heading_prefix "
{\
\bfseries\
\hfil "
62 heading_suffix "\
\hfil}\
\nopagebreak\n"
65 % and just for source2e:
66 % Remove R so I is treated in sequence I J K not I II III
67 page_precedence "rnaA"
72 \documentclass{ltxdoc
}
76 % Do not index some TeX primitives, and some common plain TeX commands.
78 \DoNotIndex{\def,
\long,
\edef,
\xdef,
\gdef,
\let,
\global}
79 \DoNotIndex{\if,
\ifnum,
\ifdim,
\ifcat,
\ifmmode,
\ifvmode,
\ifhmode,
%
80 \iftrue,
\iffalse,
\ifvoid,
\ifx,
\ifeof,
\ifcase,
\else,
\or,
\fi}
81 \DoNotIndex{\box,
\copy,
\setbox,
\unvbox,
\unhbox,
\hbox,
%
83 \DoNotIndex{\@empty,
\immediate,
\write}
84 \DoNotIndex{\egroup,
\bgroup,
\expandafter,
\begingroup,
\endgroup}
85 \DoNotIndex{\divide,
\advance,
\multiply,
\count,
\dimen}
86 \DoNotIndex{\relax,
\space,
\string}
87 \DoNotIndex{\csname,
\endcsname,\@spaces,
\openin,
\openout,
%
89 \DoNotIndex{\catcode,
\endinput}
90 \DoNotIndex{\jobname,
\message,
\read,
\the,
\m@ne,
\noexpand}
91 \DoNotIndex{\hsize,
\vsize,
\hskip,
\vskip,
\kern,
\hfil,
\hfill,
\hss}
92 \DoNotIndex{\m@ne,
\z@,
\z@skip,\@ne,
\tw@,
\p@
}
93 \DoNotIndex{\dp,
\wd,
\ht,
\vss,
\unskip}
95 % Set up the Index and Change History to use \part
96 \IndexPrologue{\part*
{Index
}%
97 \markboth{Index
}{Index
}%
98 \addcontentsline{toc
}{part
}{Index
}%
99 The italic numbers denote the pages where the
100 corresponding entry is described,
101 numbers underlined point to the definition,
102 all others indicate the places where it is used.
}
104 \GlossaryPrologue{\part*
{Change History
}%
105 % Allow control names to be hyphenated here...
106 {\GlossaryParms\ttfamily\hyphenchar\font=`\-
}%
107 \markboth{Change History
}{Change History
}%
108 \addcontentsline{toc
}{part
}{Change History
}}
110 % The standard \changes command modified slightly to better cope with
111 % this multiple file document.
113 \def\@changes@iso@date
#1/
#2/
#3/
#4\space{#1\if\relax#2\relax\else-
#2-
#3\fi\space}
114 \def\changes@
#1#2#3{%
115 \let\protect\@unexpandable@protect
116 \edef\@tempa
{\noexpand\glossary{\@changes@iso@date
#2///
\space
117 \currentfile\space#1\levelchar
118 \ifx\saved@macroname\@empty
126 \string\verb\quotechar*
%
127 \verbatimchar\saved@macroname
131 \@tempa
\endgroup\@esphack
}
133 % Move whole block up so that the file key is not so close
134 % to bottom of US letter page.
135 \addtolength\topmargin{-
2\baselineskip}
138 % Section numbers now reach eg 74.17.2 which need more space
139 \renewcommand*
\l@subsection
{\@dottedtocline
{2}{1.5em
}{2.8em
}}
140 \renewcommand*
\l@subsubsection
{\@dottedtocline
{3}{3.8em
}{3.4em
}}
143 % Produce a Change Log and (2 column) Index.
147 \setcounter{IndexColumns
}{2}
149 % Needed for documentation in ltoutenc.dtx
150 \usepackage{textcomp
}
153 \title{The
\LaTeXe\ Sources
}
163 % This command will be used to input the patch file
164 % if that file exists.
165 \newcommand{\includeltpatch}{%
166 \def\currentfile{ltpatch.ltx
}
169 \xdef\filekey{\filekey,
\thepart=
{\ttfamily\currentfile}}}%
170 Things we did wrong
\ldots
171 \IndexInput{ltpatch.ltx
}}
175 % Get the date and patch level from ltvers.dtx
177 \let\patchdate=\@empty
179 \def\ProvidesFile#1\fmtversion#2#3\patch@level
#4{%
180 \date{#2}\xdef\patchdate{#4}\endinput}
182 \global\let\X@date=\@date
184 % Add the patch version if available.
185 \long\def\Xdef#1#2#3\def#4#5{%
189 \InputIfFileExists{ltpatch.ltx
}
190 {\let\def\Xdef}{\global\let\includeltpatch\relax}
195 \ifx\patchdate\Xpatch\else
196 \edef\@date
{\@date
\space Patch level
\patchdate}
199 \@warning
{ltpatch.ltx does not match ltvers.dtx!
}
200 \let\includeltpatch\relax
204 \pagenumbering{roman
}
205 \MaintainedByLaTeXTeam{latex
}
207 \renewcommand\maketitle{}
213 \pagenumbering{arabic
}
215 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217 % Each of the following \DocInclude lines includes a file with extension
218 % .dtx. Each of these files may be typeset separately. For instance
220 % will typeset the source of the LaTeX box commands.
222 % If this file is processed, each of these separate dtx files will be
223 % contained as a part of a single document. Using ltxdoc.cfg you can
224 % then optionally produce a combined index and/or change history for
225 % the entire source of the format file. Note that such a document will
226 % be quite large (about 555 pages).
229 \DocInclude{ltdirchk
} % System dependent initialisation
231 \DocInclude{ltplain
} % LaTeX version of Knuth's plain.tex
233 \DocInclude{ltvers
} % Current version date
235 \DocInclude{ltdefns
} % Initial definitions.
237 \DocInclude{ltalloc
} % Allocation of counters and others.
239 \DocInclude{ltcntrl
} % Program control macros.
241 \DocInclude{lterror
} % Error handling.
243 \DocInclude{ltpar
} % Paragraphs.
245 \DocInclude{ltspace
} % Spacing, line and page breaking.
247 \DocInclude{ltlogos
} % Logos.
249 \DocInclude{ltfiles
} % \input files and related commands
251 \DocInclude{ltoutenc
} % Output encoding interface
253 \DocInclude{ltcounts
} % Counters
255 \DocInclude{ltlength
} % Lengths
257 \DocInclude{ltfssbas
} % NFSS Base macros
259 \DocInclude{ltfsstrc
} % NFSS Tracing (and tracefnt.sty)
261 \DocInclude{ltfsscmp
} % NFSS1 Compatibility
263 \DocInclude{ltfssdcl
} % NFSS Declarative interface
265 \DocInclude{ltfssini
} % NFSS Initialisation
267 \DocInclude{fontdef
} % fonttext.ltx/fontmath.ltx
269 \DocInclude{preload
} % preload.ltx
271 \DocInclude{ltfntcmd
} % \textrm etc
273 \DocInclude{ltpageno
} % Page numbering
275 \DocInclude{ltxref
} % Cross referencing
277 \DocInclude{ltmiscen
} % Miscellaneous environment definitions.
279 \DocInclude{ltmath
} % Mathematics set up.
281 \DocInclude{ltlists
} % List and related environments
283 \DocInclude{ltboxes
} % Parbox and friends
285 \DocInclude{lttab
} % Tabbing tabular and array
287 \DocInclude{ltpictur
} % Picture mode
289 \DocInclude{ltthm
} % Theorem environments
291 \DocInclude{ltsect
} % Sectioning
293 \DocInclude{ltfloat
} % Floats
295 \DocInclude{ltidxglo
} % Index and Glossary
297 \DocInclude{ltbibl
} % Bibliography
299 \DocInclude{ltpage
} % \pagestyle \raggedbottom \sloppy
301 \DocInclude{ltoutput
} % Output routine
303 \DocInclude{ltclass
} % Package & Class interface
305 \DocInclude{lthyphen
} % Hyphenation (hyphen.ltx).
307 \DocInclude{ltluatex
} % Luatex support
309 \DocInclude{ltfinal
} % Last minute initialisations and dump
311 \includeltpatch % Corrections distributed after the full release
313 % Stop here if ltxdoc.cfg says \AtEndOfClass{\OnlyDescription}
314 \StopEventually{\end{document}}
325 \string # Produce change log with^^J
%
326 makeindex -s gglo.ist -o source2e.gls source2e.glo
}
333 % makeindex needs a symbol between the parts of composite page numbers
334 % but we dont want one, so:
336 \string # Produce index with^^J
%
337 makeindex -s source2e.ist source2e.idx
}
342 \def-
{\futurelet\temp\indexdash}
343 \def\indexdash{\ifx\temp-
\endash\fi}
348 % Make sure that the index is not printed twice
349 % (ltxdoc.cfg might have a second \PrintIndex command)
350 \let\PrintChanges\relax
351 \let\PrintIndex\relax
356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
358 To use this file to produce a fully indexed source code
359 you need to execute the following (or equivalent) commands:
363 makeindex -s source2e.ist source2e.idx
364 makeindex -s gglo.ist -o source2e.gls source2e.glo
370 The makeindex style source2e.ist is used in place of the usual
371 doc gind.ist to ensure that I is used in the sequence I J K
372 not I II II, which would be the default makeindex behaviour.
374 The third run with latex is only required to get the table of
375 contents entries for the change log and index. You may speed things up
376 by using the
\includeonly mechanism so as not to typeset the source
377 files on the second run. This involves changing the file
379 between the latex runs.
381 The following unix script automates this.
382 (It could easily be ported to scripts for DOS or VMS,
383 rm is ReMove a file, and echo "..." > file writes ... to "file".)
386 After this script (after the second ==============) is a similar script
387 that will produce the documentation for all the files in the base
388 distribution that are *not* included in source2e.dvi. This second script
389 was requested, but before using it, beware it will take a long time!
390 It may however be modified as required, eg to not typeset the fdd files
396 rm -f source2e.gls source2e.ind source2e.toc
399 # Create new standard ltxdoc.cfg file
400 # Pass the (possibly empty) list of arguments supplied on the
401 # command line to article class.
403 # If you use A4 paper, running this script with argument
405 # may save about
30 pages.
407 echo "
\PassOptionsToClass{$*
}{article
}" > ltxdoc.cfg
410 # Now LaTeX the file with this cfg file.
415 # Make the Change log and Glossary.
417 makeindex -s source2e.ist source2e.idx
418 makeindex -s gglo.ist -o source2e.gls source2e.glo
421 # Second run: append
\includeonly{} to ltxdoc.cfg to speed up things
422 # (this run needed only to get changes and index listed in .toc file)
424 # Note that the index will not be made incorrect by the insertion
425 # of the table of contents as the front matter uses a different page
428 echo "
\includeonly{}" >> ltxdoc.cfg
433 # Third and final run, to put everything together.
434 # First restore the cfg file:
436 echo "
\PassOptionsToClass{$*
}{article
}" > ltxdoc.cfg
443 # Running this script will process all the dtx fdd and *guide.tex
444 # and ltnews*.tex files in the LaTeX distribution, except the dtx
445 # files included in source2e.tex.
446 # (The shell first script in the comments of source2e.tex will
449 # Any command line arguments (eg
a4paper) are taken as options to the
452 # This script is likely to take ages!
454 echo "
\PassOptionsToClass{$*
}{article
}" > ltxdoc.cfg
455 echo "
\batchmode" >> ltxdoc.cfg
457 # The next four lines produce full indexes and change logs
458 # you may not want those.
459 echo "
\AtBeginDocument{\RecordChanges}" >> ltxdoc.cfg
460 echo "
\AtEndDocument{\PrintChanges}" >> ltxdoc.cfg
461 echo "
\AtBeginDocument{\CodelineIndex\EnableCrossrefs}" >> ltxdoc.cfg
462 echo "
\AtEndDocument{\PrintIndex}" >> ltxdoc.cfg
464 # If you do not want any code listings, just documentation, then instead
465 # of the above four lines, uncomment the following:
466 # echo "
\AtBeginDocument{\OnlyDescription}" >> ltxdoc.cfg
468 echo "
\PassOptionsToClass{$*
}{article
}" > ltxguide.cfg
469 echo "
\batchmode" >> ltxguide.cfg
471 cp ltxguide.cfg ltnews.cfg
474 for i in *dtx *fdd *guide.tex ltnews*.tex
478 if (grep "Include
{$B
}" source2e.tex >/dev/null ; )
483 if (latex $i > /dev/null)
487 echo makeindex -s gind.ist $B.idx
488 makeindex -s gind.ist $B.idx > /dev/null
2> /dev/null
489 echo makeindex -s gglo.ist -o $B.gls $B.glo
490 makeindex -s gglo.ist -o $B.gls $B.glo > /dev/null
2> /dev/null
494 echo "!!! LaTeX ERROR: $i. (See $B.log.)"