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.
31 %%% From File: ltfinal.dtx
35 \ProvidesFile{ltfinal.dtx}
36 [2017/03/09 v2.0t LaTeX Kernel (Final Settings)]
38 \documentclass{ltxdoc}
39 \GetFileInfo{ltfinal.dtx}
51 \MaintainedByLaTeXTeam{latex}
53 \DocInput{ltfinal.dtx}
59 % \section{Final settings}
60 % This section contains the final settings for \LaTeX. It initialises
61 % some debugging and typesetting parameters, sets the default
62 % |\catcode|s and uc/lc codes, and inputs the hyphenation file.
66 % \changes{v0.1a}{1994/03/07}{Initial version, split from latex.dtx}
67 % \changes{v0.1a}{1994/03/07}{Remove oldcomments environment}
68 % \changes{v0.1c}{1994/04/21}{Added comments, set the catcodes of
70 % \changes{v0.1d}{1994/04/23}{Check that \cs{font@submax} is still zero}
71 % \changes{v0.1e}{1994/05/02}{Set all the catcodes}
72 % \changes{v0.1f}{1994/05/03}{Set the catcode of control-J to be
73 % `other', for use in messages.}
74 % \changes{v0.1g}{1994/05/05}{Added empty errhelp.}
75 % \changes{v0.1h}{1994/05/13}{Added package ot1enc, and defined
76 % \cs{@acci}, \cs{@accii} and \cs{@acciii}.}
77 % \changes{v0.1j}{1994/05/18}{Corrected the lccode for d-bar.}
78 % \changes{v0.1k}{1994/05/19}{Removed \cs{makeat...}}
79 % \changes{v1.0n}{1994/05/31}{Renamed lthyphen.* to lthyphen.*.}
80 % \changes{v1.0o}{1994/11/17}
81 % {\cs{@tempa} to \cs{reserved@a}}
82 % \changes{v1.0p}{1994/12/01}
83 % {Renamed lthyphen.* to hyphen.*.}
84 % \changes{v1.0r}{1995/06/05}
85 % {Added \cs{MakeUppercase} and \cs{MakeLowercase}.}
86 % \changes{v1.0s}{1995/06/06}
87 % {Made \cs{MakeUppercase} and \cs{MakeLowercase} brace their
89 % \changes{v2.0r}{2016/10/15}{Require e\TeX{}}
90 % \changes{v2.0s}{2016/10/15}{Tidy up status of char 127}
92 % \subsection{Debugging}
94 % By default, \LaTeX{} shows statistics:
100 % \subsection{Typesetting parameters}
102 % \begin{macro}{\@lowpenalty}
103 % \begin{macro}{\@medpenalty}
104 % \begin{macro}{\@highpenalty}
105 % These are penalties used internally.
107 \newcount\@lowpenalty
108 \newcount\@medpenalty
109 \newcount\@highpenalty
116 %\begin{macro}{\newmarks}
117 % \changes{v2.0a}{2014/12/30}{macro added}
118 % \changes{v2.0b}{2015/01/23}{use reserved count 256}
119 % \changes{v2.0g}{2015/06/19}{Use $-1$ for first range to get contiguous allocation}
120 % Allocate extended marks types if etex is active.
121 % Placed here at the end of the format
122 % to increase compatibility with count allocations
123 % in earlier releases.
126 %<*2ekernel|latexrelease>
127 %<latexrelease>\IncludeInRelease{2015/01/01}%
128 %<latexrelease> {\newmarks}{Extended Allocation}%
132 \ifx\marks\@undefined\else
134 \e@alloc\marks \e@alloc@chardef{\count256}\m@ne\e@alloc@top}
139 %</2ekernel|latexrelease>
140 %<latexrelease>\EndIncludeInRelease
141 %<latexrelease>\IncludeInRelease{0000/00/00}%
142 %<latexrelease> {\newmarks}{Extended Allocation}%
143 %<latexrelease>\let\newmarks\@undefined
144 %<latexrelease>\EndIncludeInRelease
149 %\begin{macro}{\newXeTeXintercharclass}
150 % \changes{v2.0a}{2014/12/30}{macro added}
151 % \changes{v2.0b}{2015/01/23}{use reserved count 257}
152 % \changes{v2.0f}{2015/04/28}{define \cs{xe@alloc@intercharclass} for compatibility with older xelatex initilisation}
153 %\begin{macro}{\xe@alloc@intercharclass}
154 %\begin{macro}{\e@alloc@intercharclass@top}
155 % \changes{v2.0j}{2016/01/04}{Start allocation at one not three}
156 % \changes{v2.0k}{2016/01/05}{Remove duplicated code}
157 % Allocate |\XeTeXintercharclass| types if xetex is active.
158 % previously defined in |xetex.ini|.
162 %<*2ekernel|latexrelease>
163 %<latexrelease>\IncludeInRelease{2015/01/01}%
164 %<latexrelease> {\newXeTeXintercharclass}{Extended Allocation}%
167 % Classes allocated 1 to 4094 (or 254 on older xetex)
168 % (In earlier XeLaTeX versions 1, 2 and 3 were pre-set for CJK).
169 % \changes{v2.0g}{2015/06/19}{Use $-1$ for first range to get contiguous allocation}
170 % \changes{v2.0q}{2016/04/22}{XeTeX 0.99996 has 4096 char classes not 256}
172 \ifx\XeTeXcharclass\@undefined
176 \ifdim\the\XeTeXversion\XeTeXrevision\p@>0.99993\p@
177 \chardef\e@alloc@intercharclass@top=4095
179 \chardef\e@alloc@intercharclass@top=255
183 \def\newXeTeXintercharclass{%
184 \e@alloc\XeTeXcharclass
185 \chardef\xe@alloc@intercharclass\m@ne\e@alloc@intercharclass@top}
190 %</2ekernel|latexrelease>
191 %<latexrelease>\EndIncludeInRelease
192 %<latexrelease>\IncludeInRelease{0000/00/00}%
193 %<latexrelease> {\newXeTeXintercharclass}{Extended Allocation}%
194 %<latexrelease> \ifx\XeTeXcharclass\@undefined
195 %<latexrelease> \else
196 %<latexrelease> \def\xe@alloc@#1#2#3#4#5{\global\advance#1\@ne
197 %<latexrelease> \xe@ch@ck#1#4#2%
198 %<latexrelease> \allocationnumber#1%
199 %<latexrelease> \global#3#5\allocationnumber
200 %<latexrelease> \wlog{\string#5=\string#2\the\allocationnumber}}
201 %<latexrelease> \def\xe@ch@ck#1#2#3{%
202 %<latexrelease> \ifnum#1<#2\else
203 %<latexrelease> \errmessage{No room for a new #3}%
205 %<latexrelease> \def\newXeTeXintercharclass{%
206 %<latexrelease> \xe@alloc@\xe@alloc@intercharclass
207 %<latexrelease> \XeTeXcharclass\chardef\@cclv}
209 %<latexrelease>\EndIncludeInRelease
210 %<*2ekernel|latexrelease>
211 %<latexrelease>\IncludeInRelease{2016/02/01}%
212 %<latexrelease> {\xe@alloc@intercharclass}{Start of XeTeX class allocator}%
213 \ifx\XeTeXcharclass\@undefined
215 \countdef\xe@alloc@intercharclass=257
216 \xe@alloc@intercharclass=\z@
218 %</2ekernel|latexrelease>
219 %<latexrelease>\EndIncludeInRelease
220 %<latexrelease>\IncludeInRelease{2015/01/01}%
221 %<latexrelease> {\xe@alloc@intercharclass}{Start of XeTeX class allocator}%
222 %<latexrelease> \ifx\XeTeXcharclass\@undefined
223 %<latexrelease> \else
224 %<latexrelease> \xe@alloc@intercharclass=\thr@@
226 %<latexrelease>\EndIncludeInRelease
227 %<latexrelease>\IncludeInRelease{0000/00/00}%
228 %<latexrelease> {\xe@alloc@intercharclass}{Start of XeTeX class allocator}%
229 %<latexrelease> \ifx\XeTeXcharclass\@undefined
230 %<latexrelease> \else
231 %<latexrelease> \newcount\xe@alloc@intercharclass
232 %<latexrelease> \xe@alloc@intercharclass=\thr@@
234 %<latexrelease>\EndIncludeInRelease
243 % The default values of the picture and |\fbox| parameters:
249 % The saved value of \TeX's |\maxdepth|:
251 \@maxdepth = \maxdepth
253 % |\vsize| initialized because a |\clearpage| with |\vsize < \topskip|
255 % |\@colroom| and |\@colht| also initialized because |\vsize| may be
256 % set to them if a |\clearpage| is done before the |\begin{document}|
263 % Initialise |\textheight| |\textwidth| and page style, to avoid
264 % internal errors if they are not set by the class.
265 % \changes{v0.1b}{1994/04/18}
266 % {Initialise \cs{textheight}, \cs{textwidth} and page style}
268 \textheight=.5\maxdimen
269 \textwidth=\textheight
273 % \subsection{Lccodes for hyphenation}
275 % \changes{v2.0a}{2015/01/03}{Unicode data loading added}
276 % \changes{v2.0c}{2015/01/24}{Skip T1-code entirely with Unicode engines}
277 % \changes{v2.0d}{2015/03/26}{Use renamed
278 % \texttt{unicode-letters.def}}
279 % \changes{v2.0i}{2015/12/10}{Use new common Unicode data loaders}
280 % \changes{v2.0j}{2016/01/04}{Do not set up inter character classes for
282 % \changes{v2.0l}{2016/01/05}{Correct \textsf{latexrelease} guards}
283 % \changes{v2.0l}{2016/01/05}{Ensure old definitions for inter-character
284 % class toks are available using \textsf{latexrelease}}
285 % \changes{v2.0m}{2016/01/05}{Undefine XeTeX classes when using patching
287 % \changes{v2.0l}{2016/01/05}{Missing brace}
288 % \changes{v2.0p}{2016/01/05}{Only apply XeTeX change if XeTeX is in use}
289 % For $7$- and $8$-bit engines the assumption of T1 encodings is the
290 % basis for the hyphenation patterns. That's not the case for the Unicode
291 % engines, where the assumption is engine-native working. The common
292 % loader system provides access to data from the Unicode Consortium
293 % covering not only |\lccode| but also other related data. The
294 % |\lccode| part of that at least needs to be loaded before hyphenation is
295 % tackled: Xe\TeX{} follows the standard \TeX{} route of building patterns
296 % into the format. Lua\TeX{} doesn't require this data be loaded \emph{here}
297 % but it does need to be loaded somewhere. Rather than test for the Unicode
298 % engines by name, the approach here is to look for the extended math mode
299 % handling both provide: any other engine developed in this area will
300 % presumably also provide |\Umathcode|.
303 \ifx\Umathcode\@undefined\else 1\fi
304 \ifx\XeTeXmathcode\@undefined\else 1\fi
306 \message{ Unicode character data,}
307 \input{load-unicode-data}
309 %<latexrelease>\IncludeInRelease{2016/02/01}%
310 %<latexrelease> {\XeTeXintercharclasses}{XeTeX character classes}%
311 %<latexrelease> \ifx\XeTeXinterchartoks\undefined
312 %<latexrelease> \else
313 %<latexrelease> \begingroup
314 %<latexrelease> \chardef\XeTeXcharclassID = 0 %
315 %<latexrelease> \chardef\XeTeXcharclassOP = 0 %
316 %<latexrelease> \chardef\XeTeXcharclassCL = 0 %
317 %<latexrelease> \chardef\XeTeXcharclassEX = 0 %
318 %<latexrelease> \chardef\XeTeXcharclassIS = 0 %
319 %<latexrelease> \chardef\XeTeXcharclassNS = 0 %
320 %<latexrelease> \chardef\XeTeXcharclassCM = 0 %
321 %<latexrelease> \input{load-unicode-xetex-classes}
322 %<latexrelease> \endgroup
323 %<latexrelease> \global\let\xtxHanGlue\undefined
324 %<latexrelease> \global\let\xtxHanSpace\undefined
325 %<latexrelease> \global\XeTeXinterchartoks 0 1 = {}
326 %<latexrelease> \global\XeTeXinterchartoks 0 2 = {}
327 %<latexrelease> \global\XeTeXinterchartoks 0 3 = {}
328 %<latexrelease> \global\XeTeXinterchartoks 1 0 = {}
329 %<latexrelease> \global\XeTeXinterchartoks 2 0 = {}
330 %<latexrelease> \global\XeTeXinterchartoks 3 0 = {}
331 %<latexrelease> \global\XeTeXinterchartoks 1 1 = {}
332 %<latexrelease> \global\XeTeXinterchartoks 1 2 = {}
333 %<latexrelease> \global\XeTeXinterchartoks 1 3 = {}
334 %<latexrelease> \global\XeTeXinterchartoks 2 1 = {}
335 %<latexrelease> \global\XeTeXinterchartoks 2 2 = {}
336 %<latexrelease> \global\XeTeXinterchartoks 2 3 = {}
337 %<latexrelease> \global\XeTeXinterchartoks 3 1 = {}
338 %<latexrelease> \global\XeTeXinterchartoks 3 2 = {}
339 %<latexrelease> \global\XeTeXinterchartoks 3 3 = {}
341 %<latexrelease>\EndIncludeInRelease
342 %<latexrelease>\IncludeInRelease{0000/00/00}%
343 %<latexrelease> {\XeTeXintercharclasses}{XeTeX character classes}%
344 %<latexrelease> \ifx\XeTeXinterchartoks\undefined
345 %<latexrelease> \else
346 %<latexrelease> \input{load-unicode-xetex-classes}
347 %<latexrelease> \gdef\xtxHanGlue{\hskip0pt plus 0.1em\relax}
348 %<latexrelease> \gdef\xtxHanSpace{\hskip0.2em plus 0.2em minus 0.1em\relax}
349 %<latexrelease> \global\XeTeXinterchartoks 0 1 = {\xtxHanSpace}
350 %<latexrelease> \global\XeTeXinterchartoks 0 2 = {\xtxHanSpace}
351 %<latexrelease> \global\XeTeXinterchartoks 0 3 = {\nobreak\xtxHanSpace}
352 %<latexrelease> \global\XeTeXinterchartoks 1 0 = {\xtxHanSpace}
353 %<latexrelease> \global\XeTeXinterchartoks 2 0 = {\nobreak\xtxHanSpace}
354 %<latexrelease> \global\XeTeXinterchartoks 3 0 = {\xtxHanSpace}
355 %<latexrelease> \global\XeTeXinterchartoks 1 1 = {\xtxHanGlue}
356 %<latexrelease> \global\XeTeXinterchartoks 1 2 = {\xtxHanGlue}
357 %<latexrelease> \global\XeTeXinterchartoks 1 3 = {\nobreak\xtxHanGlue}
358 %<latexrelease> \global\XeTeXinterchartoks 2 1 = {\nobreak\xtxHanGlue}
359 %<latexrelease> \global\XeTeXinterchartoks 2 2 = {\nobreak\xtxHanGlue}
360 %<latexrelease> \global\XeTeXinterchartoks 2 3 = {\xtxHanGlue}
361 %<latexrelease> \global\XeTeXinterchartoks 3 1 = {\xtxHanGlue}
362 %<latexrelease> \global\XeTeXinterchartoks 3 2 = {\xtxHanGlue}
363 %<latexrelease> \global\XeTeXinterchartoks 3 3 = {\nobreak\xtxHanGlue}
365 %<latexrelease>\EndIncludeInRelease
368 % \changes{v2.0d}{2015/02/03}{Set \cs{lccode} for \texttt{-} with Unicode
370 % There is one over-ride that makes sense here (see below for the same for
371 % $8$-bit engines): setting the lccode for |-| to itself.
373 \lccode`\- =`\- % default hyphen char
375 % The alternative is that a ``traditional'' engine is in use.
379 % \changes{v1.1b}{1998/05/20}{Set up lccodes before loading
380 % hyphenation files: pr/2639}
381 % We set things up so that hyphenation files can assume that the
382 % default (T1) lccodes are in use (at present this also sets up the
384 % We temporarily define |\reserved@a| to apply |\reserved@c| to
385 % all the numbers in the range of its arguments.
387 \def\reserved@a#1#2{%
393 \ifnum\@tempcnta>\@tempcntb\else
394 \reserved@c\@tempcnta
395 \advance\@tempcnta\@ne
396 \expandafter\reserved@b
400 % Depending on the \TeX{} version, we might not be allowed to do
401 % this for non-ASCII characters.
402 % \changes{v1.0n}{1994/06/09}{For \TeX2, do not set codes for higher
403 % half of character table.}
406 \count@=#1\advance\count@ by -"20
410 \reserved@a{`\a}{`\z}
411 \reserved@a{"A0}{"BC}
412 \reserved@a{"E0}{"FF}
414 % The upper case characters need their |\uccode| and |\lccode| values
415 % set, and their |\sfcode| set to 999.
418 \count@=#1\advance\count@ by "20
423 \reserved@a{`\A}{`\Z}
424 \reserved@a{"80}{"9C}
425 \reserved@a{"C0}{"DF}
427 % Well, it would be nice if that were correct, but unfortunately, the
428 % Cork encoding contains some odd slots whose uccode or lccode isn't
429 % quite what you'd expect.
431 \uccode`\^^Y=`\I % dotless i
432 \lccode`\^^Y=`\^^Y % dotless i
433 \uccode`\^^Z=`\J % dotless j, ae in OT1
434 \lccode`\^^Z=`\^^Z % dotless j, ae in OT1
435 \lccode`\^^9d=`\i % dotted I
436 \uccode`\^^9d=`\^^9d % dotted I
437 \lccode`\^^9e=`\^^9e % d-bar
438 \uccode`\^^9e=`\^^d0 % d-bar
440 % Finally here is one that helps hyphenation in the OT1 encoding.
441 % \changes{v1.0z}{1996/10/31}
442 % {Added extra \cs{lcode}, hoping it does no harm in T1 (pr/1969)}
444 \lccode`\^^[=`\^^[ % oe in OT1
447 % And we also set the |\lccode| of |\-| and |\textcompwordmark| so
448 % that they do not prevent hyphenation in the remainder of the word
449 % (as suggested by Lars Helstr\"om).
450 % \changes{v1.1e}{2003/10/13}
451 % {Added extra \cs{lccode} for \cs{-} and \cs{textcompwordmark}}
453 \lccode`\- =`\- % default hyphen char
454 \lccode 127=127 % alternate hyphen char
455 \lccode 23 =23 % textcompwordmark in T1
458 % End of the conditional to select either Unicode or T1 encoding defaults.
463 % This is as good a place as any to active a few Xe\TeX{}-specific
466 \ifx\XeTeXuseglyphmetrics\@undefined
468 \XeTeXuseglyphmetrics=1 %
469 \XeTeXdashbreakstate=1 %
473 % \subsection{Hyphenation}
475 % \changes{v0.1a}{1994/03/07}{move code here from lhyphen.dtx}
476 % \changes{v0.1a}{1994/03/07}
477 % {use \cs{InputIfFileExists} not \cs{IfFileExists}}
478 % \changes{v1.0x}{1995/11/01}
479 % {(DPC) Switch meaning of \cs{@addtofilelist} for cfg files}%
480 % The following code will be compiled into the format file. It checks
481 % for the existence of \texttt{hyphen.cfg} in inputs that file if
482 % found. Otherwise it inputs \texttt{hyphen.ltx}. Note that these
483 % are loaded in \emph{before} the |\catcode|s are set, so local
484 % hyphenation files can use 8-bit input.
486 % We try to load the customized hyphenation description file.
488 \InputIfFileExists{hyphen.cfg}
489 {\typeout{===========================================^^J%
490 Local configuration file hyphen.cfg used^^J%
491 ===========================================}%
492 \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%
495 \let\@addtofilelist\@gobble
498 % \begin{macro}{\l@nohyphenation}
499 % \changes{v2.0t}{2017/03/09}{ensure \cs{l@nohyphenation} is defined.}
501 \ifx\l@nohyphenation \@undefined
502 \newlanguage\l@nohyphenation
506 % \begin{macro}{\document@default@language}
507 % Default document language. -1 acts as language 0, but used as a flag in |\document|
508 % to see if it has been set in the preamble.
510 \let\document@default@language\m@ne
516 % \subsection{Font loading}
517 % Fonts loaded during the formatting process might already have
518 % changed the |\font@submax| from |0pt| to something higher.
519 % If so, we put out a bold warning.
520 % \changes{v0.1l}{1994/05/20}{Use new font warning commands}
521 % \changes{v1.1c}{2000/08/23}{Fix typo in warning}
523 \ifdim \font@submax >\z@
524 \@font@warning{Size substitutions with differences\MessageBreak
525 up to \font@submax\space have occurred.\MessageBreak
527 Please check the transcript file
528 carefully\MessageBreak
529 and redo the format generation if necessary!
531 \errhelp{Only stopped, to give you time to
532 read the above message.}
535 % We reset the macro. Otherwise every user will get a warning on
538 \def\font@submax{0pt}
542 % \subsection{Input encoding}
544 % We temporarily define |\reserved@a| to apply |\reserved@c| to all the
545 % numbers in the range of its arguments.
547 \def\reserved@a#1#2{%
553 \ifnum\@tempcnta>\@tempcntb\else
554 \reserved@c\@tempcnta
555 \advance\@tempcnta\@ne
556 \expandafter\reserved@b
560 % \changes{v0.1e}{1994/05/02}{Added setting the special catcodes.}
561 % \changes{v0.1f}{1994/05/02}{Set the catcode of control-J.}
562 % Set the special catcodes (although some of these are useless, since an
563 % error will have occurred if the catcodes have changed). Note that
564 % |^^J| has catcode `other' for use in warning messages.
583 % \changes{v0.1e}{1994/05/02}{Added setting the `other' catcodes.}
584 % Set the `other' catcodes.
586 \def\reserved@c#1{\catcode#1=12\relax}
589 \reserved@a{`\'}{`\?}
595 % \changes{v0.1e}{1994/05/02}{Added setting the `letter' catcodes.}
596 % Set the `letter' catcodes.
598 \def\reserved@c#1{\catcode#1=11\relax}
599 \reserved@a{`\A}{`\Z}
600 \reserved@a{`\a}{`\z}
602 % \changes{v0.1e}{1994/05/02}{Made slot 127 illegal}
603 % \changes{v1.0n}{1994/11/18}
604 % {re-allow slots 127--255}
605 % All the characters in the range 0--31 and 127--255 are illegal,
606 % \emph{except} tab (|^^I|), nl (|^^J|), ff (|^^L|) and cr (|^^M|).
608 % Now allow 8-bit characters, although their use in this way is
609 % strongly discouraged. See |inputenc.dtx| for a supported mechanism
612 \def\reserved@c#1{\catcode#1=15\relax}
613 \reserved@a{0}{`\^^H}
615 \reserved@a{`\^^N}{31}
618 % \subsection{Lccodes and uccodes}
620 % \changes{v1.1b}{1998/05/20}{Set up uc/lccodes after loading
621 % hyphenation files: pr/2639}
622 % We now again set up the default (T1) uc/lccodes.
623 % The lower case characters need their |\uccode| and |\lccode| values
624 % set. Some of this is a repeat of the set-up before loading
626 % Depending on the \TeX{} version, we might not be allowed to do
627 % this for non-ASCII characters.
628 % \changes{v1.0n}{1994/06/09}{For \TeX2, do not set codes for higher
629 % half of character table.}
630 % \changes{v2.0a}{2015/01/03}{Skip resetting codes with Unicode engines}
631 % For the Unicode engines (Xe\TeX{} and Lua\TeX{}) there is no need to
632 % do any of this: they use hyphenation data which does not alter any
633 % of the set up and so this entire block is skipped.
636 \ifx\Umathcode\@undefined\else 1\fi
637 \ifx\XeTeXmathcode\@undefined\else 1\fi
641 \count@=#1\advance\count@ by -"20
645 \reserved@a{`\a}{`\z}
646 \reserved@a{"A0}{"BC}
647 \reserved@a{"E0}{"FF}
649 % The upper case characters need their |\uccode| and |\lccode| values
650 % set, and their |\sfcode| set to 999.
653 \count@=#1\advance\count@ by "20
658 \reserved@a{`\A}{`\Z}
659 \reserved@a{"80}{"9C}
660 \reserved@a{"C0}{"DF}
662 % Well, it would be nice if that were correct, but unfortunately, the
663 % Cork encoding contains some odd slots whose uccode or lccode isn't
664 % quite what you'd expect.
666 \uccode`\^^Y=`\I % dotless i
667 \lccode`\^^Y=`\^^Y % dotless i
668 \uccode`\^^Z=`\J % dotless j, ae in OT1
669 \lccode`\^^Z=`\^^Z % dotless j, ae in OT1
670 \lccode`\^^9d=`\i % dotted I
671 \uccode`\^^9d=`\^^9d % dotted I
672 \lccode`\^^9e=`\^^9e % d-bar
673 \uccode`\^^9e=`\^^d0 % d-bar
675 % Finally here is one that helps hyphenation in the OT1 encoding.
676 % \changes{v1.0z}{1996/10/31}
677 % {Added extra \cs{lcode}, hoping it does no harm in T1 (pr/1969)}
679 \lccode`\^^[=`\^^[ % oe in OT1
680 \fi % End of reset block for 8-bit engines
683 % \begin{macro}{\MakeUppercase}
684 % \begin{macro}{\MakeUppercase}
685 % \begin{macro}{\@uclclist}
687 % \changes{v1.1a}{1997/10/20}{Removed \cs{aa} and \cs{AA} from
688 % \cs{@uclclist} as these are macros.}
690 % And whilst we're doing things with uc/lc tables, here are two
691 % commands to upper- and lower-case a string.
693 % \emph{Note} that this implementation is subject to change! At
694 % the moment we're not providing any way to extend the list of
695 % uc/lc commands, since finding a good interface is difficult.
696 % These commands have some nasty features, such as uppercasing
697 % mathematics, environment names, labels, etc. A much better
698 % long-term solution is to use all-caps fonts, but these aren't
699 % generally available.
701 \DeclareRobustCommand{\MakeUppercase}[1]{{%
703 \def\reserved@a##1##2{\let##1##2\reserved@a}%
704 \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
705 \protected@edef\reserved@a{\uppercase{#1}}%
708 \DeclareRobustCommand{\MakeLowercase}[1]{{%
709 \def\reserved@a##1##2{\let##2##1\reserved@a}%
710 \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
711 \protected@edef\reserved@a{\lowercase{#1}}%
714 \def\@uclclist{\oe\OE\o\O\ae\AE
715 \dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH}
717 % The above code works, but has the nasty side-effect that if you
718 % say something like:
720 % \markboth{\MakeUppercase\contentsname}
721 % {\MakeUppercase\contentsname}
723 % then the uppercasing is only done to the first letter of the
724 % contents name, since the mark expands out to:
726 % \mark{\protect\MakeUppercase Table of Contents}
727 % {\protect\MakeUppercase Table of Contents}
729 % In order to get round this, we redefine |\MakeUppercase| and
730 % |\MakeLowercase| to grab their argument and brace it. This is a
731 % very low-level hack, and is \emph{not} recommended practice!
732 % This is an instance of a general problem that makes it unsafe to
733 % grab arguments unbraced, and probably needs a more general
734 % solution. For the moment though, this hack will do:
736 \protected@edef\MakeUppercase#1{\MakeUppercase{#1}}
737 \protected@edef\MakeLowercase#1{\MakeLowercase{#1}}
743 % \changes{v1.0h}{1994/05/13}{Added output enc stuff}
744 % \changes{v1.0i}{1994/05/16}{moved output enc stuff to lfonts}
746 % \changes{v0.1a}{1994/03/07}{Add code from the old dump.dtx}
748 % \subsection{Applying Patch files}
749 % Between major releases, small patches will be distributed in
750 % files |ltpatch.ltx| which must be added at this point.
751 % \changes{v1.0m}{1994/06/08}{Add patch file system}
752 % \changes{v2.0h}{2015/06/23}
753 % {set \cs{patch@level} in ltvers rather than in ltfinal/ltpatch}
755 % Patch file code removed.
757 %\IfFileExists{ltpatch.ltx}
758 % {\typeout{=================================^^J%
759 % Applying patch file ltpatch.ltx^^J%
760 % =================================}
761 % \def\fmtversion@topatch{unknown}
762 % \input{ltpatch.ltx}
763 % \ifx\fmtversion\fmtversion@topatch
764 % \ifx\patch@level\@undefined
765 % \typeout{^^J^^J^^J%
766 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
767 % !! Patch file `ltpatch.ltx' not suitable for this^^J%
768 % !! version of LaTeX.^^J^^J%
769 % !! Please check if initex found an old patch file:^^J%
770 % !! --- if so, rename it or delete it, and redo the^^J%
772 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
776 % \changes{v1.0q}{1995/04/21}
777 % {Allow initial patch level 0}
778 % \changes{v1.0t}{1995/06/13}
779 % {Add patch level string more carefully}
780 % The code below adds the `patch level' string to the first |\typeout|
781 % in the startup banner.
783 % \def\fmtversion@topatch{0}%
784 % \ifx\fmtversion@topatch\patch@level\else
785 % \def\reserved@a\typeout##1##2\reserved@a{%
786 % \typeout{##1 patch level \patch@level}##2}
787 % \everyjob\expandafter\expandafter\expandafter{%
788 % \expandafter\reserved@a\the\everyjob\reserved@a}
789 % \let\reserved@a\relax
794 % \typeout{^^J^^J^^J%
795 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
796 % !! Patch file `ltpatch.ltx' (for version <\fmtversion@topatch>)^^J%
797 % !! is not suitable for version <\fmtversion> of LaTeX.^^J^^J%
798 % !! Please check if initex found an old patch file:^^J%
799 % !! --- if so, rename it or delete it, and redo the^^J%
801 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
804 % \let\fmtversion@topatch\relax
808 % \subsection{Freeing Memory}
810 % \begin{macro}{\reserved@a}
811 % \begin{macro}{\reserved@b}
812 % \changes{v1.0v}{1995/10/17}{reset here after the \cs{input} above}
813 % And just to make sure nobody relies on those definitions of
814 % |\reserved@b| and friends.
815 % These macros are reserved for use in the kernel. \emph{Do not use
816 % them as general scratch macros}.
818 \let\reserved@a\@filelist
819 \let\reserved@b=\@undefined
820 \let\reserved@c=\@undefined
821 \let\reserved@d=\@undefined
822 \let\reserved@e=\@undefined
823 \let\reserved@f=\@undefined
828 % \begin{macro}{\toks}
829 % \changes{v1.0y}{1996/07/10}
830 % {Free up memory from scratch registers /2213}
840 % \begin{macro}{\errhelp}
841 % \changes{v0.1g}{1994/05/05}{Set error help empty.}
842 % \changes{v1.1d}{2000/09/01}{Set error help empty at very end
843 % (pr/449 done correctly).}
844 % Empty the error help message, which may have some rubbish:
850 % \subsection{Initialise file list}
852 % \begin{macro}{\@providesfile}
853 % \changes{v1.0v}{1995/10/17}{reset macro}
854 % Initialise for use in the document. During initex a modified version
855 % has been used which leaves debugging information for |latexbug.tex|.
857 \def\@providesfile#1[#2]{%
859 \expandafter\xdef\csname ver@#1\endcsname{#2}%
864 % \begin{macro}{\@filelist}
865 % \changes{v1.0w}{1995/10/19}{Move after \cs{reserved@a} setting:-)}
866 % \begin{macro}{\@addtofilelist}
867 % Reset |\@filelist| so files input while making the format are not
868 % listed. The list built up so far may take up a lot of memory and so
869 % it is moved to |\reserved@a| where it will be overwritten as soon
870 % as almost any \LaTeX\ command is issued in a class file.
871 % However the |latexbug.tex| program will be able to access this
872 % information and insert it into a bug report.
874 \let\@filelist\@gobble
875 \def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}%
880 % \subsection{Dumping the format}
881 % Finally we make |@| into a letter, ensure the format will
882 % be in the `normal' error mode, and dump everything into the
884 % \changes{v1.0t}{1995/06/13}
885 % {Call \cs{errorstopmode}}