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 % \changes{v2.0t}{2017/03/09}{ensure \cs{\@nohyphenation} is defined.}
500 \ifx\l@nohyphenation \@undefined
501 \newlanguage\l@nohyphenation
507 % \subsection{Font loading}
508 % Fonts loaded during the formatting process might already have
509 % changed the |\font@submax| from |0pt| to something higher.
510 % If so, we put out a bold warning.
511 % \changes{v0.1l}{1994/05/20}{Use new font warning commands}
513 % \changes{v1.1c}{2000/08/23}{Fix typo in warning}
514 \ifdim \font@submax >\z@
515 \@font@warning{Size substitutions with differences\MessageBreak
516 up to \font@submax\space have occurred.\MessageBreak
518 Please check the transcript file
519 carefully\MessageBreak
520 and redo the format generation if necessary!
522 \errhelp{Only stopped, to give you time to
523 read the above message.}
526 % We reset the macro. Otherwise every user will get a warning on
529 \def\font@submax{0pt}
533 % \subsection{Input encoding}
535 % We temporarily define |\reserved@a| to apply |\reserved@c| to all the
536 % numbers in the range of its arguments.
538 \def\reserved@a#1#2{%
544 \ifnum\@tempcnta>\@tempcntb\else
545 \reserved@c\@tempcnta
546 \advance\@tempcnta\@ne
547 \expandafter\reserved@b
551 % \changes{v0.1e}{1994/05/02}{Added setting the special catcodes.}
552 % \changes{v0.1f}{1994/05/02}{Set the catcode of control-J.}
553 % Set the special catcodes (although some of these are useless, since an
554 % error will have occurred if the catcodes have changed). Note that
555 % |^^J| has catcode `other' for use in warning messages.
574 % \changes{v0.1e}{1994/05/02}{Added setting the `other' catcodes.}
575 % Set the `other' catcodes.
577 \def\reserved@c#1{\catcode#1=12\relax}
580 \reserved@a{`\'}{`\?}
586 % \changes{v0.1e}{1994/05/02}{Added setting the `letter' catcodes.}
587 % Set the `letter' catcodes.
589 \def\reserved@c#1{\catcode#1=11\relax}
590 \reserved@a{`\A}{`\Z}
591 \reserved@a{`\a}{`\z}
593 % \changes{v0.1e}{1994/05/02}{Made slot 127 illegal}
594 % \changes{v1.0n}{1994/11/18}
595 % {re-allow slots 127--255}
596 % All the characters in the range 0--31 and 127--255 are illegal,
597 % \emph{except} tab (|^^I|), nl (|^^J|), ff (|^^L|) and cr (|^^M|).
599 % Now allow 8-bit characters, although their use in this way is
600 % strongly discouraged. See |inputenc.dtx| for a supported mechanism
603 \def\reserved@c#1{\catcode#1=15\relax}
604 \reserved@a{0}{`\^^H}
606 \reserved@a{`\^^N}{31}
609 % \subsection{Lccodes and uccodes}
611 % \changes{v1.1b}{1998/05/20}{Set up uc/lccodes after loading
612 % hyphenation files: pr/2639}
613 % We now again set up the default (T1) uc/lccodes.
614 % The lower case characters need their |\uccode| and |\lccode| values
615 % set. Some of this is a repeat of the set-up before loading
617 % Depending on the \TeX{} version, we might not be allowed to do
618 % this for non-ASCII characters.
619 % \changes{v1.0n}{1994/06/09}{For \TeX2, do not set codes for higher
620 % half of character table.}
621 % \changes{v2.0a}{2015/01/03}{Skip resetting codes with Unicode engines}
622 % For the Unicode engines (Xe\TeX{} and Lua\TeX{}) there is no need to
623 % do any of this: they use hyphenation data which does not alter any
624 % of the set up and so this entire block is skipped.
627 \ifx\Umathcode\@undefined\else 1\fi
628 \ifx\XeTeXmathcode\@undefined\else 1\fi
632 \count@=#1\advance\count@ by -"20
636 \reserved@a{`\a}{`\z}
637 \reserved@a{"A0}{"BC}
638 \reserved@a{"E0}{"FF}
640 % The upper case characters need their |\uccode| and |\lccode| values
641 % set, and their |\sfcode| set to 999.
644 \count@=#1\advance\count@ by "20
649 \reserved@a{`\A}{`\Z}
650 \reserved@a{"80}{"9C}
651 \reserved@a{"C0}{"DF}
653 % Well, it would be nice if that were correct, but unfortunately, the
654 % Cork encoding contains some odd slots whose uccode or lccode isn't
655 % quite what you'd expect.
657 \uccode`\^^Y=`\I % dotless i
658 \lccode`\^^Y=`\^^Y % dotless i
659 \uccode`\^^Z=`\J % dotless j, ae in OT1
660 \lccode`\^^Z=`\^^Z % dotless j, ae in OT1
661 \lccode`\^^9d=`\i % dotted I
662 \uccode`\^^9d=`\^^9d % dotted I
663 \lccode`\^^9e=`\^^9e % d-bar
664 \uccode`\^^9e=`\^^d0 % d-bar
666 % Finally here is one that helps hyphenation in the OT1 encoding.
667 % \changes{v1.0z}{1996/10/31}
668 % {Added extra \cs{lcode}, hoping it does no harm in T1 (pr/1969)}
670 \lccode`\^^[=`\^^[ % oe in OT1
671 \fi % End of reset block for 8-bit engines
674 % \begin{macro}{\MakeUppercase}
675 % \begin{macro}{\MakeUppercase}
676 % \begin{macro}{\@uclclist}
678 % \changes{v1.1a}{1997/10/20}{Removed \cs{aa} and \cs{AA} from
679 % \cs{@uclclist} as these are macros.}
681 % And whilst we're doing things with uc/lc tables, here are two
682 % commands to upper- and lower-case a string.
684 % \emph{Note} that this implementation is subject to change! At
685 % the moment we're not providing any way to extend the list of
686 % uc/lc commands, since finding a good interface is difficult.
687 % These commands have some nasty features, such as uppercasing
688 % mathematics, environment names, labels, etc. A much better
689 % long-term solution is to use all-caps fonts, but these aren't
690 % generally available.
692 \DeclareRobustCommand{\MakeUppercase}[1]{{%
694 \def\reserved@a##1##2{\let##1##2\reserved@a}%
695 \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
696 \protected@edef\reserved@a{\uppercase{#1}}%
699 \DeclareRobustCommand{\MakeLowercase}[1]{{%
700 \def\reserved@a##1##2{\let##2##1\reserved@a}%
701 \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
702 \protected@edef\reserved@a{\lowercase{#1}}%
705 \def\@uclclist{\oe\OE\o\O\ae\AE
706 \dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH}
708 % The above code works, but has the nasty side-effect that if you
709 % say something like:
711 % \markboth{\MakeUppercase\contentsname}
712 % {\MakeUppercase\contentsname}
714 % then the uppercasing is only done to the first letter of the
715 % contents name, since the mark expands out to:
717 % \mark{\protect\MakeUppercase Table of Contents}
718 % {\protect\MakeUppercase Table of Contents}
720 % In order to get round this, we redefine |\MakeUppercase| and
721 % |\MakeLowercase| to grab their argument and brace it. This is a
722 % very low-level hack, and is \emph{not} recommended practice!
723 % This is an instance of a general problem that makes it unsafe to
724 % grab arguments unbraced, and probably needs a more general
725 % solution. For the moment though, this hack will do:
727 \protected@edef\MakeUppercase#1{\MakeUppercase{#1}}
728 \protected@edef\MakeLowercase#1{\MakeLowercase{#1}}
734 % \changes{v1.0h}{1994/05/13}{Added output enc stuff}
735 % \changes{v1.0i}{1994/05/16}{moved output enc stuff to lfonts}
737 % \changes{v0.1a}{1994/03/07}{Add code from the old dump.dtx}
739 % \subsection{Applying Patch files}
740 % Between major releases, small patches will be distributed in
741 % files |ltpatch.ltx| which must be added at this point.
742 % \changes{v1.0m}{1994/06/08}{Add patch file system}
743 % \changes{v2.0h}{2015/06/23}
744 % {set \cs{patch@level} in ltvers rather than in ltfinal/ltpatch}
746 % Patch file code removed.
748 %\IfFileExists{ltpatch.ltx}
749 % {\typeout{=================================^^J%
750 % Applying patch file ltpatch.ltx^^J%
751 % =================================}
752 % \def\fmtversion@topatch{unknown}
753 % \input{ltpatch.ltx}
754 % \ifx\fmtversion\fmtversion@topatch
755 % \ifx\patch@level\@undefined
756 % \typeout{^^J^^J^^J%
757 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
758 % !! Patch file `ltpatch.ltx' not suitable for this^^J%
759 % !! version of LaTeX.^^J^^J%
760 % !! Please check if initex found an old patch file:^^J%
761 % !! --- if so, rename it or delete it, and redo the^^J%
763 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
767 % \changes{v1.0q}{1995/04/21}
768 % {Allow initial patch level 0}
769 % \changes{v1.0t}{1995/06/13}
770 % {Add patch level string more carefully}
771 % The code below adds the `patch level' string to the first |\typeout|
772 % in the startup banner.
774 % \def\fmtversion@topatch{0}%
775 % \ifx\fmtversion@topatch\patch@level\else
776 % \def\reserved@a\typeout##1##2\reserved@a{%
777 % \typeout{##1 patch level \patch@level}##2}
778 % \everyjob\expandafter\expandafter\expandafter{%
779 % \expandafter\reserved@a\the\everyjob\reserved@a}
780 % \let\reserved@a\relax
785 % \typeout{^^J^^J^^J%
786 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
787 % !! Patch file `ltpatch.ltx' (for version <\fmtversion@topatch>)^^J%
788 % !! is not suitable for version <\fmtversion> of LaTeX.^^J^^J%
789 % !! Please check if initex found an old patch file:^^J%
790 % !! --- if so, rename it or delete it, and redo the^^J%
792 % !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
795 % \let\fmtversion@topatch\relax
799 % \subsection{Freeing Memory}
801 % \begin{macro}{\reserved@a}
802 % \begin{macro}{\reserved@b}
803 % \changes{v1.0v}{1995/10/17}{reset here after the \cs{input} above}
804 % And just to make sure nobody relies on those definitions of
805 % |\reserved@b| and friends.
806 % These macros are reserved for use in the kernel. \emph{Do not use
807 % them as general scratch macros}.
809 \let\reserved@a\@filelist
810 \let\reserved@b=\@undefined
811 \let\reserved@c=\@undefined
812 \let\reserved@d=\@undefined
813 \let\reserved@e=\@undefined
814 \let\reserved@f=\@undefined
819 % \begin{macro}{\toks}
820 % \changes{v1.0y}{1996/07/10}
821 % {Free up memory from scratch registers /2213}
831 % \begin{macro}{\errhelp}
832 % \changes{v0.1g}{1994/05/05}{Set error help empty.}
833 % \changes{v1.1d}{2000/09/01}{Set error help empty at very end
834 % (pr/449 done correctly).}
835 % Empty the error help message, which may have some rubbish:
841 % \subsection{Initialise file list}
843 % \begin{macro}{\@providesfile}
844 % \changes{v1.0v}{1995/10/17}{reset macro}
845 % Initialise for use in the document. During initex a modified version
846 % has been used which leaves debugging information for |latexbug.tex|.
848 \def\@providesfile#1[#2]{%
850 \expandafter\xdef\csname ver@#1\endcsname{#2}%
855 % \begin{macro}{\@filelist}
856 % \changes{v1.0w}{1995/10/19}{Move after \cs{reserved@a} setting:-)}
857 % \begin{macro}{\@addtofilelist}
858 % Reset |\@filelist| so files input while making the format are not
859 % listed. The list built up so far may take up a lot of memory and so
860 % it is moved to |\reserved@a| where it will be overwritten as soon
861 % as almost any \LaTeX\ command is issued in a class file.
862 % However the |latexbug.tex| program will be able to access this
863 % information and insert it into a bug report.
865 \let\@filelist\@gobble
866 \def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}%
871 % \subsection{Dumping the format}
872 % Finally we make |@| into a letter, ensure the format will
873 % be in the `normal' error mode, and dump everything into the
875 % \changes{v1.0t}{1995/06/13}
876 % {Call \cs{errorstopmode}}