summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx175
1 files changed, 9 insertions, 166 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 5043d39d569..cf749116d62 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,9 +53,7 @@
%
% The modules documented in \file{source3} are designed to be used on top of
% \LaTeXe{} and are loaded all as one with the usual |\usepackage{expl3}| or
-% |\RequirePackage{expl3}| instructions. These modules will also form the
-% basis of the \LaTeX3 format, but work in this area is incomplete and not
-% included in this documentation at present.
+% |\RequirePackage{expl3}| instructions.
%
% As the modules use a coding syntax different from standard
% \LaTeXe{} it provides a few functions for setting it up.
@@ -123,43 +121,11 @@
% \section{\pkg{l3bootstrap} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
%<@@=kernel>
% \end{macrocode}
%
-% \subsection{Format-specific code}
-%
-% The very first thing to do is to bootstrap the \IniTeX{} system so
-% that everything else will actually work. \TeX{} does not start with
-% some pretty basic character codes set up.
-% \begin{macrocode}
-%<*initex>
-\catcode `\{ = 1 %
-\catcode `\} = 2 %
-\catcode `\# = 6 %
-\catcode `\^ = 7 %
-%</initex>
-% \end{macrocode}
-%
-% Tab characters should not show up in the code, but to be on the
-% safe side.
-% \begin{macrocode}
-%<*initex>
-\catcode `\^^I = 10 %
-%</initex>
-% \end{macrocode}
-%
-% For \LuaTeX{}, the extra primitives need to be enabled. This is not needed
-% in package mode: common formats have the primitives enabled.
-% \begin{macrocode}
-%<*initex>
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname directlua\endcsname\relax
-\else
- \directlua{tex.enableprimitives("", tex.extraprimitives())}%
-\fi
-%</initex>
-% \end{macrocode}
+% \subsection{\LuaTeX{}-specific code}
%
% Depending on the versions available, the \LaTeX{} format may not have
% the raw |\Umath| primitive names available. We fix that globally:
@@ -169,7 +135,6 @@
% a newer format anyway and as they all start |\U| this should be
% reasonably safe.
% \begin{macrocode}
-%<*package>
\begingroup
\expandafter\ifx\csname directlua\endcsname\relax
\else
@@ -187,7 +152,6 @@
}%
\fi
\endgroup
-%</package>
% \end{macrocode}
%
% \subsection{The \tn{pdfstrcmp} primitive in \XeTeX{}}
@@ -215,15 +179,13 @@
\ifnum\luatexversion<95 %
\else
% \end{macrocode}
-% In package mode for \LuaTeX{} we make sure the basic support is loaded:
+% For \LuaTeX{} we make sure the basic support is loaded:
% this is only necessary in plain.
% \begin{macrocode}
-%<*package>
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname newcatcodetable\endcsname\relax
\input{ltluatex}%
\fi
-%</package>
\directlua{require("expl3")}%
% \end{macrocode}
% As the user might be making a custom format, no assumption is made about
@@ -289,24 +251,6 @@
\fi
=0 %
\newlinechar`\^^J %
-%<*initex>
- \def\LineBreak{^^J}%
- \edef\next
- {%
- \errhelp
- {%
- \LongText
- For pdfTeX and XeTeX the '-etex' command-line switch is also
- needed.\LineBreak
- \LineBreak
- Format building will abort!\LineBreak
- }%
- \errmessage{\ShortText}%
- \endgroup
- \noexpand\end
- }%
-%</initex>
-%<*package>
\def\LineBreak{\noexpand\MessageBreak}%
\expandafter\ifx\csname PackageError\endcsname\relax
\def\LineBreak{^^J}%
@@ -323,18 +267,14 @@
\endgroup
\noexpand\endinput
}%
-%</package>
\fi
\next
% \end{macrocode}
%
% \subsection{Extending allocators}
%
-% In format mode, allocating registers is handled by \pkg{l3alloc}. However, in
-% package mode it's much safer to rely on more general code. For example,
-% the ability to extend \TeX{}'s allocation routine to allow for \eTeX{} has
+% The ability to extend \TeX{}'s allocation routine to allow for \eTeX{} has
% been around since 1997 in the \pkg{etex} package.
-%
% Loading this support is delayed until here as we are now sure that the
% \eTeX{} extensions and \tn{pdfstrcmp} or equivalent are available. Thus
% there is no danger of an \enquote{uncontrolled} error if the engine
@@ -353,7 +293,6 @@
% here is done using a group and \tn{ifx} test as we are not quite in the
% position to have a single name for \tn{pdfstrcmp} just yet.
% \begin{macrocode}
-%<*package>
\begingroup
\def\@tempa{LaTeX2e}%
\def\next{}%
@@ -368,98 +307,6 @@
\fi
\expandafter\endgroup
\next
-%</package>
-% \end{macrocode}
-%
-% \subsection{Character data}
-%
-% \TeX{} needs various pieces of data to be set about characters, in particular
-% which ones to treat as letters and which \tn{lccode} values apply as these
-% affect hyphenation. It makes most sense to set this and related information
-% up in one place. Whilst for \LuaTeX{} hyphenation patterns can be read
-% anywhere, other engines have to build them into the format and so we
-% \emph{must} do this set up before reading the patterns. For the Unicode
-% engines, there are shared loaders available to obtain the relevant
-% information directly from the Unicode Consortium data files. These need
-% standard (Ini)\TeX{} category codes and primitive availability and must
-% therefore loaded \emph{very} early. This has a knock-on effect on the
-% $8$-bit set up: it makes sense to do the definitions for those here as
-% well so it is all in one place.
-%
-% For \XeTeX{} and \LuaTeX{}, which are natively Unicode engines, simply
-% load the Unicode data.
-% \begin{macrocode}
-%<*initex>
-\ifdefined\Umathcode
- \input load-unicode-data %
- \input load-unicode-math-classes %
-\else
-% \end{macrocode}
-% For the $8$-bit engines a font encoding scheme must be chosen. At present,
-% this is the EC (|T1|) scheme, with the assumption that languages for which
-% this is not appropriate will be used with one of the Unicode engines.
-% \begin{macrocode}
- \begingroup
-% \end{macrocode}
-% Lower case chars: map to themselves when lower casing and down by |"20| when
-% upper casing. (The characters |a|--|z| are set up correctly by \IniTeX{}.)
-% \begin{macrocode}
- \def\temp{%
- \ifnum\count0>\count2 %
- \else
- \global\lccode\count0 = \count0 %
- \global\uccode\count0 = \numexpr\count0 - "20\relax
- \advance\count0 by 1 %
- \expandafter\temp
- \fi
- }
- \count0 = "A0 %
- \count2 = "BC %
- \temp
- \count0 = "E0 %
- \count2 = "FF %
- \temp
-% \end{macrocode}
-% Upper case chars: map up by |"20| when lower casing, to themselves when upper
-% casing and require an \tn{sfcode} of $999$. (The characters |A|--|Z| are set
-% up correctly by \IniTeX{}.)
-% \begin{macrocode}
- \def\temp{%
- \ifnum\count0>\count2 %
- \else
- \global\lccode\count0 = \numexpr\count0 + "20\relax
- \global\uccode\count0 = \count0 %
- \global\sfcode\count0 = 999 %
- \advance\count0 by 1 %
- \expandafter\temp
- \fi
- }
- \count0 = "80 %
- \count2 = "9C %
- \temp
- \count0 = "C0 %
- \count2 = "DF %
- \temp
-% \end{macrocode}
-% A few special cases where things are not as one might expect using the above
-% pattern: dotless-I, dotless-J, dotted-I and d-bar.
-% \begin{macrocode}
- \global\lccode`\^^Y = `\^^Y %
- \global\uccode`\^^Y = `\I %
- \global\lccode`\^^Z = `\^^Z %
- \global\uccode`\^^Y = `\J %
- \global\lccode"9D = `\i %
- \global\uccode"9D = "9D %
- \global\lccode"9E = "9E %
- \global\uccode"9E = "D0 %
-% \end{macrocode}
-% Allow hyphenation at a zero-width glyph (used to break up ligatures or
-% to place accents between characters).
-% \begin{macrocode}
- \global\lccode23 = 23 %
- \endgroup
-\fi
-%</initex>
% \end{macrocode}
%
% \subsection{The \LaTeX3 code environment}
@@ -470,14 +317,11 @@
% Before changing any category codes, in package mode we need to save
% the situation before loading. Note the set up here means that once applied
% \cs{ExplSyntaxOff} becomes a \enquote{do nothing} command until
-% \cs{ExplSyntaxOn} is used. For format mode, there is no need to save
-% category codes so that step is skipped.
+% \cs{ExplSyntaxOn} is used.
% \begin{macrocode}
-\protected\def\ExplSyntaxOff{}%
-%<*package>
\protected\edef\ExplSyntaxOff
{%
- \protected\def\ExplSyntaxOff{}%
+ \protected\def\noexpand\ExplSyntaxOff{}%
\catcode 9 = \the\catcode 9\relax
\catcode 32 = \the\catcode 32\relax
\catcode 34 = \the\catcode 34\relax
@@ -490,7 +334,6 @@
\endlinechar = \the\endlinechar\relax
\chardef\csname\detokenize{l_@@_expl_bool}\endcsname = 0\relax
}%
-%</package>
% \end{macrocode}
% \end{macro}
%
@@ -560,7 +403,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}