diff options
author | Karl Berry <karl@freefriends.org> | 2015-12-20 23:00:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-12-20 23:00:54 +0000 |
commit | f4e67bebe6f832d21491cfa7ae1dfa9388899117 (patch) | |
tree | 3ecab4ba208e0c7ef72957758d26a48d8fc008b8 /Master/texmf-dist/source/latex/l3kernel | |
parent | 01185308aa1c1a77c8926a0432aeda02d7a240d9 (diff) |
l3 (20dec15)
git-svn-id: svn://tug.org/texlive/trunk@39152 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/expl3.dtx | 82 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3.ins | 17 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3basics.dtx | 3 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx | 305 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx | 222 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx | 112 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3file.dtx | 22 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3final.dtx | 187 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3format.ins | 18 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3keys.dtx | 72 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx | 97 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3names.dtx | 1682 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3str.dtx | 251 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3token.dtx | 190 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx | 924 |
15 files changed, 1910 insertions, 2274 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index dc8c1a1a777..616b5e07678 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -34,10 +34,10 @@ %% ----------------------------------------------------------------------- % %<*driver|generic|package> -\def\ExplFileName{expl3} -\def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2015/11/04} -\def\ExplFileVersion{6224} +\def\ExplFileName{expl3}% +\def\ExplFileDescription{L3 programming layer}% +\def\ExplFileDate{2015/12/20}% +\def\ExplFileVersion{6326}% %</driver|generic|package> %<*driver> \documentclass[full]{l3doc} @@ -1101,16 +1101,16 @@ % \begin{macrocode} %<*!loader> \begingroup - \def\next{\endgroup} + \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax \begingroup - \def\next{\endgroup\endgroup} + \def\next{\endgroup\endgroup}% \def\PackageError#1#2#3% {% \endgroup \errhelp{#3}% - \errmessage{#1 Error: #2!} - } + \errmessage{#1 Error: #2!}% + }% \fi \expandafter\ifx\csname ExplLoaderFileVersion\endcsname\relax \def\next @@ -1119,7 +1119,7 @@ {% You have attempted to use the expl3 code directly rather than using the correct loader. Loading of expl3 will abort. - } + }% \endgroup \endinput } @@ -1136,7 +1136,7 @@ }% \endgroup \endinput - } + }% \fi \fi \next @@ -1152,7 +1152,7 @@ {% \ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription\space - } + }% \else \expandafter\endinput \fi @@ -1170,8 +1170,8 @@ Package: \ExplFileName\space \ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription\space - (code) - } + (code)% + }% %</!loader> % \end{macrocode} % @@ -1187,7 +1187,7 @@ [% \ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription\space (loader) - ] + ]% % \end{macrocode} % % \begin{macro}[aux]{\expl@create@bool@option} @@ -1421,30 +1421,6 @@ % \end{variable} % \end{variable} % -% \begin{variable}[int]{\c__expl_def_ext_tl} -% Set up to load Unicode data for various string/text manipulations. -% As the full mechanisms are still be constructed, this requires some -% fiddling about with the \cs{ProvidesExplFile} command. A similar -% requirement applies a little later to loading the native drivers, but -% as that may not happen depending on options the same trick has to be -% repeated! -% \begin{macrocode} -\tl_const:Nn \c__expl_def_ext_tl { def } -\group_begin: -\cs_set_protected:Npn \ProvidesExplFile - { - \char_set_catcode_space:n { `\ } - \ProvidesExplFileAux - } -\cs_set_protected:Npn \ProvidesExplFileAux #1#2#3#4 - { - \group_end: - \ProvidesFile {#1} [ #2~v#3~#4 ] - } -\@onefilewithoptions { l3unicode-data } [ ] [ ] \c__expl_def_ext_tl -% \end{macrocode} -% \end{variable} -% % \begin{macro} % { % \box_rotate:Nn, @@ -1529,6 +1505,7 @@ \group_end: \ProvidesFile {#1} [ #2~v#3~#4 ] } + \tl_const:Nn \c__expl_def_ext_tl { def } \@onefilewithoptions { l3 \l__expl_driver_tl } [ ] [ ] \c__expl_def_ext_tl } % \end{macrocode} @@ -1597,12 +1574,12 @@ % not \LaTeXe{}! % \begin{macrocode} \begingroup - \def\tempa{LaTeX2e} - \def\next{} + \def\tempa{LaTeX2e}% + \def\next{}% \ifx\fmtname\tempa \def\next {% - \PackageInfo{expl3}{Switching from generic to LaTeX2e loader} + \PackageInfo{expl3}{Switching from generic to LaTeX2e loader}% % \end{macrocode} % The \cs{relax} stops \cs{RequirePackage} from scanning for a date % argument. Putting \tn{endinput} \emph{after} loading the package is @@ -1611,8 +1588,8 @@ % \file{expl3.sty} is open it is impossible to close the file % \file{expl3-generic.tex}. % \begin{macrocode} - \RequirePackage{expl3} \relax \endinput - } + \RequirePackage{expl3}\relax \endinput + }% \fi \expandafter\endgroup \next @@ -1626,7 +1603,7 @@ \else \immediate\write-1 {% - Package \ExplFileName\space Info: The package is already loaded. + Package \ExplFileName\space Info: The package is already loaded.% }% \expandafter\endinput \fi @@ -1634,10 +1611,10 @@ {% Package: \ExplFileName\space \ExplFileDate\space v\ExplFileVersion\space - \ExplFileDescription\space (loader) - } + \ExplFileDescription\space (loader)% + }% \expandafter\edef\csname ver@\ExplFileName -generic.tex\endcsname - {\ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription} + {\ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription}% % \end{macrocode} % % \begin{variable}[aux]{\l@expl@tidy@tl} @@ -1648,7 +1625,7 @@ \catcode64=\the\catcode64\relax \let\expandafter\noexpand\csname l@expl@tidy@tl\endcsname \noexpand\undefined - } + }% \catcode64=11 % % \end{macrocode} % \end{variable} @@ -1675,13 +1652,13 @@ % any existing definition is saved for restoration after the payload. % \begin{macrocode} \let\expl@AtBeginDocument\AtBeginDocument -\def\AtBeginDocument#1{} +\def\AtBeginDocument#1{}% \expandafter\def\expandafter\l@expl@tidy@tl\expandafter {% \l@expl@tidy@tl \let\AtBeginDocument\expl@AtBeginDocument \let\expl@AtBeginDocument\undefined - } + }% % \end{macrocode} % \end{macro} % \end{macro} @@ -1742,11 +1719,6 @@ { dvips } } .def \scan_stop: -% \end{macrocode} -% The same considerations apply to loading Unicode support data, so that too -% is done here. -% \begin{macrocode} -\tex_input:D l3unicode-data.def \scan_stop: \cs_undefine:N \ProvidesExplFile \cs_undefine:N \ProvidesExplFileAux % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins index 20063fa76f7..903e3595c7c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3.ins +++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins @@ -77,7 +77,7 @@ Do not distribute a modified version of this file. \from{l3color.dtx} {package} \from{l3candidates.dtx} {package} \from{l3sys.dtx} {package} - \from{l3luatex.dtx} {package} + \from{l3luatex.dtx} {package,tex} } } @@ -123,5 +123,20 @@ Do not distribute a modified version of this file. \generate{\file{l3tl.sty} {\from{l3oldmodules.dtx} {l3tl,oldmodules}}} \generate{\file{l3token.sty} {\from{l3oldmodules.dtx} {l3token,oldmodules}}} +% Lua code + +\def\MetaPrefix{--} +\preamble + +EXPERIMENTAL CODE + +Do not distribute this file without also distributing the +source files specified above. + +Do not distribute a modified version of this file. + +\endpreamble +\nopostamble +\generate{\file{expl3.lua}{\from{l3luatex.dtx}{package,lua}}} \endbatchfile diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx index 7c371c86734..3e2faf912cf 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3basics.dtx 6033 2015-09-22 19:48:51Z bruno $ +\GetIdInfo$Id: l3basics.dtx 6315 2015-11-22 22:49:22Z bruno $ {L3 Basic definitions} %</driver|package> %<*driver> @@ -2729,6 +2729,7 @@ { \__msg_kernel_error:nnxx { kernel } { bad-number-of-arguments } { \token_to_str:N #1 } { \int_eval:n {#3} } + \use_none:n } {#4} } diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx index b510b1036ce..2fddc7e68e3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx @@ -57,7 +57,7 @@ \begingroup \catcode 32 = 10 % \GetIdInfoAuxI - } + }% % \end{macrocode} % A first check for a completely empty \textsc{svn} field. If that is % not the case, there is a second case when a file created using @@ -90,7 +90,7 @@ \fi \tempa \GetIdInfoLog - } + }% % \end{macrocode} % Here, |#1| is |Id|, |#2| is the file name, |#3| is the extension, % |#4| is the version, |#5| is the check in date and |#6| is the check in @@ -119,14 +119,14 @@ }% \fi \tempa - } + }% % \end{macrocode} % Convert an \textsc{svn}-style date into a \LaTeX{}-style one. % \begin{macrocode} \csname protected\endcsname\gdef\GetIdInfoAuxIII$#1-#2-#3$% {% \def\ExplFileDate{#1/#2/#3}% - } + }% % \end{macrocode} % During loading of \pkg{expl3}, module information is added to the log. % This function gets redefined once loading is complete. @@ -138,15 +138,15 @@ L3 Module: \ExplFileName\space \ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription - } - } + }% + }% \endgroup % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} -\GetIdInfo$Id: l3bootstrap.dtx 6213 2015-10-18 09:48:17Z joseph $ - {L3 Bootstrap code} +\GetIdInfo$Id: l3bootstrap.dtx 6320 2015-12-15 09:49:47Z joseph $ + {L3 Bootstrap code}% %</driver|package> %<*driver> \documentclass[full]{l3doc} @@ -267,10 +267,10 @@ % some pretty basic character codes set up. % \begin{macrocode} %<*initex> -\catcode `\{ = 1 \relax -\catcode `\} = 2 \relax -\catcode `\# = 6 \relax -\catcode `\^ = 7 \relax +\catcode `\{ = 1\relax +\catcode `\} = 2\relax +\catcode `\# = 6\relax +\catcode `\^ = 7\relax %</initex> % \end{macrocode} % @@ -278,7 +278,7 @@ % safe side. % \begin{macrocode} %<*initex> -\catcode `\^^I = 10 \relax +\catcode `\^^I = 10\relax %</initex> % \end{macrocode} % @@ -291,7 +291,7 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname directlua\endcsname\relax \else - \directlua{tex.enableprimitives("", tex.extraprimitives())} + \directlua{tex.enableprimitives("", tex.extraprimitives())}% \fi %</initex> % \end{macrocode} @@ -325,7 +325,7 @@ %</package> % \end{macrocode} % -% \subsection{The \tn{pdfstrcmp} primitive with \XeTeX{} and \LuaTeX{}} +% \subsection{The \tn{pdfstrcmp} primitive in \XeTeX{}} % % Only \pdfTeX{} has a primitive called \tn{pdfstrcmp}. The \XeTeX{} % version is just \tn{strcmp}, so there is some shuffling to do. As @@ -337,149 +337,74 @@ \fi % \end{macrocode} % -% If \LuaTeX{} is in use then no primitive \tn{pdfstrcmp} is available. -% However, it can be emulated using some Lua code. In earlier versions of -% the code, the \pkg{pdftexcmds} package was loaded to do this task. However, -% that raises some issues in \enquote{generic} (it fails with Con\TeX{}t -% MkIV), and also adds a hardly-needed dependency. Note that \LuaTeX{} -% prior to version $0.36$ is not supported by \pkg{expl3}: here that means -% simply skipping the definition, which will then be picked up later. This -% definition may need to be done twice: one \enquote{now} and once at the -% start of every job. The latter can occur in package mode if for example a -% custom format is being constructed. To achieve this while not requiring a -% separate file, the Lua code is saved into a macro then used twice. -% (In the long term, the Lua code here may be best moved to a separate -% file.) -% -% No macro definition is given just yet: that is left until \pkg{l3basics}. +% \subsection{Loading support \Lua{} code} +% +% When \LuaTeX{} is used there are various pieces of \Lua{} code which need to +% be loaded. The code itself is defined in \pkg{l3luatex} and is extracted into +% a separate file. Thus here the task is to load the \Lua{} code both now and +% (if required) at the start of each job. % \begin{macrocode} -\begingroup - \expandafter\ifx\csname directlua\endcsname\relax +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname directlua\endcsname\relax +\else + \ifnum\luatexversion<70 % \else - \ifnum\luatexversion<36 % - \else - \catcode`\_=11 % - \catcode`\:=11 % - \def\tempa - {% - l3kernel = l3kernel or { } - function l3kernel.strcmp(A, B) - if A == B then - tex.write("0") - elseif A < B then - tex.write("-1") - else - tex.write("1") - end - end - } - \directlua{\tempa} % \end{macrocode} -% A test for \LuaTeX{} in Ini\TeX{} mode. +% In package mode a category code table is needed: either use a pre-loaded +% allocator or provide one using the \LaTeXe{}-based generic code. In format +% mode the table used here can be hard-coded into the \Lua{}. % \begin{macrocode} - \ifnum 0% - \directlua - {% - if status.ini_version then - tex.write("1") - end - }>0 % - \global\everyjob\expandafter - {% - \the\expandafter\everyjob - \expandafter\lua_now_x:n\expandafter{\tempa}% - } - \fi +%<*package> + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname newcatcodetable\endcsname\relax + \input{ltluatex}% \fi - \fi -\endgroup + \newcatcodetable\ucharcat@table + \directlua{ + l3kernel = l3kernel or { } + local charcat_table = \number\ucharcat@table + l3kernel.charcat_table = charcat_table + }% +%</package> + \directlua{require("expl3")}% % \end{macrocode} -% -% \subsection{Emulating \tn{Ucharchar} in \LuaTeX{}} -% -% Expandably creating character tokens can be done in macros but for the -% full Unicode range requires engine support in practical terms. That is -% available in \XeTeX{} as \tn{Ucharcat} but in \LuaTeX{} some Lua code -% is required. That is set up here, following the model above. Note that -% we do not try to emulate the syntax of the primitive (doable with \LuaTeX{} -% 0.80 or later, but not required by our use case). -% -% One minor wrinkle is that a catcode table is needed to return values. -% For format mode, long-term we can simply take an arbitrary one and make -% sure this is never allocated. In package mode use the same approach -% (and table) as \pkg{ucharcat}: look for an allocator and use it if available, -% or use a table unlikely to clash with any other use. We use the same table -% as \pkg{ucharcat} but as this is \enquote{disposable} we are safe. +% As the user might be making a custom format, no assumption is made about +% matching package mode with only loading the \Lua{} code once. Instead, a +% query to \Lua{} will reveal what mode is in operation. % \begin{macrocode} -\begingroup - \expandafter\ifx\csname directlua\endcsname\relax - \else - \ifnum\luatexversion<70 % - \else -%<*initex> - % TEMP - \catcode`\@=11 % - \chardef\ucharcat@table="8000 % -%</initex> -%<*package> - \begingroup\expandafter\expandafter\expandafter\endgroup - \expandafter\ifx\csname newcatcodetable\endcsname\relax - \directlua{tex.enableprimitives("",{"initcatcodetable"})} - \chardef\ucharcat@table"7000 % - \initcatcodetable\ucharcat@table - \else - \newcatcodetable\ucharcat@table - \fi -%</package> - \catcode`\_=11 % - \catcode`\:=11 % - \def\tempa - {% - l3kernel = l3kernel or { } - local utf8_char = unicode.utf8.char - function l3kernel.charcat(charcode, catcode) - tex.setcatcode(\number\ucharcat@table, charcode, catcode) - tex.sprint(\number\ucharcat@table, utf8_char(charcode)) - end - } - \directlua{\tempa} - \ifnum 0% - \directlua - {% - if status.ini_version then - tex.write("1") - end - }>0 % - \global\everyjob\expandafter - {% - \the\expandafter\everyjob - \expandafter\lua_now_x:n\expandafter{\tempa}% - } - \fi + \ifnum 0% + \directlua{ + if status.ini_version then + tex.write("1") + end + }>0 % + \everyjob\expandafter{% + \the\expandafter\everyjob + \csname\detokenize{lua_now_x:n}\endcsname{require("expl3")}% + }% \fi \fi -\endgroup +\fi % \end{macrocode} % % \subsection{Engine requirements} % -% The code currently requires functionality equivalent to \tn{pdfstrcmp} -% in addition to \eTeX{}. This is picked up by testing for the \tn{pdfstrcmp} -% primitive or a version of \LuaTeX{} capable of emulating it. +% The code currently requires \eTeX{} and functionality equivalent to +% \tn{pdfstrcmp}, and also driver and Unicode character support. This is +% available in a reasonably-wide range of engines. % \begin{macrocode} \begingroup \def\next{\endgroup}% \def\ShortText{Required primitives not found}% \def\LongText% {% - LaTeX3 requires the e-TeX primitives and \string\pdfstrcmp.\LineBreak - Direct PDF production also requires additional primitives listed in the - README.\LineBreak + LaTeX3 requires the e-TeX primitives and additional functionality as + described in the README file. \LineBreak These are available in the engines\LineBreak - pdfTeX v1.40\LineBreak - XeTeX v0.9994\LineBreak - - LuaTeX v0.40\LineBreak + - LuaTeX v0.70\LineBreak - e-(u)pTeX mid-2012\LineBreak or later.\LineBreak \LineBreak @@ -523,7 +448,7 @@ \def\PackageError#1#2#3% {% \errhelp{#3}% - \errmessage{#1 Error: #2} + \errmessage{#1 Error: #2}% }% \fi \edef\next @@ -565,15 +490,15 @@ % \begin{macrocode} %<*package> \begingroup - \def\@tempa{LaTeX2e} - \def\next{} + \def\@tempa{LaTeX2e}% + \def\next{}% \ifx\fmtname\@tempa \expandafter\ifx\csname extrafloats\endcsname\relax \def\next {% \RequirePackage{etex}% \csname reserveinserts\endcsname{32}% - } + }% \fi \fi \expandafter\endgroup @@ -581,6 +506,102 @@ %</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 irectly from the Unicode Consortium data files. These need +% standard (Ini)\TeX{} category codes and primitive availablity 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 defintions 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 % +\else +% \end{macrocode} +% For the $8$-bit engines an 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 Ini\TeX{}.) +% \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 Ini\TeX{}.) +% \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 +% \end{macrocode} +% In all cases it makes sense to set up |-| to map to itself: this allows +% hyphenation of the rest of a word following it (suggested by +% Lars Helstr\"om). +% \begin{macrocode} +\global\lccode`\-=`\- % +%</initex> +% \end{macrocode} +% % \subsection{The \LaTeX3 code environment} % % The code environment is now set up. @@ -592,7 +613,7 @@ % \cs{ExplSyntaxOn} is used. For format mode, there is no need to save % category codes so that step is skipped. % \begin{macrocode} -\protected\def\ExplSyntaxOff{} +\protected\def\ExplSyntaxOff{}% %<*package> \protected\edef\ExplSyntaxOff {% @@ -608,7 +629,7 @@ \catcode 126 = \the\catcode 126\relax \endlinechar = \the\endlinechar\relax \chardef\csname\detokenize{l__kernel_expl_bool}\endcsname = 0\relax - } + }% %</package> % \end{macrocode} % \end{macro} @@ -630,7 +651,7 @@ % \begin{variable}{\l__kernel_expl_bool} % The status for experimental code syntax: this is on at present. % \begin{macrocode} -\chardef\l__kernel_expl_bool = 1 ~ +\chardef\l__kernel_expl_bool = 1\relax % \end{macrocode} %\end{variable} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx index 7e752aadf43..9a19df41122 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx @@ -38,7 +38,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3candidates.dtx 6216 2015-11-01 23:32:43Z bruno $ +\GetIdInfo$Id: l3candidates.dtx 6325 2015-12-20 18:07:35Z joseph $ {L3 Experimental additions to l3kernel} %</driver|package> %<*driver> @@ -576,15 +576,15 @@ % % \section{Additions to \pkg{l3prg}} % -% Minimal (lazy) evaluation can be obtained using the functions -% \cs{bool_all_p:n}, \cs{bool_and_p:nn}, \cs{bool_any_p:n}, or -% \cs{bool_or_p:nn}, which only evaluate their boolean expression +% Minimal (lazy) evaluation can be obtained using the conditionals +% \cs{bool_lazy_all:nTF}, \cs{bool_lazy_and:nnTF}, \cs{bool_lazy_any:nTF}, or +% \cs{bool_lazy_or:nnTF}, which only evaluate their boolean expression % arguments when they are needed to determine the resulting truth % value. For example, when evaluating the boolean expression % \begin{verbatim} -% \bool_and_p:nn +% \bool_lazy_and_p:nn % { -% \bool_any_p:n +% \bool_lazy_any_p:n % { % { \int_compare_p:n { 2 = 3 } } % { \int_compare_p:n { 4 <= 4 } } @@ -594,58 +594,62 @@ % { ! \int_compare_p:n { 2 = 4 } } % \end{verbatim} % the line marked with |is skipped| is not expanded because the result -% of \cs{bool_any_p:n} is known once the second boolean expression is +% of \cs{bool_lazy_any_p:n} is known once the second boolean expression is % found to be logically \texttt{true}. On the other hand, the last % line is expanded because its logical value is needed to determine the -% result of \cs{bool_and_p:nn}. +% result of \cs{bool_lazy_and_p:nn}. % -% \begin{function}[EXP, added = 2015-09-28]{\bool_all_p:n} +% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_all:n} % \begin{syntax} -% \cs{bool_all_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} +% \cs{bool_lazy_all_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} +% \cs{bool_lazy_all:nTF} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} \Arg{true code} \Arg{false code} % \end{syntax} % Implements the \enquote{And} operation on the \meta{boolean % expressions}, hence is \texttt{true} if all of them are % \texttt{true} and \texttt{false} if any of them is \texttt{false}. % Contrarily to the infix operator |&&|, only the \meta{boolean % expressions} which are needed to determine the result of -% \cs{bool_all_p:n} will be evaluated. See also \cs{bool_and_p:nn} +% \cs{bool_lazy_all:nTF} will be evaluated. See also \cs{bool_lazy_and:nnTF} % when there are only two \meta{boolean expressions}. % \end{function} % -% \begin{function}[EXP, added = 2015-09-28]{\bool_and_p:nn} +% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_and:nn} % \begin{syntax} -% \cs{bool_and_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2} +% \cs{bool_lazy_and_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2} +% \cs{bool_lazy_and:nnTF} \Arg{boolexpr_1} \Arg{boolexpr_2} \Arg{true code} \Arg{false code} % \end{syntax} % Implements the \enquote{And} operation between two boolean % expressions, hence is \texttt{true} if both are \texttt{true}. % Contrarily to the infix operator |&&|, the \meta{boolexpr_2} will % only be evaluated if it is needed to determine the result of -% \cs{bool_and_p:nn}. See also \cs{bool_all_p:n} when there are more +% \cs{bool_lazy_and:nnTF}. See also \cs{bool_lazy_all:nTF} when there are more % than two \meta{boolean expressions}. % \end{function} % -% \begin{function}[EXP, added = 2015-09-28]{\bool_any_p:n} +% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_any:n} % \begin{syntax} -% \cs{bool_any_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} +% \cs{bool_lazy_any_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} +% \cs{bool_lazy_any:nTF} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} \Arg{true code} \Arg{false code} % \end{syntax} % Implements the \enquote{Or} operation on the \meta{boolean % expressions}, hence is \texttt{true} if any of them is % \texttt{true} and \texttt{false} if all of them are \texttt{false}. % Contrarily to the infix operator \verb"||", only the \meta{boolean % expressions} which are needed to determine the result of -% \cs{bool_any_p:n} will be evaluated. See also \cs{bool_or_p:nn} +% \cs{bool_lazy_any:nTF} will be evaluated. See also \cs{bool_lazy_or:nnTF} % when there are only two \meta{boolean expressions}. % \end{function} % -% \begin{function}[EXP, added = 2015-09-28]{\bool_or_p:nn} +% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_or:nn} % \begin{syntax} -% \cs{bool_or_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2} +% \cs{bool_lazy_or_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2} +% \cs{bool_lazy_or:nnTF} \Arg{boolexpr_1} \Arg{boolexpr_2} \Arg{true code} \Arg{false code} % \end{syntax} % Implements the \enquote{Or} operation between two boolean % expressions, hence is \texttt{true} if either one is \texttt{true}. % Contrarily to the infix operator \verb"||", the \meta{boolexpr_2} % will only be evaluated if it is needed to determine the result of -% \cs{bool_or_p:nn}. See also \cs{bool_any_p:n} when there are more +% \cs{bool_lazy_or:nnTF}. See also \cs{bool_lazy_any:nTF} when there are more % than two \meta{boolean expressions}. % \end{function} % @@ -1085,8 +1089,11 @@ % % \section{Additions to \pkg{l3tokens}} % -% \begin{function}[updated = 2015-09-01] -% {\char_set_active_eq:NN, \char_gset_active_eq:NN} +% \begin{function}[updated = 2015-11-12] +% { +% \char_set_active_eq:NN, \char_set_active_eq:Nc, +% \char_gset_active_eq:NN, \char_gset_active_eq:Nc +% } % \begin{syntax} % \cs{char_set_active_eq:NN} \meta{char} \meta{function} % \end{syntax} @@ -1097,8 +1104,11 @@ % be an active character. % \end{function} % -% \begin{function}[added = 2015-09-02] -% {\char_set_active_eq:nN, \char_gset_active_eq:nN} +% \begin{function}[added = 2015-11-12] +% { +% \char_set_active_eq:nN, \char_set_active_eq:nc +% \char_gset_active_eq:nN, \char_gset_active_eq:nc +% } % \begin{syntax} % \cs{char_set_active_eq:nN} \Arg{integer expression} \meta{function} % \end{syntax} @@ -2557,57 +2567,65 @@ %<@@=bool> % \end{macrocode} % -% \begin{macro}{\bool_all_p:n} -% \begin{macro}[aux]{\@@_all_aux:n} +% \begin{macro}[pTF]{\bool_lazy_all:n} +% \begin{macro}[aux]{\@@_lazy_all:n} % Go through the list of expressions, stopping whenever an expression % is \texttt{false}. If the end is reached without finding any % \texttt{false} expression, then the result is \texttt{true}. % \begin{macrocode} -\cs_new:Npn \bool_all_p:n #1 - { \@@_all_aux:n #1 \q_recursion_tail \q_recursion_stop } -\cs_new:Npn \@@_all_aux:n #1 +\prg_new_conditional:Npnn \bool_lazy_all:n #1 { p , T , F , TF } + { \@@_lazy_all:n #1 \q_recursion_tail \q_recursion_stop } +\cs_new:Npn \@@_lazy_all:n #1 { - \quark_if_recursion_tail_stop_do:nn {#1} { \c_true_bool } + \quark_if_recursion_tail_stop_do:nn {#1} { \prg_return_true: } \bool_if:nF {#1} - { \use_i_delimit_by_q_recursion_stop:nw { \c_false_bool } } - \@@_all_aux:n + { \use_i_delimit_by_q_recursion_stop:nw { \prg_return_false: } } + \@@_lazy_all:n } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\bool_and_p:nn} +% \begin{macro}[pTF]{\bool_lazy_and:nn} % Only evaluate the second expression if the first is \texttt{true}. % \begin{macrocode} -\cs_new:Npn \bool_and_p:nn #1#2 - { \bool_if:nTF {#1} { \bool_if_p:n {#2} } { \c_false_bool } } +\prg_new_conditional:Npnn \bool_lazy_and:nn #1#2 { p , T , F , TF } + { + \bool_if:nTF {#1} + { \bool_if:nTF {#2} { \prg_return_true: } { \prg_return_false: } } + { \prg_return_false: } + } % \end{macrocode} % \end{macro} % -% \begin{macro}{\bool_any_p:n} -% \begin{macro}[aux]{\@@_any_aux:n} +% \begin{macro}[pTF]{\bool_lazy_any:n} +% \begin{macro}[aux]{\@@_lazy_any:n} % Go through the list of expressions, stopping whenever an expression % is \texttt{true}. If the end is reached without finding any % \texttt{true} expression, then the result is \texttt{false}. % \begin{macrocode} -\cs_new:Npn \bool_any_p:n #1 - { \@@_any_aux:n #1 \q_recursion_tail \q_recursion_stop } -\cs_new:Npn \@@_any_aux:n #1 +\prg_new_conditional:Npnn \bool_lazy_any:n #1 { p , T , F , TF } + { \@@_lazy_any:n #1 \q_recursion_tail \q_recursion_stop } +\cs_new:Npn \@@_lazy_any:n #1 { - \quark_if_recursion_tail_stop_do:nn {#1} { \c_false_bool } + \quark_if_recursion_tail_stop_do:nn {#1} { \prg_return_false: } \bool_if:nT {#1} - { \use_i_delimit_by_q_recursion_stop:nw { \c_true_bool } } - \@@_any_aux:n + { \use_i_delimit_by_q_recursion_stop:nw { \prg_return_true: } } + \@@_lazy_any:n } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\bool_or_p:nn} +% \begin{macro}[pTF]{\bool_lazy_or:nn} % Only evaluate the second expression if the first is \texttt{false}. % \begin{macrocode} -\cs_new:Npn \bool_or_p:nn #1#2 - { \bool_if:nTF {#1} { \c_true_bool } { \bool_if_p:n {#2} } } +\prg_new_conditional:Npnn \bool_lazy_or:nn #1#2 { p , T , F , TF } + { + \bool_if:nTF {#1} + { \prg_return_true: } + { \bool_if:nTF {#2} { \prg_return_true: } { \prg_return_false: } } + } % \end{macrocode} % \end{macro} % @@ -3013,7 +3031,7 @@ % The mechanisms needed for case changing are somewhat involved, particularly % to allow for all of the special cases. These functions also require the % appropriate data extracted from the Unicode documentation (either manually -% or automatically), which is covered by \pkg{l3unicode-data}. +% or automatically). % % \begin{macro}[EXP]{\tl_if_head_eq_catcode:oNTF} % Extra variants. @@ -3061,8 +3079,10 @@ % \begin{macro}[aux, EXP]{\@@_change_case_math_space:wNNnn} % \begin{macro}[aux, EXP]{\@@_change_case_N_type:Nnnn} % \begin{macro}[aux, EXP]{\@@_change_case_char:Nnn} -% \begin{macro}[aux, EXP]{\@@_change_case_char:Nn} -% \begin{macro}[aux, EXP]{\@@_change_case_char:NNNNNNNNn} +% \begin{macro}[aux, EXP]{\@@_change_case_char:nN} +% \begin{macro}[aux, EXP]{\@@_change_case_char_aux:nN} +% \begin{macro}[aux] +% {\@@_lookup_lower:N, \@@_lookup_upper:N, \@@_lookup_title:N} % \begin{macro}[aux, EXP]{\@@_change_case_cs:Nnnn} % \begin{macro}[aux, EXP]{\@@_change_case_cs:nNnnn} % \begin{macro}[aux, EXP]{\@@_change_case_cs_three:NNNw} @@ -3277,26 +3297,34 @@ #1 { \use:c { @@_change_case_ #2 _ sigma:Nnw } #1 - { \@@_change_case_char:Nn #1 {#2} } + { \@@_change_case_char:nN {#2} #1 } } } -\cs_new:Npn \@@_change_case_char:Nn #1#2 +\cs_new:Npn \@@_change_case_char:nN #1#2 { \@@_change_case_output:fwn { - \str_case:nvF #1 { c__unicode_ #2 _exceptions_tl } + \cs_if_exist:cTF { c__unicode_ #1 _ #2 _tl } + { \tl_use:c { c__unicode_ #1 _ #2 _tl } } + { \@@_change_case_char_aux:nN {#1} #2 } + } + } +\cs_if_exist:NTF \utex_char:D + { + \cs_new:Npn \@@_change_case_char_aux:nN #1#2 + { + \int_compare:nNnTF { \use:c { @@_lookup_ #1 :N } #2 } = { 0 } + { \exp_stop_f: #2 } { - \exp_after:wN \@@_change_case_char:NNNNNNNNn - \int_use:N \__int_eval:w 1000000 + `#1 \__int_eval_end: - #1 {#2} + \utex_char:D \use:c { @@_lookup_ #1 :N } #2 } } + \cs_new_protected:Npn \@@_lookup_lower:N #1 { \tex_lccode:D `#1 } + \cs_new_protected:Npn \@@_lookup_upper:N #1 { \tex_uccode:D `#1 } + \cs_new_eq:NN \@@_lookup_title:N \@@_lookup_upper:N } -\cs_new:Npn \@@_change_case_char:NNNNNNNNn #1#2#3#4#5#6#7#8#9 { - \str_case:nvF #8 - { c__unicode_ #9 _ #6 _X_ #7 _tl } - { \exp_stop_f: #8 } + \cs_new:Npn \@@_change_case_char_aux:nN #1#2 { \exp_stop_f: #2 } } % \end{macrocode} % If a control sequence has been given as the argument and it is not on @@ -3489,6 +3517,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:Nnw} % \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:w} @@ -3775,6 +3804,53 @@ % \end{macrocode} % \end{macro} % +% \begin{variable} +% { +% \c__unicode_std_sigma_tl , +% \c__unicode_final_sigma_tl , +% \c__unicode_accents_lt_tl , +% \c__unicode_dot_above_tl , +% \c__unicode_dotless_i_tl , +% \c__unicode_dotted_I_tl , +% \c__unicode_i_ogonek_tl , +% \c__unicode_I_ogonek_tl , +% \c__unicode_upper_Eszett_tl +% } +% \begin{macrocode} +\cs_if_exist:NTF \utex_char:D + { + \tl_const:Nx \c__unicode_std_sigma_tl { \utex_char:D "03C3 ~ } + \tl_const:Nx \c__unicode_final_sigma_tl { \utex_char:D "03C2 ~ } + \tl_const:Nx \c__unicode_accents_lt_tl + { + \utex_char:D "00CC ~ + { \utex_char:D "0069 ~ \utex_char:D "0307 ~ \utex_char:D "0300 ~ } + \utex_char:D "00CD ~ + { \utex_char:D "0069 ~ \utex_char:D "0307 ~ \utex_char:D "0301 ~ } + \utex_char:D "0128 ~ + { \utex_char:D "0069 ~ \utex_char:D "0307 ~ \utex_char:D "0303 ~ } + } + \tl_const:Nx \c__unicode_dot_above_tl { \utex_char:D "0307 ~ } + \tl_const:Nx \c__unicode_dotless_i_tl { \utex_char:D "0131 ~ } + \tl_const:Nx \c__unicode_dotted_I_tl { \utex_char:D "0130 ~ } + \tl_const:Nx \c__unicode_i_ogonek_tl { \utex_char:D "012F ~ } + \tl_const:Nx \c__unicode_I_ogonek_tl { \utex_char:D "012E ~ } + \tl_const:Nx \c__unicode_upper_Eszett_tl { \utex_char:D "1E9E ~} + } + { + \tl_const:Nn \c__unicode_std_sigma_tl { } + \tl_const:Nn \c__unicode_final_sigma_tl { } + \tl_const:Nn \c__unicode_accents_lt_tl { } + \tl_const:Nn \c__unicode_dot_above_tl { } + \tl_const:Nn \c__unicode_dotless_i_tl { I } + \tl_const:Nn \c__unicode_dotted_I_tl { i } + \tl_const:Nn \c__unicode_i_ogonek_tl { } + \tl_const:Nn \c__unicode_I_ogonek_tl { } + \tl_const:Nn \c__unicode_upper_Eszett_tl { } + } +% \end{macrocode} +% \end{variable} +% % \begin{macro}[aux, EXP]{\@@_mixed_case:nn} % \begin{macro}[aux, EXP]{\@@_mixed_case_aux:nn} % \begin{macro}[aux, EXP]{\@@_mixed_case_loop:wn} @@ -3783,7 +3859,7 @@ % \begin{macro}[aux, EXP]{\@@_mixed_case_N_type:Nwn} % \begin{macro}[aux, EXP]{\@@_mixed_case_N_type:NNNnn} % \begin{macro}[aux, EXP]{\@@_mixed_case_N_type:Nnn} -% \begin{macro}[aux, EXP]{\@@_mixed_case_char:Nn} +% \begin{macro}[aux, EXP]{\@@_mixed_case_char:N} % \begin{macro}[aux, EXP]{\@@_mixed_case_skip:N} % \begin{macro}[aux, EXP]{\@@_mixed_case_skip:NN} % \begin{macro}[aux, EXP]{\@@_mixed_case_skip_tidy:Nwn} @@ -3926,11 +4002,7 @@ \cs_new:Npn \@@_mixed_case_skip:NN #1#2 { \quark_if_recursion_tail_stop_do:nn {#2} - { - \exp_args:Nf \@@_mixed_case_char:nN - { \str_case:nVF #1 \c__unicode_mixed_exceptions_tl \exp_stop_f: } - #1 - } + { \@@_mixed_case_char:N #1 } \int_compare:nNnT { `#1 } = { `#2 } { \use_i_delimit_by_q_recursion_stop:nw @@ -3945,11 +4017,14 @@ { \@@_mixed_case_loop:wn #2 \q_recursion_stop } -\cs_new:Npn \@@_mixed_case_char:nN #1#2 +\cs_new:Npn \@@_mixed_case_char:N #1 { - \tl_if_blank:nTF {#1} - { \@@_change_case_char:Nn #2 { upper } } - { \@@_change_case_output:nwn {#1} } + \cs_if_exist:cTF { c__unicode_title_ #1 _tl } + { + \@@_change_case_output:fwn + { \tl_use:c { c__unicode_title_ #1 _tl } } + } + { \@@_change_case_char:nN { upper } #1 } } % \end{macrocode} % \end{macro} @@ -4367,7 +4442,9 @@ % \begin{macro} % {^^A % \char_set_active_eq:NN, \char_gset_active_eq:NN, -% \char_set_active_eq:nN, \char_gset_active_eq:nN +% \char_set_active_eq:Nc, \char_gset_active_eq:Nc, +% \char_set_active_eq:nN, \char_gset_active_eq:nN, +% \char_set_active_eq:nc, \char_gset_active_eq:nc % } % Four simple functions with very similar definitions, so set up using % an auxiliary. @@ -4389,6 +4466,10 @@ \@@_tmp:nN { char_set_active_eq } \cs_set_eq:NN \@@_tmp:nN { char_gset_active_eq } \cs_gset_eq:NN \group_end: +\cs_generate_variant:Nn \char_set_active_eq:NN { Nc } +\cs_generate_variant:Nn \char_gset_active_eq:NN { Nc } +\cs_generate_variant:Nn \char_set_active_eq:nN { nc } +\cs_generate_variant:Nn \char_gset_active_eq:nN { nc } % \end{macrocode} % \end{macro} % @@ -4464,6 +4545,7 @@ % \begin{macrocode} \group_begin: %<*package> + \char_set_catcode_active:N \^^L \cs_set_nopar:Npn ^^L { } %</package> \char_set_catcode_other:n { 0 } diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index 2d508e31a05..a18533f82c7 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx @@ -38,7 +38,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3drivers.dtx 6213 2015-10-18 09:48:17Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6281 2015-11-17 07:11:52Z joseph $ {L3 Experimental drivers} %</driver|package> %<*driver> @@ -206,13 +206,23 @@ % \begin{macrocode} %<*initex> %<*pdfmode> -\pdftex_pdfhorigin:D = 1 true in \scan_stop: -\pdftex_pdfvorigin:D = 1 true in \scan_stop: -\pdftex_pdfdecimaldigits:D = 3 \scan_stop: -\pdftex_pdfpkresolution:D = 600 \scan_stop: -\pdftex_pdfminorversion:D = 5 \scan_stop: -\pdftex_pdfcompresslevel:D = 9 \scan_stop: -\pdftex_pdfobjcompresslevel:D = 2 \scan_stop: +\group_begin: + \cs_set_proteced:Npx \@@_tmp:w #1 = + { + \tex_global:D + \cs_if_exist:NTF \luatex_pdfvariable:D + { \exp_not:N \luatex_pdfvariable:D #1 } + { \exp_not:c { pdftex_pdf #1 :D } } + = + } + \@@_tmp:w horigin = 1 true in \scan_stop: + \@@_tmp:w vorigin = 1 true in \scan_stop: + \@@_tmp:w decimaldigits = 3 \scan_stop: + \@@_tmp:w pkresolution = 600 \scan_stop: + \@@_tmp:w minorversion = 5 \scan_stop: + \@@_tmp:w compresslevel = 9 \scan_stop: + \@@_tmp:w objcompresslevel = 2 \scan_stop: +\group_end: %</pdfmode> %</initex> % \end{macrocode} @@ -226,9 +236,10 @@ % that here and later, the \texttt{dvipdfmx} documentation does not cover % the |literal| key word but that this appears to behave in the same way as % \pdfTeX{}'s \tn{pdfliteral} (making life easier all-round). For \pdfTeX{} -% and \LuaTeX{} giving direct PDF output there is a dedicated primitive. +% in direct PDF output mode there is a dedicated primitive. \LuaTeX{} is +% almost the same but with newer versions there is a compatibly step % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_state_save: +\cs_new_protected_nopar:Npx \@@_state_save: %<*dvips> { \tex_special:D { ps:gsave } } %</dvips> @@ -236,9 +247,13 @@ { \tex_special:D { pdf:literal~q } } %</dvipdfmx|xdvipdfmx> %<*pdfmode> - { \pdftex_pdfsave:D } + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D save \scan_stop: } + { \pdftex_pdfsave:D } + } %</pdfmode> -\cs_new_protected_nopar:Npn \@@_state_restore: +\cs_new_protected_nopar:Npx \@@_state_restore: %<*dvips> { \tex_special:D { ps:grestore } } %</dvips> @@ -246,7 +261,11 @@ { \tex_special:D { pdf:literal~Q } } %</dvipdfmx|xdvipdfmx> %<*pdfmode> - { \pdftex_pdfrestore:D } + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D restore \scan_stop: } + { \pdftex_pdfrestore:D } + } %</pdfmode> % \end{macrocode} % \end{macro} @@ -259,7 +278,7 @@ % be driver-specific. Note that these functions set the transformation matrix % to the current position: contrast with \cs{@@_literal_direct:n}. % \begin{macrocode} -\cs_new_protected:Npn \@@_literal:n #1 +\cs_new_protected:Npx \@@_literal:n #1 %<*dvipdfmx|xdvipdfmx> { \tex_special:D { pdf:literal~ #1 } } %</dvipdfmx|xdvipdfmx> @@ -283,26 +302,12 @@ } %</dvips> %<*pdfmode> - { \pdftex_pdfliteral:D {#1} } -%</pdfmode> -% \end{macrocode} -% \end{macro} -% -% \begin{macro}[int]{\@@_literal_direct:n} -% Even \enquote{lower level} than \cs{@@_literal:n}, these commands do -% not set the transformation matrix but simply dump the driver code directly -% into the output. In the \texttt{(x)dvipdfmx} case this two-part keyword -% is documented (\emph{cf.}~|literal| alone). -% \begin{macrocode} -\cs_new_protected:Npn \@@_literal_direct:n #1 -%<*dvipdfmx|xdvipdfmx> - { \tex_special:D { pdf:literal~direct~ #1 } } -%</dvipdfmx|xdvipdfmx> -%<*dvips> - { \tex_special:D { ps:: #1 } } -%</dvips> -%<*pdfmode> - { \pdftex_pdfliteral:D direct {#1} } + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D literal } + { \pdftex_pdfliteral:D } + {#1} + } %</pdfmode> % \end{macrocode} % \end{macro} @@ -334,9 +339,14 @@ % part: that is always zero and so is built in here. % \begin{macrocode} %<*!dvips> -\cs_new_protected:Npn \@@_matrix:n #1 +\cs_new_protected:Npx \@@_matrix:n #1 %<*pdfmode> - { \pdftex_pdfsetmatrix:D {#1} } + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D setmatrix } + { \pdftex_pdfsetmatrix:D } + {#1} + } %</pdfmode> %<*dvipdfmx|xdvipdfmx> { \@@_literal:n { #1 \c_space_tl 0~0~cm } } @@ -516,24 +526,34 @@ % available. In all cases there is a need to reset the color after % the current group. % \begin{macrocode} +\cs_new_protected_nopar:Npx \@@_color_ensure_current: %<*dvipdfmx|dvips|xdvipdfmx> -\cs_new_protected_nopar:Npn \@@_color_ensure_current: { - \tex_special:D { color~push~\l_@@_current_color_tl } - \group_insert_after:N \@@_color_reset: + \tex_special:D { color~push~\exp_not:N \l_@@_current_color_tl } + \group_insert_after:N \exp_not:N \@@_color_reset: } -\cs_new_protected_nopar:Npn \@@_color_reset: +%</dvipdfmx|dvips|xdvipdfmx> +%<*pdfmode> + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D colorstack } + { \pdftex_pdfcolorstack:D } + \exp_not:N \l_@@_color_stack_int push + { \exp_not:N \l_@@_current_color_tl } + \group_insert_after:N \exp_not:N \@@_color_reset: + } +%</pdfmode> +\cs_new_protected_nopar:Npx \@@_color_reset: +%<*dvipdfmx|dvips|xdvipdfmx> { \tex_special:D { color~pop } } %</dvipdfmx|dvips|xdvipdfmx> %<*pdfmode> -\cs_new_protected_nopar:Npn \@@_color_ensure_current: { - \pdftex_pdfcolorstack:D \l_@@_color_stack_int push - { \l_@@_current_color_tl } - \group_insert_after:N \@@_color_reset: + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D colorstack } + { \pdftex_pdfcolorstack:D } + \exp_not:N \l_@@_color_stack_int pop \scan_stop: } -\cs_new_protected_nopar:Npn \@@_color_reset: - { \pdftex_pdfcolorstack:D \l_@@_color_stack_int pop \scan_stop: } %</pdfmode> % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index 777f595d34e..1c904d50bf3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3file.dtx 6037 2015-09-23 12:41:15Z joseph $ +\GetIdInfo$Id: l3file.dtx 6317 2015-12-03 16:25:17Z joseph $ {L3 File and I/O operations} %</driver|package> %<*driver> @@ -690,7 +690,7 @@ { \group_begin: \seq_map_inline:Nn \l_char_active_seq - { \cs_set_nopar:Npx ##1 { \token_to_str:N ##1 } } + { \char_set:active:Npx ##1 { \cs_to_str:N ##1 } } \tl_set:Nx \l_@@_internal_name_tl {#1} \tl_set:Nx \l_@@_internal_name_tl { \tl_to_str:N \l_@@_internal_name_tl } @@ -1227,18 +1227,26 @@ % transcript file (\cs{c_term_iow}). % \begin{macrocode} \cs_new_eq:NN \c_log_iow \c_minus_one -\cs_new_eq:NN \c_term_iow \c_sixteen +\int_const:Nn \c_term_iow { 128 } % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_streams_seq} -% A list of the currently-available input streams to be used as a stack. -% Things are done differently in format and package mode, so the starting -% point varies! +% A list of the currently-available output streams to be used as a stack. % \begin{macrocode} \seq_new:N \g_@@_streams_seq %<*initex> -\seq_gset_eq:NN \g_@@_streams_seq \g__ior_streams_seq +\seq_set_eq:NN \g_@@_streams_seq \g__ior_streams_seq +\cs_if_exist:NT \luatex_directlua:D + { + \int_compare:nNnT \luatex_luatexversion:D > { 80 } + { + \int_step_inline:nnnn { 16 } { 1 } { 127 } + { + \seq_gput_right:Nn \g_@@_streams_seq {#1} + } + } + } %</initex> % \end{macrocode} % \end{variable} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx index e080da8a5bd..96ffcd918fc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx @@ -35,7 +35,7 @@ % %<*driver> \documentclass[full]{l3doc} -\GetIdInfo$Id: l3final.dtx 6223 2015-11-03 14:50:28Z joseph $ +\GetIdInfo$Id: l3final.dtx 6320 2015-12-15 09:49:47Z joseph $ {L3 Experimental format finalisation} \begin{document} \DocInput{\jobname.dtx} @@ -64,8 +64,9 @@ % % \begin{documentation} % -% This module is the end of the \LaTeX3 format file. Currently, there -% is not a lot happening here. +% This module is the end of the \LaTeX3 format file. Currently, a lot of this +% is copy-pasted from the \LaTeXe{} format or is highly unstable (essentially +% hacks which need revisiting later). % % \end{documentation} % @@ -77,6 +78,186 @@ %<*initex> % \end{macrocode} % +% \subsection{Input encoding} +% +% The letters |a|--|z| and |A|--|Z| will be correct directly from Ini\TeX{} +% while for Unicode engines (almost) all characters to be treated as letters +% are defined by the automatic data parsing. Thus the changes here are to +% deal with the additional cases. +% +% All the characters in the range $0$--$31$ \emph{except} tab (|^^I|), nl +% (|^^J|), ff (|^^L|) and cr (|^^M|). +% \begin{macrocode} +\int_step_inline:nnnn { 0 } { 1 } { `\^^H } + { \char_set_catcode_invalid:n {#1} } +\char_set_catcode_invalid:n { `\^^K } +\int_step_inline:nnnn { `\^^N } { 1 } { 31 } + { \char_set_catcode_invalid:n {#1} } +% \end{macrocode} +% The same is true for the top of the $7$-bit range. +% \begin{macrocode} +\char_set_catcode_invalid:n { 127 } +% \end{macrocode} +% For the $8$-bit engines dotless-I and dotless-J need to be valid, +% and these therefore appear in some following code. To avoid an issue +% when those lines are read, the chars are made valid here and that is +% reversed for Unicode engines below. +% \begin{macrocode} +\char_set_catcode_letter:n { `\^^Y } +\char_set_catcode_letter:n { `\^^Z } +% \end{macrocode} +% +% For non-Unicode engine we now need to convert from UTF-$8$ to $8$-bit +% for pattern reading and document use. The set up here is copied from +% the file |conv-utf8-ec.tex| maintained by \acro{tug} for hyphenation +% pattern use. As some of the relevant primitives have been moved and to +% allow for self-contained code that is copied here with minor adjustments. +% (The primitives have to be available at point of use not just at point of +% definition so a compatibility layer is hard to arrange here.) +% \begin{macrocode} +\bool_if:nTF + { + \sys_if_engine_luatex_p: + || \sys_if_engine_xetex_p: + } +% \end{macrocode} +% Unicode engines: make these two invalid (this happens after \TeX{} +% has read and thrown away their use in the following). +% \begin{macrocode} + { + \char_set_catcode_invalid:n { `\^^Y } + \char_set_catcode_invalid:n { `\^^Z } + } +% \end{macrocode} +% Now for $8$-bit engines. +% \begin{macrocode} + { +% \end{macrocode} +% At least for the present, make \upTeX{} behave like \pdfTeX{} so +% the set up is easier. +% \begin{macrocode} + \sys_if_engine_uptex:T + { \uptex_disablecjktoken:D } +% \end{macrocode} +% The actual mappings: these are kept low-level for performance reasons. +% \begin{macrocode} + \cs_new_nopar:cpn { __char_active_C3:N } #1 + { + \if_meaning:w #1 ^^9f ^^ff \else: % ß - U+00DF - germandbls + \if_meaning:w #1 ^^a0 ^^e0 \else: % à - U+00E0 - agrave + \if_meaning:w #1 ^^a1 ^^e1 \else: % á - U+00E1 - aacute + \if_meaning:w #1 ^^a2 ^^e2 \else: % â - U+00E2 - acircumflex + \if_meaning:w #1 ^^a3 ^^e3 \else: % ã - U+00E3 - atilde + \if_meaning:w #1 ^^a4 ^^e4 \else: % ä - U+00E4 - adieresis + \if_meaning:w #1 ^^a5 ^^e5 \else: % å - U+00E5 - aring + \if_meaning:w #1 ^^a6 ^^e6 \else: % æ - U+00E6 - ae + \if_meaning:w #1 ^^a7 ^^e7 \else: % ç - U+00E7 - ccedilla + \if_meaning:w #1 ^^a8 ^^e8 \else: % è - U+00E8 - egrave + \if_meaning:w #1 ^^a9 ^^e9 \else: % é - U+00E9 - eacute + \if_meaning:w #1 ^^aa ^^ea \else: % ê - U+00EA - ecircumflex + \if_meaning:w #1 ^^ab ^^eb \else: % ë - U+00EB - edieresis + \if_meaning:w #1 ^^ac ^^ec \else: % ì - U+00EC - igrave + \if_meaning:w #1 ^^ad ^^ed \else: % í - U+00ED - iacute + \if_meaning:w #1 ^^ae ^^ee \else: % î - U+00EE - icircumflex + \if_meaning:w #1 ^^af ^^ef \else: % ï - U+00EF - idieresis + \if_meaning:w #1 ^^b0 ^^f0 \else: % ð - U+00F0 - eth + \if_meaning:w #1 ^^b1 ^^f1 \else: % ñ - U+00F1 - ntilde + \if_meaning:w #1 ^^b2 ^^f2 \else: % ò - U+00F2 - ograve + \if_meaning:w #1 ^^b3 ^^f3 \else: % ó - U+00F3 - oacute + \if_meaning:w #1 ^^b4 ^^f4 \else: % ô - U+00F4 - ocircumflex + \if_meaning:w #1 ^^b5 ^^f5 \else: % õ - U+00F5 - otilde + \if_meaning:w #1 ^^b6 ^^f6 \else: % ö - U+00F6 - odieresis + \if_meaning:w #1 ^^b8 ^^f8 \else: % ø - U+00F8 - oslash + \if_meaning:w #1 ^^b9 ^^f9 \else: % ù - U+00F9 - ugrave + \if_meaning:w #1 ^^ba ^^fa \else: % ú - U+00FA - uacute + \if_meaning:w #1 ^^bb ^^fb \else: % û - U+00FB - ucircumflex + \if_meaning:w #1 ^^bc ^^fc \else: % ü - U+00FC - udieresis + \if_meaning:w #1 ^^bd ^^fd \else: % ý - U+00FD - yacute + \if_meaning:w #1 ^^be ^^fe \else: % þ - U+00FE - thorn + \if_meaning:w #1 ^^bf ^^b8 \else: % ÿ - U+00FF - ydieresis + \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + } + \cs_new_nopar:cpn { __char_active_C4:N } #1 + { + \if_meaning:w #1 ^^83 ^^a0 \else: % ă - U+0103 - abreve + \if_meaning:w #1 ^^85 ^^a1 \else: % ą - U+0105 - aogonek + \if_meaning:w #1 ^^87 ^^a2 \else: % ć - U+0107 - cacute + \if_meaning:w #1 ^^8d ^^a3 \else: % č - U+010D - ccaron + \if_meaning:w #1 ^^8f ^^a4 \else: % ď - U+010F - dcaron + \if_meaning:w #1 ^^91 ^^9e \else: % đ - U+0111 - dcroat + \if_meaning:w #1 ^^99 ^^a6 \else: % ę - U+0119 - eogonek + \if_meaning:w #1 ^^9b ^^a5 \else: % ě - U+011B - ecaron + \if_meaning:w #1 ^^9f ^^a7 \else: % ğ - U+011F - gbreve + \if_meaning:w #1 ^^b1 ^^19 \else: % ı - U+0131 - dotlessi + \if_meaning:w #1 ^^b3 ^^bc \else: % ij - U+0133 - ij + \if_meaning:w #1 ^^ba ^^a8 \else: % ĺ - U+013A - lacute + \if_meaning:w #1 ^^be ^^a9 \else: % ľ - U+013E - lcaron + \__msg_kernel_expandable_error:nn { kernel } { encoding-failure } + \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + } + \cs_new_nopar:cpn { __char_active_C5:N } #1 + { + \if_meaning:w #1 ^^82 ^^aa \else: % ł - U+0142 - lslash + \if_meaning:w #1 ^^84 ^^ab \else: % ń - U+0144 - nacute + \if_meaning:w #1 ^^88 ^^ac \else: % ň - U+0148 - ncaron + \if_meaning:w #1 ^^8b ^^ad \else: % ŋ - U+014B - eng + \if_meaning:w #1 ^^91 ^^ae \else: % ő - U+0151 - ohungarumlaut + \if_meaning:w #1 ^^93 ^^f7 \else: % œ - U+0153 - oe + \if_meaning:w #1 ^^95 ^^af \else: % ŕ - U+0155 - racute + \if_meaning:w #1 ^^99 ^^b0 \else: % ř - U+0159 - rcaron + \if_meaning:w #1 ^^9b ^^b1 \else: % ś - U+015B - sacute + \if_meaning:w #1 ^^9f ^^b3 \else: % ş - U+015F - scedilla + \if_meaning:w #1 ^^a1 ^^b2 \else: % š - U+0161 - scaron + \if_meaning:w #1 ^^a5 ^^b4 \else: % ť - U+0165 - tcaron + \if_meaning:w #1 ^^af ^^b7 \else: % ů - U+016F - uring + \if_meaning:w #1 ^^b1 ^^b6 \else: % ű - U+0171 - uhungarumlaut + \if_meaning:w #1 ^^ba ^^b9 \else: % ź - U+017A - zacute + \if_meaning:w #1 ^^bc ^^bb \else: % ż - U+017C - zdotaccent + \if_meaning:w #1 ^^be ^^ba \else: % ž - U+017E - zcaron + \__msg_kernel_expandable_error:nn { kernel } { encoding-failure } + \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + } + \cs_new_nopar:cpn { __char_active_C8:N } #1 + { + \if_meaning:w #1 ^^99 ^^b3 \else: % ș - U+0219 - scommaaccent + \if_meaning:w #1 ^^9b ^^b5 \else: % ț - U+021B - tcommaaccent + \if_meaning:w #1 ^^b7 ^^1a \else: % ȷ - U+0237 - dotlessj + \__msg_kernel_expandable_error:nn { kernel } { encoding-failure } + \fi: \fi: \fi: + } +% \end{macrocode} +% Install and record the active characters. +% \begin{macrocode} + \clist_map_inline:nn { C3 , C4 , C5 , C8 } + { + \char_set_catcode_active:n { "#1 } + \char_set_active_eq:nc { "#1 } { __char_active_ #1 :N } + \seq_put_right:Nx \l_char_special_seq + { \exp_not:c { \char_generate:nn { "#1 } { 12 } } } + \seq_put_right:Nx \l_char_active_seq + { \exp_not:c { \char_generate:nn { "#1 } { 12 } } } + } + \__msg_kernel_new:nnn { kernel } { encoding-failure } + { Unknown~UTF-8~char } +% \end{macrocode} +% All of the chars are lower case so give them the correct \tn{lccode} +% values. +% \begin{macrocode} + \clist_map_inline:nn + { + 19 , 1A , 9E , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , + AA , AB , AC , AD , AE , AF , B0 , B1 , B2 , B3 , B3 , B4 , B5 , + B6 , B7 , B8 , B9 , BA , BB , BC , E0 , E1 , E2 , E3 , E4 , E5 , + E6 , E7 , E8 , E9 , EA , EB , EC , ED , EE , EF , F0 , F1 , F2 , + F3 , F4 , F5 , F6 , F7 , F8 , F9 , FA , FB , FC , FD , FE , FF + } + { \char_set_lccode:nn { "#1 } { "#1 } } + } +% \end{macrocode} +% % \subsection{Temporary hacks} % % \begin{macro}{\T1/lmr/m/n/10} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins index 3d967cc7e7d..9f3bd8b9ad0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3format.ins +++ b/Master/texmf-dist/source/latex/l3kernel/l3format.ins @@ -77,7 +77,7 @@ Do not distribute a modified version of this file. \from{l3color.dtx} {initex} \from{l3candidates.dtx} {initex} \from{l3sys.dtx} {initex} - \from{l3luatex.dtx} {initex} + \from{l3luatex.dtx} {initex,tex} % ======== FORMAT ONLY ========= \from{l3final.dtx} {initex} % ============================== @@ -90,4 +90,20 @@ Do not distribute a modified version of this file. \generate{\file{l3docstrip.tex}{\from{l3docstrip.dtx}{program}}} +% Lua code (currently identical to the package-mode version) + +\def\MetaPrefix{--} +\preamble + +EXPERIMENTAL CODE + +Do not distribute this file without also distributing the +source files specified above. + +Do not distribute a modified version of this file. + +\endpreamble +\nopostamble +\generate{\file{expl3.lua}{\from{l3luatex.dtx}{package,lua}}} + \endbatchfile diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index 1f9f6b537a4..7b834f6c7a7 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3keys.dtx 6037 2015-09-23 12:41:15Z joseph $ +\GetIdInfo$Id: l3keys.dtx 6284 2015-11-17 10:10:56Z bruno $ {L3 Key-value interfaces} %</driver|package> %<*driver> @@ -122,7 +122,8 @@ % \end{verbatim} % % Key names may contain any tokens, as they are handled internally -% using \cs{tl_to_str:n}. As will be discussed in +% using \cs{tl_to_str:n}; spaces are \emph{ignored} in key names. +% As will be discussed in % section~\ref{sec:l3keys:subdivision}, it is suggested that the character % |/| is reserved for sub-division of keys into logical % groups. Functions and variables are \emph{not} expanded when creating @@ -139,7 +140,7 @@ % % \section{Creating keys} % -% \begin{function}{\keys_define:nn} +% \begin{function}[updated = 2015-11-07]{\keys_define:nn} % \begin{syntax} % \cs{keys_define:nn} \Arg{module} \Arg{keyval list} % \end{syntax} @@ -599,7 +600,7 @@ % % \section{Setting keys} % -% \begin{function} +% \begin{function}[updated = 2015-11-07] % {\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no} % \begin{syntax} % \cs{keys_set:nn} \Arg{module} \Arg{keyval list} @@ -656,7 +657,7 @@ % } % \end{verbatim} % -% \begin{function}[added = 2011-08-23, updated = 2014-04-27] +% \begin{function}[added = 2011-08-23, updated = 2015-11-07] % { % \keys_set_known:nnN, \keys_set_known:nVN, % \keys_set_known:nvN, \keys_set_known:noN, @@ -720,7 +721,7 @@ % groups to be made \enquote{active}, or by marking one or more groups to % be ignored in key setting. % -% \begin{function}[added = 2013-07-14, updated = 2014-04-27] +% \begin{function}[added = 2013-07-14, updated = 2015-11-07] % { % \keys_set_filter:nnnN, \keys_set_filter:nnVN, % \keys_set_filter:nnvN, \keys_set_filter:nnoN, @@ -742,7 +743,7 @@ % \meta{keyval list} returned at each stage. % \end{function} % -% \begin{function}[added = 2013-07-14] +% \begin{function}[added = 2013-07-14, updated = 2015-11-07] % { % \keys_set_groups:nnn, \keys_set_groups:nnV, % \keys_set_groups:nnv, \keys_set_groups:nno @@ -758,7 +759,7 @@ % % \section{Utility functions for keys} % -% \begin{function}[EXP,pTF]{\keys_if_exist:nn} +% \begin{function}[EXP, pTF, updated = 2015-11-07]{\keys_if_exist:nn} % \begin{syntax} % \cs{keys_if_exist_p:nn} \Arg{module} \Arg{key} \\ % \cs{keys_if_exist:nnTF} \Arg{module} \Arg{key} \Arg{true code} \Arg{false code} @@ -767,7 +768,8 @@ % has been defined for \meta{key}. % \end{function} % -% \begin{function}[added = 2011-08-21,EXP,pTF]{\keys_if_choice_exist:nnn} +% \begin{function}[added = 2011-08-21,EXP,pTF, updated = 2015-11-07] +% {\keys_if_choice_exist:nnn} % \begin{syntax} % \cs{keys_if_choice_exist_p:nnn} \Arg{module} \Arg{key} \Arg{choice} \\ % \cs{keys_if_choice_exist:nnnTF} \Arg{module} \Arg{key} \Arg{choice} \Arg{true code} \Arg{false code} @@ -1200,7 +1202,7 @@ { \@@_define:onn \l_@@_module_tl } \cs_new_protected:Npn \@@_define:nnn #1#2#3 { - \tl_set:Nx \l_@@_module_tl { \tl_to_str:n {#2} } + \tl_set:Nx \l_@@_module_tl { \@@_remove_spaces:n {#2} } \keyval_parse:NNn \@@_define_elt:n \@@_define_elt:nn {#3} \tl_set:Nn \l_@@_module_tl {#1} } @@ -1263,7 +1265,11 @@ } \cs_new_protected:Npn \@@_property_find:w #1 . #2 \q_stop { - \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl \tl_to_str:n {#1} } + \tl_set:Nx \l_keys_path_tl + { + \l_keys_path_tl + \@@_remove_spaces:n {#1} + } \tl_if_in:nnTF {#2} { . } { \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl . } @@ -1455,7 +1461,7 @@ \clist_map_inline:nn {#2} { \int_incr:N \l_keys_choice_int - \@@_cmd_set:nx { \l_keys_path_tl / \tl_to_str:n {##1} } + \@@_cmd_set:nx { \l_keys_path_tl / \@@_remove_spaces:n {##1} } { \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1} \int_set:Nn \exp_not:N \l_keys_choice_int @@ -1907,7 +1913,7 @@ { \@@_set:onn { \l_@@_module_tl } } \cs_new_protected:Npn \@@_set:nnn #1#2#3 { - \tl_set:Nx \l_@@_module_tl { \tl_to_str:n {#2} } + \tl_set:Nx \l_@@_module_tl { \@@_remove_spaces:n {#2} } \keyval_parse:NNn \@@_set_elt:n \@@_set_elt:nn {#3} \tl_set:Nn \l_@@_module_tl {#1} } @@ -2040,7 +2046,8 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_set_elt_aux:nnn #1#2#3 { - \tl_set:Nx \l_keys_path_tl { \l_@@_module_tl / \tl_to_str:n {#2} } + \tl_set:Nx \l_keys_path_tl + { \l_@@_module_tl / \@@_remove_spaces:n {#2} } \tl_clear:N \l_@@_module_tl \exp_after:wN \@@_find_key_module:w \l_keys_path_tl / \q_stop \@@_value_or_default:n {#3} @@ -2241,7 +2248,7 @@ % \begin{macrocode} \cs_new:Npn \@@_choice_find:n #1 { - \@@_execute:nn { \l_keys_path_tl / \tl_to_str:n {#1} } + \@@_execute:nn { \l_keys_path_tl / \@@_remove_spaces:n {#1} } { \@@_execute:nn { \l_keys_path_tl / unknown } { } } } \cs_new:Npn \@@_multichoice_find:n #1 @@ -2252,12 +2259,32 @@ % % \subsection{Utilities} % +% \begin{macro}[EXP, int]{\@@_remove_spaces:n} +% \begin{macro}[EXP, aux]{\@@_remove_spaces:w} +% Removes all spaces from the input which is detokenized as a result. +% This function has the same effect as \tn{zap@space} in \LaTeXe{} +% after applying \cs{tl_to_str:n}. It is set up to be fast as the +% use case here is tightly defined. The~|?| is only there to allow +% for a space after \cs{use_none:nn} responsible for ending the loop. +% \begin{macrocode} +\cs_new:Npn \@@_remove_spaces:n #1 + { + \exp_after:wN \@@_remove_spaces:w \tl_to_str:n {#1} + \use_none:nn ? ~ + } +\cs_new:Npn \@@_remove_spaces:w #1 ~ + { #1 \@@_remove_spaces:w } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}[EXP,pTF]{\keys_if_exist:nn} -% A utility for others to see if a key exists. +% A utility for others to see if a key exists. % \begin{macrocode} \prg_new_conditional:Npnn \keys_if_exist:nn #1#2 { p , T , F , TF } { - \cs_if_exist:cTF { \c_@@_code_root_tl \tl_to_str:n { #1 / #2 } } + \cs_if_exist:cTF + { \c_@@_code_root_tl \@@_remove_spaces:n { #1 / #2 } } { \prg_return_true: } { \prg_return_false: } } @@ -2270,7 +2297,8 @@ \prg_new_conditional:Npnn \keys_if_choice_exist:nnn #1#2#3 { p , T , F , TF } { - \cs_if_exist:cTF { \c_@@_code_root_tl \tl_to_str:n { #1 / #2 / #3 } } + \cs_if_exist:cTF + { \c_@@_code_root_tl \@@_remove_spaces:n { #1 / #2 / #3 } } { \prg_return_true: } { \prg_return_false: } } @@ -2291,14 +2319,14 @@ \keys_if_exist:nnTF {#1} {#2} { \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key } - { \tl_to_str:n { #1 / #2 } } { t } { } { } + { \@@_remove_spaces:n { #1 / #2 } } { t } { } { } \exp_args:Ncc \@@_show:NN - { \c_@@_code_root_tl \tl_to_str:n { #1 / #2 } } - { \c_@@_info_root_tl \tl_to_str:n { #1 / #2 } } + { \c_@@_code_root_tl \@@_remove_spaces:n { #1 / #2 } } + { \c_@@_info_root_tl \@@_remove_spaces:n { #1 / #2 } } } { \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key } - { \tl_to_str:n { #1 / #2 } } { f } { } { } + { \@@_remove_spaces:n { #1 / #2 } } { f } { } { } \__msg_show_wrap:n { } } } diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx index 20c8535cf38..28a4eba5fa2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx @@ -36,10 +36,10 @@ %<*driver> \documentclass[full]{l3doc} %</driver> -%<*driver|package> -\GetIdInfo$Id: l3luatex.dtx 5983 2015-09-10 18:57:56Z joseph $ +%<*driver|package&tex> +\GetIdInfo$Id: l3luatex.dtx 6250 2015-11-11 13:45:38Z joseph $ {L3 Experimental LuaTeX-specific functions} -%</driver|package> +%</driver|package&tex> %<*driver> \begin{document} \DocInput{\jobname.dtx} @@ -77,6 +77,8 @@ % error: use \cs{sys_if_engine_luatex:T} to avoid this. Details of coding % the \LuaTeX{} engine are detailed in the \LuaTeX{} manual. % +% \subsection{\TeX{} code interfaces} +% % \begin{function}[EXP, added = 2015-06-29]{\lua_now_x:n, \lua_now:n} % \begin{syntax} % \cs{lua_now:n} \Arg{token list} @@ -142,6 +144,27 @@ % \end{texnote} % \end{function} % +% \subsection{Lua interfaces} +% +% As well as interfaces for \TeX{}, there are a small number of Lua functions +% provided here. Currently these are intended for internal use only. +% +% \begin{function}{l3kernel.strcmp} +% \begin{syntax} +% \cs{l3kernel.strcmp}|(|\meta{str one}, \meta{str two}|)| +% \end{syntax} +% Compares the two strings and returns |0| to \TeX{} +% if the two are identical. +% \end{function} +% +% \begin{function}{l3kernel.charcat} +% \begin{syntax} +% \cs{l3kernel.charcat}|(|\meta{charcode}, \meta{catcode}|)| +% \end{syntax} +% Constructs a character of \meta{charcode} and \meta{catcode} and returns +% the result to \TeX{}. +% \end{function} +% % \end{documentation} % % \begin{implementation} @@ -152,7 +175,11 @@ %<*initex|package> % \end{macrocode} % -% \subsubsection{Breaking out to \Lua{}} +% \subsection{Breaking out to \Lua{}} +% +% \begin{macrocode} +%<*tex> +% \end{macrocode} % % \begin{macro}[EXP]{\lua_now_x:n, \lua_now:n} % \begin{macro}{\lua_shipout_x:n, \lua_shipout:n} @@ -206,6 +233,68 @@ % \end{macrocode} % % \begin{macrocode} +%</tex> +% \end{macrocode} +% +% \subsection{\Lua{} functions for internal use} +% +% \begin{macrocode} +%<*lua> +% \end{macrocode} +% +% \begin{macro}{l3kernel} +% Create a table for the kernel's own use. +% \begin{macrocode} +l3kernel = l3kernel or { } +% \end{macrocode} +% \end{macro} +% +% Various local copies of standard functions: naming convention is to retain +% the full text but replace all |.| by |_|. +% \begin{macrocode} +local tex_setcatcode = tex.setcatcode +local tex_sprint = tex.sprint +local tex_write = tex.write +local unicode_utf8_char = unicode.utf8.char +% \end{macrocode} +% +% \begin{macro}{l3kernel.strcmp} +% String comparison which gives the same results as \pdfTeX{}'s +% \tn{pdfstrcmp}, although the ordering should likely not be relied upon! +% \begin{macrocode} +local function strcmp(A, B) + if A == B then + tex_write("0") + elseif A < B then + tex_write("-1") + else + tex_write("1") + end +end +l3kernel.strcmp = strcmp +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{l3kernel.charcat} +% Creating arbitrary chars needs a category code table. As set up here, +% one may have been assigned earlier (see \pkg{l3bootstrap}) or a hard-coded +% one is used. The latter is intended for format mode and should be adjusted +% to match an eventual allocator. +% \begin{macrocode} +local charcat_table = l3kernel.charcat_table or 1 +local function charcat(charcode, catcode) + tex_setcatcode(charcat_table, charcode, catcode) + tex_sprint(charcat_table, unicode_utf8_char(charcode)) +end +l3kernel.charcat = charcat +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</lua> +% \end{macrocode} +% +% \begin{macrocode} %</initex|package> % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx index 44b019828bb..5cc1a600b02 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3names.dtx 6220 2015-11-03 11:53:30Z joseph $ +\GetIdInfo$Id: l3names.dtx 6276 2015-11-16 12:04:42Z joseph $ {L3 Namespace for primitives} %</driver|package> %<*driver> @@ -165,399 +165,399 @@ % % Now all the other primitives. % \begin{macrocode} - \__kernel_primitive:NN \above \tex_above:D - \__kernel_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D - \__kernel_primitive:NN \abovedisplayskip \tex_abovedisplayskip:D - \__kernel_primitive:NN \abovewithdelims \tex_abovewithdelims:D - \__kernel_primitive:NN \accent \tex_accent:D - \__kernel_primitive:NN \adjdemerits \tex_adjdemerits:D - \__kernel_primitive:NN \advance \tex_advance:D - \__kernel_primitive:NN \afterassignment \tex_afterassignment:D - \__kernel_primitive:NN \aftergroup \tex_aftergroup:D - \__kernel_primitive:NN \atop \tex_atop:D - \__kernel_primitive:NN \atopwithdelims \tex_atopwithdelims:D - \__kernel_primitive:NN \badness \tex_badness:D - \__kernel_primitive:NN \baselineskip \tex_baselineskip:D - \__kernel_primitive:NN \batchmode \tex_batchmode:D - \__kernel_primitive:NN \begingroup \tex_begingroup:D - \__kernel_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D - \__kernel_primitive:NN \belowdisplayskip \tex_belowdisplayskip:D - \__kernel_primitive:NN \binoppenalty \tex_binoppenalty:D - \__kernel_primitive:NN \botmark \tex_botmark:D - \__kernel_primitive:NN \box \tex_box:D - \__kernel_primitive:NN \boxmaxdepth \tex_boxmaxdepth:D - \__kernel_primitive:NN \brokenpenalty \tex_brokenpenalty:D - \__kernel_primitive:NN \catcode \tex_catcode:D - \__kernel_primitive:NN \char \tex_char:D - \__kernel_primitive:NN \chardef \tex_chardef:D - \__kernel_primitive:NN \cleaders \tex_cleaders:D - \__kernel_primitive:NN \closein \tex_closein:D - \__kernel_primitive:NN \closeout \tex_closeout:D - \__kernel_primitive:NN \clubpenalty \tex_clubpenalty:D - \__kernel_primitive:NN \copy \tex_copy:D - \__kernel_primitive:NN \count \tex_count:D - \__kernel_primitive:NN \countdef \tex_countdef:D - \__kernel_primitive:NN \cr \tex_cr:D - \__kernel_primitive:NN \crcr \tex_crcr:D - \__kernel_primitive:NN \csname \tex_csname:D - \__kernel_primitive:NN \day \tex_day:D - \__kernel_primitive:NN \deadcycles \tex_deadcycles:D - \__kernel_primitive:NN \def \tex_def:D - \__kernel_primitive:NN \defaulthyphenchar \tex_defaulthyphenchar:D - \__kernel_primitive:NN \defaultskewchar \tex_defaultskewchar:D - \__kernel_primitive:NN \delcode \tex_delcode:D - \__kernel_primitive:NN \delimiter \tex_delimiter:D - \__kernel_primitive:NN \delimiterfactor \tex_delimiterfactor:D - \__kernel_primitive:NN \delimitershortfall \tex_delimitershortfall:D - \__kernel_primitive:NN \dimen \tex_dimen:D - \__kernel_primitive:NN \dimendef \tex_dimendef:D - \__kernel_primitive:NN \discretionary \tex_discretionary:D - \__kernel_primitive:NN \displayindent \tex_displayindent:D - \__kernel_primitive:NN \displaylimits \tex_displaylimits:D - \__kernel_primitive:NN \displaystyle \tex_displaystyle:D - \__kernel_primitive:NN \displaywidowpenalty \tex_displaywidowpenalty:D - \__kernel_primitive:NN \displaywidth \tex_displaywidth:D - \__kernel_primitive:NN \divide \tex_divide:D - \__kernel_primitive:NN \doublehyphendemerits \tex_doublehyphendemerits:D - \__kernel_primitive:NN \dp \tex_dp:D - \__kernel_primitive:NN \dump \tex_dump:D - \__kernel_primitive:NN \edef \tex_edef:D - \__kernel_primitive:NN \else \tex_else:D - \__kernel_primitive:NN \emergencystretch \tex_emergencystretch:D - \__kernel_primitive:NN \end \tex_end:D - \__kernel_primitive:NN \endcsname \tex_endcsname:D - \__kernel_primitive:NN \endgroup \tex_endgroup:D - \__kernel_primitive:NN \endinput \tex_endinput:D - \__kernel_primitive:NN \endlinechar \tex_endlinechar:D - \__kernel_primitive:NN \eqno \tex_eqno:D - \__kernel_primitive:NN \errhelp \tex_errhelp:D - \__kernel_primitive:NN \errmessage \tex_errmessage:D - \__kernel_primitive:NN \errorcontextlines \tex_errorcontextlines:D - \__kernel_primitive:NN \errorstopmode \tex_errorstopmode:D - \__kernel_primitive:NN \escapechar \tex_escapechar:D - \__kernel_primitive:NN \everycr \tex_everycr:D - \__kernel_primitive:NN \everydisplay \tex_everydisplay:D - \__kernel_primitive:NN \everyhbox \tex_everyhbox:D - \__kernel_primitive:NN \everyjob \tex_everyjob:D - \__kernel_primitive:NN \everymath \tex_everymath:D - \__kernel_primitive:NN \everypar \tex_everypar:D - \__kernel_primitive:NN \everyvbox \tex_everyvbox:D - \__kernel_primitive:NN \exhyphenpenalty \tex_exhyphenpenalty:D - \__kernel_primitive:NN \expandafter \tex_expandafter:D - \__kernel_primitive:NN \fam \tex_fam:D - \__kernel_primitive:NN \fi \tex_fi:D - \__kernel_primitive:NN \finalhyphendemerits \tex_finalhyphendemerits:D - \__kernel_primitive:NN \firstmark \tex_firstmark:D - \__kernel_primitive:NN \floatingpenalty \tex_floatingpenalty:D - \__kernel_primitive:NN \font \tex_font:D - \__kernel_primitive:NN \fontdimen \tex_fontdimen:D - \__kernel_primitive:NN \fontname \tex_fontname:D - \__kernel_primitive:NN \futurelet \tex_futurelet:D - \__kernel_primitive:NN \gdef \tex_gdef:D - \__kernel_primitive:NN \global \tex_global:D - \__kernel_primitive:NN \globaldefs \tex_globaldefs:D - \__kernel_primitive:NN \halign \tex_halign:D - \__kernel_primitive:NN \hangafter \tex_hangafter:D - \__kernel_primitive:NN \hangindent \tex_hangindent:D - \__kernel_primitive:NN \hbadness \tex_hbadness:D - \__kernel_primitive:NN \hbox \tex_hbox:D - \__kernel_primitive:NN \hfil \tex_hfil:D - \__kernel_primitive:NN \hfill \tex_hfill:D - \__kernel_primitive:NN \hfilneg \tex_hfilneg:D - \__kernel_primitive:NN \hfuzz \tex_hfuzz:D - \__kernel_primitive:NN \hoffset \tex_hoffset:D - \__kernel_primitive:NN \holdinginserts \tex_holdinginserts:D - \__kernel_primitive:NN \hrule \tex_hrule:D - \__kernel_primitive:NN \hsize \tex_hsize:D - \__kernel_primitive:NN \hskip \tex_hskip:D - \__kernel_primitive:NN \hss \tex_hss:D - \__kernel_primitive:NN \ht \tex_ht:D - \__kernel_primitive:NN \hyphenation \tex_hyphenation:D - \__kernel_primitive:NN \hyphenchar \tex_hyphenchar:D - \__kernel_primitive:NN \hyphenpenalty \tex_hyphenpenalty:D - \__kernel_primitive:NN \if \tex_if:D - \__kernel_primitive:NN \ifcase \tex_ifcase:D - \__kernel_primitive:NN \ifcat \tex_ifcat:D - \__kernel_primitive:NN \ifdim \tex_ifdim:D - \__kernel_primitive:NN \ifeof \tex_ifeof:D - \__kernel_primitive:NN \iffalse \tex_iffalse:D - \__kernel_primitive:NN \ifhbox \tex_ifhbox:D - \__kernel_primitive:NN \ifhmode \tex_ifhmode:D - \__kernel_primitive:NN \ifinner \tex_ifinner:D - \__kernel_primitive:NN \ifmmode \tex_ifmmode:D - \__kernel_primitive:NN \ifnum \tex_ifnum:D - \__kernel_primitive:NN \ifodd \tex_ifodd:D - \__kernel_primitive:NN \iftrue \tex_iftrue:D - \__kernel_primitive:NN \ifvbox \tex_ifvbox:D - \__kernel_primitive:NN \ifvmode \tex_ifvmode:D - \__kernel_primitive:NN \ifvoid \tex_ifvoid:D - \__kernel_primitive:NN \ifx \tex_ifx:D - \__kernel_primitive:NN \ignorespaces \tex_ignorespaces:D - \__kernel_primitive:NN \immediate \tex_immediate:D - \__kernel_primitive:NN \indent \tex_indent:D - \__kernel_primitive:NN \input \tex_input:D - \__kernel_primitive:NN \inputlineno \tex_inputlineno:D - \__kernel_primitive:NN \insert \tex_insert:D - \__kernel_primitive:NN \insertpenalties \tex_insertpenalties:D - \__kernel_primitive:NN \interlinepenalty \tex_interlinepenalty:D - \__kernel_primitive:NN \jobname \tex_jobname:D - \__kernel_primitive:NN \kern \tex_kern:D - \__kernel_primitive:NN \language \tex_language:D - \__kernel_primitive:NN \lastbox \tex_lastbox:D - \__kernel_primitive:NN \lastkern \tex_lastkern:D - \__kernel_primitive:NN \lastpenalty \tex_lastpenalty:D - \__kernel_primitive:NN \lastskip \tex_lastskip:D - \__kernel_primitive:NN \lccode \tex_lccode:D - \__kernel_primitive:NN \leaders \tex_leaders:D - \__kernel_primitive:NN \left \tex_left:D - \__kernel_primitive:NN \lefthyphenmin \tex_lefthyphenmin:D - \__kernel_primitive:NN \leftskip \tex_leftskip:D - \__kernel_primitive:NN \leqno \tex_leqno:D - \__kernel_primitive:NN \let \tex_let:D - \__kernel_primitive:NN \limits \tex_limits:D - \__kernel_primitive:NN \linepenalty \tex_linepenalty:D - \__kernel_primitive:NN \lineskip \tex_lineskip:D - \__kernel_primitive:NN \lineskiplimit \tex_lineskiplimit:D - \__kernel_primitive:NN \long \tex_long:D - \__kernel_primitive:NN \looseness \tex_looseness:D - \__kernel_primitive:NN \lower \tex_lower:D - \__kernel_primitive:NN \lowercase \tex_lowercase:D - \__kernel_primitive:NN \mag \tex_mag:D - \__kernel_primitive:NN \mark \tex_mark:D - \__kernel_primitive:NN \mathaccent \tex_mathaccent:D - \__kernel_primitive:NN \mathbin \tex_mathbin:D - \__kernel_primitive:NN \mathchar \tex_mathchar:D - \__kernel_primitive:NN \mathchardef \tex_mathchardef:D - \__kernel_primitive:NN \mathchoice \tex_mathchoice:D - \__kernel_primitive:NN \mathclose \tex_mathclose:D - \__kernel_primitive:NN \mathcode \tex_mathcode:D - \__kernel_primitive:NN \mathinner \tex_mathinner:D - \__kernel_primitive:NN \mathop \tex_mathop:D - \__kernel_primitive:NN \mathopen \tex_mathopen:D - \__kernel_primitive:NN \mathord \tex_mathord:D - \__kernel_primitive:NN \mathpunct \tex_mathpunct:D - \__kernel_primitive:NN \mathrel \tex_mathrel:D - \__kernel_primitive:NN \mathsurround \tex_mathsurround:D - \__kernel_primitive:NN \maxdeadcycles \tex_maxdeadcycles:D - \__kernel_primitive:NN \maxdepth \tex_maxdepth:D - \__kernel_primitive:NN \meaning \tex_meaning:D - \__kernel_primitive:NN \medmuskip \tex_medmuskip:D - \__kernel_primitive:NN \message \tex_message:D - \__kernel_primitive:NN \mkern \tex_mkern:D - \__kernel_primitive:NN \month \tex_month:D - \__kernel_primitive:NN \moveleft \tex_moveleft:D - \__kernel_primitive:NN \moveright \tex_moveright:D - \__kernel_primitive:NN \mskip \tex_mskip:D - \__kernel_primitive:NN \multiply \tex_multiply:D - \__kernel_primitive:NN \muskip \tex_muskip:D - \__kernel_primitive:NN \muskipdef \tex_muskipdef:D - \__kernel_primitive:NN \newlinechar \tex_newlinechar:D - \__kernel_primitive:NN \noalign \tex_noalign:D - \__kernel_primitive:NN \noboundary \tex_noboundary:D - \__kernel_primitive:NN \noexpand \tex_noexpand:D - \__kernel_primitive:NN \noindent \tex_noindent:D - \__kernel_primitive:NN \nolimits \tex_nolimits:D - \__kernel_primitive:NN \nonscript \tex_nonscript:D - \__kernel_primitive:NN \nonstopmode \tex_nonstopmode:D - \__kernel_primitive:NN \nulldelimiterspace \tex_nulldelimiterspace:D - \__kernel_primitive:NN \nullfont \tex_nullfont:D - \__kernel_primitive:NN \number \tex_number:D - \__kernel_primitive:NN \omit \tex_omit:D - \__kernel_primitive:NN \openin \tex_openin:D - \__kernel_primitive:NN \openout \tex_openout:D - \__kernel_primitive:NN \or \tex_or:D - \__kernel_primitive:NN \outer \tex_outer:D - \__kernel_primitive:NN \output \tex_output:D - \__kernel_primitive:NN \outputpenalty \tex_outputpenalty:D - \__kernel_primitive:NN \over \tex_over:D - \__kernel_primitive:NN \overfullrule \tex_overfullrule:D - \__kernel_primitive:NN \overline \tex_overline:D - \__kernel_primitive:NN \overwithdelims \tex_overwithdelims:D - \__kernel_primitive:NN \pagedepth \tex_pagedepth:D - \__kernel_primitive:NN \pagefilllstretch \tex_pagefilllstretch:D - \__kernel_primitive:NN \pagefillstretch \tex_pagefillstretch:D - \__kernel_primitive:NN \pagefilstretch \tex_pagefilstretch:D - \__kernel_primitive:NN \pagegoal \tex_pagegoal:D - \__kernel_primitive:NN \pageshrink \tex_pageshrink:D - \__kernel_primitive:NN \pagestretch \tex_pagestretch:D - \__kernel_primitive:NN \pagetotal \tex_pagetotal:D - \__kernel_primitive:NN \par \tex_par:D - \__kernel_primitive:NN \parfillskip \tex_parfillskip:D - \__kernel_primitive:NN \parindent \tex_parindent:D - \__kernel_primitive:NN \parshape \tex_parshape:D - \__kernel_primitive:NN \parskip \tex_parskip:D - \__kernel_primitive:NN \patterns \tex_patterns:D - \__kernel_primitive:NN \pausing \tex_pausing:D - \__kernel_primitive:NN \penalty \tex_penalty:D - \__kernel_primitive:NN \postdisplaypenalty \tex_postdisplaypenalty:D - \__kernel_primitive:NN \predisplaypenalty \tex_predisplaypenalty:D - \__kernel_primitive:NN \predisplaysize \tex_predisplaysize:D - \__kernel_primitive:NN \pretolerance \tex_pretolerance:D - \__kernel_primitive:NN \prevdepth \tex_prevdepth:D - \__kernel_primitive:NN \prevgraf \tex_prevgraf:D - \__kernel_primitive:NN \radical \tex_radical:D - \__kernel_primitive:NN \raise \tex_raise:D - \__kernel_primitive:NN \read \tex_read:D - \__kernel_primitive:NN \relax \tex_relax:D - \__kernel_primitive:NN \relpenalty \tex_relpenalty:D - \__kernel_primitive:NN \right \tex_right:D - \__kernel_primitive:NN \righthyphenmin \tex_righthyphenmin:D - \__kernel_primitive:NN \rightskip \tex_rightskip:D - \__kernel_primitive:NN \romannumeral \tex_romannumeral:D - \__kernel_primitive:NN \scriptfont \tex_scriptfont:D - \__kernel_primitive:NN \scriptscriptfont \tex_scriptscriptfont:D - \__kernel_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D - \__kernel_primitive:NN \scriptspace \tex_scriptspace:D - \__kernel_primitive:NN \scriptstyle \tex_scriptstyle:D - \__kernel_primitive:NN \scrollmode \tex_scrollmode:D - \__kernel_primitive:NN \setbox \tex_setbox:D - \__kernel_primitive:NN \setlanguage \tex_setlanguage:D - \__kernel_primitive:NN \sfcode \tex_sfcode:D - \__kernel_primitive:NN \shipout \tex_shipout:D - \__kernel_primitive:NN \show \tex_show:D - \__kernel_primitive:NN \showbox \tex_showbox:D - \__kernel_primitive:NN \showboxbreadth \tex_showboxbreadth:D - \__kernel_primitive:NN \showboxdepth \tex_showboxdepth:D - \__kernel_primitive:NN \showlists \tex_showlists:D - \__kernel_primitive:NN \showthe \tex_showthe:D - \__kernel_primitive:NN \skewchar \tex_skewchar:D - \__kernel_primitive:NN \skip \tex_skip:D - \__kernel_primitive:NN \skipdef \tex_skipdef:D - \__kernel_primitive:NN \spacefactor \tex_spacefactor:D - \__kernel_primitive:NN \spaceskip \tex_spaceskip:D - \__kernel_primitive:NN \span \tex_span:D - \__kernel_primitive:NN \special \tex_special:D - \__kernel_primitive:NN \splitbotmark \tex_splitbotmark:D - \__kernel_primitive:NN \splitfirstmark \tex_splitfirstmark:D - \__kernel_primitive:NN \splitmaxdepth \tex_splitmaxdepth:D - \__kernel_primitive:NN \splittopskip \tex_splittopskip:D - \__kernel_primitive:NN \string \tex_string:D - \__kernel_primitive:NN \tabskip \tex_tabskip:D - \__kernel_primitive:NN \textfont \tex_textfont:D - \__kernel_primitive:NN \textstyle \tex_textstyle:D - \__kernel_primitive:NN \the \tex_the:D - \__kernel_primitive:NN \thickmuskip \tex_thickmuskip:D - \__kernel_primitive:NN \thinmuskip \tex_thinmuskip:D - \__kernel_primitive:NN \time \tex_time:D - \__kernel_primitive:NN \toks \tex_toks:D - \__kernel_primitive:NN \toksdef \tex_toksdef:D - \__kernel_primitive:NN \tolerance \tex_tolerance:D - \__kernel_primitive:NN \topmark \tex_topmark:D - \__kernel_primitive:NN \topskip \tex_topskip:D - \__kernel_primitive:NN \tracingcommands \tex_tracingcommands:D - \__kernel_primitive:NN \tracinglostchars \tex_tracinglostchars:D - \__kernel_primitive:NN \tracingmacros \tex_tracingmacros:D - \__kernel_primitive:NN \tracingonline \tex_tracingonline:D - \__kernel_primitive:NN \tracingoutput \tex_tracingoutput:D - \__kernel_primitive:NN \tracingpages \tex_tracingpages:D - \__kernel_primitive:NN \tracingparagraphs \tex_tracingparagraphs:D - \__kernel_primitive:NN \tracingrestores \tex_tracingrestores:D - \__kernel_primitive:NN \tracingstats \tex_tracingstats:D - \__kernel_primitive:NN \uccode \tex_uccode:D - \__kernel_primitive:NN \uchyph \tex_uchyph:D - \__kernel_primitive:NN \underline \tex_underline:D - \__kernel_primitive:NN \unhbox \tex_unhbox:D - \__kernel_primitive:NN \unhcopy \tex_unhcopy:D - \__kernel_primitive:NN \unkern \tex_unkern:D - \__kernel_primitive:NN \unpenalty \tex_unpenalty:D - \__kernel_primitive:NN \unskip \tex_unskip:D - \__kernel_primitive:NN \unvbox \tex_unvbox:D - \__kernel_primitive:NN \unvcopy \tex_unvcopy:D - \__kernel_primitive:NN \uppercase \tex_uppercase:D - \__kernel_primitive:NN \vadjust \tex_vadjust:D - \__kernel_primitive:NN \valign \tex_valign:D - \__kernel_primitive:NN \vbadness \tex_vbadness:D - \__kernel_primitive:NN \vbox \tex_vbox:D - \__kernel_primitive:NN \vcenter \tex_vcenter:D - \__kernel_primitive:NN \vfil \tex_vfil:D - \__kernel_primitive:NN \vfill \tex_vfill:D - \__kernel_primitive:NN \vfilneg \tex_vfilneg:D - \__kernel_primitive:NN \vfuzz \tex_vfuzz:D - \__kernel_primitive:NN \voffset \tex_voffset:D - \__kernel_primitive:NN \vrule \tex_vrule:D - \__kernel_primitive:NN \vsize \tex_vsize:D - \__kernel_primitive:NN \vskip \tex_vskip:D - \__kernel_primitive:NN \vsplit \tex_vsplit:D - \__kernel_primitive:NN \vss \tex_vss:D - \__kernel_primitive:NN \vtop \tex_vtop:D - \__kernel_primitive:NN \wd \tex_wd:D - \__kernel_primitive:NN \widowpenalty \tex_widowpenalty:D - \__kernel_primitive:NN \write \tex_write:D - \__kernel_primitive:NN \xdef \tex_xdef:D - \__kernel_primitive:NN \xleaders \tex_xleaders:D - \__kernel_primitive:NN \xspaceskip \tex_xspaceskip:D - \__kernel_primitive:NN \year \tex_year:D + \__kernel_primitive:NN \above \tex_above:D + \__kernel_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D + \__kernel_primitive:NN \abovedisplayskip \tex_abovedisplayskip:D + \__kernel_primitive:NN \abovewithdelims \tex_abovewithdelims:D + \__kernel_primitive:NN \accent \tex_accent:D + \__kernel_primitive:NN \adjdemerits \tex_adjdemerits:D + \__kernel_primitive:NN \advance \tex_advance:D + \__kernel_primitive:NN \afterassignment \tex_afterassignment:D + \__kernel_primitive:NN \aftergroup \tex_aftergroup:D + \__kernel_primitive:NN \atop \tex_atop:D + \__kernel_primitive:NN \atopwithdelims \tex_atopwithdelims:D + \__kernel_primitive:NN \badness \tex_badness:D + \__kernel_primitive:NN \baselineskip \tex_baselineskip:D + \__kernel_primitive:NN \batchmode \tex_batchmode:D + \__kernel_primitive:NN \begingroup \tex_begingroup:D + \__kernel_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D + \__kernel_primitive:NN \belowdisplayskip \tex_belowdisplayskip:D + \__kernel_primitive:NN \binoppenalty \tex_binoppenalty:D + \__kernel_primitive:NN \botmark \tex_botmark:D + \__kernel_primitive:NN \box \tex_box:D + \__kernel_primitive:NN \boxmaxdepth \tex_boxmaxdepth:D + \__kernel_primitive:NN \brokenpenalty \tex_brokenpenalty:D + \__kernel_primitive:NN \catcode \tex_catcode:D + \__kernel_primitive:NN \char \tex_char:D + \__kernel_primitive:NN \chardef \tex_chardef:D + \__kernel_primitive:NN \cleaders \tex_cleaders:D + \__kernel_primitive:NN \closein \tex_closein:D + \__kernel_primitive:NN \closeout \tex_closeout:D + \__kernel_primitive:NN \clubpenalty \tex_clubpenalty:D + \__kernel_primitive:NN \copy \tex_copy:D + \__kernel_primitive:NN \count \tex_count:D + \__kernel_primitive:NN \countdef \tex_countdef:D + \__kernel_primitive:NN \cr \tex_cr:D + \__kernel_primitive:NN \crcr \tex_crcr:D + \__kernel_primitive:NN \csname \tex_csname:D + \__kernel_primitive:NN \day \tex_day:D + \__kernel_primitive:NN \deadcycles \tex_deadcycles:D + \__kernel_primitive:NN \def \tex_def:D + \__kernel_primitive:NN \defaulthyphenchar \tex_defaulthyphenchar:D + \__kernel_primitive:NN \defaultskewchar \tex_defaultskewchar:D + \__kernel_primitive:NN \delcode \tex_delcode:D + \__kernel_primitive:NN \delimiter \tex_delimiter:D + \__kernel_primitive:NN \delimiterfactor \tex_delimiterfactor:D + \__kernel_primitive:NN \delimitershortfall \tex_delimitershortfall:D + \__kernel_primitive:NN \dimen \tex_dimen:D + \__kernel_primitive:NN \dimendef \tex_dimendef:D + \__kernel_primitive:NN \discretionary \tex_discretionary:D + \__kernel_primitive:NN \displayindent \tex_displayindent:D + \__kernel_primitive:NN \displaylimits \tex_displaylimits:D + \__kernel_primitive:NN \displaystyle \tex_displaystyle:D + \__kernel_primitive:NN \displaywidowpenalty \tex_displaywidowpenalty:D + \__kernel_primitive:NN \displaywidth \tex_displaywidth:D + \__kernel_primitive:NN \divide \tex_divide:D + \__kernel_primitive:NN \doublehyphendemerits \tex_doublehyphendemerits:D + \__kernel_primitive:NN \dp \tex_dp:D + \__kernel_primitive:NN \dump \tex_dump:D + \__kernel_primitive:NN \edef \tex_edef:D + \__kernel_primitive:NN \else \tex_else:D + \__kernel_primitive:NN \emergencystretch \tex_emergencystretch:D + \__kernel_primitive:NN \end \tex_end:D + \__kernel_primitive:NN \endcsname \tex_endcsname:D + \__kernel_primitive:NN \endgroup \tex_endgroup:D + \__kernel_primitive:NN \endinput \tex_endinput:D + \__kernel_primitive:NN \endlinechar \tex_endlinechar:D + \__kernel_primitive:NN \eqno \tex_eqno:D + \__kernel_primitive:NN \errhelp \tex_errhelp:D + \__kernel_primitive:NN \errmessage \tex_errmessage:D + \__kernel_primitive:NN \errorcontextlines \tex_errorcontextlines:D + \__kernel_primitive:NN \errorstopmode \tex_errorstopmode:D + \__kernel_primitive:NN \escapechar \tex_escapechar:D + \__kernel_primitive:NN \everycr \tex_everycr:D + \__kernel_primitive:NN \everydisplay \tex_everydisplay:D + \__kernel_primitive:NN \everyhbox \tex_everyhbox:D + \__kernel_primitive:NN \everyjob \tex_everyjob:D + \__kernel_primitive:NN \everymath \tex_everymath:D + \__kernel_primitive:NN \everypar \tex_everypar:D + \__kernel_primitive:NN \everyvbox \tex_everyvbox:D + \__kernel_primitive:NN \exhyphenpenalty \tex_exhyphenpenalty:D + \__kernel_primitive:NN \expandafter \tex_expandafter:D + \__kernel_primitive:NN \fam \tex_fam:D + \__kernel_primitive:NN \fi \tex_fi:D + \__kernel_primitive:NN \finalhyphendemerits \tex_finalhyphendemerits:D + \__kernel_primitive:NN \firstmark \tex_firstmark:D + \__kernel_primitive:NN \floatingpenalty \tex_floatingpenalty:D + \__kernel_primitive:NN \font \tex_font:D + \__kernel_primitive:NN \fontdimen \tex_fontdimen:D + \__kernel_primitive:NN \fontname \tex_fontname:D + \__kernel_primitive:NN \futurelet \tex_futurelet:D + \__kernel_primitive:NN \gdef \tex_gdef:D + \__kernel_primitive:NN \global \tex_global:D + \__kernel_primitive:NN \globaldefs \tex_globaldefs:D + \__kernel_primitive:NN \halign \tex_halign:D + \__kernel_primitive:NN \hangafter \tex_hangafter:D + \__kernel_primitive:NN \hangindent \tex_hangindent:D + \__kernel_primitive:NN \hbadness \tex_hbadness:D + \__kernel_primitive:NN \hbox \tex_hbox:D + \__kernel_primitive:NN \hfil \tex_hfil:D + \__kernel_primitive:NN \hfill \tex_hfill:D + \__kernel_primitive:NN \hfilneg \tex_hfilneg:D + \__kernel_primitive:NN \hfuzz \tex_hfuzz:D + \__kernel_primitive:NN \hoffset \tex_hoffset:D + \__kernel_primitive:NN \holdinginserts \tex_holdinginserts:D + \__kernel_primitive:NN \hrule \tex_hrule:D + \__kernel_primitive:NN \hsize \tex_hsize:D + \__kernel_primitive:NN \hskip \tex_hskip:D + \__kernel_primitive:NN \hss \tex_hss:D + \__kernel_primitive:NN \ht \tex_ht:D + \__kernel_primitive:NN \hyphenation \tex_hyphenation:D + \__kernel_primitive:NN \hyphenchar \tex_hyphenchar:D + \__kernel_primitive:NN \hyphenpenalty \tex_hyphenpenalty:D + \__kernel_primitive:NN \if \tex_if:D + \__kernel_primitive:NN \ifcase \tex_ifcase:D + \__kernel_primitive:NN \ifcat \tex_ifcat:D + \__kernel_primitive:NN \ifdim \tex_ifdim:D + \__kernel_primitive:NN \ifeof \tex_ifeof:D + \__kernel_primitive:NN \iffalse \tex_iffalse:D + \__kernel_primitive:NN \ifhbox \tex_ifhbox:D + \__kernel_primitive:NN \ifhmode \tex_ifhmode:D + \__kernel_primitive:NN \ifinner \tex_ifinner:D + \__kernel_primitive:NN \ifmmode \tex_ifmmode:D + \__kernel_primitive:NN \ifnum \tex_ifnum:D + \__kernel_primitive:NN \ifodd \tex_ifodd:D + \__kernel_primitive:NN \iftrue \tex_iftrue:D + \__kernel_primitive:NN \ifvbox \tex_ifvbox:D + \__kernel_primitive:NN \ifvmode \tex_ifvmode:D + \__kernel_primitive:NN \ifvoid \tex_ifvoid:D + \__kernel_primitive:NN \ifx \tex_ifx:D + \__kernel_primitive:NN \ignorespaces \tex_ignorespaces:D + \__kernel_primitive:NN \immediate \tex_immediate:D + \__kernel_primitive:NN \indent \tex_indent:D + \__kernel_primitive:NN \input \tex_input:D + \__kernel_primitive:NN \inputlineno \tex_inputlineno:D + \__kernel_primitive:NN \insert \tex_insert:D + \__kernel_primitive:NN \insertpenalties \tex_insertpenalties:D + \__kernel_primitive:NN \interlinepenalty \tex_interlinepenalty:D + \__kernel_primitive:NN \jobname \tex_jobname:D + \__kernel_primitive:NN \kern \tex_kern:D + \__kernel_primitive:NN \language \tex_language:D + \__kernel_primitive:NN \lastbox \tex_lastbox:D + \__kernel_primitive:NN \lastkern \tex_lastkern:D + \__kernel_primitive:NN \lastpenalty \tex_lastpenalty:D + \__kernel_primitive:NN \lastskip \tex_lastskip:D + \__kernel_primitive:NN \lccode \tex_lccode:D + \__kernel_primitive:NN \leaders \tex_leaders:D + \__kernel_primitive:NN \left \tex_left:D + \__kernel_primitive:NN \lefthyphenmin \tex_lefthyphenmin:D + \__kernel_primitive:NN \leftskip \tex_leftskip:D + \__kernel_primitive:NN \leqno \tex_leqno:D + \__kernel_primitive:NN \let \tex_let:D + \__kernel_primitive:NN \limits \tex_limits:D + \__kernel_primitive:NN \linepenalty \tex_linepenalty:D + \__kernel_primitive:NN \lineskip \tex_lineskip:D + \__kernel_primitive:NN \lineskiplimit \tex_lineskiplimit:D + \__kernel_primitive:NN \long \tex_long:D + \__kernel_primitive:NN \looseness \tex_looseness:D + \__kernel_primitive:NN \lower \tex_lower:D + \__kernel_primitive:NN \lowercase \tex_lowercase:D + \__kernel_primitive:NN \mag \tex_mag:D + \__kernel_primitive:NN \mark \tex_mark:D + \__kernel_primitive:NN \mathaccent \tex_mathaccent:D + \__kernel_primitive:NN \mathbin \tex_mathbin:D + \__kernel_primitive:NN \mathchar \tex_mathchar:D + \__kernel_primitive:NN \mathchardef \tex_mathchardef:D + \__kernel_primitive:NN \mathchoice \tex_mathchoice:D + \__kernel_primitive:NN \mathclose \tex_mathclose:D + \__kernel_primitive:NN \mathcode \tex_mathcode:D + \__kernel_primitive:NN \mathinner \tex_mathinner:D + \__kernel_primitive:NN \mathop \tex_mathop:D + \__kernel_primitive:NN \mathopen \tex_mathopen:D + \__kernel_primitive:NN \mathord \tex_mathord:D + \__kernel_primitive:NN \mathpunct \tex_mathpunct:D + \__kernel_primitive:NN \mathrel \tex_mathrel:D + \__kernel_primitive:NN \mathsurround \tex_mathsurround:D + \__kernel_primitive:NN \maxdeadcycles \tex_maxdeadcycles:D + \__kernel_primitive:NN \maxdepth \tex_maxdepth:D + \__kernel_primitive:NN \meaning \tex_meaning:D + \__kernel_primitive:NN \medmuskip \tex_medmuskip:D + \__kernel_primitive:NN \message \tex_message:D + \__kernel_primitive:NN \mkern \tex_mkern:D + \__kernel_primitive:NN \month \tex_month:D + \__kernel_primitive:NN \moveleft \tex_moveleft:D + \__kernel_primitive:NN \moveright \tex_moveright:D + \__kernel_primitive:NN \mskip \tex_mskip:D + \__kernel_primitive:NN \multiply \tex_multiply:D + \__kernel_primitive:NN \muskip \tex_muskip:D + \__kernel_primitive:NN \muskipdef \tex_muskipdef:D + \__kernel_primitive:NN \newlinechar \tex_newlinechar:D + \__kernel_primitive:NN \noalign \tex_noalign:D + \__kernel_primitive:NN \noboundary \tex_noboundary:D + \__kernel_primitive:NN \noexpand \tex_noexpand:D + \__kernel_primitive:NN \noindent \tex_noindent:D + \__kernel_primitive:NN \nolimits \tex_nolimits:D + \__kernel_primitive:NN \nonscript \tex_nonscript:D + \__kernel_primitive:NN \nonstopmode \tex_nonstopmode:D + \__kernel_primitive:NN \nulldelimiterspace \tex_nulldelimiterspace:D + \__kernel_primitive:NN \nullfont \tex_nullfont:D + \__kernel_primitive:NN \number \tex_number:D + \__kernel_primitive:NN \omit \tex_omit:D + \__kernel_primitive:NN \openin \tex_openin:D + \__kernel_primitive:NN \openout \tex_openout:D + \__kernel_primitive:NN \or \tex_or:D + \__kernel_primitive:NN \outer \tex_outer:D + \__kernel_primitive:NN \output \tex_output:D + \__kernel_primitive:NN \outputpenalty \tex_outputpenalty:D + \__kernel_primitive:NN \over \tex_over:D + \__kernel_primitive:NN \overfullrule \tex_overfullrule:D + \__kernel_primitive:NN \overline \tex_overline:D + \__kernel_primitive:NN \overwithdelims \tex_overwithdelims:D + \__kernel_primitive:NN \pagedepth \tex_pagedepth:D + \__kernel_primitive:NN \pagefilllstretch \tex_pagefilllstretch:D + \__kernel_primitive:NN \pagefillstretch \tex_pagefillstretch:D + \__kernel_primitive:NN \pagefilstretch \tex_pagefilstretch:D + \__kernel_primitive:NN \pagegoal \tex_pagegoal:D + \__kernel_primitive:NN \pageshrink \tex_pageshrink:D + \__kernel_primitive:NN \pagestretch \tex_pagestretch:D + \__kernel_primitive:NN \pagetotal \tex_pagetotal:D + \__kernel_primitive:NN \par \tex_par:D + \__kernel_primitive:NN \parfillskip \tex_parfillskip:D + \__kernel_primitive:NN \parindent \tex_parindent:D + \__kernel_primitive:NN \parshape \tex_parshape:D + \__kernel_primitive:NN \parskip \tex_parskip:D + \__kernel_primitive:NN \patterns \tex_patterns:D + \__kernel_primitive:NN \pausing \tex_pausing:D + \__kernel_primitive:NN \penalty \tex_penalty:D + \__kernel_primitive:NN \postdisplaypenalty \tex_postdisplaypenalty:D + \__kernel_primitive:NN \predisplaypenalty \tex_predisplaypenalty:D + \__kernel_primitive:NN \predisplaysize \tex_predisplaysize:D + \__kernel_primitive:NN \pretolerance \tex_pretolerance:D + \__kernel_primitive:NN \prevdepth \tex_prevdepth:D + \__kernel_primitive:NN \prevgraf \tex_prevgraf:D + \__kernel_primitive:NN \radical \tex_radical:D + \__kernel_primitive:NN \raise \tex_raise:D + \__kernel_primitive:NN \read \tex_read:D + \__kernel_primitive:NN \relax \tex_relax:D + \__kernel_primitive:NN \relpenalty \tex_relpenalty:D + \__kernel_primitive:NN \right \tex_right:D + \__kernel_primitive:NN \righthyphenmin \tex_righthyphenmin:D + \__kernel_primitive:NN \rightskip \tex_rightskip:D + \__kernel_primitive:NN \romannumeral \tex_romannumeral:D + \__kernel_primitive:NN \scriptfont \tex_scriptfont:D + \__kernel_primitive:NN \scriptscriptfont \tex_scriptscriptfont:D + \__kernel_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D + \__kernel_primitive:NN \scriptspace \tex_scriptspace:D + \__kernel_primitive:NN \scriptstyle \tex_scriptstyle:D + \__kernel_primitive:NN \scrollmode \tex_scrollmode:D + \__kernel_primitive:NN \setbox \tex_setbox:D + \__kernel_primitive:NN \setlanguage \tex_setlanguage:D + \__kernel_primitive:NN \sfcode \tex_sfcode:D + \__kernel_primitive:NN \shipout \tex_shipout:D + \__kernel_primitive:NN \show \tex_show:D + \__kernel_primitive:NN \showbox \tex_showbox:D + \__kernel_primitive:NN \showboxbreadth \tex_showboxbreadth:D + \__kernel_primitive:NN \showboxdepth \tex_showboxdepth:D + \__kernel_primitive:NN \showlists \tex_showlists:D + \__kernel_primitive:NN \showthe \tex_showthe:D + \__kernel_primitive:NN \skewchar \tex_skewchar:D + \__kernel_primitive:NN \skip \tex_skip:D + \__kernel_primitive:NN \skipdef \tex_skipdef:D + \__kernel_primitive:NN \spacefactor \tex_spacefactor:D + \__kernel_primitive:NN \spaceskip \tex_spaceskip:D + \__kernel_primitive:NN \span \tex_span:D + \__kernel_primitive:NN \special \tex_special:D + \__kernel_primitive:NN \splitbotmark \tex_splitbotmark:D + \__kernel_primitive:NN \splitfirstmark \tex_splitfirstmark:D + \__kernel_primitive:NN \splitmaxdepth \tex_splitmaxdepth:D + \__kernel_primitive:NN \splittopskip \tex_splittopskip:D + \__kernel_primitive:NN \string \tex_string:D + \__kernel_primitive:NN \tabskip \tex_tabskip:D + \__kernel_primitive:NN \textfont \tex_textfont:D + \__kernel_primitive:NN \textstyle \tex_textstyle:D + \__kernel_primitive:NN \the \tex_the:D + \__kernel_primitive:NN \thickmuskip \tex_thickmuskip:D + \__kernel_primitive:NN \thinmuskip \tex_thinmuskip:D + \__kernel_primitive:NN \time \tex_time:D + \__kernel_primitive:NN \toks \tex_toks:D + \__kernel_primitive:NN \toksdef \tex_toksdef:D + \__kernel_primitive:NN \tolerance \tex_tolerance:D + \__kernel_primitive:NN \topmark \tex_topmark:D + \__kernel_primitive:NN \topskip \tex_topskip:D + \__kernel_primitive:NN \tracingcommands \tex_tracingcommands:D + \__kernel_primitive:NN \tracinglostchars \tex_tracinglostchars:D + \__kernel_primitive:NN \tracingmacros \tex_tracingmacros:D + \__kernel_primitive:NN \tracingonline \tex_tracingonline:D + \__kernel_primitive:NN \tracingoutput \tex_tracingoutput:D + \__kernel_primitive:NN \tracingpages \tex_tracingpages:D + \__kernel_primitive:NN \tracingparagraphs \tex_tracingparagraphs:D + \__kernel_primitive:NN \tracingrestores \tex_tracingrestores:D + \__kernel_primitive:NN \tracingstats \tex_tracingstats:D + \__kernel_primitive:NN \uccode \tex_uccode:D + \__kernel_primitive:NN \uchyph \tex_uchyph:D + \__kernel_primitive:NN \underline \tex_underline:D + \__kernel_primitive:NN \unhbox \tex_unhbox:D + \__kernel_primitive:NN \unhcopy \tex_unhcopy:D + \__kernel_primitive:NN \unkern \tex_unkern:D + \__kernel_primitive:NN \unpenalty \tex_unpenalty:D + \__kernel_primitive:NN \unskip \tex_unskip:D + \__kernel_primitive:NN \unvbox \tex_unvbox:D + \__kernel_primitive:NN \unvcopy \tex_unvcopy:D + \__kernel_primitive:NN \uppercase \tex_uppercase:D + \__kernel_primitive:NN \vadjust \tex_vadjust:D + \__kernel_primitive:NN \valign \tex_valign:D + \__kernel_primitive:NN \vbadness \tex_vbadness:D + \__kernel_primitive:NN \vbox \tex_vbox:D + \__kernel_primitive:NN \vcenter \tex_vcenter:D + \__kernel_primitive:NN \vfil \tex_vfil:D + \__kernel_primitive:NN \vfill \tex_vfill:D + \__kernel_primitive:NN \vfilneg \tex_vfilneg:D + \__kernel_primitive:NN \vfuzz \tex_vfuzz:D + \__kernel_primitive:NN \voffset \tex_voffset:D + \__kernel_primitive:NN \vrule \tex_vrule:D + \__kernel_primitive:NN \vsize \tex_vsize:D + \__kernel_primitive:NN \vskip \tex_vskip:D + \__kernel_primitive:NN \vsplit \tex_vsplit:D + \__kernel_primitive:NN \vss \tex_vss:D + \__kernel_primitive:NN \vtop \tex_vtop:D + \__kernel_primitive:NN \wd \tex_wd:D + \__kernel_primitive:NN \widowpenalty \tex_widowpenalty:D + \__kernel_primitive:NN \write \tex_write:D + \__kernel_primitive:NN \xdef \tex_xdef:D + \__kernel_primitive:NN \xleaders \tex_xleaders:D + \__kernel_primitive:NN \xspaceskip \tex_xspaceskip:D + \__kernel_primitive:NN \year \tex_year:D % \end{macrocode} % Since \LaTeX3 requires at least the \eTeX{} extensions, % we also rename the additional primitives. These are all % given the prefix | \etex_|. % \begin{macrocode} - \__kernel_primitive:NN \beginL \etex_beginL:D - \__kernel_primitive:NN \beginR \etex_beginR:D - \__kernel_primitive:NN \botmarks \etex_botmarks:D - \__kernel_primitive:NN \clubpenalties \etex_clubpenalties:D - \__kernel_primitive:NN \currentgrouplevel \etex_currentgrouplevel:D - \__kernel_primitive:NN \currentgrouptype \etex_currentgrouptype:D - \__kernel_primitive:NN \currentifbranch \etex_currentifbranch:D - \__kernel_primitive:NN \currentiflevel \etex_currentiflevel:D - \__kernel_primitive:NN \currentiftype \etex_currentiftype:D - \__kernel_primitive:NN \detokenize \etex_detokenize:D - \__kernel_primitive:NN \dimexpr \etex_dimexpr:D - \__kernel_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D - \__kernel_primitive:NN \endL \etex_endL:D - \__kernel_primitive:NN \endR \etex_endR:D - \__kernel_primitive:NN \eTeXrevision \etex_eTeXrevision:D - \__kernel_primitive:NN \eTeXversion \etex_eTeXversion:D - \__kernel_primitive:NN \everyeof \etex_everyeof:D - \__kernel_primitive:NN \firstmarks \etex_firstmarks:D - \__kernel_primitive:NN \fontchardp \etex_fontchardp:D - \__kernel_primitive:NN \fontcharht \etex_fontcharht:D - \__kernel_primitive:NN \fontcharic \etex_fontcharic:D - \__kernel_primitive:NN \fontcharwd \etex_fontcharwd:D - \__kernel_primitive:NN \glueexpr \etex_glueexpr:D - \__kernel_primitive:NN \glueshrink \etex_glueshrink:D - \__kernel_primitive:NN \glueshrinkorder \etex_glueshrinkorder:D - \__kernel_primitive:NN \gluestretch \etex_gluestretch:D - \__kernel_primitive:NN \gluestretchorder \etex_gluestretchorder:D - \__kernel_primitive:NN \gluetomu \etex_gluetomu:D - \__kernel_primitive:NN \ifcsname \etex_ifcsname:D - \__kernel_primitive:NN \ifdefined \etex_ifdefined:D - \__kernel_primitive:NN \iffontchar \etex_iffontchar:D - \__kernel_primitive:NN \interactionmode \etex_interactionmode:D - \__kernel_primitive:NN \interlinepenalties \etex_interlinepenalties:D - \__kernel_primitive:NN \lastlinefit \etex_lastlinefit:D - \__kernel_primitive:NN \lastnodetype \etex_lastnodetype:D - \__kernel_primitive:NN \marks \etex_marks:D - \__kernel_primitive:NN \middle \etex_middle:D - \__kernel_primitive:NN \muexpr \etex_muexpr:D - \__kernel_primitive:NN \mutoglue \etex_mutoglue:D - \__kernel_primitive:NN \numexpr \etex_numexpr:D - \__kernel_primitive:NN \pagediscards \etex_pagediscards:D - \__kernel_primitive:NN \parshapedimen \etex_parshapedimen:D - \__kernel_primitive:NN \parshapeindent \etex_parshapeindent:D - \__kernel_primitive:NN \parshapelength \etex_parshapelength:D - \__kernel_primitive:NN \predisplaydirection \etex_predisplaydirection:D - \__kernel_primitive:NN \protected \etex_protected:D - \__kernel_primitive:NN \readline \etex_readline:D - \__kernel_primitive:NN \savinghyphcodes \etex_savinghyphcodes:D - \__kernel_primitive:NN \savingvdiscards \etex_savingvdiscards:D - \__kernel_primitive:NN \scantokens \etex_scantokens:D - \__kernel_primitive:NN \showgroups \etex_showgroups:D - \__kernel_primitive:NN \showifs \etex_showifs:D - \__kernel_primitive:NN \showtokens \etex_showtokens:D - \__kernel_primitive:NN \splitbotmarks \etex_splitbotmarks:D - \__kernel_primitive:NN \splitdiscards \etex_splitdiscards:D - \__kernel_primitive:NN \splitfirstmarks \etex_splitfirstmarks:D - \__kernel_primitive:NN \TeXXeTstate \etex_TeXXeTstate:D - \__kernel_primitive:NN \topmarks \etex_topmarks:D - \__kernel_primitive:NN \tracingassigns \etex_tracingassigns:D - \__kernel_primitive:NN \tracinggroups \etex_tracinggroups:D - \__kernel_primitive:NN \tracingifs \etex_tracingifs:D - \__kernel_primitive:NN \tracingnesting \etex_tracingnesting:D - \__kernel_primitive:NN \tracingscantokens \etex_tracingscantokens:D - \__kernel_primitive:NN \unexpanded \etex_unexpanded:D - \__kernel_primitive:NN \unless \etex_unless:D - \__kernel_primitive:NN \widowpenalties \etex_widowpenalties:D + \__kernel_primitive:NN \beginL \etex_beginL:D + \__kernel_primitive:NN \beginR \etex_beginR:D + \__kernel_primitive:NN \botmarks \etex_botmarks:D + \__kernel_primitive:NN \clubpenalties \etex_clubpenalties:D + \__kernel_primitive:NN \currentgrouplevel \etex_currentgrouplevel:D + \__kernel_primitive:NN \currentgrouptype \etex_currentgrouptype:D + \__kernel_primitive:NN \currentifbranch \etex_currentifbranch:D + \__kernel_primitive:NN \currentiflevel \etex_currentiflevel:D + \__kernel_primitive:NN \currentiftype \etex_currentiftype:D + \__kernel_primitive:NN \detokenize \etex_detokenize:D + \__kernel_primitive:NN \dimexpr \etex_dimexpr:D + \__kernel_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D + \__kernel_primitive:NN \endL \etex_endL:D + \__kernel_primitive:NN \endR \etex_endR:D + \__kernel_primitive:NN \eTeXrevision \etex_eTeXrevision:D + \__kernel_primitive:NN \eTeXversion \etex_eTeXversion:D + \__kernel_primitive:NN \everyeof \etex_everyeof:D + \__kernel_primitive:NN \firstmarks \etex_firstmarks:D + \__kernel_primitive:NN \fontchardp \etex_fontchardp:D + \__kernel_primitive:NN \fontcharht \etex_fontcharht:D + \__kernel_primitive:NN \fontcharic \etex_fontcharic:D + \__kernel_primitive:NN \fontcharwd \etex_fontcharwd:D + \__kernel_primitive:NN \glueexpr \etex_glueexpr:D + \__kernel_primitive:NN \glueshrink \etex_glueshrink:D + \__kernel_primitive:NN \glueshrinkorder \etex_glueshrinkorder:D + \__kernel_primitive:NN \gluestretch \etex_gluestretch:D + \__kernel_primitive:NN \gluestretchorder \etex_gluestretchorder:D + \__kernel_primitive:NN \gluetomu \etex_gluetomu:D + \__kernel_primitive:NN \ifcsname \etex_ifcsname:D + \__kernel_primitive:NN \ifdefined \etex_ifdefined:D + \__kernel_primitive:NN \iffontchar \etex_iffontchar:D + \__kernel_primitive:NN \interactionmode \etex_interactionmode:D + \__kernel_primitive:NN \interlinepenalties \etex_interlinepenalties:D + \__kernel_primitive:NN \lastlinefit \etex_lastlinefit:D + \__kernel_primitive:NN \lastnodetype \etex_lastnodetype:D + \__kernel_primitive:NN \marks \etex_marks:D + \__kernel_primitive:NN \middle \etex_middle:D + \__kernel_primitive:NN \muexpr \etex_muexpr:D + \__kernel_primitive:NN \mutoglue \etex_mutoglue:D + \__kernel_primitive:NN \numexpr \etex_numexpr:D + \__kernel_primitive:NN \pagediscards \etex_pagediscards:D + \__kernel_primitive:NN \parshapedimen \etex_parshapedimen:D + \__kernel_primitive:NN \parshapeindent \etex_parshapeindent:D + \__kernel_primitive:NN \parshapelength \etex_parshapelength:D + \__kernel_primitive:NN \predisplaydirection \etex_predisplaydirection:D + \__kernel_primitive:NN \protected \etex_protected:D + \__kernel_primitive:NN \readline \etex_readline:D + \__kernel_primitive:NN \savinghyphcodes \etex_savinghyphcodes:D + \__kernel_primitive:NN \savingvdiscards \etex_savingvdiscards:D + \__kernel_primitive:NN \scantokens \etex_scantokens:D + \__kernel_primitive:NN \showgroups \etex_showgroups:D + \__kernel_primitive:NN \showifs \etex_showifs:D + \__kernel_primitive:NN \showtokens \etex_showtokens:D + \__kernel_primitive:NN \splitbotmarks \etex_splitbotmarks:D + \__kernel_primitive:NN \splitdiscards \etex_splitdiscards:D + \__kernel_primitive:NN \splitfirstmarks \etex_splitfirstmarks:D + \__kernel_primitive:NN \TeXXeTstate \etex_TeXXeTstate:D + \__kernel_primitive:NN \topmarks \etex_topmarks:D + \__kernel_primitive:NN \tracingassigns \etex_tracingassigns:D + \__kernel_primitive:NN \tracinggroups \etex_tracinggroups:D + \__kernel_primitive:NN \tracingifs \etex_tracingifs:D + \__kernel_primitive:NN \tracingnesting \etex_tracingnesting:D + \__kernel_primitive:NN \tracingscantokens \etex_tracingscantokens:D + \__kernel_primitive:NN \unexpanded \etex_unexpanded:D + \__kernel_primitive:NN \unless \etex_unless:D + \__kernel_primitive:NN \widowpenalties \etex_widowpenalties:D % \end{macrocode} % The newer primitives are more complex: there are an awful lot of them, % and we don't use them all at the moment. So the following is selective, @@ -568,130 +568,152 @@ % are not related to PDF output. These ones related to PDF output or only % work in PDF mode. % \begin{macrocode} - \__kernel_primitive:NN \pdfannot \pdftex_pdfannot:D - \__kernel_primitive:NN \pdfcatalog \pdftex_pdfcatalog:D - \__kernel_primitive:NN \pdfcompresslevel \pdftex_pdfcompresslevel:D - \__kernel_primitive:NN \pdfcolorstack \pdftex_pdfcolorstack:D - \__kernel_primitive:NN \pdfcolorstackinit \pdftex_pdfcolorstackinit:D - \__kernel_primitive:NN \pdfcreationdate \pdftex_pdfcreationdate:D - \__kernel_primitive:NN \pdfdecimaldigits \pdftex_pdfdecimaldigits:D - \__kernel_primitive:NN \pdfdest \pdftex_pdfdest:D - \__kernel_primitive:NN \pdfdestmargin \pdftex_pdfdestmargin:D - \__kernel_primitive:NN \pdfendlink \pdftex_pdfendlink:D - \__kernel_primitive:NN \pdfendthread \pdftex_pdfendthread:D - \__kernel_primitive:NN \pdffontattr \pdftex_pdffontattr:D - \__kernel_primitive:NN \pdffontname \pdftex_pdffontname:D - \__kernel_primitive:NN \pdffontobjnum \pdftex_pdffontobjnum:D - \__kernel_primitive:NN \pdfgamma \pdftex_pdfgamma:D - \__kernel_primitive:NN \pdfimageapplygamma \pdftex_pdfimageapplygamma:D - \__kernel_primitive:NN \pdfimagegamma \pdftex_pdfimagegamma:D - \__kernel_primitive:NN \pdfgentounicode \pdftex_pdfgentounicode:D - \__kernel_primitive:NN \pdfglyphtounicode \pdftex_pdfglyphtounicode:D - \__kernel_primitive:NN \pdfhorigin \pdftex_pdfhorigin:D - \__kernel_primitive:NN \pdfimagehicolor \pdftex_pdfimagehicolor:D - \__kernel_primitive:NN \pdfimageresolution \pdftex_pdfimageresolution:D - \__kernel_primitive:NN \pdfincludechars \pdftex_pdfincludechars:D - \__kernel_primitive:NN \pdfinclusioncopyfonts \pdftex_pdfinclusioncopyfonts:D - \__kernel_primitive:NN \pdfinclusionerrorlevel \pdftex_pdfinclusionerrorlevel:D - \__kernel_primitive:NN \pdfinfo \pdftex_pdfinfo:D - \__kernel_primitive:NN \pdflastannot \pdftex_pdflastannot:D - \__kernel_primitive:NN \pdflastlink \pdftex_pdflastlink:D - \__kernel_primitive:NN \pdflastobj \pdftex_pdflastobj:D - \__kernel_primitive:NN \pdflastxform \pdftex_pdflastxform:D - \__kernel_primitive:NN \pdflastximage \pdftex_pdflastximage:D - \__kernel_primitive:NN \pdflastximagecolordepth \pdftex_pdflastximagecolordepth:D - \__kernel_primitive:NN \pdflastximagepages \pdftex_pdflastximagepages:D - \__kernel_primitive:NN \pdflinkmargin \pdftex_pdflinkmargin:D - \__kernel_primitive:NN \pdfliteral \pdftex_pdfliteral:D - \__kernel_primitive:NN \pdfminorversion \pdftex_pdfminorversion:D - \__kernel_primitive:NN \pdfnames \pdftex_pdfnames:D - \__kernel_primitive:NN \pdfobj \pdftex_pdfobj:D - \__kernel_primitive:NN \pdfobjcompresslevel \pdftex_pdfobjcompresslevel:D - \__kernel_primitive:NN \pdfoutline \pdftex_pdfoutline:D - \__kernel_primitive:NN \pdfoutput \pdftex_pdfoutput:D - \__kernel_primitive:NN \pdfpageattr \pdftex_pdfpageattr:D - \__kernel_primitive:NN \pdfpagebox \pdftex_pdfpagebox:D - \__kernel_primitive:NN \pdfpageref \pdftex_pdfpageref:D - \__kernel_primitive:NN \pdfpageresources \pdftex_pdfpageresources:D - \__kernel_primitive:NN \pdfpagesattr \pdftex_pdfpagesattr:D - \__kernel_primitive:NN \pdfrefobj \pdftex_pdfrefobj:D - \__kernel_primitive:NN \pdfrefxform \pdftex_pdfrefxform:D - \__kernel_primitive:NN \pdfrefximage \pdftex_pdfrefximage:D - \__kernel_primitive:NN \pdfrestore \pdftex_pdfrestore:D - \__kernel_primitive:NN \pdfretval \pdftex_pdfretval:D - \__kernel_primitive:NN \pdfsave \pdftex_pdfsave:D - \__kernel_primitive:NN \pdfsetmatrix \pdftex_pdfsetmatrix:D - \__kernel_primitive:NN \pdfstartlink \pdftex_pdfstartlink:D - \__kernel_primitive:NN \pdfstartthread \pdftex_pdfstartthread:D - \__kernel_primitive:NN \pdfthread \pdftex_pdfthread:D - \__kernel_primitive:NN \pdfthreadmargin \pdftex_pdfthreadmargin:D - \__kernel_primitive:NN \pdftrailer \pdftex_pdftrailer:D - \__kernel_primitive:NN \pdfuniqueresname \pdftex_pdfuniqueresname:D - \__kernel_primitive:NN \pdfvorigin \pdftex_pdfvorigin:D - \__kernel_primitive:NN \pdfxform \pdftex_pdfxform:D - \__kernel_primitive:NN \pdfxformattr \pdftex_pdfxformattr:D - \__kernel_primitive:NN \pdfxformname \pdftex_pdfxformname:D - \__kernel_primitive:NN \pdfxformresources \pdftex_pdfxformresources:D - \__kernel_primitive:NN \pdfximage \pdftex_pdfximage:D - \__kernel_primitive:NN \pdfximagebbox \pdftex_pdfximagebbox:D + \__kernel_primitive:NN \pdfannot \pdftex_pdfannot:D + \__kernel_primitive:NN \pdfcatalog \pdftex_pdfcatalog:D + \__kernel_primitive:NN \pdfcompresslevel \pdftex_pdfcompresslevel:D + \__kernel_primitive:NN \pdfcolorstack \pdftex_pdfcolorstack:D + \__kernel_primitive:NN \pdfcolorstackinit \pdftex_pdfcolorstackinit:D + \__kernel_primitive:NN \pdfcreationdate \pdftex_pdfcreationdate:D + \__kernel_primitive:NN \pdfdecimaldigits \pdftex_pdfdecimaldigits:D + \__kernel_primitive:NN \pdfdest \pdftex_pdfdest:D + \__kernel_primitive:NN \pdfdestmargin \pdftex_pdfdestmargin:D + \__kernel_primitive:NN \pdfendlink \pdftex_pdfendlink:D + \__kernel_primitive:NN \pdfendthread \pdftex_pdfendthread:D + \__kernel_primitive:NN \pdffontattr \pdftex_pdffontattr:D + \__kernel_primitive:NN \pdffontname \pdftex_pdffontname:D + \__kernel_primitive:NN \pdffontobjnum \pdftex_pdffontobjnum:D + \__kernel_primitive:NN \pdfgamma \pdftex_pdfgamma:D + \__kernel_primitive:NN \pdfimageapplygamma \pdftex_pdfimageapplygamma:D + \__kernel_primitive:NN \pdfimagegamma \pdftex_pdfimagegamma:D + \__kernel_primitive:NN \pdfgentounicode \pdftex_pdfgentounicode:D + \__kernel_primitive:NN \pdfglyphtounicode \pdftex_pdfglyphtounicode:D + \__kernel_primitive:NN \pdfhorigin \pdftex_pdfhorigin:D + \__kernel_primitive:NN \pdfimagehicolor \pdftex_pdfimagehicolor:D + \__kernel_primitive:NN \pdfimageresolution \pdftex_pdfimageresolution:D + \__kernel_primitive:NN \pdfincludechars \pdftex_pdfincludechars:D + \__kernel_primitive:NN \pdfinclusioncopyfonts \pdftex_pdfinclusioncopyfonts:D + \__kernel_primitive:NN \pdfinclusionerrorlevel \pdftex_pdfinclusionerrorlevel:D + \__kernel_primitive:NN \pdfinfo \pdftex_pdfinfo:D + \__kernel_primitive:NN \pdflastannot \pdftex_pdflastannot:D + \__kernel_primitive:NN \pdflastlink \pdftex_pdflastlink:D + \__kernel_primitive:NN \pdflastobj \pdftex_pdflastobj:D + \__kernel_primitive:NN \pdflastxform \pdftex_pdflastxform:D + \__kernel_primitive:NN \pdflastximage \pdftex_pdflastximage:D + \__kernel_primitive:NN \pdflastximagecolordepth \pdftex_pdflastximagecolordepth:D + \__kernel_primitive:NN \pdflastximagepages \pdftex_pdflastximagepages:D + \__kernel_primitive:NN \pdflinkmargin \pdftex_pdflinkmargin:D + \__kernel_primitive:NN \pdfliteral \pdftex_pdfliteral:D + \__kernel_primitive:NN \pdfminorversion \pdftex_pdfminorversion:D + \__kernel_primitive:NN \pdfnames \pdftex_pdfnames:D + \__kernel_primitive:NN \pdfobj \pdftex_pdfobj:D + \__kernel_primitive:NN \pdfobjcompresslevel \pdftex_pdfobjcompresslevel:D + \__kernel_primitive:NN \pdfoutline \pdftex_pdfoutline:D + \__kernel_primitive:NN \pdfoutput \pdftex_pdfoutput:D + \__kernel_primitive:NN \pdfpageattr \pdftex_pdfpageattr:D + \__kernel_primitive:NN \pdfpagebox \pdftex_pdfpagebox:D + \__kernel_primitive:NN \pdfpageref \pdftex_pdfpageref:D + \__kernel_primitive:NN \pdfpageresources \pdftex_pdfpageresources:D + \__kernel_primitive:NN \pdfpagesattr \pdftex_pdfpagesattr:D + \__kernel_primitive:NN \pdfrefobj \pdftex_pdfrefobj:D + \__kernel_primitive:NN \pdfrefxform \pdftex_pdfrefxform:D + \__kernel_primitive:NN \pdfrefximage \pdftex_pdfrefximage:D + \__kernel_primitive:NN \pdfrestore \pdftex_pdfrestore:D + \__kernel_primitive:NN \pdfretval \pdftex_pdfretval:D + \__kernel_primitive:NN \pdfsave \pdftex_pdfsave:D + \__kernel_primitive:NN \pdfsetmatrix \pdftex_pdfsetmatrix:D + \__kernel_primitive:NN \pdfstartlink \pdftex_pdfstartlink:D + \__kernel_primitive:NN \pdfstartthread \pdftex_pdfstartthread:D + \__kernel_primitive:NN \pdfthread \pdftex_pdfthread:D + \__kernel_primitive:NN \pdfthreadmargin \pdftex_pdfthreadmargin:D + \__kernel_primitive:NN \pdftrailer \pdftex_pdftrailer:D + \__kernel_primitive:NN \pdfuniqueresname \pdftex_pdfuniqueresname:D + \__kernel_primitive:NN \pdfvorigin \pdftex_pdfvorigin:D + \__kernel_primitive:NN \pdfxform \pdftex_pdfxform:D + \__kernel_primitive:NN \pdfxformattr \pdftex_pdfxformattr:D + \__kernel_primitive:NN \pdfxformname \pdftex_pdfxformname:D + \__kernel_primitive:NN \pdfxformresources \pdftex_pdfxformresources:D + \__kernel_primitive:NN \pdfximage \pdftex_pdfximage:D + \__kernel_primitive:NN \pdfximagebbox \pdftex_pdfximagebbox:D % \end{macrocode} % While these are not. % \begin{macrocode} - \__kernel_primitive:NN \ifpdfabsdim \pdftex_ifabsdim:D - \__kernel_primitive:NN \ifpdfabsnum \pdftex_ifabsnum:D - \__kernel_primitive:NN \ifpdfprimitive \pdftex_ifprimitive:D - \__kernel_primitive:NN \pdfadjustspacing \pdftex_adjustspacing:D - \__kernel_primitive:NN \pdfcopyfont \pdftex_copyfont:D - \__kernel_primitive:NN \pdfdraftmode \pdftex_draftmode:D - \__kernel_primitive:NN \pdfeachlinedepth \pdftex_eachlinedepth:D - \__kernel_primitive:NN \pdfeachlineheight \pdftex_eachlineheight:D - \__kernel_primitive:NN \pdffirstlineheight \pdftex_firstlineheight:D - \__kernel_primitive:NN \pdffontexpand \pdftex_fontexpand:D - \__kernel_primitive:NN \pdffontsize \pdftex_fontsize:D - \__kernel_primitive:NN \pdfignoreddimen \pdftex_ignoreddimen:D - \__kernel_primitive:NN \pdfinsertht \pdftex_insertht:D - \__kernel_primitive:NN \pdflastlinedepth \pdftex_lastlinedepth:D - \__kernel_primitive:NN \pdflastxpos \pdftex_lastxpos:D - \__kernel_primitive:NN \pdflastypos \pdftex_lastypos:D - \__kernel_primitive:NN \pdfmapfile \pdftex_mapfile:D - \__kernel_primitive:NN \pdfmapline \pdftex_mapline:D - \__kernel_primitive:NN \pdfnoligatures \pdftex_noligatures:D - \__kernel_primitive:NN \pdfnormaldeviate \pdftex_normaldeviate:D - \__kernel_primitive:NN \pdfpageheight \pdftex_pageheight:D - \__kernel_primitive:NN \pdfpagewidth \pdftex_pagewidth:D - \__kernel_primitive:NN \pdfpkmode \pdftex_pkmode:D - \__kernel_primitive:NN \pdfpkresolution \pdftex_pkresolution:D - \__kernel_primitive:NN \pdfprimitive \pdftex_primitive:D - \__kernel_primitive:NN \pdfprotrudechars \pdftex_protrudechars:D - \__kernel_primitive:NN \pdfpxdimen \pdftex_pxdimen:D - \__kernel_primitive:NN \pdfrandomseed \pdftex_randomseed:D - \__kernel_primitive:NN \pdfsavepos \pdftex_savepos:D - \__kernel_primitive:NN \pdfstrcmp \pdftex_strcmp:D - \__kernel_primitive:NN \pdfsetrandomseed \pdftex_setrandomseed:D - \__kernel_primitive:NN \pdfshellescape \pdftex_shellescape:D - \__kernel_primitive:NN \pdftracingfonts \pdftex_tracingfonts:D - \__kernel_primitive:NN \pdfuniformdeviate \pdftex_uniformdeviate:D + \__kernel_primitive:NN \ifpdfabsdim \pdftex_ifabsdim:D + \__kernel_primitive:NN \ifpdfabsnum \pdftex_ifabsnum:D + \__kernel_primitive:NN \ifpdfprimitive \pdftex_ifprimitive:D + \__kernel_primitive:NN \pdfadjustspacing \pdftex_adjustspacing:D + \__kernel_primitive:NN \pdfcopyfont \pdftex_copyfont:D + \__kernel_primitive:NN \pdfdraftmode \pdftex_draftmode:D + \__kernel_primitive:NN \pdfeachlinedepth \pdftex_eachlinedepth:D + \__kernel_primitive:NN \pdfeachlineheight \pdftex_eachlineheight:D + \__kernel_primitive:NN \pdffirstlineheight \pdftex_firstlineheight:D + \__kernel_primitive:NN \pdffontexpand \pdftex_fontexpand:D + \__kernel_primitive:NN \pdffontsize \pdftex_fontsize:D + \__kernel_primitive:NN \pdfignoreddimen \pdftex_ignoreddimen:D + \__kernel_primitive:NN \pdfinsertht \pdftex_insertht:D + \__kernel_primitive:NN \pdflastlinedepth \pdftex_lastlinedepth:D + \__kernel_primitive:NN \pdflastxpos \pdftex_lastxpos:D + \__kernel_primitive:NN \pdflastypos \pdftex_lastypos:D + \__kernel_primitive:NN \pdfmapfile \pdftex_mapfile:D + \__kernel_primitive:NN \pdfmapline \pdftex_mapline:D + \__kernel_primitive:NN \pdfnoligatures \pdftex_noligatures:D + \__kernel_primitive:NN \pdfnormaldeviate \pdftex_normaldeviate:D + \__kernel_primitive:NN \pdfpageheight \pdftex_pageheight:D + \__kernel_primitive:NN \pdfpagewidth \pdftex_pagewidth:D + \__kernel_primitive:NN \pdfpkmode \pdftex_pkmode:D + \__kernel_primitive:NN \pdfpkresolution \pdftex_pkresolution:D + \__kernel_primitive:NN \pdfprimitive \pdftex_primitive:D + \__kernel_primitive:NN \pdfprotrudechars \pdftex_protrudechars:D + \__kernel_primitive:NN \pdfpxdimen \pdftex_pxdimen:D + \__kernel_primitive:NN \pdfrandomseed \pdftex_randomseed:D + \__kernel_primitive:NN \pdfsavepos \pdftex_savepos:D + \__kernel_primitive:NN \pdfstrcmp \pdftex_strcmp:D + \__kernel_primitive:NN \pdfsetrandomseed \pdftex_setrandomseed:D + \__kernel_primitive:NN \pdfshellescape \pdftex_shellescape:D + \__kernel_primitive:NN \pdftracingfonts \pdftex_tracingfonts:D + \__kernel_primitive:NN \pdfuniformdeviate \pdftex_uniformdeviate:D % \end{macrocode} % The version primitives are not related to PDF mode but are related to % \pdfTeX{} so retain the full prefix. % \begin{macrocode} - \__kernel_primitive:NN \pdftexbanner \pdftex_pdftexbanner:D - \__kernel_primitive:NN \pdftexrevision \pdftex_pdftexrevision:D - \__kernel_primitive:NN \pdftexversion \pdftex_pdftexversion:D + \__kernel_primitive:NN \pdftexbanner \pdftex_pdftexbanner:D + \__kernel_primitive:NN \pdftexrevision \pdftex_pdftexrevision:D + \__kernel_primitive:NN \pdftexversion \pdftex_pdftexversion:D % \end{macrocode} % These ones appear in \pdfTeX{} but don't have |pdf| in the name at all. % (\tn{synctex} is odd as it's really not from \pdfTeX{} but from SyncTeX!) % \begin{macrocode} - \__kernel_primitive:NN \efcode \pdftex_efcode:D - \__kernel_primitive:NN \ifincsname \pdftex_ifincsname:D - \__kernel_primitive:NN \leftmarginkern \pdftex_leftmarginkern:D - \__kernel_primitive:NN \letterspacefont \pdftex_letterspacefont:D - \__kernel_primitive:NN \lpcode \pdftex_lpcode:D - \__kernel_primitive:NN \quitvmode \pdftex_quitvmode:D - \__kernel_primitive:NN \rightmarginkern \pdftex_rightmarginkern:D - \__kernel_primitive:NN \rpcode \pdftex_rpcode:D - \__kernel_primitive:NN \synctex \pdftex_synctex:D - \__kernel_primitive:NN \tagcode \pdftex_tagcode:D + \__kernel_primitive:NN \efcode \pdftex_efcode:D + \__kernel_primitive:NN \ifincsname \pdftex_ifincsname:D + \__kernel_primitive:NN \leftmarginkern \pdftex_leftmarginkern:D + \__kernel_primitive:NN \letterspacefont \pdftex_letterspacefont:D + \__kernel_primitive:NN \lpcode \pdftex_lpcode:D + \__kernel_primitive:NN \quitvmode \pdftex_quitvmode:D + \__kernel_primitive:NN \rightmarginkern \pdftex_rightmarginkern:D + \__kernel_primitive:NN \rpcode \pdftex_rpcode:D + \__kernel_primitive:NN \synctex \pdftex_synctex:D + \__kernel_primitive:NN \tagcode \pdftex_tagcode:D +% \end{macrocode} +% Post \pdfTeX{} primitive availability gets more complex. Both \XeTeX{} and +% \LuaTeX{} have varying names for some primitives from \pdfTeX{}. Particularly +% for \LuaTeX{} tracking all of that would be hard. Instead, we now check that +% we only save primitives if they actually exist. +% \begin{macrocode} +%</initex|names|package> +%<*initex|package> + \tex_long:D \tex_def:D \use_ii:nn #1#2 {#2} + \tex_long:D \tex_def:D \use_none:n #1 { } + \tex_long:D \tex_def:D \__kernel_primitive:NN #1#2 + { + \etex_ifdefined:D #1 + \tex_expandafter:D \use_ii:nn + \tex_fi:D + \use_none:n { \tex_global:D \tex_let:D #2 #1 } +%<*initex> + \tex_global:D \tex_let:D #1 \tex_undefined:D +%</initex> + } +%</initex|package> +%<*initex|names|package> % \end{macrocode} % \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is % handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}. With @@ -699,124 +721,173 @@ % into the \enquote{base} name. A few cross-compatibility names which lack % the |pdf| of the original are handled later. % \begin{macrocode} - \__kernel_primitive:NN \suppressfontnotfounderror \xetex_suppressfontnotfounderror:D - \__kernel_primitive:NN \XeTeXcharclass \xetex_charclass:D - \__kernel_primitive:NN \XeTeXcharglyph \xetex_charglyph:D - \__kernel_primitive:NN \XeTeXcountfeatures \xetex_countfeatures:D - \__kernel_primitive:NN \XeTeXcountglyphs \xetex_countglyphs:D - \__kernel_primitive:NN \XeTeXcountselectors \xetex_countselectors:D - \__kernel_primitive:NN \XeTeXcountvariations \xetex_countvariations:D - \__kernel_primitive:NN \XeTeXdefaultencoding \xetex_defaultencoding:D - \__kernel_primitive:NN \XeTeXdashbreakstate \xetex_dashbreakstate:D - \__kernel_primitive:NN \XeTeXfeaturecode \xetex_featurecode:D - \__kernel_primitive:NN \XeTeXfeaturename \xetex_featurename:D - \__kernel_primitive:NN \XeTeXfindfeaturebyname \xetex_findfeaturebyname:D - \__kernel_primitive:NN \XeTeXfindselectorbyname \xetex_findselectorbyname:D - \__kernel_primitive:NN \XeTeXfindvariationbyname \xetex_findvariationbyname:D - \__kernel_primitive:NN \XeTeXfirstfontchar \xetex_firstfontchar:D - \__kernel_primitive:NN \XeTeXfonttype \xetex_fonttype:D - \__kernel_primitive:NN \XeTeXglyph \xetex_glyph:D - \__kernel_primitive:NN \XeTeXglyphbounds \xetex_glyphbounds:D - \__kernel_primitive:NN \XeTeXglyphindex \xetex_glyphindex:D - \__kernel_primitive:NN \XeTeXglyphname \xetex_glyphname:D - \__kernel_primitive:NN \XeTeXinputencoding \xetex_inputencoding:D - \__kernel_primitive:NN \XeTeXinputnormalization \xetex_inputnormalization:D - \__kernel_primitive:NN \XeTeXinterchartokenstate \xetex_interchartokenstate:D - \__kernel_primitive:NN \XeTeXinterchartoks \xetex_interchartoks:D - \__kernel_primitive:NN \XeTeXisdefaultselector \xetex_isdefaultselector:D - \__kernel_primitive:NN \XeTeXisexclusivefeature \xetex_isexclusivefeature:D - \__kernel_primitive:NN \XeTeXlastfontchar \xetex_lastfontchar:D - \__kernel_primitive:NN \XeTeXlinebreakskip \xetex_linebreakskip:D - \__kernel_primitive:NN \XeTeXlinebreaklocale \xetex_linebreaklocale:D - \__kernel_primitive:NN \XeTeXlinebreakpenalty \xetex_linebreakpenalty:D - \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcountfeatures:D - \__kernel_primitive:NN \XeTeXOTcountlanguages \xetex_OTcountlanguages:D - \__kernel_primitive:NN \XeTeXOTcountscripts \xetex_OTcountscripts:D - \__kernel_primitive:NN \XeTeXOTfeaturetag \xetex_OTfeaturetag:D - \__kernel_primitive:NN \XeTeXOTlanguagetag \xetex_OTlanguagetag:D - \__kernel_primitive:NN \XeTeXOTscripttag \xetex_OTscripttag:D - \__kernel_primitive:NN \XeTeXpdffile \xetex_pdffile:D - \__kernel_primitive:NN \XeTeXpdfpagecount \xetex_pdfpagecount:D - \__kernel_primitive:NN \XeTeXpicfile \xetex_picfile:D - \__kernel_primitive:NN \XeTeXselectorname \xetex_selectorname:D - \__kernel_primitive:NN \XeTeXtracingfonts \xetex_tracingfonts:D - \__kernel_primitive:NN \XeTeXupwardsmode \xetex_upwardsmode:D - \__kernel_primitive:NN \XeTeXuseglyphmetrics \xetex_useglyphmetrics:D - \__kernel_primitive:NN \XeTeXvariation \xetex_variation:D - \__kernel_primitive:NN \XeTeXvariationdefault \xetex_variationdefault:D - \__kernel_primitive:NN \XeTeXvariationmax \xetex_variationmax:D - \__kernel_primitive:NN \XeTeXvariationmin \xetex_variationmin:D - \__kernel_primitive:NN \XeTeXvariationname \xetex_variationname:D + \__kernel_primitive:NN \suppressfontnotfounderror \xetex_suppressfontnotfounderror:D + \__kernel_primitive:NN \XeTeXcharclass \xetex_charclass:D + \__kernel_primitive:NN \XeTeXcharglyph \xetex_charglyph:D + \__kernel_primitive:NN \XeTeXcountfeatures \xetex_countfeatures:D + \__kernel_primitive:NN \XeTeXcountglyphs \xetex_countglyphs:D + \__kernel_primitive:NN \XeTeXcountselectors \xetex_countselectors:D + \__kernel_primitive:NN \XeTeXcountvariations \xetex_countvariations:D + \__kernel_primitive:NN \XeTeXdefaultencoding \xetex_defaultencoding:D + \__kernel_primitive:NN \XeTeXdashbreakstate \xetex_dashbreakstate:D + \__kernel_primitive:NN \XeTeXfeaturecode \xetex_featurecode:D + \__kernel_primitive:NN \XeTeXfeaturename \xetex_featurename:D + \__kernel_primitive:NN \XeTeXfindfeaturebyname \xetex_findfeaturebyname:D + \__kernel_primitive:NN \XeTeXfindselectorbyname \xetex_findselectorbyname:D + \__kernel_primitive:NN \XeTeXfindvariationbyname \xetex_findvariationbyname:D + \__kernel_primitive:NN \XeTeXfirstfontchar \xetex_firstfontchar:D + \__kernel_primitive:NN \XeTeXfonttype \xetex_fonttype:D + \__kernel_primitive:NN \XeTeXglyph \xetex_glyph:D + \__kernel_primitive:NN \XeTeXglyphbounds \xetex_glyphbounds:D + \__kernel_primitive:NN \XeTeXglyphindex \xetex_glyphindex:D + \__kernel_primitive:NN \XeTeXglyphname \xetex_glyphname:D + \__kernel_primitive:NN \XeTeXinputencoding \xetex_inputencoding:D + \__kernel_primitive:NN \XeTeXinputnormalization \xetex_inputnormalization:D + \__kernel_primitive:NN \XeTeXinterchartokenstate \xetex_interchartokenstate:D + \__kernel_primitive:NN \XeTeXinterchartoks \xetex_interchartoks:D + \__kernel_primitive:NN \XeTeXisdefaultselector \xetex_isdefaultselector:D + \__kernel_primitive:NN \XeTeXisexclusivefeature \xetex_isexclusivefeature:D + \__kernel_primitive:NN \XeTeXlastfontchar \xetex_lastfontchar:D + \__kernel_primitive:NN \XeTeXlinebreakskip \xetex_linebreakskip:D + \__kernel_primitive:NN \XeTeXlinebreaklocale \xetex_linebreaklocale:D + \__kernel_primitive:NN \XeTeXlinebreakpenalty \xetex_linebreakpenalty:D + \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcountfeatures:D + \__kernel_primitive:NN \XeTeXOTcountlanguages \xetex_OTcountlanguages:D + \__kernel_primitive:NN \XeTeXOTcountscripts \xetex_OTcountscripts:D + \__kernel_primitive:NN \XeTeXOTfeaturetag \xetex_OTfeaturetag:D + \__kernel_primitive:NN \XeTeXOTlanguagetag \xetex_OTlanguagetag:D + \__kernel_primitive:NN \XeTeXOTscripttag \xetex_OTscripttag:D + \__kernel_primitive:NN \XeTeXpdffile \xetex_pdffile:D + \__kernel_primitive:NN \XeTeXpdfpagecount \xetex_pdfpagecount:D + \__kernel_primitive:NN \XeTeXpicfile \xetex_picfile:D + \__kernel_primitive:NN \XeTeXselectorname \xetex_selectorname:D + \__kernel_primitive:NN \XeTeXtracingfonts \xetex_tracingfonts:D + \__kernel_primitive:NN \XeTeXupwardsmode \xetex_upwardsmode:D + \__kernel_primitive:NN \XeTeXuseglyphmetrics \xetex_useglyphmetrics:D + \__kernel_primitive:NN \XeTeXvariation \xetex_variation:D + \__kernel_primitive:NN \XeTeXvariationdefault \xetex_variationdefault:D + \__kernel_primitive:NN \XeTeXvariationmax \xetex_variationmax:D + \__kernel_primitive:NN \XeTeXvariationmin \xetex_variationmin:D + \__kernel_primitive:NN \XeTeXvariationname \xetex_variationname:D % \end{macrocode} % The version primitives retain |XeTeX|. % \begin{macrocode} - \__kernel_primitive:NN \XeTeXrevision \xetex_XeTeXrevision:D - \__kernel_primitive:NN \XeTeXversion \xetex_XeTeXversion:D + \__kernel_primitive:NN \XeTeXrevision \xetex_XeTeXrevision:D + \__kernel_primitive:NN \XeTeXversion \xetex_XeTeXversion:D +% \end{macrocode} +% Primitives from \pdfTeX{} that \XeTeX{} renames: also helps with +% \LuaTeX{}. +% \begin{macrocode} + \__kernel_primitive:NN \ifprimitive \pdftex_primitive:D + \__kernel_primitive:NN \primitive \pdftex_primitive:D + \__kernel_primitive:NN \shellescape \pdftex_shellescape:D % \end{macrocode} % Primitives from \LuaTeX{}, some of which have been ported back to % \XeTeX{}. Notice that \tn{expanded} was intended for \pdfTeX{}~1.50 but % as that was not released we call this a \LuaTeX{} primitive. % \begin{macrocode} - \__kernel_primitive:NN \alignmark \luatex_alignmark:D - \__kernel_primitive:NN \aligntab \luatex_aligntab:D - \__kernel_primitive:NN \attribute \luatex_attribute:D - \__kernel_primitive:NN \attributedef \luatex_attributedef:D - \__kernel_primitive:NN \catcodetable \luatex_catcodetable:D - \__kernel_primitive:NN \clearmarks \luatex_clearmarks:D - \__kernel_primitive:NN \crampeddisplaystyle \luatex_crampeddisplaystyle:D - \__kernel_primitive:NN \crampedscriptscriptstyle \luatex_crampedscriptscriptstyle:D - \__kernel_primitive:NN \crampedscriptstyle \luatex_crampedscriptstyle:D - \__kernel_primitive:NN \crampedtextstyle \luatex_crampedtextstyle:D - \__kernel_primitive:NN \directlua \luatex_directlua:D - \__kernel_primitive:NN \expanded \luatex_expanded:D - \__kernel_primitive:NN \fontid \luatex_fontid:D - \__kernel_primitive:NN \formatname \luatex_formatname:D - \__kernel_primitive:NN \hyphenationmin \luatex_hypenationmin:D - \__kernel_primitive:NN \gleaders \luatex_gleaders:D - \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D - \__kernel_primitive:NN \latelua \luatex_latelua:D - \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D - \__kernel_primitive:NN \luafunction \luatex_luafunction:D - \__kernel_primitive:NN \luastartup \luatex_luastartup:D - \__kernel_primitive:NN \luatexdatestamp \luatex_luatexdatestamp:D - \__kernel_primitive:NN \luatexrevision \luatex_luatexrevision:D - \__kernel_primitive:NN \luatexversion \luatex_luatexversion:D - \__kernel_primitive:NN \mathstyle \luatex_mathstyle:D - \__kernel_primitive:NN \nokerns \luatex_nokerns:D - \__kernel_primitive:NN \noligs \luatex_noligs:D - \__kernel_primitive:NN \outputbox \luatex_outputbox:D - \__kernel_primitive:NN \pageleftoffset \luatex_pageleftoffset:D - \__kernel_primitive:NN \pagetopoffset \luatex_pagetopoffset:D - \__kernel_primitive:NN \postexhyphenchar \luatex_postexhyphenchar:D - \__kernel_primitive:NN \posthyphenchar \luatex_posthyphenchar:D - \__kernel_primitive:NN \preexhyphenchar \luatex_preexhyphenchar:D - \__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D - \__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D - \__kernel_primitive:NN \scantextokens \luatex_scantextokens:D - \__kernel_primitive:NN \suppressifcsnameerror \luatex_suppressifcsnameerror:D - \__kernel_primitive:NN \suppresslongerror \luatex_suppresslongerror:D - \__kernel_primitive:NN \suppressmathparerror \luatex_suppressmathparerror:D - \__kernel_primitive:NN \suppressoutererror \luatex_suppressoutererror:D + \__kernel_primitive:NN \alignmark \luatex_alignmark:D + \__kernel_primitive:NN \aligntab \luatex_aligntab:D + \__kernel_primitive:NN \attribute \luatex_attribute:D + \__kernel_primitive:NN \attributedef \luatex_attributedef:D + \__kernel_primitive:NN \catcodetable \luatex_catcodetable:D + \__kernel_primitive:NN \clearmarks \luatex_clearmarks:D + \__kernel_primitive:NN \crampeddisplaystyle \luatex_crampeddisplaystyle:D + \__kernel_primitive:NN \crampedscriptscriptstyle \luatex_crampedscriptscriptstyle:D + \__kernel_primitive:NN \crampedscriptstyle \luatex_crampedscriptstyle:D + \__kernel_primitive:NN \crampedtextstyle \luatex_crampedtextstyle:D + \__kernel_primitive:NN \directlua \luatex_directlua:D + \__kernel_primitive:NN \dviextension \luatex_dviextension:D + \__kernel_primitive:NN \dvifeedback \luatex_dvifeedback:D + \__kernel_primitive:NN \dvivariable \luatex_dvivariable:D + \__kernel_primitive:NN \expanded \luatex_expanded:D + \__kernel_primitive:NN \fontid \luatex_fontid:D + \__kernel_primitive:NN \formatname \luatex_formatname:D + \__kernel_primitive:NN \hyphenationmin \luatex_hypenationmin:D + \__kernel_primitive:NN \gleaders \luatex_gleaders:D + \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D + \__kernel_primitive:NN \latelua \luatex_latelua:D + \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D + \__kernel_primitive:NN \luafunction \luatex_luafunction:D + \__kernel_primitive:NN \luastartup \luatex_luastartup:D + \__kernel_primitive:NN \luatexdatestamp \luatex_luatexdatestamp:D + \__kernel_primitive:NN \luatexrevision \luatex_luatexrevision:D + \__kernel_primitive:NN \luatexversion \luatex_luatexversion:D + \__kernel_primitive:NN \mathdisplayskipmode \luatex_mathdisplayskipmode:D + \__kernel_primitive:NN \matheqnogapstep \luatex_matheqnogapstep:D + \__kernel_primitive:NN \mathoption \luatex_mathoption:D + \__kernel_primitive:NN \mathscriptsmode \luatex_mathscriptsmode:D + \__kernel_primitive:NN \mathstyle \luatex_mathstyle:D + \__kernel_primitive:NN \mathsurroundskip \luatex_mathsurroundskip:D + \__kernel_primitive:NN \nohrule \luatex_nohrule:D + \__kernel_primitive:NN \nokerns \luatex_nokerns:D + \__kernel_primitive:NN \noligs \luatex_noligs:D + \__kernel_primitive:NN \novrule \luatex_novrule:D + \__kernel_primitive:NN \outputbox \luatex_outputbox:D + \__kernel_primitive:NN \pageleftoffset \luatex_pageleftoffset:D + \__kernel_primitive:NN \pagetopoffset \luatex_pagetopoffset:D + \__kernel_primitive:NN \pdfextension \luatex_pdfextension:D + \__kernel_primitive:NN \pdffeedback \luatex_pdffeedback:D + \__kernel_primitive:NN \pdfvariable \luatex_pdfvariable:D + \__kernel_primitive:NN \postexhyphenchar \luatex_postexhyphenchar:D + \__kernel_primitive:NN \posthyphenchar \luatex_posthyphenchar:D + \__kernel_primitive:NN \preexhyphenchar \luatex_preexhyphenchar:D + \__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D + \__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D + \__kernel_primitive:NN \scantextokens \luatex_scantextokens:D + \__kernel_primitive:NN \setfontid \luatex_setfontid:D + \__kernel_primitive:NN \suppressifcsnameerror \luatex_suppressifcsnameerror:D + \__kernel_primitive:NN \suppresslongerror \luatex_suppresslongerror:D + \__kernel_primitive:NN \suppressmathparerror \luatex_suppressmathparerror:D + \__kernel_primitive:NN \suppressoutererror \luatex_suppressoutererror:D % \end{macrocode} % Slightly more awkward are the directional primitives in \LuaTeX{}. These % come from Omega/Aleph, but we do not support those engines and % so it seems most sensible to treat them as \LuaTeX{} primitives for prefix % purposes. % \begin{macrocode} - \__kernel_primitive:NN \bodydir \luatex_bodydir:D - \__kernel_primitive:NN \boxdir \luatex_boxdir:D - \__kernel_primitive:NN \leftghost \luatex_leftghost:D - \__kernel_primitive:NN \localbrokenpenalty \luatex_localbrokenpenalty:D - \__kernel_primitive:NN \localinterlinepenalty \luatex_localinterlinepenalty:D - \__kernel_primitive:NN \localleftbox \luatex_localleftbox:D - \__kernel_primitive:NN \localrightbox \luatex_localrightbox:D - \__kernel_primitive:NN \mathdir \luatex_mathdir:D - \__kernel_primitive:NN \pagebottomoffset \luatex_pagebottomoffset:D - \__kernel_primitive:NN \pagedir \luatex_pagedir:D - \__kernel_primitive:NN \pagerightoffset \luatex_pagerightoffset:D - \__kernel_primitive:NN \pardir \luatex_pardir:D - \__kernel_primitive:NN \rightghost \luatex_rightghost:D - \__kernel_primitive:NN \textdir \luatex_textdir:D + \__kernel_primitive:NN \bodydir \luatex_bodydir:D + \__kernel_primitive:NN \boxdir \luatex_boxdir:D + \__kernel_primitive:NN \leftghost \luatex_leftghost:D + \__kernel_primitive:NN \localbrokenpenalty \luatex_localbrokenpenalty:D + \__kernel_primitive:NN \localinterlinepenalty \luatex_localinterlinepenalty:D + \__kernel_primitive:NN \localleftbox \luatex_localleftbox:D + \__kernel_primitive:NN \localrightbox \luatex_localrightbox:D + \__kernel_primitive:NN \mathdir \luatex_mathdir:D + \__kernel_primitive:NN \pagebottomoffset \luatex_pagebottomoffset:D + \__kernel_primitive:NN \pagedir \luatex_pagedir:D + \__kernel_primitive:NN \pagerightoffset \luatex_pagerightoffset:D + \__kernel_primitive:NN \pardir \luatex_pardir:D + \__kernel_primitive:NN \rightghost \luatex_rightghost:D + \__kernel_primitive:NN \textdir \luatex_textdir:D +% \end{macrocode} +% Primitives from \pdfTeX{} that \LuaTeX{} renames. +% \begin{macrocode} + \__kernel_primitive:NN \adjustspacing \pdftex_adjustspacing:D + \__kernel_primitive:NN \copyfont \pdftex_copyfont:D + \__kernel_primitive:NN \draftmode \pdftex_draftmode:D + \__kernel_primitive:NN \expandglyphsinfont \pdftex_fontexpand:D + \__kernel_primitive:NN \ignoreligaturesinfont \pdftex_ignoreligaturesinfont:D + \__kernel_primitive:NN \insertht \pdftex_insertht:D + \__kernel_primitive:NN \lastsavedboxresourceindex \pdftex_pdflastxform:D + \__kernel_primitive:NN \lastsavedimageresourceindex \pdftex_pdflastximage:D + \__kernel_primitive:NN \lastsavedimageresourcepages \pdftex_pdflastximagepages:D + \__kernel_primitive:NN \lastxpos \pdftex_lastxpos:D + \__kernel_primitive:NN \lastypos \pdftex_lastypos:D + \__kernel_primitive:NN \normaldeviate \pdftex_normaldeviate:D + \__kernel_primitive:NN \outputmode \pdftex_pdfoutput:D + \__kernel_primitive:NN \pageheight \pdftex_pageheight:D + \__kernel_primitive:NN \pagewidth \pdftex_pagewith:D + \__kernel_primitive:NN \protrudechars \pdftex_protrudechars:D + \__kernel_primitive:NN \pxdimen \pdftex_pxdimen:D + \__kernel_primitive:NN \randomseed \pdftex_randomseed:D + \__kernel_primitive:NN \useboxresource \pdftex_pdfrefxform:D + \__kernel_primitive:NN \useimageresource \pdftex_pdfrefximage:D + \__kernel_primitive:NN \savepos \pdftex_savepos:D + \__kernel_primitive:NN \saveboxresource \pdftex_pdfxform:D + \__kernel_primitive:NN \saveimageresource \pdftex_pdfximage:D + \__kernel_primitive:NN \setrandomseed \pdftex_setrandomseed:D + \__kernel_primitive:NN \uniformdeviate \pdftex_uniformdeviate:D % \end{macrocode} % The set of Unicode math primitives were introduced by \XeTeX{} and \LuaTeX{} % in a somewhat complex fashion: a few first as |\XeTeX...| which were then @@ -826,188 +897,197 @@ % and drop |\U(math)| from the names. Where there is a related \TeX{}90 % primitive or where it really seems required we keep the |math| part of the name. % \begin{macrocode} - \__kernel_primitive:NN \Uchar \utex_char:D - \__kernel_primitive:NN \Ucharcat \utex_charcat:D - \__kernel_primitive:NN \Udelcode \utex_delcode:D - \__kernel_primitive:NN \Udelcodenum \utex_delcodenum:D - \__kernel_primitive:NN \Udelimiter \utex_delimiter:D - \__kernel_primitive:NN \Udelimiterover \utex_delimiterover:D - \__kernel_primitive:NN \Udelimiterunder \utex_delimiterunder:D - \__kernel_primitive:NN \Umathaccent \utex_mathaccent:D - \__kernel_primitive:NN \Umathaxis \utex_mathaxis:D - \__kernel_primitive:NN \Umathbinbinspacing \utex_binbinspacing:D - \__kernel_primitive:NN \Umathbinclosespacing \utex_binclosespacing:D - \__kernel_primitive:NN \Umathbininnerspacing \utex_bininnerspacing:D - \__kernel_primitive:NN \Umathbinopenspacing \utex_binopenspacing:D - \__kernel_primitive:NN \Umathbinopspacing \utex_binopspacing:D - \__kernel_primitive:NN \Umathbinordspacing \utex_binordspacing:D - \__kernel_primitive:NN \Umathbinpunctspacing \utex_binpunctspacing:D - \__kernel_primitive:NN \Umathbinrelspacing \utex_binrelspacing:D - \__kernel_primitive:NN \Umathchar \utex_mathchar:D - \__kernel_primitive:NN \Umathchardef \utex_mathchardef:D - \__kernel_primitive:NN \Umathcharnum \utex_mathcharnum:D - \__kernel_primitive:NN \Umathcharnumdef \utex_mathcharnumdef:D - \__kernel_primitive:NN \Umathclosebinspacing \utex_closebinspacing:D - \__kernel_primitive:NN \Umathcloseclosespacing \utex_closeclosespacing:D - \__kernel_primitive:NN \Umathcloseinnerspacing \utex_closeinnerspacing:D - \__kernel_primitive:NN \Umathcloseopenspacing \utex_closeopenspacing:D - \__kernel_primitive:NN \Umathcloseopspacing \utex_closeopspacing:D - \__kernel_primitive:NN \Umathcloseordspacing \utex_closeordspacing:D - \__kernel_primitive:NN \Umathclosepunctspacing \utex_closepunctspacing:D - \__kernel_primitive:NN \Umathcloserelspacing \utex_closerelspacing:D - \__kernel_primitive:NN \Umathcode \utex_mathcode:D - \__kernel_primitive:NN \Umathcodenum \utex_mathcodenum:D - \__kernel_primitive:NN \Umathconnectoroverlapmin \utex_connectoroverlapmin:D - \__kernel_primitive:NN \Umathfractiondelsize \utex_fractiondelsize:D - \__kernel_primitive:NN \Umathfractiondenomdown \utex_fractiondenomdown:D - \__kernel_primitive:NN \Umathfractiondenomvgap \utex_fractiondenomvgap:D - \__kernel_primitive:NN \Umathfractionnumup \utex_fractionnumup:D - \__kernel_primitive:NN \Umathfractionnumvgap \utex_fractionnumvgap:D - \__kernel_primitive:NN \Umathfractionrule \utex_fractionrule:D - \__kernel_primitive:NN \Umathinnerbinspacing \utex_innerbinspacing:D - \__kernel_primitive:NN \Umathinnerclosespacing \utex_innerclosespacing:D - \__kernel_primitive:NN \Umathinnerinnerspacing \utex_innerinnerspacing:D - \__kernel_primitive:NN \Umathinneropenspacing \utex_inneropenspacing:D - \__kernel_primitive:NN \Umathinneropspacing \utex_inneropspacing:D - \__kernel_primitive:NN \Umathinnerordspacing \utex_innerordspacing:D - \__kernel_primitive:NN \Umathinnerpunctspacing \utex_innerpunctspacing:D - \__kernel_primitive:NN \Umathinnerrelspacing \utex_innerrelspacing:D - \__kernel_primitive:NN \Umathlimitabovebgap \utex_limitabovebgap:D - \__kernel_primitive:NN \Umathlimitabovekern \utex_limitabovekern:D - \__kernel_primitive:NN \Umathlimitabovevgap \utex_limitabovevgap:D - \__kernel_primitive:NN \Umathlimitbelowbgap \utex_limitbelowbgap:D - \__kernel_primitive:NN \Umathlimitbelowkern \utex_limitbelowkern:D - \__kernel_primitive:NN \Umathlimitbelowvgap \utex_limitbelowvgap:D - \__kernel_primitive:NN \Umathopbinspacing \utex_opbinspacing:D - \__kernel_primitive:NN \Umathopclosespacing \utex_opclosespacing:D - \__kernel_primitive:NN \Umathopenbinspacing \utex_openbinspacing:D - \__kernel_primitive:NN \Umathopenclosespacing \utex_openclosespacing:D - \__kernel_primitive:NN \Umathopeninnerspacing \utex_openinnerspacing:D - \__kernel_primitive:NN \Umathopenopenspacing \utex_openopenspacing:D - \__kernel_primitive:NN \Umathopenopspacing \utex_openopspacing:D - \__kernel_primitive:NN \Umathopenordspacing \utex_openordspacing:D - \__kernel_primitive:NN \Umathopenpunctspacing \utex_openpunctspacing:D - \__kernel_primitive:NN \Umathopenrelspacing \utex_openrelspacing:D - \__kernel_primitive:NN \Umathoperatorsize \utex_operatorsize:D - \__kernel_primitive:NN \Umathopinnerspacing \utex_opinnerspacing:D - \__kernel_primitive:NN \Umathopopenspacing \utex_opopenspacing:D - \__kernel_primitive:NN \Umathopopspacing \utex_opopspacing:D - \__kernel_primitive:NN \Umathopordspacing \utex_opordspacing:D - \__kernel_primitive:NN \Umathoppunctspacing \utex_oppunctspacing:D - \__kernel_primitive:NN \Umathoprelspacing \utex_oprelspacing:D - \__kernel_primitive:NN \Umathordbinspacing \utex_ordbinspacing:D - \__kernel_primitive:NN \Umathordclosespacing \utex_ordclosespacing:D - \__kernel_primitive:NN \Umathordinnerspacing \utex_ordinnerspacing:D - \__kernel_primitive:NN \Umathordopenspacing \utex_ordopenspacing:D - \__kernel_primitive:NN \Umathordopspacing \utex_ordopspacing:D - \__kernel_primitive:NN \Umathordordspacing \utex_ordordspacing:D - \__kernel_primitive:NN \Umathordpunctspacing \utex_ordpunctspacing:D - \__kernel_primitive:NN \Umathordrelspacing \utex_ordrelspacing:D - \__kernel_primitive:NN \Umathoverbarkern \utex_overbarkern:D - \__kernel_primitive:NN \Umathoverbarrule \utex_overbarrule:D - \__kernel_primitive:NN \Umathoverbarvgap \utex_overbarvgap:D - \__kernel_primitive:NN \Umathoverdelimiterbgap \utex_overdelimiterbgap:D - \__kernel_primitive:NN \Umathoverdelimitervgap \utex_overdelimitervgap:D - \__kernel_primitive:NN \Umathpunctbinspacing \utex_punctbinspacing:D - \__kernel_primitive:NN \Umathpunctclosespacing \utex_punctclosespacing:D - \__kernel_primitive:NN \Umathpunctinnerspacing \utex_punctinnerspacing:D - \__kernel_primitive:NN \Umathpunctopenspacing \utex_punctopenspacing:D - \__kernel_primitive:NN \Umathpunctopspacing \utex_punctopspacing:D - \__kernel_primitive:NN \Umathpunctordspacing \utex_punctordspacing:D - \__kernel_primitive:NN \Umathpunctpunctspacing \utex_punctpunctspacing:D - \__kernel_primitive:NN \Umathpunctrelspacing \utex_punctrelspacing:D - \__kernel_primitive:NN \Umathquad \utex_quad:D - \__kernel_primitive:NN \Umathradicaldegreeafter \utex_radicaldegreeafter:D - \__kernel_primitive:NN \Umathradicaldegreebefore \utex_radicaldegreebefore:D - \__kernel_primitive:NN \Umathradicaldegreeraise \utex_radicaldegreeraise:D - \__kernel_primitive:NN \Umathradicalkern \utex_radicalkern:D - \__kernel_primitive:NN \Umathradicalrule \utex_radicalrule:D - \__kernel_primitive:NN \Umathradicalvgap \utex_radicalvgap:D - \__kernel_primitive:NN \Umathrelbinspacing \utex_relbinspacing:D - \__kernel_primitive:NN \Umathrelclosespacing \utex_relclosespacing:D - \__kernel_primitive:NN \Umathrelinnerspacing \utex_relinnerspacing:D - \__kernel_primitive:NN \Umathrelopenspacing \utex_relopenspacing:D - \__kernel_primitive:NN \Umathrelopspacing \utex_relopspacing:D - \__kernel_primitive:NN \Umathrelordspacing \utex_relordspacing:D - \__kernel_primitive:NN \Umathrelpunctspacing \utex_relpunctspacing:D - \__kernel_primitive:NN \Umathrelrelspacing \utex_relrelspacing:D - \__kernel_primitive:NN \Umathspaceafterscript \utex_spaceafterscript:D - \__kernel_primitive:NN \Umathstackdenomdown \utex_stackdenomdown:D - \__kernel_primitive:NN \Umathstacknumup \utex_stacknumup:D - \__kernel_primitive:NN \Umathstackvgap \utex_stackvgap:D - \__kernel_primitive:NN \Umathsubshiftdown \utex_subshiftdown:D - \__kernel_primitive:NN \Umathsubshiftdrop \utex_subshiftdrop:D - \__kernel_primitive:NN \Umathsubsupshiftdown \utex_subsupshiftdown:D - \__kernel_primitive:NN \Umathsubsupvgap \utex_subsupvgap:D - \__kernel_primitive:NN \Umathsubtopmax \utex_subtopmax:D - \__kernel_primitive:NN \Umathsupbottommin \utex_supbottommin:D - \__kernel_primitive:NN \Umathsupshiftdrop \utex_supshiftdrop:D - \__kernel_primitive:NN \Umathsupshiftup \utex_supshiftup:D - \__kernel_primitive:NN \Umathsupsubbottommax \utex_supsubbottommax:D - \__kernel_primitive:NN \Umathunderbarkern \utex_underbarkern:D - \__kernel_primitive:NN \Umathunderbarrule \utex_underbarrule:D - \__kernel_primitive:NN \Umathunderbarvgap \utex_underbarvgap:D - \__kernel_primitive:NN \Umathunderdelimiterbgap \utex_underdelimiterbgap:D - \__kernel_primitive:NN \Umathunderdelimitervgap \utex_underdelimitervgap:D - \__kernel_primitive:NN \Uoverdelimiter \utex_overdelimiter:D - \__kernel_primitive:NN \Uradical \utex_radical:D - \__kernel_primitive:NN \Uroot \utex_root:D - \__kernel_primitive:NN \Ustack \utex_stack:D - \__kernel_primitive:NN \Ustartdisplaymath \utex_startdisplaymath:D - \__kernel_primitive:NN \Ustartmath \utex_startmath:D - \__kernel_primitive:NN \Ustopdisplaymath \utex_stopdisplaymath:D - \__kernel_primitive:NN \Ustopmath \utex_stopmath:D - \__kernel_primitive:NN \Usubscript \utex_subscript:D - \__kernel_primitive:NN \Usuperscript \utex_superscript:D - \__kernel_primitive:NN \Uunderdelimiter \utex_underdelimiter:D + \__kernel_primitive:NN \Uchar \utex_char:D + \__kernel_primitive:NN \Ucharcat \utex_charcat:D + \__kernel_primitive:NN \Udelcode \utex_delcode:D + \__kernel_primitive:NN \Udelcodenum \utex_delcodenum:D + \__kernel_primitive:NN \Udelimiter \utex_delimiter:D + \__kernel_primitive:NN \Udelimiterover \utex_delimiterover:D + \__kernel_primitive:NN \Udelimiterunder \utex_delimiterunder:D + \__kernel_primitive:NN \Uhextensible \utex_hextensible:D + \__kernel_primitive:NN \Umathaccent \utex_mathaccent:D + \__kernel_primitive:NN \Umathaxis \utex_mathaxis:D + \__kernel_primitive:NN \Umathbinbinspacing \utex_binbinspacing:D + \__kernel_primitive:NN \Umathbinclosespacing \utex_binclosespacing:D + \__kernel_primitive:NN \Umathbininnerspacing \utex_bininnerspacing:D + \__kernel_primitive:NN \Umathbinopenspacing \utex_binopenspacing:D + \__kernel_primitive:NN \Umathbinopspacing \utex_binopspacing:D + \__kernel_primitive:NN \Umathbinordspacing \utex_binordspacing:D + \__kernel_primitive:NN \Umathbinpunctspacing \utex_binpunctspacing:D + \__kernel_primitive:NN \Umathbinrelspacing \utex_binrelspacing:D + \__kernel_primitive:NN \Umathchar \utex_mathchar:D + \__kernel_primitive:NN \Umathcharclass \utex_mathcharclass:D + \__kernel_primitive:NN \Umathchardef \utex_mathchardef:D + \__kernel_primitive:NN \Umathcharfam \utex_mathcharfam:D + \__kernel_primitive:NN \Umathcharnum \utex_mathcharnum:D + \__kernel_primitive:NN \Umathcharnumdef \utex_mathcharnumdef:D + \__kernel_primitive:NN \Umathcharslot \utex_mathcharslot:D + \__kernel_primitive:NN \Umathclosebinspacing \utex_closebinspacing:D + \__kernel_primitive:NN \Umathcloseclosespacing \utex_closeclosespacing:D + \__kernel_primitive:NN \Umathcloseinnerspacing \utex_closeinnerspacing:D + \__kernel_primitive:NN \Umathcloseopenspacing \utex_closeopenspacing:D + \__kernel_primitive:NN \Umathcloseopspacing \utex_closeopspacing:D + \__kernel_primitive:NN \Umathcloseordspacing \utex_closeordspacing:D + \__kernel_primitive:NN \Umathclosepunctspacing \utex_closepunctspacing:D + \__kernel_primitive:NN \Umathcloserelspacing \utex_closerelspacing:D + \__kernel_primitive:NN \Umathcode \utex_mathcode:D + \__kernel_primitive:NN \Umathcodenum \utex_mathcodenum:D + \__kernel_primitive:NN \Umathconnectoroverlapmin \utex_connectoroverlapmin:D + \__kernel_primitive:NN \Umathfractiondelsize \utex_fractiondelsize:D + \__kernel_primitive:NN \Umathfractiondenomdown \utex_fractiondenomdown:D + \__kernel_primitive:NN \Umathfractiondenomvgap \utex_fractiondenomvgap:D + \__kernel_primitive:NN \Umathfractionnumup \utex_fractionnumup:D + \__kernel_primitive:NN \Umathfractionnumvgap \utex_fractionnumvgap:D + \__kernel_primitive:NN \Umathfractionrule \utex_fractionrule:D + \__kernel_primitive:NN \Umathinnerbinspacing \utex_innerbinspacing:D + \__kernel_primitive:NN \Umathinnerclosespacing \utex_innerclosespacing:D + \__kernel_primitive:NN \Umathinnerinnerspacing \utex_innerinnerspacing:D + \__kernel_primitive:NN \Umathinneropenspacing \utex_inneropenspacing:D + \__kernel_primitive:NN \Umathinneropspacing \utex_inneropspacing:D + \__kernel_primitive:NN \Umathinnerordspacing \utex_innerordspacing:D + \__kernel_primitive:NN \Umathinnerpunctspacing \utex_innerpunctspacing:D + \__kernel_primitive:NN \Umathinnerrelspacing \utex_innerrelspacing:D + \__kernel_primitive:NN \Umathlimitabovebgap \utex_limitabovebgap:D + \__kernel_primitive:NN \Umathlimitabovekern \utex_limitabovekern:D + \__kernel_primitive:NN \Umathlimitabovevgap \utex_limitabovevgap:D + \__kernel_primitive:NN \Umathlimitbelowbgap \utex_limitbelowbgap:D + \__kernel_primitive:NN \Umathlimitbelowkern \utex_limitbelowkern:D + \__kernel_primitive:NN \Umathlimitbelowvgap \utex_limitbelowvgap:D + \__kernel_primitive:NN \Umathopbinspacing \utex_opbinspacing:D + \__kernel_primitive:NN \Umathopclosespacing \utex_opclosespacing:D + \__kernel_primitive:NN \Umathopenbinspacing \utex_openbinspacing:D + \__kernel_primitive:NN \Umathopenclosespacing \utex_openclosespacing:D + \__kernel_primitive:NN \Umathopeninnerspacing \utex_openinnerspacing:D + \__kernel_primitive:NN \Umathopenopenspacing \utex_openopenspacing:D + \__kernel_primitive:NN \Umathopenopspacing \utex_openopspacing:D + \__kernel_primitive:NN \Umathopenordspacing \utex_openordspacing:D + \__kernel_primitive:NN \Umathopenpunctspacing \utex_openpunctspacing:D + \__kernel_primitive:NN \Umathopenrelspacing \utex_openrelspacing:D + \__kernel_primitive:NN \Umathoperatorsize \utex_operatorsize:D + \__kernel_primitive:NN \Umathopinnerspacing \utex_opinnerspacing:D + \__kernel_primitive:NN \Umathopopenspacing \utex_opopenspacing:D + \__kernel_primitive:NN \Umathopopspacing \utex_opopspacing:D + \__kernel_primitive:NN \Umathopordspacing \utex_opordspacing:D + \__kernel_primitive:NN \Umathoppunctspacing \utex_oppunctspacing:D + \__kernel_primitive:NN \Umathoprelspacing \utex_oprelspacing:D + \__kernel_primitive:NN \Umathordbinspacing \utex_ordbinspacing:D + \__kernel_primitive:NN \Umathordclosespacing \utex_ordclosespacing:D + \__kernel_primitive:NN \Umathordinnerspacing \utex_ordinnerspacing:D + \__kernel_primitive:NN \Umathordopenspacing \utex_ordopenspacing:D + \__kernel_primitive:NN \Umathordopspacing \utex_ordopspacing:D + \__kernel_primitive:NN \Umathordordspacing \utex_ordordspacing:D + \__kernel_primitive:NN \Umathordpunctspacing \utex_ordpunctspacing:D + \__kernel_primitive:NN \Umathordrelspacing \utex_ordrelspacing:D + \__kernel_primitive:NN \Umathoverbarkern \utex_overbarkern:D + \__kernel_primitive:NN \Umathoverbarrule \utex_overbarrule:D + \__kernel_primitive:NN \Umathoverbarvgap \utex_overbarvgap:D + \__kernel_primitive:NN \Umathoverdelimiterbgap \utex_overdelimiterbgap:D + \__kernel_primitive:NN \Umathoverdelimitervgap \utex_overdelimitervgap:D + \__kernel_primitive:NN \Umathpunctbinspacing \utex_punctbinspacing:D + \__kernel_primitive:NN \Umathpunctclosespacing \utex_punctclosespacing:D + \__kernel_primitive:NN \Umathpunctinnerspacing \utex_punctinnerspacing:D + \__kernel_primitive:NN \Umathpunctopenspacing \utex_punctopenspacing:D + \__kernel_primitive:NN \Umathpunctopspacing \utex_punctopspacing:D + \__kernel_primitive:NN \Umathpunctordspacing \utex_punctordspacing:D + \__kernel_primitive:NN \Umathpunctpunctspacing \utex_punctpunctspacing:D + \__kernel_primitive:NN \Umathpunctrelspacing \utex_punctrelspacing:D + \__kernel_primitive:NN \Umathquad \utex_quad:D + \__kernel_primitive:NN \Umathradicaldegreeafter \utex_radicaldegreeafter:D + \__kernel_primitive:NN \Umathradicaldegreebefore \utex_radicaldegreebefore:D + \__kernel_primitive:NN \Umathradicaldegreeraise \utex_radicaldegreeraise:D + \__kernel_primitive:NN \Umathradicalkern \utex_radicalkern:D + \__kernel_primitive:NN \Umathradicalrule \utex_radicalrule:D + \__kernel_primitive:NN \Umathradicalvgap \utex_radicalvgap:D + \__kernel_primitive:NN \Umathrelbinspacing \utex_relbinspacing:D + \__kernel_primitive:NN \Umathrelclosespacing \utex_relclosespacing:D + \__kernel_primitive:NN \Umathrelinnerspacing \utex_relinnerspacing:D + \__kernel_primitive:NN \Umathrelopenspacing \utex_relopenspacing:D + \__kernel_primitive:NN \Umathrelopspacing \utex_relopspacing:D + \__kernel_primitive:NN \Umathrelordspacing \utex_relordspacing:D + \__kernel_primitive:NN \Umathrelpunctspacing \utex_relpunctspacing:D + \__kernel_primitive:NN \Umathrelrelspacing \utex_relrelspacing:D + \__kernel_primitive:NN \Umathskewedfractionhgap \utex_skewedfractionhgap:D + \__kernel_primitive:NN \Umathskewedfractionvgap \utex_skewedfractionvgap:D + \__kernel_primitive:NN \Umathspaceafterscript \utex_spaceafterscript:D + \__kernel_primitive:NN \Umathstackdenomdown \utex_stackdenomdown:D + \__kernel_primitive:NN \Umathstacknumup \utex_stacknumup:D + \__kernel_primitive:NN \Umathstackvgap \utex_stackvgap:D + \__kernel_primitive:NN \Umathsubshiftdown \utex_subshiftdown:D + \__kernel_primitive:NN \Umathsubshiftdrop \utex_subshiftdrop:D + \__kernel_primitive:NN \Umathsubsupshiftdown \utex_subsupshiftdown:D + \__kernel_primitive:NN \Umathsubsupvgap \utex_subsupvgap:D + \__kernel_primitive:NN \Umathsubtopmax \utex_subtopmax:D + \__kernel_primitive:NN \Umathsupbottommin \utex_supbottommin:D + \__kernel_primitive:NN \Umathsupshiftdrop \utex_supshiftdrop:D + \__kernel_primitive:NN \Umathsupshiftup \utex_supshiftup:D + \__kernel_primitive:NN \Umathsupsubbottommax \utex_supsubbottommax:D + \__kernel_primitive:NN \Umathunderbarkern \utex_underbarkern:D + \__kernel_primitive:NN \Umathunderbarrule \utex_underbarrule:D + \__kernel_primitive:NN \Umathunderbarvgap \utex_underbarvgap:D + \__kernel_primitive:NN \Umathunderdelimiterbgap \utex_underdelimiterbgap:D + \__kernel_primitive:NN \Umathunderdelimitervgap \utex_underdelimitervgap:D + \__kernel_primitive:NN \Uoverdelimiter \utex_overdelimiter:D + \__kernel_primitive:NN \Uradical \utex_radical:D + \__kernel_primitive:NN \Uroot \utex_root:D + \__kernel_primitive:NN \Uskewed \utex_skewed:D + \__kernel_primitive:NN \Uskewedwithdelims \utex_skewedwithdelims:D + \__kernel_primitive:NN \Ustack \utex_stack:D + \__kernel_primitive:NN \Ustartdisplaymath \utex_startdisplaymath:D + \__kernel_primitive:NN \Ustartmath \utex_startmath:D + \__kernel_primitive:NN \Ustopdisplaymath \utex_stopdisplaymath:D + \__kernel_primitive:NN \Ustopmath \utex_stopmath:D + \__kernel_primitive:NN \Usubscript \utex_subscript:D + \__kernel_primitive:NN \Usuperscript \utex_superscript:D + \__kernel_primitive:NN \Uunderdelimiter \utex_underdelimiter:D + \__kernel_primitive:NN \Uvextensible \utex_vextensible:D % \end{macrocode} % Primitives from p\TeX{}. % \begin{macrocode} - \__kernel_primitive:NN \autospacing \ptex_autospacing:D - \__kernel_primitive:NN \autoxspacing \ptex_autoxspacing:D - \__kernel_primitive:NN \dtou \ptex_dtou:D - \__kernel_primitive:NN \euc \ptex_euc:D - \__kernel_primitive:NN \ifdbox \ptex_ifdbox:D - \__kernel_primitive:NN \ifddir \ptex_ifddir:D - \__kernel_primitive:NN \ifmdir \ptex_ifmdir:D - \__kernel_primitive:NN \iftbox \ptex_iftbox:D - \__kernel_primitive:NN \iftdir \ptex_iftdir:D - \__kernel_primitive:NN \ifybox \ptex_ifybox:D - \__kernel_primitive:NN \ifydir \ptex_ifydir:D - \__kernel_primitive:NN \inhibitglue \ptex_inhibitglue:D - \__kernel_primitive:NN \inhibitxspcode \ptex_inhibitxspcode:D - \__kernel_primitive:NN \jcharwidowpenalty \ptex_jcharwidowpenalty:D - \__kernel_primitive:NN \jfam \ptex_jfam:D - \__kernel_primitive:NN \jfont \ptex_jfont:D - \__kernel_primitive:NN \jis \ptex_jis:D - \__kernel_primitive:NN \kanjiskip \ptex_kanjiskip:D - \__kernel_primitive:NN \kansuji \ptex_kansuji:D - \__kernel_primitive:NN \kansujichar \ptex_kansujichar:D - \__kernel_primitive:NN \kcatcode \ptex_kcatcode:D - \__kernel_primitive:NN \kuten \ptex_kuten:D - \__kernel_primitive:NN \noautospacing \ptex_noautospacing:D - \__kernel_primitive:NN \noautoxspacing \ptex_noautoxspacing:D - \__kernel_primitive:NN \postbreakpenalty \ptex_postbreakpenalty:D - \__kernel_primitive:NN \prebreakpenalty \ptex_prebreakpenalty:D - \__kernel_primitive:NN \showmode \ptex_showmode:D - \__kernel_primitive:NN \sjis \ptex_sjis:D - \__kernel_primitive:NN \tate \ptex_tate:D - \__kernel_primitive:NN \tbaselineshift \ptex_tbaselineshift:D - \__kernel_primitive:NN \tfont \ptex_tfont:D - \__kernel_primitive:NN \xkanjiskip \ptex_xkanjiskip:D - \__kernel_primitive:NN \xspcode \ptex_xspcode:D - \__kernel_primitive:NN \ybaselineshift \ptex_ybaselineshift:D - \__kernel_primitive:NN \yoko \ptex_yoko:D + \__kernel_primitive:NN \autospacing \ptex_autospacing:D + \__kernel_primitive:NN \autoxspacing \ptex_autoxspacing:D + \__kernel_primitive:NN \dtou \ptex_dtou:D + \__kernel_primitive:NN \euc \ptex_euc:D + \__kernel_primitive:NN \ifdbox \ptex_ifdbox:D + \__kernel_primitive:NN \ifddir \ptex_ifddir:D + \__kernel_primitive:NN \ifmdir \ptex_ifmdir:D + \__kernel_primitive:NN \iftbox \ptex_iftbox:D + \__kernel_primitive:NN \iftdir \ptex_iftdir:D + \__kernel_primitive:NN \ifybox \ptex_ifybox:D + \__kernel_primitive:NN \ifydir \ptex_ifydir:D + \__kernel_primitive:NN \inhibitglue \ptex_inhibitglue:D + \__kernel_primitive:NN \inhibitxspcode \ptex_inhibitxspcode:D + \__kernel_primitive:NN \jcharwidowpenalty \ptex_jcharwidowpenalty:D + \__kernel_primitive:NN \jfam \ptex_jfam:D + \__kernel_primitive:NN \jfont \ptex_jfont:D + \__kernel_primitive:NN \jis \ptex_jis:D + \__kernel_primitive:NN \kanjiskip \ptex_kanjiskip:D + \__kernel_primitive:NN \kansuji \ptex_kansuji:D + \__kernel_primitive:NN \kansujichar \ptex_kansujichar:D + \__kernel_primitive:NN \kcatcode \ptex_kcatcode:D + \__kernel_primitive:NN \kuten \ptex_kuten:D + \__kernel_primitive:NN \noautospacing \ptex_noautospacing:D + \__kernel_primitive:NN \noautoxspacing \ptex_noautoxspacing:D + \__kernel_primitive:NN \postbreakpenalty \ptex_postbreakpenalty:D + \__kernel_primitive:NN \prebreakpenalty \ptex_prebreakpenalty:D + \__kernel_primitive:NN \showmode \ptex_showmode:D + \__kernel_primitive:NN \sjis \ptex_sjis:D + \__kernel_primitive:NN \tate \ptex_tate:D + \__kernel_primitive:NN \tbaselineshift \ptex_tbaselineshift:D + \__kernel_primitive:NN \tfont \ptex_tfont:D + \__kernel_primitive:NN \xkanjiskip \ptex_xkanjiskip:D + \__kernel_primitive:NN \xspcode \ptex_xspcode:D + \__kernel_primitive:NN \ybaselineshift \ptex_ybaselineshift:D + \__kernel_primitive:NN \yoko \ptex_yoko:D % \end{macrocode} % Primitives from up\TeX{}. % \begin{macrocode} - \__kernel_primitive:NN \disablecjktoken \uptex_disablecjktoken:D - \__kernel_primitive:NN \enablecjktoken \uptex_enablecjktoken:D - \__kernel_primitive:NN \forcecjktoken \uptex_forcecjktoken:D - \__kernel_primitive:NN \kchar \uptex_kchar:D - \__kernel_primitive:NN \kchardef \uptex_kchardef:D - \__kernel_primitive:NN \kuten \uptex_kuten:D - \__kernel_primitive:NN \ucs \uptex_ucs:D + \__kernel_primitive:NN \disablecjktoken \uptex_disablecjktoken:D + \__kernel_primitive:NN \enablecjktoken \uptex_enablecjktoken:D + \__kernel_primitive:NN \forcecjktoken \uptex_forcecjktoken:D + \__kernel_primitive:NN \kchar \uptex_kchar:D + \__kernel_primitive:NN \kchardef \uptex_kchardef:D + \__kernel_primitive:NN \kuten \uptex_kuten:D + \__kernel_primitive:NN \ucs \uptex_ucs:D % \end{macrocode} % End of the \enquote{just the names} part of the source. % \begin{macrocode} @@ -1088,29 +1168,17 @@ \tex_let:D \luatex_mathdir:D \luatexmathdir \tex_let:D \luatex_pagebottomoffset:D \luatexpagebottomoffset \tex_let:D \luatex_pagedir:D \luatexpagedir - \tex_let:D \luatex_pageheight:D \luatexpageheight + \tex_let:D \pdftex_pageheight:D \luatexpageheight \tex_let:D \luatex_pagerightoffset:D \luatexpagerightoffset - \tex_let:D \luatex_pagewidth:D \luatexpagewidth + \tex_let:D \pdftex_pagewidth:D \luatexpagewidth \tex_let:D \luatex_pardir:D \luatexpardir \tex_let:D \luatex_rightghost:D \luatexrightghost \tex_let:D \luatex_textdir:D \luatextextdir \tex_fi:D -%</package> -% \end{macrocode} -% Tidy up some \XeTeX{} renames and the fact that some -% format-building processes leave a couple of questionable decisions about. -% (There may at some stage be \LuaTeX{} renames of the same sort to address.) -% \begin{macrocode} -%<*initex|package> -\etex_unless:D \etex_ifdefined:D \pdftex_ifprimitive:D - \tex_expandafter:D \tex_let:D - \tex_csname:D pdftex_ifprimitive:D \tex_expandafter:D \tex_endcsname:D - \tex_csname:D ifprimitive \tex_endcsname:D - \tex_let:D \pdftex_primitive:D \primitive - \tex_let:D \pdftex_shellescape:D \shellescape -\tex_fi:D % \end{macrocode} -% Only \pdfTeX{} and \LuaTeX{} define \tn{pdfmapfile} and \tn{pdfmapline}. +% Only \pdfTeX{} and \LuaTeX{} define \tn{pdfmapfile} and \tn{pdfmapline}: +% Tidy up the fact that some format-building processes leave +% a couple of questionable decisions about that! % \begin{macrocode} \tex_ifnum:D 0 \etex_ifdefined:D \pdftex_pdftexversion:D 1 \tex_fi:D @@ -1119,11 +1187,13 @@ \tex_let:D \pdftex_mapfile:D \tex_undefined:D \tex_let:D \pdftex_mapline:D \tex_undefined:D \tex_fi:D +%</package> % \end{macrocode} % Older \XeTeX{} versions use |\XeTeX| as the prefix for the Unicode math % primitives it knows. That is tided up here (we support \XeTeX{} versions % from 0.9994 but this change was in 0.9999). % \begin{macrocode} +%<*initex|package> \etex_ifdefined:D \XeTeXdelcode \tex_let:D \utex_delcode:D \XeTeXdelcode \tex_let:D \utex_delcodenum:D \XeTeXdelcodenum @@ -1146,20 +1216,6 @@ \tex_let:D \pdftex_pdftexrevision:D \tex_undefined:D \tex_let:D \pdftex_pdftexversion:D \tex_undefined:D \tex_fi:D -% \end{macrocode} -% From v0.81, \LuaTeX{} drops the |pdf| prefix in some cases. -% \begin{macrocode} -\etex_ifdefined:D \lastxpos - \tex_let:D \pdftex_lastxpos:D \lastxpos - \tex_let:D \pdftex_lastypos:D \lastypos - \tex_let:D \pdftex_normaldeviate:D \normaldeviate - \tex_let:D \pdftex_pageheight:D \pageheight - \tex_let:D \pdftex_pagewith:D \pagewidth - \tex_let:D \pdftex_randomseed:D \randomseed - \tex_let:D \pdftex_setrandomseed:D \setrandomseed - \tex_let:D \pdftex_savepos:D \savepos - \tex_let:D \pdftex_uniformdeviate:D \uniformdeviate -\tex_fi:D %</initex|package> % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx index 34d57cf2ff7..f7ab1f809a8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3str.dtx 6021 2015-09-20 15:10:27Z joseph $ +\GetIdInfo$Id: l3str.dtx 6325 2015-12-20 18:07:35Z joseph $ {L3 Strings} %</driver|package> %<*driver> @@ -546,7 +546,7 @@ % % \section{Constant token lists} % -% \begin{variable}[added = 2016-09-19] +% \begin{variable}[added = 2015-09-19] % { % \c_ampersand_str, % \c_atsign_str, @@ -1393,13 +1393,12 @@ % \begin{macro}[aux, EXP]{\@@_change_case_loop:nw} % \begin{macro}[aux, EXP]{\@@_change_case_space:n} % \begin{macro}[aux, EXP]{\@@_change_case_char:nN} -% \begin{macro}[aux, EXP]{\@@_change_case_char:NNNNNNNNn} +% \begin{macro}[aux] +% {\@@_lookup_lower:N, \@@_lookup_upper:N, \@@_lookup_fold:N} % Case changing for programmatic reasons is done by first detokenizing % input then doing a simple loop that only has to worry about spaces % and everything else. The output is detokenized to allow data sharing -% with text-based case changing. The key idea here of splitting up the -% data files based on the character code of the current character is -% shared with the text case changer too. +% with text-based case changing. % \begin{macrocode} \cs_new:Npn \str_fold_case:n #1 { \@@_change_case:nn {#1} { fold } } \cs_new:Npn \str_lower_case:n #1 { \@@_change_case:nn {#1} { lower } } @@ -1432,18 +1431,33 @@ \cs_new:Npn \@@_change_case_char:nN #1#2 { \quark_if_recursion_tail_stop:N #2 - \exp_args:Nf \tl_to_str:n + \cs_if_exist:cTF { c__unicode_ #1 _ #2 _tl } + { \tl_to_str:c { c__unicode_ #1 _ #2 _tl } } + { \@@_change_case_char_aux:nN {#1} #2 } + \__str_change_case_loop:nw {#1} + } +% \end{macrocode} +% For Unicode engines there's a look up to see if the current character +% has a valid one-to-one case change mapping. That's not needed for $8$-bit +% engines: as they don't have \cs{utex_char:D} all of the changes they can +% make are hard-coded and so already picked up above. +% \begin{macrocode} +\cs_if_exist:NTF \utex_char:D + { + \cs_new:Npn \@@_change_case_char_aux:nN #1#2 { - \exp_after:wN \@@_change_case_char:NNNNNNNNn - \int_use:N \__int_eval:w 1000000 + `#2 \__int_eval_end: #2 {#1} + \int_compare:nNnTF { \use:c { @@_lookup_ #1 :N } #2 } = { 0 } + { #2 } + { + \utex_char:D \use:c { @@_lookup_ #1 :N } #2 ~ + } } - \@@_change_case_loop:nw {#1} + \cs_new_protected:Npn \@@_lookup_lower:N #1 { \tex_lccode:D `#1 } + \cs_new_protected:Npn \@@_lookup_upper:N #1 { \tex_uccode:D `#1 } + \cs_new_eq:NN \@@_lookup_fold:N \@@_lookup_lower:N } -\cs_new:Npn \@@_change_case_char:NNNNNNNNn #1#2#3#4#5#6#7#8#9 { - \str_case:nvF #8 - { c__unicode_ #9 _ #6 _X_ #7 _tl } - { #8 } + \cs_new:Npn \@@_change_case_char_aux:nN #1#2 { #2 } } % \end{macrocode} % \end{macro} @@ -1508,6 +1522,215 @@ % \end{macrocode} % \end{macro} % +% \subsection{Unicode data for case changing} +% +% \begin{macrocode} +%<@@=unicode> +% \end{macrocode} +% +% Case changing both for strings and \enquote{text} requires data from +% the Unicode Consortium. Some of this is build in to the format (as +% \tn{lccode} and \tn{uccode} values) but this covers only the simple +% one-to-one situations and does not fully handle for example case folding. +% +% The data required for cross-module manipulations is loaded here: currenty +% this means for |str| and |tl| functions. As such, the prefix used is not +% |str| but rather |unicode|. For performance (as the entire data set must +% be read during each run) and as this code comes somewhat early in the +% load process, there is quite a bit of low-level code here. +% +% As only the data needs to remain at the end of this process, everything +% is set up inside a group. +% \begin{macrocode} +\group_begin: +% \end{macrocode} +% A read stream is needed. The I/O module is not yet in place \emph{and} +% we do not want to use up a stream. We therefore use a known free one in +% format mode or look for the next free one in package mode (covers plain, +% \LaTeXe{} and Con\TeX{}t MkII and MkIV). +% \begin{macrocode} +%<*initex> + \tex_chardef:D \g_@@_data_ior \c_zero +%</initex> +%<*package> + \tex_chardef:D \g_@@_data_ior + \etex_numexpr:D + \cs_if_exist:NTF \lastallocatedread + { \lastallocatedread } + { + \cs_if_exist:NTF \c_syst_last_allocated_read + { \c_syst_last_allocated_read } + { \tex_count:D 16 ~ } + } + + 1 + \scan_stop: +%</package> +% \end{macrocode} +% Set up to read each file. As they use C-style comments, thre is a need to +% deal with |#|. At the same time, spaces are important so they need to be +% picked up as they are important. Beyond that, the current category code +% scheme works fine. With no I/O loop available, hard-code one that will work +% quickly. +% \begin{macrocode} + \cs_set_protected:Npn \@@_map_inline:n #1 + { + \group_begin: + \tex_catcode:D `\# = 12 \scan_stop: + \tex_catcode:D `\ = 10 \scan_stop: + \tex_openin:D \g_@@_data_ior = #1 \scan_stop: + \cs_if_exist:NT \utex_char:D + { \@@_map_loop: } + \tex_closein:D \g_@@_data_ior + \group_end: + } + \cs_set_protected:Npn \@@_map_loop: + { + \tex_ifeof:D \g_@@_data_ior + \exp_after:wN \use_none:n + \else: + \exp_after:wN \use:n + \fi: + { + \tex_read:D \g_@@_data_ior to \l_@@_tmp_tl + \if_meaning:w \c_empty_tl \l_@@_tmp_tl + \else: + \exp_after:wN \@@_parse:w \l_@@_tmp_tl \q_stop + \fi: + \@@_map_loop: + } + } + \cs_set_nopar:Npn \l_@@_tmp_tl { } +% \end{macrocode} +% The lead-off parser for each line is common for all of the files. If +% the line starts with a |#| it's a comment. There's one special comment +% line to look out for in \texttt{SpecialCasing.txt} as we want to ignore +% everything after it. As this line does not appear in any other sources +% and the test is quite quick (there are relatively few comment lines), it +% can be present in all of the passes. +% \begin{macrocode} + \cs_set_protected:Npn \@@_parse:w #1#2 \q_stop + { + \reverse_if:N \if:w \l_@@_hash_tl #1 + \@@_parse_auxi:w #1#2 \q_stop + \else: + \if_int_compare:w \__str_if_eq_x:nn + {#2} { ~Conditional~Mappings~ } = \c_zero + \cs_set_protected:Npn \@@_parse:w ##1 \q_stop { } + \fi: + \fi: + } + \cs_set_nopar:Npx \l_@@_hash_tl { \token_to_str:N # } +% \end{macrocode} +% Storing each exception is always done in the same way: create a constant +% token list which expands to exactly the mapping. These will have the +% category codes \enquote{now} (so should be letters) but will be detokenized +% for string use. +% \begin{macrocode} + \cs_set_protected:Npn \@@_store:nnnnn #1#2#3#4#5 + { + \tl_const:cx { c_@@_ #2 _ \utex_char:D "#1 _tl } + { + \utex_char:D "#3 ~ + \utex_char:D "#4 ~ + \tl_if_blank:nF {#5} + { \utex_char:D "#5 } + } + } +% \end{macrocode} +% Parse the main Unicode data file for title case exceptions (the one-to-one +% lower and upper case mappings it contains will all be covered by the \TeX{} +% data). +% \begin{macrocode} + \cs_set_protected:Npn \@@_parse_auxi:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; + { \@@_parse_auxii:w #1 ; } + \cs_set_protected:Npn \@@_parse_auxii:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 \q_stop + { + \tl_if_blank:nF {#7} + { + \if_int_compare:w \__str_if_eq_x:nn { #5 ~ } {#7} = \c_zero + \else: + \tl_const:cx + { c_@@_title_ \utex_char:D "#1 _tl } + { \utex_char:D "#7 } + \fi: + } + } + \@@_map_inline:n { UnicodeData.txt } +% \end{macrocode} +% The set up for case folding is in two parts. For the basic (core) mappings, +% folding is the same as lower casing in most positions so only store +% the differences. For the more complex foldings, always sotre the result, +% splitting up the two or three code points in the inout as required. +% \begin{macrocode} + \cs_set_protected:Npn \@@_parse_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop + { + \if_int_compare:w \__str_if_eq_x:nn {#2} { C } = \c_zero + \if_int_compare:w \tex_lccode:D "#1 = "#3 \scan_stop: + \else: + \tl_const:cx + { c_@@_fold_ \utex_char:D "#1 _tl } + { \utex_char:D "#3 ~ } + \fi: + \else: + \if_int_compare:w \__str_if_eq_x:nn {#2} { F } = \c_zero + \@@_parse_auxii:w #1 ~ #3 ~ \q_stop + \fi: + \fi: + } + \cs_set_protected:Npn \@@_parse_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop + { \@@_store:nnnnn {#1} { fold } {#2} {#3} {#4} } + \@@_map_inline:n { CaseFolding.txt } +% \end{macrocode} +% For upper and lower casing special situations, there is a bit more to +% do as we also have title casing to consider. +% \begin{macrocode} + \cs_set_protected:Npn \@@_parse_auxi:w #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop + { + \use:n { \@@_parse_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop + \use:n { \@@_parse_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop + \if_int_compare:w \__str_if_eq_x:nn {#3} {#4} = \c_zero + \else: + \use:n { \@@_parse_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop + \fi: + } + \cs_set_protected:Npn \@@_parse_auxii:w #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop + { + \tl_if_empty:nF {#4} + { \@@_store:nnnnn {#1} {#2} {#3} {#4} {#5} } + } + \@@_map_inline:n { SpecialCasing.txt } +% \end{macrocode} +% For the $8$-bit engines, the above does nothing but there is some set +% up needed. There is no expandable character generator primitive so some +% alternative is needed. As we've not used up hash space for the above, we +% can go for the fast approach here of one name per letter. Keeping folding +% and lower casing separate makes the use later a bit easier. +% \begin{macrocode} + \cs_if_exist:NF \utex_char:D + { + \cs_set_protected:Npn \@@_tmp:NN #1#2 + { + \if_meaning:w \q_recursion_tail #2 + \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \fi: + \tl_const:cn { c_@@_fold_ #1 _tl } {#2} + \tl_const:cn { c_@@_lower_ #1 _tl } {#2} + \tl_const:cn { c_@@_upper_ #2 _tl } {#1} + \@@_tmp:NN + } + \@@_tmp:NN + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz + ? \q_recursion_tail \q_recursion_stop + } +% \end{macrocode} +% +% All done: tidy up. +% \begin{macrocode} +\group_end: +% \end{macrocode} +% % \begin{macrocode} %</initex|package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 0075c4abfeb..cc2cf5d3f4d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3token.dtx 6114 2015-09-28 21:32:37Z bruno $ +\GetIdInfo$Id: l3token.dtx 6249 2015-11-11 08:40:42Z joseph $ {L3 Experimental token manipulation} %</driver|package> %<*driver> @@ -112,7 +112,7 @@ % % \section{Character tokens} % -% \begin{function}[updated = 2015-08-09] +% \begin{function}[updated = 2015-11-11] % { % \char_set_catcode_escape:N , % \char_set_catcode_group_begin:N , @@ -140,15 +140,10 @@ % \begin{verbatim} % \char_set_catcode_other:N \% % \end{verbatim} -% The assignment is local. These commands update -% \cs{l_char_special_seq} as appropriate by adding or removing the -% \meta{character}, and in package mode they also update -% \tn{dospecials} (plain \TeX{} and \LaTeXe{}) and \cs{@sanitize} -% (\LaTeXe{} only). The \cs{char_set_catcode_active:N} command -% also adds the active character to \cs{l_char_active_seq}. +% The assignment is local. % \end{function} % -% \begin{function}[updated = 2015-08-09] +% \begin{function}[updated = 2015-11-11] % { % \char_set_catcode_escape:n , % \char_set_catcode_group_begin:n , @@ -174,14 +169,9 @@ % code as given by the \meta{integer expression}. This version can be % used to set up characters which cannot otherwise be given % (\emph{cf.}~the \texttt{N}-type variants). The assignment is local. -% These commands update \cs{l_char_special_seq} as appropriate by -% adding or removing the \meta{character}, and in package mode they -% also update \tn{dospecials} (plain \TeX{} and \LaTeXe{}) and -% \cs{@sanitize} (\LaTeXe{} only). The \cs{char_set_catcode_active:n} -% command also adds the active character to \cs{l_char_active_seq}. % \end{function} % -% \begin{function}[updated = 2015-08-09]{\char_set_catcode:nn} +% \begin{function}[updated = 2015-11-11]{\char_set_catcode:nn} % \begin{syntax} % \cs{char_set_catcode:nn} \Arg{intexpr_1} \Arg{intexpr_2} % \end{syntax} @@ -192,12 +182,6 @@ % The setting applies within the current \TeX{} group. In general, the % symbolic functions \cs{char_set_catcode_\meta{type}} should be preferred, % but there are cases where these lower-level functions may be useful. -% This command updates \cs{l_char_special_seq} as appropriate by -% adding or removing the \meta{character}, and in package mode it -% also updates \tn{dospecials} (plain \TeX{} and \LaTeXe{}) and -% \cs{@sanitize} (\LaTeXe{} only). -% If the category code is $13$ (active), the active character is -% added to \cs{l_char_active_seq}. % \end{function} % % \begin{function}[EXP]{\char_value_catcode:n} @@ -350,17 +334,16 @@ % terminal. % \end{function} % -% \begin{variable}[added = 2012-01-23, updated = 2015-08-09]{\l_char_active_seq} +% \begin{variable}[added = 2012-01-23, updated = 2015-11-11]{\l_char_active_seq} % Used to track which tokens may require special handling at the document % level as they are (or have been at some point) % of category \meta{active} (catcode~$13$). Each entry in -% the sequence consists of a single active character. Active tokens should be -% added to the sequence when they are defined for general document use. -% This sequence is automatically updated by \cs{char_set_catcode:nn} and -% more specific functions. +% the sequence consists of a single escaped token, for example |\~|. +% Active tokens should be added to the sequence when they are defined for +% general document use. % \end{variable} % -% \begin{variable}[added = 2012-01-23, updated = 2015-08-09]{\l_char_special_seq} +% \begin{variable}[added = 2012-01-23, updated = 2015-11-11]{\l_char_special_seq} % Used to track which tokens will require special handling when working with % verbatim-like material at the document level as they are not of categories % \meta{letter} (catcode~$11$) or \meta{other} (catcode~$12$). Each entry in @@ -368,8 +351,6 @@ % backslash or |\{| for an opening brace.^^A \} % Escaped tokens should be added to the sequence when they are defined for % general document use. -% This sequence is automatically updated by \cs{char_set_catcode:nn} and -% more specific functions. % \end{variable} % % \section{Generic tokens} @@ -992,137 +973,21 @@ % \begin{macro}{\char_set_catcode:nn} % \begin{macro}{\char_value_catcode:n} % \begin{macro}{\char_show_value_catcode:n} -% \begin{macro}[aux] -% { -% \@@_set_catcode:Nn, -% \@@_set_catcode:NnNNN, -% \@@_set_catcode:NNN, -% } -% Category code changes. Besides setting the catcode using -% \cs{tex_catcode:D}, this function keeps up to date the sequences -% \cs{l_char_active_seq}, \cs{l_char_special_seq}, and in package -% mode \tn{dospecials} (for plain \TeX{} and \LaTeXe{}) and -% \tn{@sanitize} (\LaTeXe{} only) as well. The first list contains -% active characters, and the other three contain a single-character -% control sequence. These are constructed from the given character -% code |#1| using the \tn{lowercase} primitive. In package mode -% there are difficulties because |\+| and the active |^^L| are -% \tn{outer} macros. This pushes us to only construct the -% single-character control sequence and the active character with -% character code |#1| if they are necessary for the update. As a -% start, construct an \enquote{other} (catcode~$12$) with character -% code |#1|. The second part of the \texttt{:Nn} auxiliary takes -% care of \cs{l_char_active_seq}: if the new catcode is $13$ -% (active), then the active character is constructed through -% \tn{lowercase} and added to the sequence unless it is already in -% there. The first part is more intricate and distinguishes the -% case where the original catcode is special (different from letter -% or other, since for \eTeX{}'s \tn{numexpr}, $11/2=12/2=6$) or not. -% If it the catcode was special, the single-character control -% sequence may need to be removed from the token lists and sequence, -% otherwise it may need to be added to the lists. -% -% The addition or removal is done by the \texttt{:NnNNN} auxiliary, -% which performs the catcode assignment (note here that the arguments -% of \cs{char_set_catcode:nn} are each evaluated exactly once), then -% tests whether the new catcode is special or not. If that changed -% compared to the previous catcode, then some work is needed: pass to -% the \texttt{:NNN} auxiliary the single-character control sequence, -% a function acting on token lists, and a function acting on -% sequences. Defining this auxiliary is tricky: the odd -% \texttt{f}-expansion expands the two \cs{tl_if_exist:NT} before the -% definition is performed, and the macro parameter token |#| (we are -% not yet doing a definition) stops the \texttt{f}-expansion. -% In \LaTeXe{}, \cs{@sanitize} differs from \cs{dospecials} in that -% it should not list begin-group and end-group character tokens. -% For this, patch \cs{@@_set_catcode:Nn} by copying its code -% using its \texttt{o}-expansion with arguments |#1| and |#2| -% (braces are needed because each argument is literally two tokens, -% a macro parameter character and a digit), and appending to it some -% code that removes the single-character control sequence from -% \cs{@sanitize} if the (new) catcode is $1$ or $2$. +% Simple wrappers around the primitives. % \begin{macrocode} -\group_begin: -\tex_catcode:D `@ = \c_eleven -\tex_catcode:D \c_zero = \c_twelve \cs_new_protected:Npn \char_set_catcode:nn #1#2 { - \group_begin: - \char_set_lccode:nn { 0 } {#1} - \tex_lowercase:D - { \group_end: \@@_set_catcode:Nn ^^@ } {#2} + \tex_catcode:D \__int_eval:w #1 \__int_eval_end: + = \__int_eval:w #2 \__int_eval_end: } -\tex_catcode:D \c_zero = \c_thirteen -\cs_new_protected:Npn \@@_set_catcode:Nn #1#2 - { - \int_compare:nNnTF { \tex_catcode:D `#1 / \c_two } = \c_six - { - \@@_set_catcode:NnNNN #1 {#2} \int_compare:nNnF - \tl_put_right:Nn \seq_put_right:Nn - } - { - \@@_set_catcode:NnNNN #1 {#2} \int_compare:nNnT - \tl_remove_all:Nn \seq_remove_all:Nn - } - \int_compare:nNnT { \tex_catcode:D `#1 } = \c_thirteen - { - \group_begin: - \char_set_lccode:nn { 0 } { `#1 } - \tex_lowercase:D - { - \group_end: - \seq_if_in:NnF \l_char_active_seq { ^^@ } - { \seq_put_right:Nn \l_char_active_seq { ^^@ } } - } - } - } -\cs_new_protected:Npn \@@_set_catcode:NnNNN #1#2#3#4#5 - { - \tex_catcode:D `#1 = \__int_eval:w #2 \__int_eval_end: - #3 { \tex_catcode:D `#1 / \c_two } = \c_six - { - \group_begin: \exp_args:NNc \group_end: - \@@_set_catcode:NNN {#1} #4 #5 - } - } -\exp_args:Nnf \use:n - { \cs_new_protected:Npn \@@_set_catcode:NNN #1#2#3 } - { -%<*package> - \tl_if_exist:NT \dospecials - { - \tl_if_exist:NT \@sanitize { #2 \@sanitize { \@makeother #1 } } - #2 \dospecials { \do #1 } - } -%</package> - #3 \l_char_special_seq {#1} - } -%<*package> -\tl_if_exist:NT \@sanitize - { - \exp_args:Nno \use:n - { \cs_gset_protected:Npn \@@_set_catcode:Nn #1#2 } - { - \@@_set_catcode:Nn {#1} {#2} - \int_compare:nNnT { \tex_catcode:D `#1 / \c_two } = \c_one - { - \group_begin: \exp_args:NNNx \group_end: - \tl_remove_all:Nn \@sanitize - { \exp_not:N \@makeother \exp_not:c {#1} } - } - } - } -%</package> \cs_new:Npn \char_value_catcode:n #1 { \tex_the:D \tex_catcode:D \__int_eval:w #1\__int_eval_end: } \cs_new_protected:Npn \char_show_value_catcode:n #1 { \__msg_show_wrap:n { > ~ \char_value_catcode:n {#1} } } -\group_end: % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro} % { @@ -1299,36 +1164,19 @@ % \end{macro} % % \begin{variable}{\l_char_active_seq, \l_char_special_seq} -% Two sequences for dealing with special characters. They must be defined -% before \cs{char_set_catcode:nn} can be used. The first is characters -% which may be active, and contains the active characters themselves to -% allow easy redefinition. The second longer list is for \enquote{special} -% characters more generally, and these are escaped so that for example +% Two sequences for dealing with special characters. The first is characters +% which may be active, the second longer list is for \enquote{special} +% characters more generally. Both lists are escaped so that for example % bulk code assignments can be carried out. In both cases, the order is % by \textsc{ascii} character code (as is done in for example -% \cs{ExplSyntaxOn}). The only complication is dealing with |_|, which -% requires the use of \cs{use:n} \emph{and} \cs{use:nn}. +% \cs{ExplSyntaxOn}). % \begin{macrocode} \seq_new:N \l_char_special_seq \seq_set_split:Nnn \l_char_special_seq { } { \ \" \# \$ \% \& \\ \^ \_ \{ \} \~ } \seq_new:N \l_char_active_seq -\use:n - { - \group_begin: - \char_set_catcode_active:N \" - \char_set_catcode_active:N \$ - \char_set_catcode_active:N \& - \char_set_catcode_active:N \^ - \char_set_catcode_active:N \_ - \char_set_catcode_active:N \~ - \use:nn - { - \group_end: - \seq_set_split:Nnn \l_char_active_seq { } - } - } - { { " $ & ^ _ ~ } } %$ +\seq_set_split:Nnn \l_char_special_seq { } + { \" \$ \& \^ \_ \~ } % \end{macrocode} % \end{variable} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx deleted file mode 100644 index 657e868ae21..00000000000 --- a/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx +++ /dev/null @@ -1,924 +0,0 @@ -% \iffalse meta-comment -% -%% File: l3unicode-data.dtx Copyright(C) 2014-2015 The LaTeX3 Project -%% -%% It may be distributed and/or modified under the conditions of the -%% LaTeX Project Public License (LPPL), either version 1.3c of this -%% license or (at your option) any later version. The latest version -%% of this license is in the file -%% -%% http://www.latex-project.org/lppl.txt -%% -%% This file is part of the "l3kernel bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/svnroot/experimental/trunk/ -%% -%% for those people who are interested. -%% -%%%%%%%%%%% -%% NOTE: %% -%%%%%%%%%%% -%% -%% Snapshots taken from the repository represent work in progress and may -%% not work or may contain conflicting material! We therefore ask -%% people _not_ to put them into distributions, archives, etc. without -%% prior consultation with the LaTeX Project Team. -%% -%% ----------------------------------------------------------------------- -%% -% -% Both the driver and the script need \pkg{expl3}: as the script runs with -% plain \TeX{}, set up in generic mode. -%<*driver|script> -\input expl3-generic\relax -\GetIdInfo$Id: l3unicode-data.dtx 5983 2015-09-10 18:57:56Z joseph $ - {L3 Case data script} -%</driver|script> -% -% The same approach as used in \pkg{DocStrip}: if \cs{documentclass} -% is undefined then skip the driver, allowing the file to be used directly. -% This works as the \cs{fi} is only seen if \LaTeX{} is not in use. The odd -% \cs{jobname} business allows the extraction to work with \LaTeX{} provided -% an appropriate \texttt{.ins} file is set up. -%<*gobble> -\ifx\jobname\relax - \let\documentclass\undefined -\fi -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname documentclass\endcsname\relax -\else - \csname fi\endcsname -%</gobble> -% -%<*driver> - \documentclass[full]{l3doc} - \begin{document} - \DocInput{\jobname.dtx} - \end{document} -%<*gobble> -\fi -%</gobble> -%</driver> -% \fi -% -% \title{^^A -% The \textsf{l3unicode-data} script\\Unicode data script^^A -% \thanks{This file describes v\ExplFileVersion, -% last revised \ExplFileDate.}^^A -% } -% -% \author{^^A -% The \LaTeX3 Project\thanks -% {^^A -% E-mail: -% \href{mailto:latex-team@latex-project.org} -% {latex-team@latex-project.org}^^A -% }^^A -% } -% -% \date{Released \ExplFileDate} -% -% \maketitle -% -% \begin{documentation} -% -% The Unicode Consortium provide comprehensive data on the standard -% mapping of characters (or more formally codepoints) when carrying -% out various different case-changing functions: -% \begin{itemize} -% \item Uppercasing -% \item Lowercasing -% \item Titlecasing (used for the first codepoint of a word: -% may be subtly different to uppercasing) -% \item Folding (removing case for comparison purposes: close -% but not identical to lowercasing) -% \end{itemize} -% This data is available in machine readable format, such that many of -% the basics of case changing can be set up on an automated basis. -% -% This file provides a script which will read the raw Unicode files -% and convert the material to a form which can be used by \pkg{expl3}. -% As the conversions here cover the entire Unicode range, this cannot -% be carried out by \pdfTeX{}: at present, the script works only -% with \LuaTeX{}. -% -% Note that this file is designed such that running \LaTeX{} will typeset -% the documentation using any engine: the script will be run if the file -% is processed by plain \TeX{}, specifically the |luatex| command. -% This process requires the files |CaseFolding.txt|, |SpecialCasing.txt| -% and |UnicodeData.txt| from the \href{http://www.unicode.org/}^^A -% {Unicode Consortium website}. -% -% The file produced by this script, |l3unicode-data.def|, contains -% appropriate definitions for all of the data structures used by \pkg{expl3} -% for Unicode transformations. It also provides appropriate alternative -% definitions for use with \pdfTeX{}. -% -% \end{documentation} -% -% \begin{implementation} -% -% \section{\pkg{l3unicode-data} Implementation} -% -% \begin{macrocode} -%<*script> -% \end{macrocode} -% -% The driver part has loaded \pkg{expl3}: turn on the syntax environment. -% \begin{macrocode} -\ExplSyntaxOn -% \end{macrocode} -% -% \subsection{Setup} -% -% \begin{variable}{\l__unicode_tmp_tl} -% Scratch space. -% \begin{macrocode} -\tl_new:N \l__unicode_tmp_tl -% \end{macrocode} -% \end{variable} -% -% The first step is to generate a series of temporary variables to -% contain the data as it's extracted. This requires a nested loop -% to give a total of $100$ token lists. -% \begin{macrocode} -\tl_map_inline:nn { 0123456789 } - { - \tl_map_inline:nn { 0123456789 } - { - \tl_new:c { l__unicode_lower_ #1 _X_ ##1 _tl } - \tl_new:c { l__unicode_upper_ #1 _X_ ##1 _tl } - } - } -% \end{macrocode} -% -% \begin{variable}{\l__unicode_compat_seq} -% A sequence to hold the list of compatibility chars currently defined by -% Unicode. This is needed for both case mapping and case folding (it's -% defined by information in the master file |UnicodeData.txt|). -% \begin{macrocode} -\seq_new:N \l__unicode_compat_seq -% \end{macrocode} -% \end{variable} -% -% \begin{variable}^^A -% { -% \l__unicode_lower_exceptions_tl , -% \l__unicode_title_exceptions_tl , -% \l__unicode_upper_exceptions_tl -% } -% Exceptions to the usual mappings. -% \begin{macrocode} -\tl_new:N \l__unicode_lower_exceptions_tl -\tl_new:N \l__unicode_title_exceptions_tl -\tl_new:N \l__unicode_upper_exceptions_tl -% \end{macrocode} -% \end{variable} -% -% \begin{macro}{\__unicode_file_map:nn} -% A utility function for handling file reading. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_file_map:nn #1#2 - { - \ior_open:Nn \g__unicode_data_ior {#1} - \ior_if_eof:NTF \g__unicode_data_ior - { \__msg_kernel_error:nnn { unicode } { file-not-found } {#1} } - { - \ior_str_map_inline:Nn \g__unicode_data_ior {#2} - \ior_close:N \g__unicode_data_ior - } - } -\__msg_kernel_new:nnn { unicode } { file-not-found } - { Could~not~find~data~file~'#1'. } -% \end{macrocode} -% \end{macro} -% -% \begin{variable}{\g__unicode_data_ior} -% \begin{variable}{\g__unicode_result_iow} -% Streams for reading and writing the data. -% \begin{macrocode} -\ior_new:N \g__unicode_data_ior -\iow_new:N \g__unicode_result_iow -% \end{macrocode} -% \end{variable} -% \end{variable} -% -% Open the data file for writing. -% \begin{macrocode} -\iow_open:Nn \g__unicode_result_iow { l3unicode-data.def } -% \end{macrocode} -% -% \subsection{Verbatim copying} -% -% \begin{macro}[int]{\__unicode_verb:} -% \begin{macro}[aux]{\__unicode_verb_auxi:w, \__unicode_verb_auxii:w} -% \begin{macro}[int]{\__unicode_verb_end:} -% There are various bits of code which need to be transferred into the data -% file from the source. This has to take place as part of the general writing -% process so needs to be done without using DocStrip. That is achieved by -% having a verbatim-copy mechanism available: this is all set up here. -% As the line containing the \cs{__unicode_verb:} function will end up with a -% (category code $12$) space at the start, there is a dedicated function to -% clear this part up. -% \begin{macrocode} -\group_begin: - \char_set_catcode_other:n { `\^^M }% - \cs_new_protected:Npn \__unicode_verb:% - {% - \group_begin:% - \char_set_catcode_other:n { `\^^M }% - \tex_endlinechar:D = `\^^M% - \clist_map_inline:nn% - { \\ , \{ , \} , \# , \^ , \% , \ }% - { \char_set_catcode_other:n { `##1 } }% - \__unicode_verb_auxi:w% - }% - \cs_new_protected:Npn \__unicode_verb_auxi:w#1^^M% - {% - \exp_after:wN \__unicode_verb_auxii:w \use_none:n #1 ^^M - }% - \cs_new_protected:Npn \__unicode_verb_auxii:w#1^^M% - {% - \str_if_eq_x:nnTF {#1} { \token_to_str:N \__unicode_verb_end: }% - { \group_end: }% - {% - \iow_now:Nn \g__unicode_result_iow {#1}% - \__unicode_verb_auxii:w% - }% - }% -\group_end:% -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \subsection{Shared data} -% -% \end{macrocode} -% There are various lines that now need to go at the start of the file. -% First, there is some header information. -% \begin{macrocode} -\__unicode_verb: -%% This is the file l3unicode-data.def -%% generated using the script l3unicode-data.dtx. -%% -%% The data here are derived from the files -\__unicode_verb_end: -% \end{macrocode} -% \begin{macro}{\__unicode_parse_line:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxi:w} -% Extract version information from the source files so this is -% recorded. The main Unicode databse file doesn't have a header -% but the other files do. -% \begin{macrocode} -\use:x - { - \cs_new_protected:Npn - \exp_not:N \__unicode_parse_line:w ##1 - ##2 \tl_to_str:n { .txt } - } - #3 \scan_stop: #4 - { - \tl_if_empty:nF {#2} - { - \ior_get_str:NN \g__unicode_data_ior \l__unicode_tmp_tl - \exp_after:wN \__unicode_parse_line_auxi:w - \l__unicode_tmp_tl \scan_stop: - \iow_now:Nx \g__unicode_result_iow - { - \iow_char:N \% - \iow_char:N \% - \c_space_tl \c_space_tl \c_space_tl - Version ~ #2 ~ dated \l__unicode_tmp_tl - } - } - } -\use:x - { - \cs_new_protected:Npn \exp_not:N \__unicode_parse_line_auxi:w - ##1 \token_to_str:N : ~ ##2 , ~ ##3 ~ ##4 \scan_stop: - } - { \tl_set:Nn \l__unicode_tmp_tl { #2 , ~ #3 } } -\clist_map_inline:nn - { UnicodeData , SpecialCasing , CaseFolding } - { - \ior_open:Nn \g__unicode_data_ior { #1 .txt } - \ior_if_eof:NTF \g__unicode_data_ior - { \__msg_kernel_error:nnn { unicode } { file-not-found } {#1} } - { - \iow_now:Nx \g__unicode_result_iow - { - \iow_char:N \% - \iow_char:N \% - \c_space_tl - - ~ #1 .txt - } - \ior_get_str:NN \g__unicode_data_ior \l__unicode_tmp_tl - \tl_set:Nx \l__unicode_tmp_tl - { - \l__unicode_tmp_tl - \tl_to_str:n { - .txt } - } - \exp_after:wN \__unicode_parse_line:w - \l__unicode_tmp_tl \scan_stop: {#1} - \ior_close:N \g__unicode_data_ior - } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% Finish off this part of the header. -% \begin{macrocode} -\__unicode_verb: -%% which are maintained by the Unicode Consortium. -%% -\__unicode_verb_end: -% \end{macrocode} -% -% \begin{macro}[EXP]{\__unicode_zero_fill:N} -% A short piece of reusable code for the header. -% \begin{macrocode} -\cs_new:Npn \__unicode_zero_fill:N #1 - { - \int_compare:nNnT #1 < \c_ten { 0 } - \int_use:N #1 - } -% \end{macrocode} -% \end{macro} -% -% Automatically include the current date. -% \begin{macrocode} -\iow_now:Nx \g__unicode_result_iow - { - \iow_char:N \% - \iow_char:N \% - \c_space_tl - Generated~on~ - \int_use:N \tex_year:D - - \__unicode_zero_fill:N \tex_month:D - - \__unicode_zero_fill:N \tex_day:D . - } -\iow_now:Nx \g__unicode_result_iow - { - \iow_char:N \% - \iow_char:N \% - } -% \end{macrocode} -% Write an identification line to the file: the file data here can't be set -% automatically and so will need to be edited by hand. As such, the data here -% the standard SVN filler. -% \begin{macrocode} -\iow_now:Nx \g__unicode_result_iow - { - \exp_not:N \ProvidesExplFile - { l3unicode-data.def } ~ - { - \int_use:N \tex_year:D / - \__unicode_zero_fill:N \tex_month:D / - \__unicode_zero_fill:N \tex_day:D - } ~ - { -1 } ~ - { L3~Unicode~data } - } -% \end{macrocode} -% -% \subsection{\pdfTeX{} support} -% -% As \pdfTeX{} does not support Unicode input natively, most of the data -% here will not be useful. Rather than use two separate mechanisms for -% each function depending on the engine, the system is designed such that -% \enquote{truncated} data structures are provided for \pdfTeX{}. These -% are coded here for direct transfer to the |.def| file, which can then -% abort loading when \pdfTeX{} is in use. -% -% The idea here is simple: map over all of the letters of the Latin -% alphabet and create appropriate token lists, then add all of the rest -% of the data structures. -% -% After the mapping, the small number of fixed data structures that are -% used for the special case conversions are created. These are mainly empty, -% but for cases where a match is possible (as the test char is in the \pdfTeX{} -% range), no-op data is included (as the \emph{output} would be out-of-range). -% \begin{macrocode} -\__unicode_verb: -\bool_if:nF - { - \sys_if_engine_luatex_p: || - \sys_if_engine_xetex_p: - } - { - \group_begin: - \cs_set_protected:Npn \__unicode_tmp:NN #1#2 - { - \quark_if_recursion_tail_stop:N #1 - \exp_after:wN \__unicode_tmp:NNNNNNN - \tex_number:D \__int_eval:w `#1 \exp_after:wN \__int_eval_end: - \tex_number:D \__int_eval:w 100 + `#2 \__int_eval_end: - #1 #2 - \__unicode_tmp:NN - } - \cs_set_protected:Npn \__unicode_tmp:NNNNNNN #1#2#3#4#5#6#7 - { - \tl_const:cx { c__unicode_fold_ #1 _X_ #2 _ tl } { #6#7 } - \tl_const:cn { c__unicode_lower_ #1 _X_ #2 _ tl } { #6#7 } - \tl_const:cn { c__unicode_upper_ #4 _X_ #5 _ tl } { #7#6 } - } - \__unicode_tmp:NN - AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz - \q_recursion_tail ? \q_recursion_stop - \group_end: - \int_step_inline:nnnn { 0 } { 1 } { 9 } - { - \int_step_inline:nnnn { 0 } { 1 } { 9 } - { - \clist_map_inline:nn { fold , lower , upper } - { - \tl_if_exist:cF { c__unicode_ ####1 _ #1 _X_ ##1 _ tl } - { \tl_const:cn { c__unicode_ ####1 _ #1 _X_ ##1 _ tl } { } } - } - } - } - \tl_const:Nn \c__unicode_lower_exceptions_tl { } - \tl_const:Nn \c__unicode_mixed_exceptions_tl { } - \tl_const:Nn \c__unicode_upper_exceptions_tl { } - \tl_const:Nn \c__unicode_std_sigma_tl { } - \tl_const:Nn \c__unicode_final_sigma_tl { } - \tl_const:Nn \c__unicode_accents_lt_tl { } - \tl_const:Nn \c__unicode_dot_above_tl { } - \tl_const:Nn \c__unicode_dotless_i_tl { I } - \tl_const:Nn \c__unicode_dotted_I_tl { i } - \tl_const:Nn \c__unicode_i_ogonek_tl { } - \tl_const:Nn \c__unicode_I_ogonek_tl { } - \tl_const:Nn \c__unicode_upper_Eszett_tl { } - \tex_endinput:D - } -\__unicode_verb_end: -% \end{macrocode} -% -% \subsection{Upper/lower/title casing} -% -% \begin{macro}{\__unicode_parse_line:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxi:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxii:nw} -% \begin{macro}[aux]{\__unicode_parse_line_auxiii:nw} -% \begin{macro}[aux]{\__unicode_parse_line_auxiv:nnn} -% \begin{macro}[aux]{\__unicode_parse_line_auxv:wnnn} -% \begin{macro}[aux]{\__unicode_parse_line_auxvi:nnNNn} -% \begin{macro}[aux]{\__unicode_brace:n} -% When parsing |UnicodeData.txt| there are no comments or blank lines. Case -% mappings when present here are one-to-one and so are easy to deal with. The -% slight complication here is that the lines are rather long, so a multi-part -% approach is needed to grab the correct parts of the line as arguments. Of -% the first set of arguments, the two that needed are |#1| (the code point) -% and |#6| (details about the code point which may include the fact it's a -% compatibility char). -% \begin{macrocode} -\cs_set_protected:Npn \__unicode_parse_line:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; - { - \__unicode_parse_line_auxi:w #1 ; #6 ; - } -% \end{macrocode} -% With some data items removed, at this stage the hexadecimal -% representation of the char is |#1|, any compatibility char information is -% in |#2|, the upper case code point is |#6|, the lower case one |#7| and -% the title case one |#8|. These may or may not be present and the upper and -% title case values may be identical. The compatibility data is first -% extracted into a sequence, then the main information is processed. Where -% there are values for upper/lower case, they are saved into the appropriate -% token lists. For title case, since the number of exceptions is small and so -% they are saved in a single dedicated space. Note that there is a space at -% the end of |#8| as we are reading the data in with spaces not ignored: that -% has to be allowed for to get the equality test right. The -% \enquote{business end} of the code here is inside a rescan block so the -% later parts of the code do not need to be concerned with string -% \emph{versus} standard category codes. -% \begin{macrocode} -\cs_set_protected:Npn \__unicode_parse_line_auxi:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 \q_stop - { - \use:x - { - \__unicode_parse_line_auxii:nw {#1} #2 \tl_to_str:n { <compat> } - \c_space_tl \exp_not:N \q_stop - } - \tl_rescan:nn { } - { - \__unicode_parse_line_auxiv:nnn {#1} {#6} { upper } - \__unicode_parse_line_auxiv:nnn {#1} {#7} { lower } - \bool_if:nF - { - \tl_if_empty_p:n {#6} - || \str_if_eq_p:nn {#6} {#8} - } - { - \seq_if_in:NnTF \l__unicode_compat_seq {#1} - { \cs_set:Npn \__unicode_brace:n ##1 { { ##1 } } } - { \cs_set_eq:NN \__unicode_brace:n \use:n } - \tl_put_right:Nx \l__unicode_title_exceptions_tl - { - \__unicode_brace:n { \utex_char:D "#1 \c_space_tl } - \__unicode_brace:n { \utex_char:D "#8 \c_space_tl } - } - } - } - } -% \end{macrocode} -% Compatibility chars have information as the marker |<compat>| then a list -% of one to three resulting code points. The one-to-one cases are not an -% issue for dealing the the data, so it's only the more complex versions that -% need to be recorded. -% \begin{macrocode} -\use:x - { - \cs_new_protected:Npn \exp_not:N \__unicode_parse_line_auxii:nw - ##1##2 \tl_to_str:n { <compat> } ~ ##3 \exp_not:N \q_stop - } - { - \tl_if_blank:nF {#3} - { - \__unicode_parse_line_auxiii:nw {#1} #3 ~ \q_stop - } - } -\cs_new_protected:Npn \__unicode_parse_line_auxiii:nw #1#2 ~ #3 \q_stop - { - \tl_if_blank:nF {#3} - { - \seq_put_right:Nn \l__unicode_compat_seq {#1} - } - } -% \end{macrocode} -% The array structure here is in two parts, one for upper and one -% for lower case mappings. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_parse_line_auxiv:nnn #1#2 - { - \exp_last_unbraced:Nf \__unicode_parse_line_auxv:wnnn - { \int_eval:n { 1000000 + "#1 } } \q_stop - {#1} {#2} - } -\cs_new_protected:Npn \__unicode_parse_line_auxv:wnnn - #1#2#3#4#5#6#7 \q_stop #8#9 - { \__unicode_parse_line_auxvi:nnNNn {#8} {#9} #6 #7 } -% \end{macrocode} -% Store data as long as there is something to actually do in a mapping. -% For entries in the the compatibility list there is a need to add braces -% around the chars in case there is any normalisation during file reading. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_parse_line_auxvi:nnNNn #1#2#3#4#5 - { - \tl_if_empty:nF {#2} - { - \seq_if_in:NnTF \l__unicode_compat_seq {#1} - { \cs_set:Npn \__unicode_brace:n ##1 { { ##1 } } } - { \cs_set_eq:NN \__unicode_brace:n \use:n } - \tl_put_right:cx { l__unicode_ #5 _ #3 _X_ #4 _tl } - { - \__unicode_brace:n - { \utex_char:D "#1 \c_space_tl } - \__unicode_brace:n - { \utex_char:D "#2 \c_space_tl } - } - } - } -\cs_new_eq:NN \__unicode_brace:n \use:n -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% Everything is set up and so the read loop can take place. -% \begin{macrocode} -\__unicode_file_map:nn - { UnicodeData.txt } - { \__unicode_parse_line:w #1 \q_stop } -% \end{macrocode} -% -% \begin{macro}{\__unicode_parse_line:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxii:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxiii:nnn} -% \begin{macro}[aux]{\__unicode_parse_line_auxiv:nwn} -% The file |SpecialCasing.txt| uses C-style comments and may contain -% blank lines: those two awkward situations need to be filtered out before -% parsing the real data in the line. -% \begin{macrocode} -\cs_set_protected:Npn \__unicode_parse_line:w #1 \q_stop - { - \tl_if_blank:nF {#1} - { - \str_if_eq_x:nnF { \tl_head:n {#1} } { \cs_to_str:N \# } - { \__unicode_parse_line_auxii:w #1 \q_stop } - } - } -% \end{macrocode} -% Here, |#1| is the code point for the input, |#2| is the lower case mapping, -% |#3| the title case mapping and |#4| the upper case mapping: all three -% mappings are always given even if they are also in |UnicodeData.txt|. As -% most of the title case exceptions are also upper case exceptions, a test is -% made so that we are only storing truly useful exceptions for title case. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_parse_line_auxii:w - #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop - { - \__unicode_parse_line_auxiii:nnn {#1} {#2} { lower } - \str_if_eq:nnF {#3} {#4} - { \__unicode_parse_line_auxiii:nnn {#1} {#3} { title } } - \__unicode_parse_line_auxiii:nnn {#1} {#4} { upper } - } -% \end{macrocode} -% For each mapping there may be one, two or three code points in the -% output. After a bit of a trick to allow for ease of parsing, we check if -% there are at least two numbers for the case-changed char. If there are, -% then save the exception. If not, then the value will also be in the main -% table and we can ignore it here. There is also a test to see if the -% current value is a title case exception: they don't need extra braces -% for those. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_parse_line_auxiii:nnn #1#2#3 - { \use:n { \__unicode_parse_line_auxiv:nwn {#1} #2 ~ } ~ \q_stop {#3} } -\cs_new_protected:Npn \__unicode_parse_line_auxiv:nwn #1#2 ~ #3 ~ #4 \q_stop #5 - { - \tl_if_empty:nF {#3} - { - \seq_if_in:NnTF \l__unicode_compat_seq {#1} - { \cs_set:Npn \__unicode_brace:n ##1 { { ##1 } } } - { \cs_set_eq:NN \__unicode_brace:n \use:n } - \tl_rescan:nn - { } - { - \tl_put_right:cx { l__unicode_ #5 _exceptions_tl } - { - \__unicode_brace:n { \utex_char:D "#1 \c_space_tl } - { - \utex_char:D "#2 \c_space_tl - \utex_char:D "#3 \c_space_tl - \tl_if_empty:nF {#4} - { \utex_char:D "#4 \c_space_tl } - } - } - } - } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% Parsing set up, read the special cases file. The input contains both -% general special cases and ones dependent on context. We only want to read -% the former, so there is a check for the line that splits the two: -% at that point, simply stop parsing. -% \begin{macrocode} -\__unicode_file_map:nn - { SpecialCasing.txt } - { - \str_if_eq_x:nnTF {#1} { \cs_to_str:N \# \c_space_tl Conditional~Mappings } - { \ior_map_break: } - { \__unicode_parse_line:w #1 \q_stop } - } -% \end{macrocode} -% -% Saving the data uses a single file, with the two arrays followed by the -% exceptions. -% \begin{macrocode} -\tl_map_inline:nn { 0123456789 } - { - \tl_map_inline:nn { 0123456789 } - { - \iow_now:Nx \g__unicode_result_iow - { - \tl_const:cn - { ~ c__unicode_lower_ #1 _X_ ##1 _tl ~ } ~ - { ~ \exp_not:v { l__unicode_lower_ #1 _X_ ##1 _tl } ~ } - } - \tl_clear:c { l__unicode_lower_ #1 _X_ ##1 _tl } - } - } -\tl_map_inline:nn { 0123456789 } - { - \tl_map_inline:nn { 0123456789 } - { - \iow_now:Nx \g__unicode_result_iow - { - \tl_const:cn - { ~ c__unicode_upper_ #1 _X_ ##1 _tl ~ } ~ - { ~ \exp_not:v { l__unicode_upper_ #1 _X_ ##1 _tl } ~ } - } - } - } -\clist_map_inline:nn - { upper , lower , title } - { - \iow_now:Nx \g__unicode_result_iow - { - \tl_const:Nn - \exp_not:c - { - c__unicode_ - \str_if_eq:nnTF {#1} { title } { mixed } {#1} - _exceptions_tl - } - { \exp_not:v { l__unicode_ #1 _ exceptions_tl } } - } - } -% \end{macrocode} -% -% Data for the special cases is now stored. This is mainly a series of simple -% token lists with appropriate names and content, but there is also one place -% where a small mapping list is required. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_special_case:nn #1#2 - { - \quark_if_recursion_tail_stop:n {#1} - \iow_now:Nx \g__unicode_result_iow - { - \tl_const:Nn \exp_not:c { c__unicode_ #1 _tl } - { ~ \utex_char:D "#2 \c_space_tl \c_space_tl } - } - \__unicode_special_case:nn - } -\__unicode_special_case:nn - { std_sigma } { 03C3 } - { final_sigma } { 03C2 } - { dotless_i } { 0131 } - { dot_above } { 0307 } - { dotted_I } { 0130 } - { i_ogonek } { 012F } - { I_ogonek } { 012E } - { upper_Eszett } { 1E9E } - \q_recursion_tail { } - \q_recursion_stop -\iow_now:Nx \g__unicode_result_iow - { - \tl_const:Nn \exp_not:N \c__unicode_accents_lt_tl - { - \utex_char:D "00CC - { \utex_char:D "0069 \utex_char:D "0307 \utex_char:D "0300 } - \utex_char:D "00CD - { \utex_char:D "0069 \utex_char:D "0307 \utex_char:D "0301 } - \utex_char:D "0128 - { \utex_char:D "0069 \utex_char:D "0307 \utex_char:D "0303 } - } - } -% \end{macrocode} -% -% \subsection{Case folding} -% -% \begin{macro}{\__unicode_parse_line:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxi:Nw} -% \begin{macro}[aux]{\__unicode_parse_line_auxii:w} -% \begin{macro}[aux]{\__unicode_parse_line_auxiii:nw} -% \begin{macro}[aux]{\__unicode_parse_line_auxiv:nn} -% \begin{macro}[aux]{\__unicode_parse_line_auxv:wnn} -% As for |SpecialCasing.txt|, the format of |CaseFolding.txt| allows both -% blank lines and C-style comments starting with |#|. -% \begin{macrocode} -\cs_set_protected:Npn \__unicode_parse_line:w #1 \q_stop - { - \tl_if_blank:nF {#1} - { \__unicode_parse_line_auxi:Nw #1 \q_stop } - } -\cs_set_protected:Npn \__unicode_parse_line_auxi:Nw #1#2 \q_stop - { - \str_if_eq_x:nnF { \exp_not:n {#1} } { \cs_to_str:N \# } - { \__unicode_parse_line_auxii:w #1#2 \q_stop } - } -% \end{macrocode} -% For lines actually containing data, there will be four entries separated by -% |;| tokens: the hex code for the char itself, which folding regim\'{e}s -% the line applies to, the hex code(s) for the folded char and a -% description. Of these, we need all but the last one. In the simple -% case of core foldings, the mapping is one--one and this information -% can be passed directly to the next stage. We also handle the full -% mappings (dropping simple ones plus any Turkic variation): an additional -% step is needed to parse this case. -% \begin{macrocode} -\cs_set_protected:Npn \__unicode_parse_line_auxii:w #1 ;~ #2 ; #3 ; #4 \q_stop - { - \str_if_eq:nnTF {#2} { C } - { - \__unicode_parse_line_auxiv:nn - {#1} { \utex_char:D "#3 \c_space_tl } - } - { - \str_if_eq:nnT {#2} { F } - { \__unicode_parse_line_auxiii:nw {#1} #3 ~ \q_stop } - } - } -% \end{macrocode} -% Full folding produces two or three Unicode code points from a single -% input char. To deal with this, we split the relevant part of the input -% and check how many chars to generate. The entire folding output is -% braced so that when read back \TeX{} will see this as a group in our -% replacement code: the only exceptions occur when the input char is on -% the compatibility list, as that would lead to an extra set of braces. -% \begin{macrocode} -\cs_set_protected:Npn \__unicode_parse_line_auxiii:nw #1 ~ #2 ~ #3 ~ #4 \q_stop - { - \seq_if_in:NnTF \l__unicode_compat_seq {#1} - { \cs_set_eq:NN \__unicode_brace:n \use:n } - { \cs_set:Npn \__unicode_brace:n ##1 { { ##1 } } } - \exp_args:Nno \__unicode_parse_line_auxiv:nn - {#1} - { - \__unicode_brace:n - { - \utex_char:D "#2 \c_space_tl - \utex_char:D "#3 \c_space_tl - \tl_if_empty:nF {#4} - { \utex_char:D "#4 \c_space_tl } - } - } - } -% \end{macrocode} -% The final stage of extracting the mapping is to split the various cases -% up such that comparison and replacement does not need to check every -% character. That is done by taking the charcode modulo $100$: this splits -% the list of chars into $100$ much shorter lists. With that done, the -% input and output chars are added to the appropriate token lists. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_parse_line_auxiv:nn #1#2 - { - \exp_last_unbraced:Nf \__unicode_parse_line_auxv:wnn - { \int_eval:n { 1000000 + "#1 } } \q_stop - {#1} {#2} - } -% \end{macrocode} -% As the input is read in string mode, there is a need for a rescan -% here since \tn{char} requires letters for hexadecimal digits -% beyond~$9$. -% \begin{macrocode} -\cs_new_protected:Npn \__unicode_parse_line_auxv:wnn - #1#2#3#4#5#6#7 \q_stop #8#9 - { - \seq_if_in:NnTF \l__unicode_compat_seq {#8} - { \cs_set:Npn \__unicode_brace:n ##1 { { ##1 } } } - { \cs_set_eq:NN \__unicode_brace:n \use:n } - \tl_rescan:nn - { } - { - \tl_put_right:cx { l__unicode_lower_ #6 _X_ #7 _tl } - { - \__unicode_brace:n { \utex_char:D "#8 \c_space_tl } - \__unicode_brace:n { #9 } - } - } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% The main loop can now take place, reading the source data and saving all of -% the information in the token list array. -% \begin{macrocode} -\__unicode_file_map:nn - { CaseFolding.txt } - { \__unicode_parse_line:w #1 \q_stop } -% \end{macrocode} -% -% Write the processed data to the |.def| file. -% \begin{macrocode} -\tl_map_inline:nn { 0123456789 } - { - \tl_map_inline:nn { 0123456789 } - { - \iow_now:Nx \g__unicode_result_iow - { - \tl_const:cn - { ~ c__unicode_fold_ #1 _X_ ##1 _tl ~ } ~ - { ~ \exp_not:v { l__unicode_lower_ #1 _X_ ##1 _tl } ~ } - } - \tl_clear:c { l__unicode_lower_ #1 _X_ ##1 _tl } - } - } -% \end{macrocode} -% -% Job done, end the \TeX{} run. -% \begin{macrocode} -\iow_close:N \g__unicode_result_iow -\tex_end:D -% \end{macrocode} -% -% \begin{macrocode} -%</script> -% \end{macrocode} -% -% \end{implementation} -% -% \PrintIndex |