diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-30 22:39:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-30 22:39:09 +0000 |
commit | a28e1bfccd6fe522fcd296426e4d89c7fb4f19b6 (patch) | |
tree | b72347e08575b56fcfed87c4d837b48dcfd1e02a /Master/texmf-dist/tex/latex/l3kernel | |
parent | b40c37a9e22b8235ff9c0bc256d00f7af94304c3 (diff) |
l3 (30apr18)
git-svn-id: svn://tug.org/texlive/trunk@47516 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 8042 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 44 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def | 123 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvips.def | 204 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def | 78 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def | 109 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def | 123 |
10 files changed, 4864 insertions, 3891 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index adfba18d086..29aaa3c2673 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -11,12 +11,12 @@ %% l3expan.dtx (with options: `package') %% l3tl.dtx (with options: `package') %% l3str.dtx (with options: `package') +%% l3quark.dtx (with options: `package') %% l3seq.dtx (with options: `package') %% l3int.dtx (with options: `package') -%% l3intarray.dtx (with options: `package') %% l3flag.dtx (with options: `package') -%% l3quark.dtx (with options: `package') %% l3prg.dtx (with options: `package') +%% l3sys.dtx (with options: `package') %% l3clist.dtx (with options: `package') %% l3token.dtx (with options: `package') %% l3prop.dtx (with options: `package') @@ -37,17 +37,17 @@ %% l3fp-trig.dtx (with options: `package') %% l3fp-convert.dtx (with options: `package') %% l3fp-random.dtx (with options: `package') +%% l3intarray.dtx (with options: `package') %% l3sort.dtx (with options: `package') -%% l3tl-build.dtx (with options: `package') %% l3tl-analysis.dtx (with options: `package') %% l3regex.dtx (with options: `package') %% l3box.dtx (with options: `package') %% l3color-base.dtx (with options: `package') %% l3coffins.dtx (with options: `package') -%% l3sys.dtx (with options: `package') -%% l3deprecation.dtx (with options: `package') -%% l3candidates.dtx (with options: `package') %% l3luatex.dtx (with options: `package,tex') +%% l3unicode.dtx (with options: `package') +%% l3candidates.dtx (with options: `package') +%% l3deprecation.dtx (with options: `package') %% %% Copyright (C) 1990-2018 The LaTeX3 Project %% @@ -62,7 +62,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018/03/05}% +\def\ExplFileDate{2018-04-30}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -360,514 +360,520 @@ { \tex_global:D \tex_let:D #2 #1 } - \__kernel_primitive:NN \ \tex_space:D - \__kernel_primitive:NN \/ \tex_italiccorrection:D - \__kernel_primitive:NN \- \tex_hyphen: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 - \__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 \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 \pdfsuppressptexinfo \pdftex_pdfsuppressptexinfo: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 \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 \pdffilemoddate \pdftex_filemoddate:D - \__kernel_primitive:NN \pdffilesize \pdftex_filesize: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 \pdfmdfivesum \pdftex_mdfivesum: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 \pdftexbanner \pdftex_pdftexbanner:D - \__kernel_primitive:NN \pdftexrevision \pdftex_pdftexrevision:D - \__kernel_primitive:NN \pdftexversion \pdftex_pdftexversion: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 + \__kernel_primitive:NN \ \tex_space:D + \__kernel_primitive:NN \/ \tex_italiccorrection:D + \__kernel_primitive:NN \- \tex_hyphen: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 + \__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 \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 \pfdftex_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 \pdfsuppressptexinfo + \pdftex_pdfsuppressptexinfo: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 \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 \pdffilemoddate \pdftex_filemoddate:D + \__kernel_primitive:NN \pdffilesize \pdftex_filesize:D + \__kernel_primitive:NN \pdffirstlineheigh \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 \pdfmdfivesum \pdftex_mdfivesum: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 \pdftexbanner \pdftex_pdftexbanner:D + \__kernel_primitive:NN \pdftexrevision \pdftex_pdftexrevision:D + \__kernel_primitive:NN \pdftexversion \pdftex_pdftexversion: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 \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 @@ -877,378 +883,428 @@ \tex_fi:D \use_none:n { \tex_global:D \tex_let:D #2 #1 } } - \__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 \XeTeXgenerateactualtext \xetex_generateactualtext: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 \XeTeXrevision \xetex_XeTeXrevision:D - \__kernel_primitive:NN \XeTeXversion \xetex_XeTeXversion:D - \__kernel_primitive:NN \mdfivesum \pdftex_mdfivesum:D - \__kernel_primitive:NN \ifprimitive \pdftex_ifprimitive:D - \__kernel_primitive:NN \primitive \pdftex_primitive:D - \__kernel_primitive:NN \shellescape \pdftex_shellescape: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 \automaticdiscretionary \luatex_automaticdiscretionary:D - \__kernel_primitive:NN \automatichyphenmode \luatex_automatichyphenmode:D - \__kernel_primitive:NN \automatichyphenpenalty \luatex_automatichyphenpenalty:D - \__kernel_primitive:NN \begincsname \luatex_begincsname:D - \__kernel_primitive:NN \breakafterdirmode \luatex_breakafterdirmode: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 \etoksapp \luatex_etoksapp:D - \__kernel_primitive:NN \etokspre \luatex_etokspre:D - \__kernel_primitive:NN \explicithyphenpenalty \luatex_explicithyphenpenalty:D - \__kernel_primitive:NN \expanded \luatex_expanded:D - \__kernel_primitive:NN \explicitdiscretionary \luatex_explicitdiscretionary:D - \__kernel_primitive:NN \firstvalidlanguage \luatex_firstvalidlanguage:D - \__kernel_primitive:NN \fontid \luatex_fontid:D - \__kernel_primitive:NN \formatname \luatex_formatname:D - \__kernel_primitive:NN \hjcode \luatex_hjcode:D - \__kernel_primitive:NN \hpack \luatex_hpack:D - \__kernel_primitive:NN \hyphenationbounds \luatex_hyphenationbounds:D - \__kernel_primitive:NN \hyphenationmin \luatex_hyphenationmin:D - \__kernel_primitive:NN \hyphenpenaltymode \luatex_hyphenpenaltymode:D - \__kernel_primitive:NN \gleaders \luatex_gleaders:D - \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D - \__kernel_primitive:NN \lastnamedcs \luatex_lastnamedcs:D - \__kernel_primitive:NN \latelua \luatex_latelua:D - \__kernel_primitive:NN \letcharcode \luatex_letcharcode:D - \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D - \__kernel_primitive:NN \luafunction \luatex_luafunction:D - \__kernel_primitive:NN \luatexbanner \luatex_luatexbanner:D - \__kernel_primitive:NN \luatexrevision \luatex_luatexrevision:D - \__kernel_primitive:NN \luatexversion \luatex_luatexversion:D - \__kernel_primitive:NN \mathdelimitersmode \luatex_mathdelimitersmode:D - \__kernel_primitive:NN \mathdisplayskipmode \luatex_mathdisplayskipmode:D - \__kernel_primitive:NN \matheqnogapstep \luatex_matheqnogapstep:D - \__kernel_primitive:NN \mathnolimitsmode \luatex_mathnolimitsmode:D - \__kernel_primitive:NN \mathoption \luatex_mathoption:D - \__kernel_primitive:NN \mathpenaltiesmode \luatex_mathpenaltiesmode:D - \__kernel_primitive:NN \mathrulesfam \luatex_mathrulesfam:D - \__kernel_primitive:NN \mathscriptsmode \luatex_mathscriptsmode:D - \__kernel_primitive:NN \mathscriptboxmode \luatex_mathscriptboxmode:D - \__kernel_primitive:NN \mathstyle \luatex_mathstyle:D - \__kernel_primitive:NN \mathsurroundmode \luatex_mathsurroundmode: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 \nospaces \luatex_nospaces:D - \__kernel_primitive:NN \novrule \luatex_novrule:D - \__kernel_primitive:NN \outputbox \luatex_outputbox:D - \__kernel_primitive:NN \pagebottomoffset \luatex_pagebottomoffset:D - \__kernel_primitive:NN \pageleftoffset \luatex_pageleftoffset:D - \__kernel_primitive:NN \pagerightoffset \luatex_pagerightoffset: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 \prebinoppenalty \luatex_prebinoppenalty:D - \__kernel_primitive:NN \predisplaygapfactor \luatex_predisplaygapfactor:D - \__kernel_primitive:NN \preexhyphenchar \luatex_preexhyphenchar:D - \__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D - \__kernel_primitive:NN \prerelpenalty \luatex_prerelpenalty: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 \shapemode \luatex_shapemode: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 \suppressprimitiveerror \luatex_suppressprimitiveerror:D - \__kernel_primitive:NN \toksapp \luatex_toksapp:D - \__kernel_primitive:NN \tokspre \luatex_tokspre:D - \__kernel_primitive:NN \tpack \luatex_tpack:D - \__kernel_primitive:NN \vpack \luatex_vpack: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 \linedir \luatex_linedir: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 \pagedir \luatex_pagedir: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 \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 \ifabsdim \pdftex_ifabsdim:D - \__kernel_primitive:NN \ifabsnum \pdftex_ifabsnum: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 \tracingfonts \pdftex_tracingfonts:D - \__kernel_primitive:NN \uniformdeviate \pdftex_uniformdeviate: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 \Umathnolimitsubfactor \utex_nolimitsubfactor:D - \__kernel_primitive:NN \Umathnolimitsupfactor \utex_nolimitsupfactor: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 \Unosubscript \utex_Unosubscript:D - \__kernel_primitive:NN \Unosuperscript \utex_Unosuperscript: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 - \__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 \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 \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 \XeTeXgenerateactualtext + \xetex_generateactualtext: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 \XeTeXrevision \xetex_XeTeXrevision:D + \__kernel_primitive:NN \XeTeXversion \xetex_XeTeXversion:D + \__kernel_primitive:NN \mdfivesum \pdftex_mdfivesum:D + \__kernel_primitive:NN \ifprimitive \pdftex_ifprimitive:D + \__kernel_primitive:NN \primitive \pdftex_primitive:D + \__kernel_primitive:NN \shellescape \pdftex_shellescape: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 \automaticdiscretionary + \luatex_automaticdiscretionary:D + \__kernel_primitive:NN \automatichyphenmode + \luatex_automatichyphenmode:D + \__kernel_primitive:NN \automatichyphenpenalty + \luatex_automatichyphenpenalty:D + \__kernel_primitive:NN \begincsname \luatex_begincsname:D + \__kernel_primitive:NN \breakafterdirmode \luatex_breakafterdirmode: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 \etoksapp \luatex_etoksapp:D + \__kernel_primitive:NN \etokspre \luatex_etokspre:D + \__kernel_primitive:NN \explicithyphenpenalty + \luatex_explicithyphenpenalty:D + \__kernel_primitive:NN \expanded \luatex_expanded:D + \__kernel_primitive:NN \explicitdiscretionary + \luatex_explicitdiscretionary:D + \__kernel_primitive:NN \firstvalidlanguage \luatex_firstvalidlanguage:D + \__kernel_primitive:NN \fontid \luatex_fontid:D + \__kernel_primitive:NN \formatname \luatex_formatname:D + \__kernel_primitive:NN \hjcode \luatex_hjcode:D + \__kernel_primitive:NN \hpack \luatex_hpack:D + \__kernel_primitive:NN \hyphenationbounds \luatex_hyphenationbounds:D + \__kernel_primitive:NN \hyphenationmin \luatex_hyphenationmin:D + \__kernel_primitive:NN \hyphenpenaltymode \luatex_hyphenpenaltymode:D + \__kernel_primitive:NN \gleaders \luatex_gleaders:D + \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D + \__kernel_primitive:NN \lastnamedcs \luatex_lastnamedcs:D + \__kernel_primitive:NN \latelua \luatex_latelua:D + \__kernel_primitive:NN \letcharcode \luatex_letcharcode:D + \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D + \__kernel_primitive:NN \luafunction \luatex_luafunction:D + \__kernel_primitive:NN \luatexbanner \luatex_luatexbanner:D + \__kernel_primitive:NN \luatexrevision \luatex_luatexrevision:D + \__kernel_primitive:NN \luatexversion \luatex_luatexversion:D + \__kernel_primitive:NN \mathdelimitersmode \luatex_mathdelimitersmode:D + \__kernel_primitive:NN \mathdisplayskipmode + \luatex_mathdisplayskipmode:D + \__kernel_primitive:NN \matheqnogapstep \luatex_matheqnogapstep:D + \__kernel_primitive:NN \mathnolimitsmode \luatex_mathnolimitsmode:D + \__kernel_primitive:NN \mathoption \luatex_mathoption:D + \__kernel_primitive:NN \mathpenaltiesmode \luatex_mathpenaltiesmode:D + \__kernel_primitive:NN \mathrulesfam \luatex_mathrulesfam:D + \__kernel_primitive:NN \mathscriptsmode \luatex_mathscriptsmode:D + \__kernel_primitive:NN \mathscriptboxmode \luatex_mathscriptboxmode:D + \__kernel_primitive:NN \mathstyle \luatex_mathstyle:D + \__kernel_primitive:NN \mathsurroundmode \luatex_mathsurroundmode: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 \nospaces \luatex_nospaces:D + \__kernel_primitive:NN \novrule \luatex_novrule:D + \__kernel_primitive:NN \outputbox \luatex_outputbox:D + \__kernel_primitive:NN \pagebottomoffset \luatex_pagebottomoffset:D + \__kernel_primitive:NN \pageleftoffset \luatex_pageleftoffset:D + \__kernel_primitive:NN \pagerightoffset \luatex_pagerightoffset: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 \prebinoppenalty \luatex_prebinoppenalty:D + \__kernel_primitive:NN \predisplaygapfactor + \luatex_predisplaygapfactor:D + \__kernel_primitive:NN \preexhyphenchar \luatex_preexhyphenchar:D + \__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D + \__kernel_primitive:NN \prerelpenalty \luatex_prerelpenalty: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 \shapemode \luatex_shapemode: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 \suppressprimitiveerror + \luatex_suppressprimitiveerror:D + \__kernel_primitive:NN \toksapp \luatex_toksapp:D + \__kernel_primitive:NN \tokspre \luatex_tokspre:D + \__kernel_primitive:NN \tpack \luatex_tpack:D + \__kernel_primitive:NN \vpack \luatex_vpack: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 \linedir \luatex_linedir: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 \pagedir \luatex_pagedir: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 \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 \ifabsdim \pdftex_ifabsdim:D + \__kernel_primitive:NN \ifabsnum \pdftex_ifabsnum: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 \tracingfonts \pdftex_tracingfonts:D + \__kernel_primitive:NN \uniformdeviate \pdftex_uniformdeviate: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 \Umathnolimitsubfactor \utex_nolimitsubfactor:D + \__kernel_primitive:NN \Umathnolimitsupfactor \utex_nolimitsupfactor: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 \Unosubscript \utex_nosubscript:D + \__kernel_primitive:NN \Unosuperscript \utex_nosuperscript: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 + \__kernel_primitive:NN \autospacing \ptex_autospacing:D + \__kernel_primitive:NN \autoxspacing \ptex_autoxspacing:D + \__kernel_primitive:NN \dtou \ptex_dtou:D + \__kernel_primitive:NN \epTeXinputencoding \ptex_inputencoding:D + \__kernel_primitive:NN \epTeXversion \ptex_epTeXversion: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 \ptexversion \ptex_ptexversion: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 \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 \uptexversion \uptex_uptexversion:D \tex_endgroup:D \etex_ifdefined:D \@@end \tex_let:D \tex_end:D \@@end @@ -1299,57 +1355,62 @@ \tex_fi:D \tex_fi:D \etex_ifdefined:D \luatexsuppressfontnotfounderror - \tex_let:D \luatex_alignmark:D \luatexalignmark - \tex_let:D \luatex_aligntab:D \luatexaligntab - \tex_let:D \luatex_attribute:D \luatexattribute - \tex_let:D \luatex_attributedef:D \luatexattributedef - \tex_let:D \luatex_catcodetable:D \luatexcatcodetable - \tex_let:D \luatex_clearmarks:D \luatexclearmarks - \tex_let:D \luatex_crampeddisplaystyle:D \luatexcrampeddisplaystyle - \tex_let:D \luatex_crampedscriptscriptstyle:D \luatexcrampedscriptscriptstyle - \tex_let:D \luatex_crampedscriptstyle:D \luatexcrampedscriptstyle - \tex_let:D \luatex_crampedtextstyle:D \luatexcrampedtextstyle - \tex_let:D \luatex_fontid:D \luatexfontid - \tex_let:D \luatex_formatname:D \luatexformatname - \tex_let:D \luatex_gleaders:D \luatexgleaders - \tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable - \tex_let:D \luatex_latelua:D \luatexlatelua - \tex_let:D \luatex_luaescapestring:D \luatexluaescapestring - \tex_let:D \luatex_luafunction:D \luatexluafunction - \tex_let:D \luatex_mathstyle:D \luatexmathstyle - \tex_let:D \luatex_nokerns:D \luatexnokerns - \tex_let:D \luatex_noligs:D \luatexnoligs - \tex_let:D \luatex_outputbox:D \luatexoutputbox - \tex_let:D \luatex_pageleftoffset:D \luatexpageleftoffset - \tex_let:D \luatex_pagetopoffset:D \luatexpagetopoffset - \tex_let:D \luatex_postexhyphenchar:D \luatexpostexhyphenchar - \tex_let:D \luatex_posthyphenchar:D \luatexposthyphenchar - \tex_let:D \luatex_preexhyphenchar:D \luatexpreexhyphenchar - \tex_let:D \luatex_prehyphenchar:D \luatexprehyphenchar - \tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable - \tex_let:D \luatex_scantextokens:D \luatexscantextokens - \tex_let:D \luatex_suppressifcsnameerror:D \luatexsuppressifcsnameerror - \tex_let:D \luatex_suppresslongerror:D \luatexsuppresslongerror - \tex_let:D \luatex_suppressmathparerror:D \luatexsuppressmathparerror - \tex_let:D \luatex_suppressoutererror:D \luatexsuppressoutererror - \tex_let:D \utex_char:D \luatexUchar - \tex_let:D \xetex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror - \tex_let:D \luatex_bodydir:D \luatexbodydir - \tex_let:D \luatex_boxdir:D \luatexboxdir - \tex_let:D \luatex_leftghost:D \luatexleftghost - \tex_let:D \luatex_localbrokenpenalty:D \luatexlocalbrokenpenalty - \tex_let:D \luatex_localinterlinepenalty:D \luatexlocalinterlinepenalty - \tex_let:D \luatex_localleftbox:D \luatexlocalleftbox - \tex_let:D \luatex_localrightbox:D \luatexlocalrightbox - \tex_let:D \luatex_mathdir:D \luatexmathdir - \tex_let:D \luatex_pagebottomoffset:D \luatexpagebottomoffset - \tex_let:D \luatex_pagedir:D \luatexpagedir - \tex_let:D \pdftex_pageheight:D \luatexpageheight - \tex_let:D \luatex_pagerightoffset:D \luatexpagerightoffset - \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_let:D \luatex_alignmark:D \luatexalignmark + \tex_let:D \luatex_aligntab:D \luatexaligntab + \tex_let:D \luatex_attribute:D \luatexattribute + \tex_let:D \luatex_attributedef:D \luatexattributedef + \tex_let:D \luatex_catcodetable:D \luatexcatcodetable + \tex_let:D \luatex_clearmarks:D \luatexclearmarks + \tex_let:D \luatex_crampeddisplaystyle:D \luatexcrampeddisplaystyle + \tex_let:D \luatex_crampedscriptscriptstyle:D + \luatexcrampedscriptscriptstyle + \tex_let:D \luatex_crampedscriptstyle:D \luatexcrampedscriptstyle + \tex_let:D \luatex_crampedtextstyle:D \luatexcrampedtextstyle + \tex_let:D \luatex_fontid:D \luatexfontid + \tex_let:D \luatex_formatname:D \luatexformatname + \tex_let:D \luatex_gleaders:D \luatexgleaders + \tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable + \tex_let:D \luatex_latelua:D \luatexlatelua + \tex_let:D \luatex_luaescapestring:D \luatexluaescapestring + \tex_let:D \luatex_luafunction:D \luatexluafunction + \tex_let:D \luatex_mathstyle:D \luatexmathstyle + \tex_let:D \luatex_nokerns:D \luatexnokerns + \tex_let:D \luatex_noligs:D \luatexnoligs + \tex_let:D \luatex_outputbox:D \luatexoutputbox + \tex_let:D \luatex_pageleftoffset:D \luatexpageleftoffset + \tex_let:D \luatex_pagetopoffset:D \luatexpagetopoffset + \tex_let:D \luatex_postexhyphenchar:D \luatexpostexhyphenchar + \tex_let:D \luatex_posthyphenchar:D \luatexposthyphenchar + \tex_let:D \luatex_preexhyphenchar:D \luatexpreexhyphenchar + \tex_let:D \luatex_prehyphenchar:D \luatexprehyphenchar + \tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable + \tex_let:D \luatex_scantextokens:D \luatexscantextokens + \tex_let:D \luatex_suppressifcsnameerror:D + \luatexsuppressifcsnameerror + \tex_let:D \luatex_suppresslongerror:D \luatexsuppresslongerror + \tex_let:D \luatex_suppressmathparerror:D + \luatexsuppressmathparerror + \tex_let:D \luatex_suppressoutererror:D \luatexsuppressoutererror + \tex_let:D \utex_char:D \luatexUchar + \tex_let:D \xetex_suppressfontnotfounderror:D + \luatexsuppressfontnotfounderror + \tex_let:D \luatex_bodydir:D \luatexbodydir + \tex_let:D \luatex_boxdir:D \luatexboxdir + \tex_let:D \luatex_leftghost:D \luatexleftghost + \tex_let:D \luatex_localbrokenpenalty:D \luatexlocalbrokenpenalty + \tex_let:D \luatex_localinterlinepenalty:D + \luatexlocalinterlinepenalty + \tex_let:D \luatex_localleftbox:D \luatexlocalleftbox + \tex_let:D \luatex_localrightbox:D \luatexlocalrightbox + \tex_let:D \luatex_mathdir:D \luatexmathdir + \tex_let:D \luatex_pagebottomoffset:D \luatexpagebottomoffset + \tex_let:D \luatex_pagedir:D \luatexpagedir + \tex_let:D \pdftex_pageheight:D \luatexpageheight + \tex_let:D \luatex_pagerightoffset:D \luatexpagerightoffset + \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 \tex_ifnum:D 0 \etex_ifdefined:D \pdftex_pdftexversion:D 1 \tex_fi:D @@ -1427,8 +1488,9 @@ \tex_chardef:D \exp_end: = 0 ~ \tex_let:D \token_to_meaning:N \tex_meaning:D \tex_let:D \cs_meaning:N \tex_meaning:D -\tex_let:D \tl_to_str:n \etex_detokenize:D -\tex_let:D \token_to_str:N \tex_string:D +\tex_let:D \tl_to_str:n \etex_detokenize:D +\tex_let:D \token_to_str:N \tex_string:D +\tex_let:D \__kernel_tl_to_str:w \etex_detokenize:D \tex_let:D \scan_stop: \tex_relax:D \tex_let:D \group_begin: \tex_begingroup:D \tex_let:D \group_end: \tex_endgroup:D @@ -1492,6 +1554,7 @@ \cs_set_nopar:Npx \l__exp_internal_tl {#1} \l__exp_internal_tl } +\cs_set:Npn \use_x:n #1 { \luatex_expanded:D {#1} } \cs_set:Npn \use:n #1 {#1} \cs_set:Npn \use:nn #1#2 {#1#2} \cs_set:Npn \use:nnn #1#2#3 {#1#2#3} @@ -1511,7 +1574,8 @@ \cs_set:Npn \use_none_delimit_by_q_recursion_stop:w #1 \q_recursion_stop { } \cs_set:Npn \use_i_delimit_by_q_nil:nw #1#2 \q_nil {#1} \cs_set:Npn \use_i_delimit_by_q_stop:nw #1#2 \q_stop {#1} -\cs_set:Npn \use_i_delimit_by_q_recursion_stop:nw #1#2 \q_recursion_stop {#1} +\cs_set:Npn \use_i_delimit_by_q_recursion_stop:nw + #1#2 \q_recursion_stop {#1} \cs_set:Npn \use_none:n #1 { } \cs_set:Npn \use_none:nn #1#2 { } \cs_set:Npn \use_none:nnn #1#2#3 { } @@ -1521,17 +1585,17 @@ \cs_set:Npn \use_none:nnnnnnn #1#2#3#4#5#6#7 { } \cs_set:Npn \use_none:nnnnnnnn #1#2#3#4#5#6#7#8 { } \cs_set:Npn \use_none:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { } -\cs_set_protected:Npn \__kernel_debug:TF #1#2 {#2} +\cs_set_protected:Npn \__kernel_if_debug:TF #1#2 {#2} \tex_ifodd:D \l@expl@enable@debug@bool - \cs_set_protected:Npn \__kernel_debug:TF #1#2 {#1} + \cs_set_protected:Npn \__kernel_if_debug:TF #1#2 {#1} \fi: -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_protected:Npn \debug_on:n #1 { \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} } { - \cs_if_exist_use:cF { __debug_##1_on: } + \cs_if_exist_use:cF { __debug_ ##1 _on: } { \__kernel_msg_error:nnn { kernel } { debug } {##1} } } } @@ -1539,7 +1603,7 @@ { \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} } { - \cs_if_exist_use:cF { __debug_##1_off: } + \cs_if_exist_use:cF { __debug_ ##1 _off: } { \__kernel_msg_error:nnn { kernel } { debug } {##1} } } } @@ -1556,7 +1620,7 @@ { \tl_to_str:n { \debug_off:n {#1} } } } } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_nopar:Npn \l__debug_suspended_tl { } \cs_set_protected:Npn \debug_suspend: @@ -1579,7 +1643,7 @@ \cs_set_protected:Npn \debug_suspend: { } \cs_set_protected:Npn \debug_resume: { } } -\__kernel_debug:TF +\__kernel_if_debug:TF { \exp_args:Nc \cs_set_protected:Npn { __debug_check-declarations_on: } { @@ -1636,7 +1700,7 @@ \fi: } { } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_protected:Npn \__debug_chk_var_scope_aux:NN #1#2 { \exp_args:NNf \__debug_chk_var_scope_aux:Nn #1 { \cs_to_str:N #2 } } @@ -1666,7 +1730,7 @@ } } { } -\__kernel_debug:TF +\__kernel_if_debug:TF { \exp_args:Nc \cs_set_protected:Npn { __debug_check-expressions_on: } { @@ -1674,7 +1738,7 @@ { \__debug_suspended:T { ##1 \use_none:nnnnnnn } \exp_after:wN \__debug_chk_expr_aux:nNnN - \exp_after:wN { \tex_the:D ##2 ##1 \tex_relax:D } + \exp_after:wN { \tex_the:D ##2 ##1 \scan_stop: } ##2 } } @@ -1687,7 +1751,7 @@ { \tex_romannumeral:D - 0 \exp_after:wN \use_none:n - \__int_value:w #3 #2 #1 \tex_relax:D + \int_value:w #3 #2 #1 \scan_stop: } { \__kernel_msg_expandable_error:nnnn @@ -1697,7 +1761,7 @@ } } { } -\__kernel_debug:TF +\__kernel_if_debug:TF { \exp_args:Nc \cs_set_protected:Npn { __debug_log-functions_on: } { @@ -1713,7 +1777,7 @@ \fi: } { } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_protected:Npn \__debug_deprecation_on: { \g__debug_deprecation_on_tl } @@ -1730,23 +1794,30 @@ { \cs_set_protected:Npn \__kernel_deprecation_code:nn #1#2 { } } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_protected:Npn \__kernel_patch_deprecation:nnNNpn #1#2#3#4#5# { \if_meaning:w \cs_new_protected:Npn #3 + \exp_after:wN \use_i:nn \else: - \__kernel_msg_error:nnx { kernel } { debug-unpatchable } - { \token_to_str:N #3 ~(for~deprecation) } + \if_meaning:w \cs_new:Npn #3 + \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn + \else: + \__kernel_msg_error:nnx { kernel } { debug-unpatchable } + { \token_to_str:N #3 ~(for~deprecation) } + \exp_after:wN \exp_after:wN \exp_after:wN \use_none:nn + \fi: \fi: - \__debug_deprecation_aux:nnNnn {#1} {#2} #4 {#5} + { \__debug_deprecation_aux:nnNnn {#1} {#2} #4 {#5} } + { \__debug_deprecation_expandable:nnNnn {#1} {#2} #4 {#5} } } \cs_set_protected:Npn \__debug_deprecation_aux:nnNnn #1#2#3#4#5 { \tl_gput_right:Nn \g__debug_deprecation_on_tl { \tex_let:D #3 \scan_stop: - \__deprecation_error:Nnn #3 {#2} {#1} + \__kernel_deprecation_error:Nnn #3 {#2} {#1} } \tl_gput_right:Nn \g__debug_deprecation_off_tl { @@ -1762,9 +1833,23 @@ \exp_not:N #3 } } + \cs_set_protected:Npn \__debug_deprecation_expandable:nnNnn #1#2#3#4#5 + { + \tl_gput_right:Nn \g__debug_deprecation_on_tl + { + \tex_let:D #3 \scan_stop: + \__kernel_deprecation_error:Nnn #3 {#2} {#1} + } + \tl_gput_right:Nn \g__debug_deprecation_off_tl + { + \tex_let:D #3 \scan_stop: + \cs_set:Npn #3 #4 {#5} + } + \cs_new:Npn #3 #4 {#5} + } } { \cs_set_protected:Npn \__kernel_patch_deprecation:nnNNpn #1#2 { } } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_protected:Npn \__kernel_patch:nnNNpn #1#2#3#4#5# { \__debug_patch_aux:nnnn {#1} {#2} { #3 #4 #5 } } @@ -1783,11 +1868,12 @@ { \__kernel_patch_args:nnnNNpn { } { } } \cs_set_protected:Npn \__kernel_patch_conditional_args:nNNpnn { \__kernel_patch_conditional_args:nnnNNpnn { } { } } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_set_protected:Npn \__kernel_patch_args:nnnNNpn #1#2#3#4#5#6# { \__debug_patch_args_aux:nnnNNnn {#1} {#2} {#3} #4 #5 {#6} } - \cs_set_protected:Npn \__kernel_patch_conditional_args:nnnNNpnn #1#2#3#4#5#6# + \cs_set_protected:Npn \__kernel_patch_conditional_args:nnnNNpnn + #1#2#3#4#5#6# { \__debug_patch_args_aux:nnnNNnnn {#1} {#2} {#3} #4 #5 {#6} } \cs_set_protected:Npn \__debug_patch_args_aux:nnnNNnn #1#2#3#4#5#6#7 { @@ -1806,7 +1892,8 @@ } { \cs_set_protected:Npn \__kernel_patch_args:nnnNNpn #1#2#3 { } - \cs_set_protected:Npn \__kernel_patch_conditional_args:nnnNNpnn #1#2#3 { } + \cs_set_protected:Npn \__kernel_patch_conditional_args:nnnNNpnn + #1#2#3 { } } \cs_set:Npn \prg_return_true: { \exp_after:wN \use_i:nn \exp:w } @@ -1822,8 +1909,12 @@ { \__prg_generate_conditional_parm:nnNpnn { new } { _protected } } \cs_set_protected:Npn \__prg_generate_conditional_parm:nnNpnn #1#2#3#4# { - \__cs_split_function:NN #3 \__prg_generate_conditional:nnNnnnnn - {#1} {#2} {#4} + \use:x + { + \__prg_generate_conditional:nnNnnnnn + \cs_split_function:N #3 + } + {#1} {#2} {#4} } \cs_set_protected:Npn \prg_set_conditional:Nnn { \__prg_generate_conditional_count:nnNnn { set } { } } @@ -1835,12 +1926,16 @@ { \__prg_generate_conditional_count:nnNnn { new } { _protected } } \cs_set_protected:Npn \__prg_generate_conditional_count:nnNnn #1#2#3 { - \__cs_split_function:NN #3 \__prg_generate_conditional_count:nnNnnnn - {#1} {#2} + \use:x + { + \__prg_generate_conditional_count:nnNnnnn + \cs_split_function:N #3 + } + {#1} {#2} } \cs_set_protected:Npn \__prg_generate_conditional_count:nnNnnnn #1#2#3#4#5 { - \__cs_parm_from_arg_count:nnF + \__kernel_cs_parm_from_arg_count:nnF { \__prg_generate_conditional:nnNnnnnn {#1} {#2} #3 {#4} {#5} } { \tl_count:n {#2} } { @@ -1926,8 +2021,8 @@ \use:x { \exp_not:N \__prg_set_eq_conditional:nnNnnNNw - \__cs_split_function:NN #2 \prg_do_nothing: - \__cs_split_function:NN #3 \prg_do_nothing: + \cs_split_function:N #2 + \cs_split_function:N #3 \exp_not:N #1 \tl_to_str:n {#4} \exp_not:n { , \q_recursion_tail , \q_recursion_stop } @@ -1990,27 +2085,23 @@ } \cs_set:Npn \__cs_to_str:N #1 { \c_zero } \cs_set:Npn \__cs_to_str:w #1 \__cs_to_str:N - { - \__int_value:w \fi: \exp_after:wN \c_zero } -\cs_set:Npx \__cs_split_function:NN #1 + { - \int_value:w \fi: \exp_after:wN \c_zero } +\cs_set_protected:Npn \__cs_tmp:w #1 { - \exp_not:N \exp_after:wN \exp_not:N \exp_after:wN - \exp_not:N \exp_after:wN \exp_not:N \__cs_split_function_auxi:w - \exp_not:N \cs_to_str:N #1 \exp_not:N \q_mark \c_true_bool - \token_to_str:N : \exp_not:N \q_mark \c_false_bool - \exp_not:N \q_stop - } -\use:x - { - \cs_set:Npn \exp_not:N \__cs_split_function_auxi:w - ##1 \token_to_str:N : ##2 \exp_not:N \q_mark ##3##4 \exp_not:N \q_stop ##5 + \cs_set:Npn \cs_split_function:N ##1 + { + \exp_after:wN \exp_after:wN \exp_after:wN + \__cs_split_function_auxi:w + \cs_to_str:N ##1 \q_mark \c_true_bool + #1 \q_mark \c_false_bool \q_stop + } + \cs_set:Npn \__cs_split_function_auxi:w + ##1 #1 ##2 \q_mark ##3##4 \q_stop + { \__cs_split_function_auxii:w ##1 \q_mark \q_stop {##2} ##3 } + \cs_set:Npn \__cs_split_function_auxii:w ##1 \q_mark ##2 \q_stop + { {##1} } } - { \__cs_split_function_auxii:w #5 #1 \q_mark \q_stop {#2} #3 } -\cs_set:Npn \__cs_split_function_auxii:w #1#2 \q_mark #3 \q_stop - { #1 {#2} } -\cs_set:Npn \__cs_get_function_name:N #1 - { \__cs_split_function:NN #1 \use_i:nnn } -\cs_set:Npn \__cs_get_function_signature:N #1 - { \__cs_split_function:NN #1 \use_ii:nnn } +\exp_after:wN \__cs_tmp:w \token_to_str:N : \prg_set_conditional:Npnn \cs_if_exist:N #1 { p , T , F , TF } { \if_meaning:w #1 \scan_stop: @@ -2085,7 +2176,7 @@ { \cs_if_exist:cTF {#1} { \use:c {#1} } { } } \cs_set_protected:Npn \__kernel_msg_error:nnxx #1#2#3#4 { - \tex_newlinechar:D = `\^^J \tex_relax:D + \tex_newlinechar:D = `\^^J \scan_stop: \tex_errmessage:D { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~! ^^J @@ -2107,8 +2198,11 @@ \cs_set_protected:Npn \iow_term:x { \tex_immediate:D \tex_write:D 16 } \__kernel_patch:nnNNpn { } - { \__kernel_debug_log:x { Defining~\token_to_str:N #1~ \msg_line_context: } } -\cs_set_protected:Npn \__chk_if_free_cs:N #1 + { + \__kernel_debug_log:x + { Defining~\token_to_str:N #1~ \msg_line_context: } + } +\cs_set_protected:Npn \__kernel_chk_if_free_cs:N #1 { \cs_if_free:NF #1 { @@ -2116,13 +2210,13 @@ { \token_to_str:N #1 } { \token_to_meaning:N #1 } } } -\cs_set_protected:Npn \__chk_if_free_cs:c - { \exp_args:Nc \__chk_if_free_cs:N } +\cs_set_protected:Npn \__kernel_chk_if_free_cs:c + { \exp_args:Nc \__kernel_chk_if_free_cs:N } \cs_set:Npn \__cs_tmp:w #1#2 { \cs_set_protected:Npn #1 ##1 { - \__chk_if_free_cs:N ##1 + \__kernel_chk_if_free_cs:N ##1 #2 ##1 } } @@ -2170,7 +2264,7 @@ \cs_new_protected:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN } \cs_new_protected:Npn \cs_new_eq:NN #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \tex_global:D \cs_set_eq:NN #1 } \cs_new_protected:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN } @@ -2187,12 +2281,12 @@ \fi: { \cs_gset_eq:cN {#1} \tex_undefined:D } } -\cs_set_protected:Npn \__cs_parm_from_arg_count:nnF #1#2 +\cs_set_protected:Npn \__kernel_cs_parm_from_arg_count:nnF #1#2 { \exp_args:Nx \__cs_parm_from_arg_count_test:nnF { \exp_after:wN \exp_not:n - \if_case:w \__int_eval:n {#2} + \if_case:w \int_eval:n {#2} { } \or: { ##1 } \or: { ##1##2 } @@ -2218,7 +2312,9 @@ { #2 {#1} } } \cs_new:Npn \__cs_count_signature:N #1 - { \int_eval:n { \__cs_split_function:NN #1 \__cs_count_signature:nnN } } + { \exp_args:Nf \__cs_count_signature:n { \cs_split_function:N #1 } } +\cs_new:Npn \__cs_count_signature:n #1 + { \int_eval:n { \__cs_count_signature:nnN #1 } } \cs_new:Npn \__cs_count_signature:nnN #1#2#3 { \if_meaning:w \c_true_bool #3 @@ -2231,7 +2327,7 @@ { \exp_args:Nc \__cs_count_signature:N } \cs_new_protected:Npn \cs_generate_from_arg_count:NNnn #1#2#3#4 { - \__cs_parm_from_arg_count:nnF { \use:nnn #2 #1 } {#3} + \__kernel_cs_parm_from_arg_count:nnF { \use:nnn #2 #1 } {#3} { \__kernel_msg_error:nnxx { kernel } { bad-number-of-arguments } { \token_to_str:N #1 } { \int_eval:n {#3} } @@ -2253,8 +2349,12 @@ } \cs_new_protected:Npn \__cs_generate_from_signature:NNn #1#2 { - \__cs_split_function:NN #2 \__cs_generate_from_signature:nnNNNn - #1 #2 + \use:x + { + \__cs_generate_from_signature:nnNNNn + \cs_split_function:N #2 + } + #1 #2 } \cs_new_protected:Npn \__cs_generate_from_signature:nnNNNn #1#2#3#4#5#6 { @@ -2352,7 +2452,7 @@ \cs_new:Npn \cs_if_eq:ccTF { \exp_args:Ncc \cs_if_eq:NNTF } \cs_new:Npn \cs_if_eq:ccT { \exp_args:Ncc \cs_if_eq:NNT } \cs_new:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF } -\cs_new_protected:Npn \__kernel_check_defined:NT #1#2 +\cs_new_protected:Npn \__kernel_chk_defined:NT #1#2 { \cs_if_exist:NTF #1 {#2} @@ -2371,7 +2471,7 @@ { \exp_args:Nc \__kernel_register_log:N } \cs_new_protected:Npn \__kernel_register_show_aux:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { \exp_args:No \__kernel_register_show_aux:nNN { \tex_the:D #2 } #2 #1 @@ -2393,19 +2493,19 @@ \group_end: #1 { \token_to_str:N #2 = \cs_meaning:N #2 } } -\cs_new_nopar:Npn \prg_do_nothing: { } -\cs_new_eq:NN \__prg_break_point:Nn \use_ii:nn -\cs_new:Npn \__prg_map_break:Nn #1#2#3 \__prg_break_point:Nn #4#5 +\cs_new:Npn \prg_do_nothing: { } +\cs_new_eq:NN \prg_break_point:Nn \use_ii:nn +\cs_new:Npn \prg_map_break:Nn #1#2#3 \prg_break_point:Nn #4#5 { #5 \if_meaning:w #1 #4 \exp_after:wN \use_iii:nnn \fi: - \__prg_map_break:Nn #1 {#2} + \prg_map_break:Nn #1 {#2} } -\cs_new_eq:NN \__prg_break_point: \prg_do_nothing: -\cs_new:Npn \__prg_break: #1 \__prg_break_point: { } -\cs_new:Npn \__prg_break:n #1#2 \__prg_break_point: {#1} +\cs_new_eq:NN \prg_break_point: \prg_do_nothing: +\cs_new:Npn \prg_break: #1 \prg_break_point: { } +\cs_new:Npn \prg_break:n #1#2 \prg_break_point: {#1} %% File: l3expan.dtx Copyright (C) 1990-2018 The LaTeX3 project \cs_new:Npn \__exp_arg_next:nnn #1#2#3 { #2 \::: { #3 {#1} } } \cs_new:Npn \__exp_arg_next:Nnn #1#2#3 { #2 \::: { #3 #1 } } @@ -2426,8 +2526,9 @@ \use:nn { \cs_new_eq:NN \exp_stop_f: } { ~ } \cs_new_protected:Npn \::x #1 \::: #2#3 { - \cs_set_nopar:Npx \l__exp_internal_tl { {#3} } - \exp_after:wN \__exp_arg_next:nnn \l__exp_internal_tl {#1} {#2} + \cs_set_nopar:Npx \l__exp_internal_tl + { \exp_not:n { #1 \::: } { \exp_not:n {#2} {#3} } } + \l__exp_internal_tl } \cs_new:Npn \::V #1 \::: #2#3 { @@ -2674,36 +2775,44 @@ { \exp_after:wN \__exp_last_two_unbraced:noN \exp_after:wN {#3} {#2} #1 } \cs_new:Npn \__exp_last_two_unbraced:noN #1#2#3 { \exp_after:wN #3 #2 #1 } +\cs_new_eq:NN \__kernel_exp_not:w \etex_unexpanded:D \cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: } -\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} } +\cs_new:Npn \exp_not:o #1 { \__kernel_exp_not:w \exp_after:wN {#1} } \cs_new:Npn \exp_not:f #1 { \etex_unexpanded:D \exp_after:wN { \exp:w \exp_end_continue_f:w #1 } } \cs_new:Npn \exp_not:V #1 { - \etex_unexpanded:D \exp_after:wN + \__kernel_exp_not:w \exp_after:wN { \exp:w \__exp_eval_register:N #1 } } \cs_new:Npn \exp_not:v #1 { - \etex_unexpanded:D \exp_after:wN + \__kernel_exp_not:w \exp_after:wN { \exp:w \__exp_eval_register:c {#1} } } \group_begin: \tex_catcode:D `\^^@ = 13 \cs_new_protected:Npn \exp_end_continue_f:w { `^^@ } - \cs_new:Npn ^^@ - { \__kernel_msg_expandable_error:nn { kernel } { bad-exp-end-f } } + \if_cs_exist:N ^^@ + \else: + \cs_new:Npn ^^@ + { \__kernel_msg_expandable_error:nn { kernel } { bad-exp-end-f } } + \fi: \cs_new:Npn \exp_end_continue_f:nw #1 { `^^@ #1 } \group_end: \__kernel_patch:nnNNpn { \__kernel_chk_cs_exist:N #1 } { } \cs_new_protected:Npn \cs_generate_variant:Nn #1#2 { \__cs_generate_variant:N #1 - \exp_after:wN \__cs_split_function:NN - \exp_after:wN #1 - \exp_after:wN \__cs_generate_variant:nnNN - \exp_after:wN #1 - \tl_to_str:n {#2} , \scan_stop: , \q_recursion_stop + \use:x + { + \__cs_generate_variant:nnNN + \cs_split_function:N #1 + \exp_not:N #1 + \tl_to_str:n {#2} , + \exp_not:N \scan_stop: , + \exp_not:N \q_recursion_stop + } } \cs_new_protected:Npn \cs_generate_variant:cn { \exp_args:Nc \cs_generate_variant:Nn } @@ -2840,7 +2949,8 @@ #5 } } -\cs_new:Npn \__cs_generate_variant_loop_special:NNwNNnn #1#2#3 \q_stop #4#5#6#7 +\cs_new:Npn \__cs_generate_variant_loop_special:NNwNNnn + #1#2#3 \q_stop #4#5#6#7 { #3 \q_stop #4 #5 {#6} {#7} \exp_not:n @@ -2903,12 +3013,9 @@ { : \exp_not:N \use_i:nn } } } -\use:x - { - \cs_new_protected:Npn \exp_not:N \__cs_generate_internal_variant:wwnNwnn - ##1 \token_to_str:N x ##2 \exp_not:N \q_mark - ##3 ##4 ##5 \exp_not:N \q_stop ##6 ##7 - } +\exp_last_unbraced:NNNNo + \cs_new_protected:Npn \__cs_generate_internal_variant:wwnNwnn #1 + { \token_to_str:N x } #2 \q_mark #3#4#5 \q_stop #6#7 { #3 \cs_if_free:cT {#6} { #4 {#6} {#7} } @@ -2919,7 +3026,13 @@ \__cs_generate_internal_variant_loop:n } \cs_new_protected:Npn \prg_generate_conditional_variant:Nnn #1 - { \__cs_split_function:NN #1 \__cs_generate_variant:nnNnn } + { + \use:x + { + \__cs_generate_variant:nnNnn + \cs_split_function:N #1 + } + } \cs_new_protected:Npn \__cs_generate_variant:nnNnn #1#2#3#4#5 { \if_meaning:w \c_false_bool #3 @@ -2958,23 +3071,48 @@ { \cs_generate_variant:cn { #1 : #2 F } } \cs_new_protected:Npn \__cs_generate_variant_TF_form:nnn #1#2 { \cs_generate_variant:cn { #1 : #2 TF } } +\cs_new_protected:Npn \exp_args_generate:n #1 + { + \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} } + { + \str_map_inline:nn {##1} + { + \str_if_in:nnF { NnpcofVvx } {####1} + { + \__kernel_msg_error:nnnn { kernel } { invalid-exp-args } + {####1} {##1} + \str_map_break:n { \use_none:nnnn } + } + } + \exp_args:Nc \__cs_args_generate:Nn { exp_args:N ##1 } {##1} + } + } +\cs_new_protected:Npn \__cs_args_generate:Nn #1#2 + { + \cs_if_exist:NF #1 + { + \str_if_in:nnTF {#2} { x } { \cs_new_protected:Npx } { \cs_new:Npx } + #1 { \tl_map_function:nN { #2 : } \__cs_args_generate:n } + } + } +\cs_new:Npn \__cs_args_generate:n #1 { \exp_not:c { :: #1 } } %% File: l3tl.dtx Copyright (C) 1990-2018 The LaTeX3 Project \cs_new_protected:Npn \tl_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \tl_new:N { c } \__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN c #1 } { } \cs_new_protected:Npn \tl_const:Nn #1#2 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } } \__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN c #1 } { } \cs_new_protected:Npn \tl_const:Nx #1#2 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs_gset_nopar:Npx #1 {#2} } \cs_generate_variant:Nn \tl_const:Nn { c } @@ -2991,23 +3129,25 @@ { \tl_if_exist:NTF #1 { \tl_gclear:N #1 } { \tl_new:N #1 } } \cs_generate_variant:Nn \tl_clear_new:N { c } \cs_generate_variant:Nn \tl_gclear_new:N { c } -\tex_ifodd:D \l@expl@enable@debug@bool - \cs_new_protected:Npn \tl_set_eq:NN #1#2 - { - \__kernel_chk_var_local:N #1 - \__kernel_chk_var_exist:N #2 - \cs_set_eq:NN #1 #2 - } - \cs_new_protected:Npn \tl_gset_eq:NN #1#2 - { - \__kernel_chk_var_global:N #1 - \__kernel_chk_var_exist:N #2 - \cs_gset_eq:NN #1 #2 - } -\else: - \cs_new_eq:NN \tl_set_eq:NN \cs_set_eq:NN - \cs_new_eq:NN \tl_gset_eq:NN \cs_gset_eq:NN -\fi: +\__kernel_if_debug:TF + { + \cs_new_protected:Npn \tl_set_eq:NN #1#2 + { + \__kernel_chk_var_local:N #1 + \__kernel_chk_var_exist:N #2 + \cs_set_eq:NN #1 #2 + } + \cs_new_protected:Npn \tl_gset_eq:NN #1#2 + { + \__kernel_chk_var_global:N #1 + \__kernel_chk_var_exist:N #2 + \cs_gset_eq:NN #1 #2 + } + } + { + \cs_new_eq:NN \tl_set_eq:NN \cs_set_eq:NN + \cs_new_eq:NN \tl_gset_eq:NN \cs_gset_eq:NN + } \cs_generate_variant:Nn \tl_set_eq:NN { cN, Nc, cc } \cs_generate_variant:Nn \tl_gset_eq:NN { cN, Nc, cc } \__kernel_patch:nnNNpn @@ -3147,7 +3287,8 @@ } { \group_begin: - \exp_args:No \etex_everyeof:D { \c__tl_rescan_marker_tl \exp_not:N } + \exp_args:No \etex_everyeof:D + { \c__tl_rescan_marker_tl \exp_not:N } \int_compare:nNnT \tex_endlinechar:D = { 32 } { \int_set:Nn \tex_endlinechar:D { -1 } } \tex_newlinechar:D \tex_endlinechar:D @@ -3224,7 +3365,7 @@ \int_compare:nNnT { \char_value_catcode:n - { \exp_last_unbraced:Nf ` \str_head:n {#2} ~ } + { \exp_last_unbraced:Nf ` { \str_head:n {#2} } ~ } } = { 10 } { ~ } \exp_after:wN \__tl_rescan:w @@ -3342,7 +3483,7 @@ \cs_new:Npn \__tl_if_empty_return:o #1 { \exp_after:wN \if_meaning:w \exp_after:wN \q_nil - \etex_detokenize:D \exp_after:wN {#1} \q_nil + \__kernel_tl_to_str:w \exp_after:wN {#1} \q_nil \prg_return_true: \else: \prg_return_false: @@ -3390,23 +3531,20 @@ } \prg_generate_conditional_variant:Nnn \tl_if_in:nn { V , o , no } { T , F , TF } -\use:x +\cs_set_protected:Npn \__tl_tmp:w #1 { - \prg_new_conditional:Npnn \exp_not:N \tl_if_novalue:n ##1 + \prg_new_conditional:Npnn \tl_if_novalue:n ##1 { p , T , F , TF } { - \exp_not:N \str_if_eq:onTF - { - \exp_not:N \__tl_if_novalue:w ? ##1 { } - \c_novalue_tl - } - { ? { } \c_novalue_tl } - { \exp_not:N \prg_return_true: } - { \exp_not:N \prg_return_false: } + \str_if_eq:onTF + { \__tl_if_novalue:w ? ##1 { } #1 } + { ? { } #1 } + { \prg_return_true: } + { \prg_return_false: } } - \cs_new:Npn \exp_not:N \__tl_if_novalue:w ##1 \c_novalue_tl - {##1} + \cs_new:Npn \__tl_if_novalue:w ##1 #1 {##1} } +\exp_args:No \__tl_tmp:w { \c_novalue_tl } \cs_new:Npn \tl_if_single_p:N { \exp_args:No \tl_if_single_p:n } \cs_new:Npn \tl_if_single:NT { \exp_args:No \tl_if_single:nT } \cs_new:Npn \tl_if_single:NF { \exp_args:No \tl_if_single:nF } @@ -3414,7 +3552,8 @@ \prg_new_conditional:Npnn \tl_if_single:n #1 { p , T , F , TF } { \if_catcode:w ^ \exp_after:wN \__tl_if_single:nnw - \tl_to_str:n \exp_after:wN { \use_none:nn #1 ?? } ^ ? \q_stop + \__kernel_tl_to_str:w + \exp_after:wN { \use_none:nn #1 ?? } ^ ? \q_stop \prg_return_true: \else: \prg_return_false: @@ -3452,32 +3591,32 @@ \cs_generate_variant:Nn \tl_case:Nn { c } \prg_generate_conditional_variant:Nnn \tl_case:Nn { c } { T , F , TF } -\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop +\cs_new:Npn \__tl_case_end:nw #1#2#3 \q_mark #4#5 \q_stop { \exp_end: #1 #4 } -\cs_new_eq:NN \__tl_case_end:nw \__prg_case_end:nw \cs_new:Npn \tl_map_function:nN #1#2 { \__tl_map_function:Nn #2 #1 \q_recursion_tail - \__prg_break_point:Nn \tl_map_break: { } + \prg_break_point:Nn \tl_map_break: { } } \cs_new:Npn \tl_map_function:NN { \exp_args:No \tl_map_function:nN } \cs_new:Npn \__tl_map_function:Nn #1#2 { - \__quark_if_recursion_tail_break:nN {#2} \tl_map_break: + \quark_if_recursion_tail_break:nN {#2} \tl_map_break: #1 {#2} \__tl_map_function:Nn #1 } \cs_generate_variant:Nn \tl_map_function:NN { c } \cs_new_protected:Npn \tl_map_inline:nn #1#2 { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \cs_gset_protected:cpn - { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2} + { __tl_map_ \int_use:N \g__kernel_prg_map_int :w } ##1 {#2} \exp_args:Nc \__tl_map_function:Nn - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __tl_map_ \int_use:N \g__kernel_prg_map_int :w } #1 \q_recursion_tail - \__prg_break_point:Nn \tl_map_break: { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \tl_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } } \cs_new_protected:Npn \tl_map_inline:Nn { \exp_args:No \tl_map_inline:nn } @@ -3486,24 +3625,24 @@ { \__tl_map_variable:Nnn #2 {#3} #1 \q_recursion_tail - \__prg_break_point:Nn \tl_map_break: { } + \prg_break_point:Nn \tl_map_break: { } } \cs_new_protected:Npn \tl_map_variable:NNn { \exp_args:No \tl_map_variable:nNn } \cs_new_protected:Npn \__tl_map_variable:Nnn #1#2#3 { \tl_set:Nn #1 {#3} - \__quark_if_recursion_tail_break:NN #1 \tl_map_break: + \quark_if_recursion_tail_break:NN #1 \tl_map_break: \use:n {#2} \__tl_map_variable:Nnn #1 {#2} } \cs_generate_variant:Nn \tl_map_variable:NNn { c } \cs_new:Npn \tl_map_break: - { \__prg_map_break:Nn \tl_map_break: { } } + { \prg_map_break:Nn \tl_map_break: { } } \cs_new:Npn \tl_map_break:n - { \__prg_map_break:Nn \tl_map_break: } + { \prg_map_break:Nn \tl_map_break: } \cs_generate_variant:Nn \tl_to_str:n { V } -\cs_new:Npn \tl_to_str:N #1 { \etex_detokenize:D \exp_after:wN {#1} } +\cs_new:Npn \tl_to_str:N #1 { \__kernel_tl_to_str:w \exp_after:wN {#1} } \cs_generate_variant:Nn \tl_to_str:N { c } \cs_new:Npn \tl_use:N #1 { @@ -3546,6 +3685,9 @@ \cs_new:Npn \tl_trim_spaces:n #1 { \__tl_trim_spaces:nn { \q_mark #1 } \exp_not:o } \cs_generate_variant:Nn \tl_trim_spaces:n { o } +\cs_new:Npn \tl_trim_spaces_apply:nN #1#2 + { \__tl_trim_spaces:nn { \q_mark #1 } { \exp_args:No #2 } } +\cs_generate_variant:Nn \tl_trim_spaces_apply:nN { o } \cs_new_protected:Npn \tl_trim_spaces:N #1 { \tl_set:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } } \cs_new_protected:Npn \tl_gtrim_spaces:N #1 @@ -3590,6 +3732,8 @@ { ##3 { \use_none:n ##1 } } } \__tl_tmp:w { ~ } +\cs_new_nopar:Npn \q__tl_act_mark { \q__tl_act_mark } +\cs_new_nopar:Npn \q__tl_act_stop { \q__tl_act_stop } \cs_new:Npn \__tl_act:NNNnn #1#2#3#4#5 { \group_align_safe_begin: @@ -3638,7 +3782,7 @@ { #2 \__tl_act_result:n { #1 #3 } } \cs_new:Npn \tl_reverse:n #1 { - \etex_unexpanded:D \exp_after:wN + \__kernel_exp_not:w \exp_after:wN { \exp:w \__tl_act:NNNnn @@ -3664,7 +3808,7 @@ \cs_generate_variant:Nn \tl_greverse:N { c } \cs_new:Npn \tl_head:n #1 { - \etex_unexpanded:D + \__kernel_exp_not:w \if_false: { \fi: \__tl_head_auxi:nw #1 { } \q_stop } } \cs_new:Npn \__tl_head_auxi:nw #1#2 \q_stop @@ -3675,7 +3819,7 @@ \cs_new:Npn \__tl_head_auxii:n #1 { \exp_after:wN \if_meaning:w \exp_after:wN \q_nil - \tl_to_str:n \exp_after:wN { \use_none:n #1 } \q_nil + \__kernel_tl_to_str:w \exp_after:wN { \use_none:n #1 } \q_nil \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn @@ -3688,7 +3832,7 @@ \cs_new:Npn \tl_head:N { \exp_args:No \tl_head:n } \cs_new:Npn \tl_tail:n #1 { - \etex_unexpanded:D + \__kernel_exp_not:w \tl_if_blank:nTF {#1} { { } } { \exp_after:wN { \use_none:n #1 } } @@ -3812,7 +3956,7 @@ { \exp_args:Nf \__tl_item_aux:nn { \int_eval:n {#2} } {#1} } #1 \q_recursion_tail - \__prg_break_point: + \prg_break_point: } \cs_new:Npn \__tl_item_aux:nn #1#2 { @@ -3822,9 +3966,9 @@ } \cs_new:Npn \__tl_item:nn #1#2 { - \__quark_if_recursion_tail_break:nN {#2} \__prg_break: + \quark_if_recursion_tail_break:nN {#2} \prg_break: \int_compare:nNnTF {#1} = 1 - { \__prg_break:n { \exp_not:n {#2} } } + { \prg_break:n { \exp_not:n {#2} } } { \exp_args:Nf \__tl_item:nn { \int_eval:n { #1 - 1 } } } } \cs_new:Npn \tl_item:Nn { \exp_args:No \tl_item:nn } @@ -3835,7 +3979,7 @@ \cs_generate_variant:Nn \tl_log:N { c } \cs_new_protected:Npn \__tl_show:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { \exp_args:Nx #1 { \token_to_str:N #2 = \exp_not:o {#2} } } } \cs_new_protected:Npn \tl_show:n #1 @@ -3843,9 +3987,9 @@ \cs_new_protected:Npn \__tl_show:n #1 { \tl_set:Nf \l__tl_internal_a_tl { \__tl_show:w #1 \q_stop } - \__iow_with:Nnn \tex_newlinechar:D { 10 } + \__kernel_iow_with:Nnn \tex_newlinechar:D { 10 } { - \__iow_with:Nnn \tex_errorcontextlines:D { -1 } + \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 } { \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN { \exp_after:wN \l__tl_internal_a_tl } @@ -3893,8 +4037,11 @@ \tl_if_blank:nF {#1} { \cs_new_protected:cpx { str_ #1 :Nn } ##1##2 - { \exp_not:c { tl_ #1 :Nx } ##1 { \exp_not:N \tl_to_str:n {##2} } } - \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :Nn } { Nx , cn , cx } + { + \exp_not:c { tl_ #1 :Nx } ##1 + { \exp_not:N \tl_to_str:n {##2} } + } + \cs_generate_variant:cn { str_ #1 :Nn } { Nx , cn , cx } \__str_tmp:n } } @@ -3960,16 +4107,22 @@ { \str_greplace_all:Nnn #1 {#2} { } } \cs_generate_variant:Nn \str_remove_all:Nn { c } \cs_generate_variant:Nn \str_gremove_all:Nn { c } -\prg_new_eq_conditional:NNn \str_if_exist:N \tl_if_exist:N { p , T , F , TF } -\prg_new_eq_conditional:NNn \str_if_exist:c \tl_if_exist:c { p , T , F , TF } -\prg_new_eq_conditional:NNn \str_if_empty:N \tl_if_empty:N { p , T , F , TF } -\prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c { p , T , F , TF } +\prg_new_eq_conditional:NNn \str_if_exist:N \tl_if_exist:N + { p , T , F , TF } +\prg_new_eq_conditional:NNn \str_if_exist:c \tl_if_exist:c + { p , T , F , TF } +\prg_new_eq_conditional:NNn \str_if_empty:N \tl_if_empty:N + { p , T , F , TF } +\prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c + { p , T , F , TF } \cs_new:Npn \__str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} } \cs_if_exist:NT \luatex_luatexversion:D { + \cs_set_eq:NN \lua_escape_x:n \luatex_luaescapestring:D + \cs_set_eq:NN \lua_now_x:n \luatex_directlua:D \cs_set:Npn \__str_if_eq_x:nn #1#2 { - \luatex_directlua:D + \lua_now_x:n { l3kernel.strcmp ( @@ -3980,20 +4133,10 @@ } \cs_new:Npn \__str_escape_x:n #1 { - \luatex_luaescapestring:D - { - \etex_detokenize:D \exp_after:wN { \luatex_expanded:D {#1} } - } + \lua_escape_x:n + { \__kernel_tl_to_str:w \use_x:n { {#1} } } } } -\cs_new:Npn \__str_if_eq_x_return:nn #1 #2 - { - \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = 0 \exp_stop_f: - \prg_return_true: - \else: - \prg_return_false: - \fi: - } \prg_new_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF } { \if_int_compare:w @@ -4010,7 +4153,8 @@ } \prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F } { - \if_int_compare:w \__str_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 } + \if_int_compare:w + \__str_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 } = 0 \exp_stop_f: \prg_return_true: \else: \prg_return_false: \fi: } \prg_generate_conditional_variant:Nnn \str_if_eq:NN @@ -4088,14 +4232,15 @@ { \__str_case_end:nw {#3} } { \__str_case_x:nw {#1} } } -\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw +\cs_new:Npn \__str_case_end:nw #1#2#3 \q_mark #4#5 \q_stop + { \exp_end: #1 #4 } \cs_new:Npn \str_map_function:nN #1#2 { \exp_after:wN \__str_map_function:w \exp_after:wN \__str_map_function:Nn \exp_after:wN #2 - \etex_detokenize:D {#1} + \__kernel_tl_to_str:w {#1} \q_recursion_tail ? ~ - \__prg_break_point:Nn \str_map_break: { } + \prg_break_point:Nn \str_map_break: { } } \cs_new:Npn \str_map_function:NN { \exp_args:No \str_map_function:nN } @@ -4111,24 +4256,25 @@ \cs_generate_variant:Nn \str_map_function:NN { c } \cs_new_protected:Npn \str_map_inline:nn #1#2 { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \cs_gset_protected:cpn - { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2} + { __str_map_ \int_use:N \g__kernel_prg_map_int :w } ##1 {#2} \use:x { \exp_not:N \__str_map_inline:NN - \exp_not:c { __prg_map_ \int_use:N \g__prg_map_int :w } - \__str_to_other_fast:n {#1} + \exp_not:c { __str_map_ \int_use:N \g__kernel_prg_map_int :w } + \__kernel_str_to_other_fast:n {#1} } \q_recursion_tail - \__prg_break_point:Nn \str_map_break: { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \str_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } } \cs_new_protected:Npn \str_map_inline:Nn { \exp_args:No \str_map_inline:nn } \cs_generate_variant:Nn \str_map_inline:Nn { c } \cs_new:Npn \__str_map_inline:NN #1#2 { - \__quark_if_recursion_tail_break:NN #2 \str_map_break: + \quark_if_recursion_tail_break:NN #2 \str_map_break: \exp_args:No #1 { \token_to_str:N #2 } \__str_map_inline:NN #1 } @@ -4137,26 +4283,26 @@ \use:x { \exp_not:n { \__str_map_variable:NnN #2 {#3} } - \__str_to_other_fast:n {#1} + \__kernel_str_to_other_fast:n {#1} } \q_recursion_tail - \__prg_break_point:Nn \str_map_break: { } + \prg_break_point:Nn \str_map_break: { } } \cs_new_protected:Npn \str_map_variable:NNn { \exp_args:No \str_map_variable:nNn } \cs_new_protected:Npn \__str_map_variable:NnN #1#2#3 { - \__quark_if_recursion_tail_break:NN #3 \str_map_break: + \quark_if_recursion_tail_break:NN #3 \str_map_break: \str_set:Nn #1 {#3} \use:n {#2} \__str_map_variable:NnN #1 {#2} } \cs_generate_variant:Nn \str_map_variable:NNn { c } \cs_new:Npn \str_map_break: - { \__prg_map_break:Nn \str_map_break: { } } + { \prg_map_break:Nn \str_map_break: { } } \cs_new:Npn \str_map_break:n - { \__prg_map_break:Nn \str_map_break: } -\cs_new:Npn \__str_to_other:n #1 + { \prg_map_break:Nn \str_map_break: } +\cs_new:Npn \__kernel_str_to_other:n #1 { \exp_after:wN \__str_to_other_loop:w \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop @@ -4179,7 +4325,7 @@ \cs_new:Npn \__str_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop { \fi: #2 } } -\cs_new:Npn \__str_to_other_fast:n #1 +\cs_new:Npn \__kernel_str_to_other_fast:n #1 { \exp_after:wN \__str_to_other_fast_loop:w \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_stop @@ -4208,17 +4354,16 @@ \exp_args:Nf \tl_to_str:n { \exp_args:Nf \__str_item:nn - { \__str_to_other:n {#1} } {#2} + { \__kernel_str_to_other:n {#1} } {#2} } } \cs_new:Npn \str_item_ignore_spaces:nn #1 { \exp_args:No \__str_item:nn { \tl_to_str:n {#1} } } -\__kernel_patch_args:nNNpn { {#1} { \__int_eval:n {#2} } } \cs_new:Npn \__str_item:nn #1#2 { \exp_after:wN \__str_item:w - \__int_value:w \__int_eval:w #2 \exp_after:wN ; - \__int_value:w \__str_count:n {#1} ; + \int_value:w \int_eval:n {#2} \exp_after:wN ; + \int_value:w \__str_count:n {#1} ; #1 \q_stop } \cs_new:Npn \__str_item:w #1; #2; @@ -4230,7 +4375,7 @@ { \exp_after:wN \use_i_delimit_by_q_stop:nw \exp:w \exp_after:wN \__str_skip_exp_end:w - \__int_value:w \__int_eval:w #1 + #2 ; + \int_value:w \int_eval:n { #1 + #2 } ; } } { @@ -4248,12 +4393,15 @@ \exp_after:wN \__str_skip_loop:wNNNNNNNN \else: \exp_after:wN \__str_skip_end:w - \__int_value:w \__int_eval:w + \int_value:w \int_eval:w \fi: #1 ; } \cs_new:Npn \__str_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9 - { \exp_after:wN \__str_skip_exp_end:w \__int_value:w \__int_eval:w #1 - 8 ; } + { + \exp_after:wN \__str_skip_exp_end:w + \int_value:w \int_eval:n { #1 - 8 } ; + } \cs_new:Npn \__str_skip_end:w #1 ; { \exp_after:wN \__str_skip_end:NNNNNNNN @@ -4267,19 +4415,17 @@ \exp_args:Nf \tl_to_str:n { \exp_args:Nf \__str_range:nnn - { \__str_to_other:n {#1} } {#2} {#3} + { \__kernel_str_to_other:n {#1} } {#2} {#3} } } \cs_new:Npn \str_range_ignore_spaces:nnn #1 { \exp_args:No \__str_range:nnn { \tl_to_str:n {#1} } } -\__kernel_patch_args:nNNpn - { {#1} { \__int_eval:n {#2} } { \__int_eval:n {#3} } } \cs_new:Npn \__str_range:nnn #1#2#3 { \exp_after:wN \__str_range:w - \__int_value:w \__str_count:n {#1} \exp_after:wN ; - \__int_value:w \__int_eval:w #2 - 1 \exp_after:wN ; - \__int_value:w \__int_eval:w #3 ; + \int_value:w \__str_count:n {#1} \exp_after:wN ; + \int_value:w \int_eval:n { (#2) - 1 } \exp_after:wN ; + \int_value:w \int_eval:n {#3} ; #1 \q_stop } \cs_new:Npn \__str_range:w #1; #2; #3; @@ -4291,7 +4437,7 @@ \cs_new:Npn \__str_range:nnw #1#2 { \exp_after:wN \__str_collect_delimit_by_q_stop:w - \__int_value:w \__int_eval:w #2 - #1 \exp_after:wN ; + \int_value:w \int_eval:n { #2 - #1 } \exp_after:wN ; \exp:w \__str_skip_exp_end:w #1 ; } \cs_new:Npn \__str_range_normalize:nn #1#2 @@ -4327,14 +4473,15 @@ \cs_new:Npn \__str_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9 { \exp_after:wN \__str_collect_loop:wn - \__int_value:w \__int_eval:w #1 - 7 ; + \int_value:w \int_eval:n { #1 - 7 } ; { #2 #3#4#5#6#7#8#9 } } \cs_new:Npn \__str_collect_end:wn #1 ; { \exp_after:wN \__str_collect_end:nnnnnnnnw - \if_case:w \if_int_compare:w #1 > 0 \exp_stop_f: #1 \else: 0 \fi: \exp_stop_f: - \or: \or: \or: \or: \or: \or: \fi: + \if_case:w \if_int_compare:w #1 > 0 \exp_stop_f: + #1 \else: 0 \fi: \exp_stop_f: + \or: \or: \or: \or: \or: \or: \fi: } \cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop { #1#2#3#4#5#6#7#8 } @@ -4445,7 +4592,8 @@ \cs_new:Npn \__str_change_case_output:nw #1#2 \__str_change_case_result:n #3 { #2 \__str_change_case_result:n { #3 #1 } } \cs_generate_variant:Nn \__str_change_case_output:nw { f } -\cs_new:Npn \__str_change_case_end:wn #1 \__str_change_case_result:n #2 { #2 } +\cs_new:Npn \__str_change_case_end:wn #1 \__str_change_case_result:n #2 + { \tl_to_str:n {#2} } \cs_new:Npn \__str_change_case_loop:nw #1#2 \q_recursion_stop { \tl_if_head_is_space:nTF {#2} @@ -4453,8 +4601,8 @@ { \__str_change_case_char:nN } {#1} #2 \q_recursion_stop } -\use:x - { \cs_new:Npn \exp_not:N \__str_change_case_space:n ##1 \c_space_tl } +\exp_last_unbraced:NNNNo + \cs_new:Npn \__str_change_case_space:n #1 \c_space_tl { \__str_change_case_output:nw { ~ } \__str_change_case_loop:nw {#1} @@ -4463,33 +4611,10 @@ { \quark_if_recursion_tail_stop_do:Nn #2 { \__str_change_case_end:wn } - \cs_if_exist:cTF { c__unicode_ #1 _ #2 _tl } - { - \__str_change_case_output:fw - { \tl_to_str:c { c__unicode_ #1 _ #2 _tl } } - } - { \__str_change_case_char_aux:nN {#1} #2 } + \__str_change_case_output:fw + { \use:c { char_ #1 _case:N } #2 } \__str_change_case_loop:nw {#1} } -\cs_if_exist:NTF \utex_char:D - { - \cs_new:Npn \__str_change_case_char_aux:nN #1#2 - { - \int_compare:nNnTF { \use:c { __str_lookup_ #1 :N } #2 } = { 0 } - { \__str_change_case_output:nw {#2} } - { - \__str_change_case_output:fw - { \utex_char:D \use:c { __str_lookup_ #1 :N } #2 ~ } - } - } - \cs_new_protected:Npn \__str_lookup_lower:N #1 { \tex_lccode:D `#1 } - \cs_new_protected:Npn \__str_lookup_upper:N #1 { \tex_uccode:D `#1 } - \cs_new_eq:NN \__str_lookup_fold:N \__str_lookup_lower:N - } - { - \cs_new:Npn \__str_change_case_char_aux:nN #1#2 - { \__str_change_case_output:nw {#2} } - } \str_const:Nx \c_ampersand_str { \cs_to_str:N \& } \str_const:Nx \c_atsign_str { \cs_to_str:N \@ } \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } @@ -4509,134 +4634,122 @@ \cs_new_eq:NN \str_show:n \tl_show:n \cs_new_eq:NN \str_show:N \tl_show:N \cs_generate_variant:Nn \str_show:N { c } -\group_begin: - \tex_chardef:D \g__unicode_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: - \cs_set_protected:Npn \__unicode_map_inline:n #1 - { - \group_begin: - \tex_catcode:D `\# = 12 \scan_stop: - \tex_catcode:D `\ = 10 \scan_stop: - \tex_openin:D \g__unicode_data_ior = #1 \scan_stop: - \cs_if_exist:NT \utex_char:D - { \__unicode_map_loop: } - \tex_closein:D \g__unicode_data_ior - \group_end: - } - \cs_set_protected:Npn \__unicode_map_loop: - { - \tex_ifeof:D \g__unicode_data_ior - \exp_after:wN \use_none:n - \else: - \exp_after:wN \use:n - \fi: - { - \tex_read:D \g__unicode_data_ior to \l__unicode_tmp_tl - \if_meaning:w \c_empty_tl \l__unicode_tmp_tl - \else: - \exp_after:wN \__unicode_parse:w \l__unicode_tmp_tl \q_stop - \fi: - \__unicode_map_loop: - } - } - \cs_set_protected:Npn \__unicode_parse:w #1#2 \q_stop - { - \reverse_if:N \if:w \c_hash_str #1 - \__unicode_parse_auxi:w #1#2 \q_stop - \else: - \if_int_compare:w \__str_if_eq_x:nn - { \exp_not:n {#2} } { ~Conditional~Mappings~ } = 0 \exp_stop_f: - \cs_set_protected:Npn \__unicode_parse:w ##1 \q_stop { } - \fi: - \fi: - } - \cs_set_protected:Npn \__unicode_store:nnnnn #1#2#3#4#5 - { - \tl_const:cx { c__unicode_ #2 _ \utex_char:D "#1 _tl } - { - \utex_char:D "#3 ~ - \utex_char:D "#4 ~ - \tl_if_blank:nF {#5} - { \utex_char:D "#5 } - } - } - \cs_set_protected:Npn \__unicode_parse_auxi:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; - { \__unicode_parse_auxii:w #1 ; } - \cs_set_protected:Npn \__unicode_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} = 0 \exp_stop_f: - \else: - \tl_const:cx - { c__unicode_mixed_ \utex_char:D "#1 _tl } - { \utex_char:D "#7 } - \fi: - } - } - \__unicode_map_inline:n { UnicodeData.txt } - \cs_set_protected:Npn \__unicode_parse_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop - { - \if_int_compare:w \__str_if_eq_x:nn {#2} { C } = 0 \exp_stop_f: - \if_int_compare:w \tex_lccode:D "#1 = "#3 \scan_stop: - \else: - \tl_const:cx - { c__unicode_fold_ \utex_char:D "#1 _tl } - { \utex_char:D "#3 ~ } - \fi: - \else: - \if_int_compare:w \__str_if_eq_x:nn {#2} { F } = 0 \exp_stop_f: - \__unicode_parse_auxii:w #1 ~ #3 ~ \q_stop - \fi: - \fi: - } - \cs_set_protected:Npn \__unicode_parse_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop - { \__unicode_store:nnnnn {#1} { fold } {#2} {#3} {#4} } - \__unicode_map_inline:n { CaseFolding.txt } - \cs_set_protected:Npn \__unicode_parse_auxi:w #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop - { - \use:n { \__unicode_parse_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop - \use:n { \__unicode_parse_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop - \if_int_compare:w \__str_if_eq_x:nn {#3} {#4} = 0 \exp_stop_f: - \else: - \use:n { \__unicode_parse_auxii:w #1 ~ mixed ~ #3 ~ } ~ \q_stop - \fi: - } - \cs_set_protected:Npn \__unicode_parse_auxii:w #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop - { - \tl_if_empty:nF {#4} - { \__unicode_store:nnnnn {#1} {#2} {#3} {#4} {#5} } - } - \__unicode_map_inline:n { SpecialCasing.txt } - \cs_if_exist:NF \utex_char:D - { - \cs_set_protected:Npn \__unicode_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__unicode_fold_ #1 _tl } {#2} - \tl_const:cn { c__unicode_lower_ #1 _tl } {#2} - \tl_const:cn { c__unicode_upper_ #2 _tl } {#1} - \__unicode_tmp:NN - } - \__unicode_tmp:NN - AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz - ? \q_recursion_tail \q_recursion_stop - } -\group_end: -%% File: l3seq.dtx Copyright (C) 1990-2017 The LaTeX3 Project +%% File: l3quark.dtx Copyright (C) 1990-2018 The LaTeX3 Project +\__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN q #1 } { } +\cs_new_protected:Npn \quark_new:N #1 + { + \__kernel_chk_if_free_cs:N #1 + \cs_gset_nopar:Npn #1 {#1} + } +\quark_new:N \q_nil +\quark_new:N \q_mark +\quark_new:N \q_no_value +\quark_new:N \q_stop +\quark_new:N \q_recursion_tail +\quark_new:N \q_recursion_stop +\cs_new:Npn \quark_if_recursion_tail_stop:N #1 + { + \if_meaning:w \q_recursion_tail #1 + \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \fi: + } +\cs_new:Npn \quark_if_recursion_tail_stop_do:Nn #1 + { + \if_meaning:w \q_recursion_tail #1 + \exp_after:wN \use_i_delimit_by_q_recursion_stop:nw + \else: + \exp_after:wN \use_none:n + \fi: + } +\cs_new:Npn \quark_if_recursion_tail_stop:n #1 + { + \tl_if_empty:oTF + { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } + { \use_none_delimit_by_q_recursion_stop:w } + { } + } +\cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1 + { + \tl_if_empty:oTF + { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } + { \use_i_delimit_by_q_recursion_stop:nw } + { \use_none:n } + } +\cs_new:Npn \__quark_if_recursion_tail:w + #1 \q_recursion_tail #2 ? #3 ?! { #1 #2 } +\cs_generate_variant:Nn \quark_if_recursion_tail_stop:n { o } +\cs_generate_variant:Nn \quark_if_recursion_tail_stop_do:nn { o } +\cs_new:Npn \quark_if_recursion_tail_break:NN #1#2 + { + \if_meaning:w \q_recursion_tail #1 + \exp_after:wN #2 + \fi: + } +\cs_new:Npn \quark_if_recursion_tail_break:nN #1#2 + { + \tl_if_empty:oT + { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } + {#2} + } +\prg_new_conditional:Npnn \quark_if_nil:N #1 { p, T , F , TF } + { + \if_meaning:w \q_nil #1 + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\prg_new_conditional:Npnn \quark_if_no_value:N #1 { p, T , F , TF } + { + \if_meaning:w \q_no_value #1 + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\prg_generate_conditional_variant:Nnn \quark_if_no_value:N + { c } { p , T , F , TF } +\prg_new_conditional:Npnn \quark_if_nil:n #1 { p, T , F , TF } + { + \__quark_if_empty_return:o + { \__quark_if_nil:w {} #1 {} ? ! \q_nil ? ? ! } + } +\cs_new:Npn \__quark_if_nil:w #1 \q_nil #2 ? #3 ? ! { #1 #2 } +\prg_new_conditional:Npnn \quark_if_no_value:n #1 { p, T , F , TF } + { + \__quark_if_empty_return:o + { \__quark_if_no_value:w {} #1 {} ? ! \q_no_value ? ? ! } + } +\cs_new:Npn \__quark_if_no_value:w #1 \q_no_value #2 ? #3 ? ! { #1 #2 } +\prg_generate_conditional_variant:Nnn \quark_if_nil:n + { V , o } { p , TF , T , F } +\cs_new:Npn \__quark_if_empty_return:o #1 + { + \exp_after:wN \if_meaning:w \exp_after:wN \q_nil + \__kernel_tl_to_str:w \exp_after:wN {#1} \q_nil + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\tl_new:N \g__scan_marks_tl +\__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN s #1 } { } +\cs_new_protected:Npn \scan_new:N #1 + { + \tl_if_in:NnTF \g__scan_marks_tl { #1 } + { + \__kernel_msg_error:nnx { kernel } { scanmark-already-defined } + { \token_to_str:N #1 } + } + { + \tl_gput_right:Nn \g__scan_marks_tl {#1} + \cs_new_eq:NN #1 \scan_stop: + } + } +\scan_new:N \s_stop +\cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { } +%% File: l3seq.dtx Copyright (C) 1990-2018 The LaTeX3 Project +\scan_new:N \s__seq \cs_new:Npn \__seq_item:n { \__kernel_msg_expandable_error:nn { kernel } { misused-sequence } @@ -4648,7 +4761,7 @@ \tl_const:Nn \c_empty_seq { \s__seq } \cs_new_protected:Npn \seq_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_seq } \cs_generate_variant:Nn \seq_new:N { c } @@ -4861,10 +4974,10 @@ #1 \group_end: \prg_return_false: - \__prg_break_point: + \prg_break_point: } \cs_new:Npn \__seq_if_in: - { \__prg_break:n { \group_end: \prg_return_true: } } + { \prg_break:n { \group_end: \prg_return_true: } } \prg_generate_conditional_variant:Nnn \seq_if_in:Nn { NV , Nv , No , Nx , c , cV , cv , co , cx } { T , F , TF } \cs_new_protected:Npn \__seq_pop:NNNN #1#2#3#4 @@ -4912,18 +5025,21 @@ \cs_generate_variant:Nn \seq_gpop_left:NN { c } \cs_new_protected:Npn \seq_get_right:NN #1#2 { - \exp_after:wN \use_i_ii:nnn - \exp_after:wN \__seq_get_right_loop:nn - \exp_after:wN \q_no_value - #1 - { ?? \tl_set:Nn #2 } - { } { } + \tl_set:Nx #2 + { + \exp_after:wN \use_i_ii:nnn + \exp_after:wN \__seq_get_right_loop:nw + \exp_after:wN \q_no_value + #1 + \__seq_get_right_end:NnN \__seq_item:n + } } -\cs_new_protected:Npn \__seq_get_right_loop:nn #1#2 +\cs_new:Npn \__seq_get_right_loop:nw #1#2 \__seq_item:n { - \use_none:nn #2 {#1} - \__seq_get_right_loop:nn + #2 \use_none:n {#1} + \__seq_get_right_loop:nw } +\cs_new:Npn \__seq_get_right_end:NnN #1#2#3 { \exp_not:n {#2} } \cs_generate_variant:Nn \seq_get_right:NN { c } \cs_new_protected:Npn \seq_pop_right:NN { \__seq_pop:NNNN \__seq_pop_right:NNN \tl_set:Nx } @@ -4960,27 +5076,35 @@ { c } { T , F , TF } \prg_generate_conditional_variant:Nnn \seq_get_right:NN { c } { T , F , TF } -\prg_new_protected_conditional:Npnn \seq_pop_left:NN #1#2 { T , F , TF } +\prg_new_protected_conditional:Npnn \seq_pop_left:NN #1#2 + { T , F , TF } { \__seq_pop_TF:NNNN \__seq_pop_left:NNN \tl_set:Nn #1 #2 } -\prg_new_protected_conditional:Npnn \seq_gpop_left:NN #1#2 { T , F , TF } +\prg_new_protected_conditional:Npnn \seq_gpop_left:NN #1#2 + { T , F , TF } { \__seq_pop_TF:NNNN \__seq_pop_left:NNN \tl_gset:Nn #1 #2 } -\prg_new_protected_conditional:Npnn \seq_pop_right:NN #1#2 { T , F , TF } +\prg_new_protected_conditional:Npnn \seq_pop_right:NN #1#2 + { T , F , TF } { \__seq_pop_TF:NNNN \__seq_pop_right:NNN \tl_set:Nx #1 #2 } -\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2 { T , F , TF } +\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2 + { T , F , TF } { \__seq_pop_TF:NNNN \__seq_pop_right:NNN \tl_gset:Nx #1 #2 } -\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c } { T , F , TF } -\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c } { T , F , TF } -\prg_generate_conditional_variant:Nnn \seq_pop_right:NN { c } { T , F , TF } -\prg_generate_conditional_variant:Nnn \seq_gpop_right:NN { c } { T , F , TF } +\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c } + { T , F , TF } +\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c } + { T , F , TF } +\prg_generate_conditional_variant:Nnn \seq_pop_right:NN { c } + { T , F , TF } +\prg_generate_conditional_variant:Nnn \seq_gpop_right:NN { c } + { T , F , TF } \cs_new:Npn \seq_item:Nn #1 { \exp_after:wN \__seq_item:wNn #1 \q_stop #1 } \cs_new:Npn \__seq_item:wNn \s__seq #1 \q_stop #2#3 { - \exp_args:Nf \__seq_item:nnn + \exp_args:Nf \__seq_item:nwn { \exp_args:Nf \__seq_item:nN { \int_eval:n {#3} } #2 } #1 - { ? \__prg_break: } { } - \__prg_break_point: + \prg_break: \__seq_item:n { } + \prg_break_point: } \cs_new:Npn \__seq_item:nN #1#2 { @@ -4988,32 +5112,32 @@ { \int_eval:n { \seq_count:N #2 + 1 + #1 } } {#1} } -\cs_new:Npn \__seq_item:nnn #1#2#3 +\cs_new:Npn \__seq_item:nwn #1#2 \__seq_item:n #3 { - \use_none:n #2 + #2 \int_compare:nNnTF {#1} = 1 - { \__prg_break:n { \exp_not:n {#3} } } - { \exp_args:Nf \__seq_item:nnn { \int_eval:n { #1 - 1 } } } + { \prg_break:n { \exp_not:n {#3} } } + { \exp_args:Nf \__seq_item:nwn { \int_eval:n { #1 - 1 } } } } \cs_generate_variant:Nn \seq_item:Nn { c } \cs_new:Npn \seq_map_break: - { \__prg_map_break:Nn \seq_map_break: { } } + { \prg_map_break:Nn \seq_map_break: { } } \cs_new:Npn \seq_map_break:n - { \__prg_map_break:Nn \seq_map_break: } + { \prg_map_break:Nn \seq_map_break: } \cs_new:Npn \seq_map_function:NN #1#2 { \exp_after:wN \use_i_ii:nnn - \exp_after:wN \__seq_map_function:NNn + \exp_after:wN \__seq_map_function:Nw \exp_after:wN #2 #1 - { ? \seq_map_break: } { } - \__prg_break_point:Nn \seq_map_break: { } + \prg_break: \__seq_item:n { } \prg_break_point: + \prg_break_point:Nn \seq_map_break: { } } -\cs_new:Npn \__seq_map_function:NNn #1#2#3 +\cs_new:Npn \__seq_map_function:Nw #1#2 \__seq_item:n #3 { - \use_none:n #2 + #2 #1 {#3} - \__seq_map_function:NNn #1 + \__seq_map_function:Nw #1 } \cs_generate_variant:Nn \seq_map_function:NN { c } \cs_new_protected:Npn \__seq_push_item_def:n @@ -5028,21 +5152,21 @@ } \cs_new_protected:Npn \__seq_push_item_def: { - \int_gincr:N \g__prg_map_int - \cs_gset_eq:cN { __prg_map_ \int_use:N \g__prg_map_int :w } + \int_gincr:N \g__kernel_prg_map_int + \cs_gset_eq:cN { __seq_map_ \int_use:N \g__kernel_prg_map_int :w } \__seq_item:n } \cs_new_protected:Npn \__seq_pop_item_def: { \cs_gset_eq:Nc \__seq_item:n - { __prg_map_ \int_use:N \g__prg_map_int :w } - \int_gdecr:N \g__prg_map_int + { __seq_map_ \int_use:N \g__kernel_prg_map_int :w } + \int_gdecr:N \g__kernel_prg_map_int } \cs_new_protected:Npn \seq_map_inline:Nn #1#2 { \__seq_push_item_def:n {#2} #1 - \__prg_break_point:Nn \seq_map_break: { \__seq_pop_item_def: } + \prg_break_point:Nn \seq_map_break: { \__seq_pop_item_def: } } \cs_generate_variant:Nn \seq_map_inline:Nn { c } \cs_new_protected:Npn \seq_map_variable:NNn #1#2#3 @@ -5053,7 +5177,7 @@ \exp_not:n {#3} } #1 - \__prg_break_point:Nn \seq_map_break: { \__seq_pop_item_def: } + \prg_break_point:Nn \seq_map_break: { \__seq_pop_item_def: } } \cs_generate_variant:Nn \seq_map_variable:NNn { Nc } \cs_generate_variant:Nn \seq_map_variable:NNn { c , cc } @@ -5061,11 +5185,25 @@ { \int_eval:n { - 0 - \seq_map_function:NN #1 \__seq_count:n - } - } -\cs_new:Npn \__seq_count:n #1 { + 1 } + \exp_after:wN \use_i:nn + \exp_after:wN \__seq_count:w + #1 + \__seq_count_end:w \__seq_item:n 7 + \__seq_count_end:w \__seq_item:n 6 + \__seq_count_end:w \__seq_item:n 5 + \__seq_count_end:w \__seq_item:n 4 + \__seq_count_end:w \__seq_item:n 3 + \__seq_count_end:w \__seq_item:n 2 + \__seq_count_end:w \__seq_item:n 1 + \__seq_count_end:w \__seq_item:n 0 + \prg_break_point: + } + } +\cs_new:Npn \__seq_count:w + #1 \__seq_item:n #2 \__seq_item:n #3 \__seq_item:n #4 \__seq_item:n + #5 \__seq_item:n #6 \__seq_item:n #7 \__seq_item:n #8 #9 \__seq_item:n + { #9 8 + \__seq_count:w } +\cs_new:Npn \__seq_count_end:w 8 + \__seq_count:w #1#2 \prg_break_point: {#1} \cs_generate_variant:Nn \seq_count:N { c } \cs_new:Npn \seq_use:Nnnn #1#2#3#4 { @@ -5142,7 +5280,7 @@ \cs_generate_variant:Nn \seq_log:N { c } \cs_new_protected:Npn \__seq_show:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { #1 { LaTeX/kernel } { show-seq } { \token_to_str:N #2 } @@ -5155,7 +5293,7 @@ \seq_new:N \g_tmpa_seq \seq_new:N \g_tmpb_seq %% File: l3int.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\cs_new_eq:NN \__int_value:w \tex_number:D +\cs_new_eq:NN \int_value:w \tex_number:D \cs_new_eq:NN \__int_eval:w \etex_numexpr:D \cs_new_eq:NN \__int_eval_end: \tex_relax:D \cs_new_eq:NN \if_int_odd:w \tex_ifodd:D @@ -5163,16 +5301,14 @@ \__kernel_patch_args:nNNpn { { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \int_eval:n } } \cs_new:Npn \int_eval:n #1 - { \__int_value:w \__int_eval:w #1 \__int_eval_end: } -\__kernel_patch_args:nNNpn - { { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \__int_eval:n } } -\cs_new:Npn \__int_eval:n #1 { \__int_eval:w #1 \__int_eval_end: } + { \int_value:w \__int_eval:w #1 \__int_eval_end: } +\cs_new:Npn \int_eval:w { \int_value:w \__int_eval:w } \__kernel_patch_args:nNNpn { { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \int_abs:n } } \cs_new:Npn \int_abs:n #1 { - \__int_value:w \exp_after:wN \__int_abs:N - \__int_value:w \__int_eval:w #1 \__int_eval_end: + \int_value:w \exp_after:wN \__int_abs:N + \int_value:w \__int_eval:w #1 \__int_eval_end: \exp_stop_f: } \cs_new:Npn \__int_abs:N #1 @@ -5184,9 +5320,9 @@ } \cs_set:Npn \int_max:nn #1#2 { - \__int_value:w \exp_after:wN \__int_maxmin:wwN - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; + \int_value:w \exp_after:wN \__int_maxmin:wwN + \int_value:w \__int_eval:w #1 \exp_after:wN ; + \int_value:w \__int_eval:w #2 ; > \exp_stop_f: } @@ -5197,9 +5333,9 @@ } \cs_set:Npn \int_min:nn #1#2 { - \__int_value:w \exp_after:wN \__int_maxmin:wwN - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; + \int_value:w \exp_after:wN \__int_maxmin:wwN + \int_value:w \__int_eval:w #1 \exp_after:wN ; + \int_value:w \__int_eval:w #2 ; < \exp_stop_f: } @@ -5218,10 +5354,10 @@ } \cs_new:Npn \int_div_truncate:nn #1#2 { - \__int_value:w \__int_eval:w + \int_value:w \__int_eval:w \exp_after:wN \__int_div_truncate:NwNw - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; + \int_value:w \__int_eval:w #1 \exp_after:wN ; + \int_value:w \__int_eval:w #2 ; \__int_eval_end: } \cs_new:Npn \__int_div_truncate:NwNw #1#2; #3#4; @@ -5238,7 +5374,7 @@ / #3#4 } \cs_new:Npn \int_div_round:nn #1#2 - { \__int_value:w \__int_eval:w ( #1 ) / ( #2 ) \__int_eval_end: } + { \int_value:w \__int_eval:w ( #1 ) / ( #2 ) \__int_eval_end: } \__kernel_patch_args:nNNpn { { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \int_mod:nn } @@ -5246,16 +5382,16 @@ } \cs_new:Npn \int_mod:nn #1#2 { - \__int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; + \int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww + \int_value:w \__int_eval:w #1 \exp_after:wN ; + \int_value:w \__int_eval:w #2 ; \__int_eval_end: } \cs_new:Npn \__int_mod:ww #1; #2; { #1 - ( \__int_div_truncate:NwNw #1 ; #2 ; ) * #2 } \cs_new_protected:Npn \int_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs:w newcount \cs_end: #1 } \cs_generate_variant:Nn \int_new:N { c } @@ -5271,13 +5407,13 @@ \tex_global:D } { - \int_compare:nNnTF {#2} > \c__max_constdef_int + \int_compare:nNnTF {#2} > \c__int_max_constdef_int { \int_new:N #1 \tex_global:D } { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \tex_global:D \__int_constdef:Nw } } @@ -5292,10 +5428,10 @@ \cs_if_exist:NTF \uptex_disablecjktoken:D { \cs_new_eq:NN \__int_constdef:Nw \uptex_kchardef:D } { \cs_new_eq:NN \__int_constdef:Nw \tex_chardef:D } - \__int_constdef:Nw \c__max_constdef_int 1114111 ~ + \__int_constdef:Nw \c__int_max_constdef_int 1114111 ~ \else: \cs_new_eq:NN \__int_constdef:Nw \tex_mathchardef:D - \tex_mathchardef:D \c__max_constdef_int 32767 ~ + \tex_mathchardef:D \c__int_max_constdef_int 32767 ~ \fi: \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \int_zero:N #1 { #1 = \c_zero } @@ -5369,13 +5505,13 @@ \cs_generate_variant:Nn \int_gset:Nn { c } \cs_new_eq:NN \int_use:N \tex_the:D \cs_new:Npn \int_use:c #1 { \tex_the:D \cs:w #1 \cs_end: } -\cs_new_protected:Npn \__prg_compare_error: +\cs_new_protected:Npn \__int_compare_error: { \if_int_compare:w \c_zero \c_zero \fi: = - \__prg_compare_error: + \__int_compare_error: } -\cs_new:Npn \__prg_compare_error:Nw +\cs_new:Npn \__int_compare_error:Nw #1#2 \q_stop { { } @@ -5387,11 +5523,11 @@ \prg_new_conditional:Npnn \int_compare:n #1 { p , T , F , TF } { \exp_after:wN \__int_compare:w - \__int_value:w \__int_eval:w #1 \__prg_compare_error: + \int_value:w \__int_eval:w #1 \__int_compare_error: } -\cs_new:Npn \__int_compare:w #1 \__prg_compare_error: +\cs_new:Npn \__int_compare:w #1 \__int_compare_error: { - \exp_after:wN \if_false: \__int_value:w + \exp_after:wN \if_false: \int_value:w \__int_compare:Nw #1 e { = nd_ } \q_stop } \cs_new:Npn \__int_compare:Nw #1#2 \q_stop @@ -5402,14 +5538,14 @@ } \cs_new:Npn \__int_compare:NNw #1#2#3 \q_mark { - \etex_unexpanded:D + \__kernel_exp_not:w \use:c { __int_compare_ \token_to_str:N #1 \if_meaning:w = #2 = \fi: :NNw } - \__prg_compare_error:Nw #1 + \__int_compare_error:Nw #1 } \cs_new:cpn { __int_compare_end_=:NNw } #1#2#3 e #4 \q_stop { @@ -5421,7 +5557,7 @@ {#2} \exp_stop_f: \prg_return_false: \exp_after:wN \use_none_delimit_by_q_stop:w \fi: - #1 #2 #3 \exp_after:wN \__int_compare:Nw \__int_value:w \__int_eval:w + #1 #2 #3 \exp_after:wN \__int_compare:Nw \int_value:w \__int_eval:w } \cs_new:cpn { __int_compare_=:NNw } #1#2#3 = { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} = } @@ -5479,7 +5615,8 @@ { \__int_case_end:nw {#3} } { \__int_case:nw {#1} } } -\cs_new_eq:NN \__int_case_end:nw \__prg_case_end:nw +\cs_new:Npn \__int_case_end:nw #1#2#3 \q_mark #4#5 \q_stop + { \exp_end: #1 #4 } \__kernel_patch_conditional_args:nNNpnn { { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \int_if_odd:n } } \prg_new_conditional:Npnn \int_if_odd:n #1 { p , T , F , TF} @@ -5558,53 +5695,77 @@ } \__kernel_patch_args:nNNpn { - { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \int_step_function:nnnN } - { \__kernel_chk_expr:nNnN {#2} \__int_eval:w { } \int_step_function:nnnN } - { \__kernel_chk_expr:nNnN {#3} \__int_eval:w { } \int_step_function:nnnN } + { + \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } + \int_step_function:nnnN + } + { + \__kernel_chk_expr:nNnN {#2} \__int_eval:w { } + \int_step_function:nnnN + } + { + \__kernel_chk_expr:nNnN {#3} \__int_eval:w { } + \int_step_function:nnnN + } } \cs_new:Npn \int_step_function:nnnN #1#2#3 { \exp_after:wN \__int_step:wwwN - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 \exp_after:wN ; - \__int_value:w \__int_eval:w #3 ; + \int_value:w \__int_eval:w #1 \exp_after:wN ; + \int_value:w \__int_eval:w #2 \exp_after:wN ; + \int_value:w \__int_eval:w #3 ; } \cs_new:Npn \__int_step:wwwN #1; #2; #3; #4 { \int_compare:nNnTF {#2} > \c_zero - { \__int_step:NnnnN > } + { \__int_step:NwnnN > } { \int_compare:nNnTF {#2} = \c_zero { - \__kernel_msg_expandable_error:nnn { kernel } { zero-step } {#4} - \use_none:nnnn + \__kernel_msg_expandable_error:nnn + { kernel } { zero-step } {#4} + \prg_break: } - { \__int_step:NnnnN < } + { \__int_step:NwnnN < } } - {#1} {#2} {#3} #4 + #1 ; {#2} {#3} #4 + \prg_break_point: } -\cs_new:Npn \__int_step:NnnnN #1#2#3#4#5 +\cs_new:Npn \__int_step:NwnnN #1#2 ; #3#4#5 { - \int_compare:nNnF {#2} #1 {#4} - { - #5 {#2} - \exp_args:NNf \__int_step:NnnnN - #1 { \int_eval:n { #2 + #3 } } {#3} {#4} #5 - } - } + \if_int_compare:w #2 #1 #4 \exp_stop_f: + \prg_break:n + \fi: + #5 {#2} + \exp_after:wN \__int_step:NwnnN + \exp_after:wN #1 + \int_value:w \__int_eval:w #2 + #3 ; {#3} {#4} #5 + } +\cs_new:Npn \int_step_function:nN + { \int_step_function:nnnN { 1 } { 1 } } +\cs_new:Npn \int_step_function:nnN #1 + { \int_step_function:nnnN {#1} { 1 } } +\cs_new_protected:Npn \int_step_inline:nn + { \int_step_inline:nnnn { 1 } { 1 } } +\cs_new_protected:Npn \int_step_inline:nnn #1 + { \int_step_inline:nnnn {#1} { 1 } } \cs_new_protected:Npn \int_step_inline:nnnn { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:NNc \__int_step:NNnnnn \cs_gset_protected:Npn - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __int_map_ \int_use:N \g__kernel_prg_map_int :w } } +\cs_new_protected:Npn \int_step_variable:nNn + { \int_step_variable:nnnNn { 1 } { 1 } } +\cs_new_protected:Npn \int_step_variable:nnNn #1 + { \int_step_variable:nnnNn {#1} { 1 } } \cs_new_protected:Npn \int_step_variable:nnnNn #1#2#3#4#5 { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:NNc \__int_step:NNnnnn \cs_gset_protected:Npx - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __int_map_ \int_use:N \g__kernel_prg_map_int :w } {#1}{#2}{#3} { \tl_set:Nn \exp_not:N #4 {##1} @@ -5615,7 +5776,7 @@ { #1 #2 ##1 {#6} \int_step_function:nnnN {#3} {#4} {#5} #2 - \__prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__kernel_prg_map_int } } \cs_new_eq:NN \int_to_arabic:n \int_eval:n \cs_new:Npn \int_to_symbols:nnn #1#2#3 @@ -5788,7 +5949,7 @@ \or: x \or: y \or: z - \else: \__int_value:w \__int_eval:w #1 \exp_after:wN \__int_eval_end: + \else: \int_value:w \__int_eval:w #1 \exp_after:wN \__int_eval_end: \fi: } \cs_new:Npn \__int_to_Letter:n #1 @@ -5821,7 +5982,7 @@ \or: X \or: Y \or: Z - \else: \__int_value:w \__int_eval:w #1 \exp_after:wN \__int_eval_end: + \else: \int_value:w \__int_eval:w #1 \exp_after:wN \__int_eval_end: \fi: } \cs_new:Npn \int_to_bin:n #1 @@ -6018,65 +6179,12 @@ \int_new:N \l_tmpb_int \int_new:N \g_tmpa_int \int_new:N \g_tmpb_int -\cs_gset_eq:NN \c__deprecation_minus_one \m@ne -\cs_new_eq:NN \c_minus_one \c__deprecation_minus_one +\cs_gset_eq:NN \c__int_minus_one \m@ne +\cs_new_eq:NN \c_minus_one \c__int_minus_one \__kernel_deprecation_code:nn - { \__deprecation_error:Nnn \c_minus_one { -1 } { 2018-12-31 } } - { \tex_let:D \c_minus_one \c__deprecation_minus_one } -%% File: l3intarray.dtx Copyright (C) 2017 The LaTeX3 Project -\int_new:N \g__intarray_font_int -\cs_new_protected:Npn \__intarray_new:Nn #1#2 - { - \__chk_if_free_cs:N #1 - \int_gincr:N \g__intarray_font_int - \tex_global:D \tex_font:D #1 = cmr10~at~ \g__intarray_font_int sp \scan_stop: - \tex_hyphenchar:D #1 = \int_eval:n {#2} \scan_stop: - \int_compare:nNnT { \tex_hyphenchar:D #1 } > 0 - { \tex_fontdimen:D \tex_hyphenchar:D #1 #1 = 0 sp \scan_stop: } - \int_step_inline:nnnn { 1 } { 1 } { 8 } - { \tex_fontdimen:D ##1 #1 = 0 sp \scan_stop: } - } -\cs_new:Npn \__intarray_count:N #1 { \tex_the:D \tex_hyphenchar:D #1 } -\cs_new_protected:Npn \__intarray_gset_fast:Nnn #1#2#3 - { \tex_fontdimen:D \int_eval:n {#2} #1 = \int_eval:n {#3} sp \scan_stop: } -\cs_new_protected:Npn \__intarray_gset:Nnn #1#2#3 - { - \exp_args:Nff \__intarray_gset_aux:Nnn #1 - { \int_eval:n {#2} } { \int_eval:n {#3} } - } -\cs_new_protected:Npn \__intarray_gset_aux:Nnn #1#2#3 - { - \int_compare:nTF { 1 <= #2 <= \__intarray_count:N #1 } - { - \int_compare:nTF { - \c_max_dim <= \int_abs:n {#3} <= \c_max_dim } - { \__intarray_gset_fast:Nnn #1 {#2} {#3} } - { - \__kernel_msg_error:nnxxxx { kernel } { overflow } - { \token_to_str:N #1 } {#2} {#3} - { \int_compare:nNnT {#3} < 0 { - } \__int_value:w \c_max_dim } - \__intarray_gset_fast:Nnn #1 {#2} - { \int_compare:nNnT {#3} < 0 { - } \c_max_dim } - } - } - { - \__kernel_msg_error:nnxxx { kernel } { out-of-bounds } - { \token_to_str:N #1 } {#2} { \__intarray_count:N #1 } - } - } -\cs_new:Npn \__intarray_item_fast:Nn #1#2 - { \__int_value:w \tex_fontdimen:D \int_eval:n {#2} #1 } -\cs_new:Npn \__intarray_item:Nn #1#2 - { \exp_args:Nf \__intarray_item_aux:Nn #1 { \int_eval:n {#2} } } -\cs_new:Npn \__intarray_item_aux:Nn #1#2 - { - \int_compare:nTF { 1 <= #2 <= \__intarray_count:N #1 } - { \__intarray_item_fast:Nn #1 {#2} } - { - \__kernel_msg_expandable_error:nnnnn { kernel } { out-of-bounds } - { \token_to_str:N #1 } {#2} { \__intarray_count:N #1 } - 0 - } - } + { \__kernel_deprecation_error:Nnn \c_minus_one { -1 } { 2018-12-31 } } + { \tex_let:D \c_minus_one \c__int_minus_one } +\cs_new_eq:NN \__int_value:w \int_value:w %% File: l3flag.dtx Copyright (C) 2011-2018 The LaTeX3 Project \cs_new_protected:Npn \flag_new:n #1 { @@ -6091,7 +6199,7 @@ \if_cs_exist:w flag~#2~#1 \cs_end: \cs_set_eq:cN { flag~#2~#1 } \tex_undefined:D \exp_after:wN \__flag_clear:wn - \__int_value:w \__int_eval:w 1 + #1 + \int_value:w \int_eval:w 1 + #1 \else: \use_i:nnn \fi: @@ -6103,22 +6211,24 @@ \cs_new_protected:Npn \flag_log:n { \__flag_show:Nn \tl_log:n } \cs_new_protected:Npn \__flag_show:Nn #1#2 { - \exp_args:Nc \__kernel_check_defined:NT { flag~#2 } + \exp_args:Nc \__kernel_chk_defined:NT { flag~#2 } { \exp_args:Nx #1 { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} } } } -\tex_ifodd:D \l@expl@enable@debug@bool - \cs_new:Npn \__flag_chk_exist:n #1 - { - \flag_if_exist:nF {#1} - { - \__kernel_msg_expandable_error:nnn - { kernel } { bad-variable } { flag~#1~ } - } - } -\fi: +\__kernel_if_debug:TF + { + \cs_new:Npn \__flag_chk_exist:n #1 + { + \flag_if_exist:nF {#1} + { + \__kernel_msg_expandable_error:nnn + { kernel } { bad-variable } { flag~#1~ } + } + } + } + { } \prg_new_conditional:Npnn \flag_if_exist:n #1 { p , T , F , TF } { \cs_if_exist:cTF { flag~#1 } @@ -6138,7 +6248,7 @@ \cs_new:Npn \__flag_height_loop:wn #1 ; #2 { \if_cs_exist:w flag~#2~#1 \cs_end: - \exp_after:wN \__flag_height_loop:wn \__int_value:w \__int_eval:w 1 + + \exp_after:wN \__flag_height_loop:wn \int_value:w \int_eval:w 1 + \else: \exp_after:wN \__flag_height_end:wn \fi: @@ -6148,116 +6258,8 @@ \cs_new:Npn \flag_raise:n #1 { \cs:w flag~#1 \exp_after:wN \cs_end: - \__int_value:w \flag_height:n {#1} ; - } -%% File: l3quark.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN q #1 } { } -\cs_new_protected:Npn \quark_new:N #1 - { - \__chk_if_free_cs:N #1 - \cs_gset_nopar:Npn #1 {#1} - } -\quark_new:N \q_nil -\quark_new:N \q_mark -\quark_new:N \q_no_value -\quark_new:N \q_stop -\quark_new:N \q_recursion_tail -\quark_new:N \q_recursion_stop -\cs_new:Npn \quark_if_recursion_tail_stop:N #1 - { - \if_meaning:w \q_recursion_tail #1 - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w - \fi: - } -\cs_new:Npn \quark_if_recursion_tail_stop_do:Nn #1 - { - \if_meaning:w \q_recursion_tail #1 - \exp_after:wN \use_i_delimit_by_q_recursion_stop:nw - \else: - \exp_after:wN \use_none:n - \fi: - } -\cs_new:Npn \quark_if_recursion_tail_stop:n #1 - { - \tl_if_empty:oTF - { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } - { \use_none_delimit_by_q_recursion_stop:w } - { } - } -\cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1 - { - \tl_if_empty:oTF - { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } - { \use_i_delimit_by_q_recursion_stop:nw } - { \use_none:n } + \int_value:w \flag_height:n {#1} ; } -\cs_new:Npn \__quark_if_recursion_tail:w - #1 \q_recursion_tail #2 ? #3 ?! { #1 #2 } -\cs_generate_variant:Nn \quark_if_recursion_tail_stop:n { o } -\cs_generate_variant:Nn \quark_if_recursion_tail_stop_do:nn { o } -\cs_new:Npn \__quark_if_recursion_tail_break:NN #1#2 - { - \if_meaning:w \q_recursion_tail #1 - \exp_after:wN #2 - \fi: - } -\cs_new:Npn \__quark_if_recursion_tail_break:nN #1#2 - { - \tl_if_empty:oTF - { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } - {#2} - { } - } -\prg_new_conditional:Npnn \quark_if_nil:N #1 { p, T , F , TF } - { - \if_meaning:w \q_nil #1 - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\prg_new_conditional:Npnn \quark_if_no_value:N #1 { p, T , F , TF } - { - \if_meaning:w \q_no_value #1 - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\prg_generate_conditional_variant:Nnn \quark_if_no_value:N - { c } { p , T , F , TF } -\prg_new_conditional:Npnn \quark_if_nil:n #1 { p, T , F , TF } - { - \__tl_if_empty_return:o - { \__quark_if_nil:w {} #1 {} ? ! \q_nil ? ? ! } - } -\cs_new:Npn \__quark_if_nil:w #1 \q_nil #2 ? #3 ? ! { #1 #2 } -\prg_new_conditional:Npnn \quark_if_no_value:n #1 { p, T , F , TF } - { - \__tl_if_empty_return:o - { \__quark_if_no_value:w {} #1 {} ? ! \q_no_value ? ? ! } - } -\cs_new:Npn \__quark_if_no_value:w #1 \q_no_value #2 ? #3 ? ! { #1 #2 } -\prg_generate_conditional_variant:Nnn \quark_if_nil:n - { V , o } { p , TF , T , F } -\quark_new:N \q__tl_act_mark -\quark_new:N \q__tl_act_stop -\tl_new:N \g__scan_marks_tl -\cs_new_protected:Npn \__scan_new:N #1 - { - \tl_if_in:NnTF \g__scan_marks_tl { #1 } - { - \__kernel_msg_error:nnx { kernel } { scanmark-already-defined } - { \token_to_str:N #1 } - } - { - \tl_gput_right:Nn \g__scan_marks_tl {#1} - \cs_new_eq:NN #1 \scan_stop: - } - } -\__scan_new:N \s__stop -\cs_new:Npn \__use_none_delimit_by_s__stop:w #1 \s__stop { } -\__scan_new:N \s__seq %% File: l3prg.dtx Copyright (C) 2005-2018 The LaTeX3 Project \cs_new_eq:NN \if_bool:N \tex_ifodd:D \cs_new_eq:NN \if_predicate:w \tex_ifodd:D @@ -6312,7 +6314,7 @@ \cs_generate_variant:Nn \bool_log:N { c } \cs_new_protected:Npn \__bool_show:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { \exp_args:Nx #1 { \token_to_str:N #2 = \__bool_to_str:n {#2} } } } \bool_new:N \l_tmpa_bool @@ -6357,10 +6359,10 @@ \cs_new:cpn { __bool_(:Nw } #1#2 { \exp_after:wN \__bool_choose:NNN \exp_after:wN #1 - \__int_value:w \__bool_get_next:NN \use_i:nnnn + \int_value:w \__bool_get_next:NN \use_i:nnnn } \cs_new:cpn { __bool_p:Nw } #1 - { \exp_after:wN \__bool_choose:NNN \exp_after:wN #1 \__int_value:w } + { \exp_after:wN \__bool_choose:NNN \exp_after:wN #1 \int_value:w } \cs_new:Npn \__bool_choose:NNN #1#2#3 { \use:c @@ -6457,7 +6459,7 @@ { \exp:w \exp_after:wN \__prg_replicate_first:N - \__int_value:w \__int_eval:n {#1} + \int_value:w \int_eval:n {#1} \cs_end: } \cs_new:Npn \__prg_replicate:N #1 @@ -6499,7 +6501,8 @@ \cs_new:cpn { __prg_replicate_first_6:n } #1 { \exp_end: #1#1#1#1#1#1 } \cs_new:cpn { __prg_replicate_first_7:n } #1 { \exp_end: #1#1#1#1#1#1#1 } \cs_new:cpn { __prg_replicate_first_8:n } #1 { \exp_end: #1#1#1#1#1#1#1#1 } -\cs_new:cpn { __prg_replicate_first_9:n } #1 { \exp_end: #1#1#1#1#1#1#1#1#1 } +\cs_new:cpn { __prg_replicate_first_9:n } #1 + { \exp_end: #1#1#1#1#1#1#1#1#1 } \prg_new_conditional:Npnn \mode_if_vertical: { p , T , F , TF } { \if_mode_vertical: \prg_return_true: \else: \prg_return_false: \fi: } \prg_new_conditional:Npnn \mode_if_horizontal: { p , T , F , TF } @@ -6512,17 +6515,127 @@ { \if_int_compare:w \if_false: { \fi: `} = \c_zero \fi: } \cs_new:Npn \group_align_safe_end: { \if_int_compare:w `{ = \c_zero } \fi: } -\int_new:N \g__prg_map_int +\int_new:N \g__kernel_prg_map_int +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break_point:Nn } +\cs_new:Npn \__prg_break_point:Nn { \prg_break_point:Nn } +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break_point: } +\cs_new:Npn \__prg_break_point: { \prg_break_point: } +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_map_break:Nn } +\cs_new:Npn \__prg_map_break:Nn #1 \__prg_break_point:Nn + { \prg_map_break:Nn #1 \prg_break_point:Nn } +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break: } +\cs_new:Npn \__prg_break: #1 \__prg_break_point: { } +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break:n } +\cs_new:Npn \__prg_break:n #1#2 \__prg_break_point: {#1} +%% File: l3sys.dtx Copyright (C) 2015-2018 The LaTeX3 Project +\str_const:Nx \c_sys_jobname_str { \tex_jobname:D } +\int_const:Nn \c_sys_minute_int + { \int_mod:nn { \tex_time:D } { 60 } } +\int_const:Nn \c_sys_hour_int + { \int_div_truncate:nn { \tex_time:D } { 60 } } +\int_const:Nn \c_sys_day_int { \tex_day:D } +\int_const:Nn \c_sys_month_int { \tex_month:D } +\int_const:Nn \c_sys_year_int { \tex_year:D } +\cs_new_protected:Npn \__sys_const:nn #1#2 + { + \bool_if:nTF {#2} + { + \cs_new_eq:cN { #1 :T } \use:n + \cs_new_eq:cN { #1 :F } \use_none:n + \cs_new_eq:cN { #1 :TF } \use_i:nn + \cs_new_eq:cN { #1 _p: } \c_true_bool + } + { + \cs_new_eq:cN { #1 :T } \use_none:n + \cs_new_eq:cN { #1 :F } \use:n + \cs_new_eq:cN { #1 :TF } \use_ii:nn + \cs_new_eq:cN { #1 _p: } \c_false_bool + } + } +\str_const:Nx \c_sys_engine_str + { + \cs_if_exist:NT \luatex_luatexversion:D { luatex } + \cs_if_exist:NT \pdftex_pdftexversion:D { pdftex } + \cs_if_exist:NT \ptex_kanjiskip:D + { + \bool_lazy_and:nnTF + { \cs_if_exist_p:N \uptex_disablecjktoken:D } + { \int_compare_p:nNn { \ptex_jis:D "2121 } = { "3000 } } + { uptex } + { ptex } + } + \cs_if_exist:NT \xetex_XeTeXversion:D { xetex } + } +\tl_map_inline:nn { { luatex } { pdftex } { ptex } { uptex } { xetex } } + { + \__sys_const:nn { sys_if_engine_ #1 } + { \str_if_eq_x_p:nn \c_sys_engine_str {#1} } + } +\str_const:Nx \c_sys_output_str + { + \int_compare:nNnTF + { \cs_if_exist_use:NF \pdftex_pdfoutput:D { 0 } } > { 0 } + { pdf } + { dvi } + } +\__sys_const:nn { sys_if_output_dvi } + { \str_if_eq_x_p:nn \c_sys_output_str { dvi } } +\__sys_const:nn { sys_if_output_pdf } + { \str_if_eq_x_p:nn \c_sys_output_str { pdf } } %% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach, %% The LaTeX3 project -%% (C) 2012-2017 The LaTeX3 Project +%% (C) 2012-2018 The LaTeX3 Project \cs_new_eq:NN \c_empty_clist \c_empty_tl \tl_new:N \l__clist_internal_clist \cs_new_protected:Npn \__clist_tmp:w { } +\cs_new:Npn \__clist_trim_next:w #1 , + { + \tl_if_empty:oTF { \use_none:nn #1 ? } + { \__clist_trim_next:w \prg_do_nothing: } + { \tl_trim_spaces_apply:oN {#1} \exp_end: } + } +\cs_new:Npn \__clist_sanitize:n #1 + { + \exp_after:wN \__clist_sanitize:Nn \exp_after:wN \c_empty_tl + \exp:w \__clist_trim_next:w \prg_do_nothing: + #1 , \q_recursion_tail , \q_recursion_stop + } +\cs_new:Npn \__clist_sanitize:Nn #1#2 + { + \quark_if_recursion_tail_stop:n {#2} + #1 \__clist_wrap_item:w #2 , + \exp_after:wN \__clist_sanitize:Nn \exp_after:wN , + \exp:w \__clist_trim_next:w \prg_do_nothing: + } +\prg_new_conditional:Npnn \__clist_if_wrap:n #1 { TF } + { + \tl_if_empty:oTF + { + \__clist_if_wrap:w + \q_mark ? #1 ~ \q_mark ? ~ #1 \q_mark , ~ \q_mark #1 , + } + { + \tl_if_head_is_group:nTF { #1 { } } + { + \tl_if_empty:nTF {#1} + { \prg_return_true: } + { + \tl_if_empty:oTF { \use_none:n #1} + { \prg_return_true: } + { \prg_return_false: } + } + } + { \prg_return_false: } + } + { \prg_return_true: } + } +\cs_new:Npn \__clist_if_wrap:w #1 \q_mark ? ~ #2 ~ \q_mark #3 , { } +\cs_new:Npn \__clist_wrap_item:w #1 , + { \__clist_if_wrap:nTF {#1} { \exp_not:n { {#1} } } { \exp_not:n {#1} } } \cs_new_eq:NN \clist_new:N \tl_new:N \cs_new_eq:NN \clist_new:c \tl_new:c \cs_new_protected:Npn \clist_const:Nn #1#2 - { \tl_const:Nx #1 { \__clist_trim_spaces:n {#2} } } + { \tl_const:Nx #1 { \__clist_sanitize:n {#2} } } \cs_generate_variant:Nn \clist_const:Nn { c , Nx , cx } \cs_new_eq:NN \clist_clear:N \tl_clear:N \cs_new_eq:NN \clist_clear:c \tl_clear:c @@ -6551,19 +6664,18 @@ { #2 #3 { - \exp_last_unbraced:Nf \use_none:n - { \seq_map_function:NN #4 \__clist_wrap_item:n } + \exp_after:wN \use_none:n \exp:w \exp_end_continue_f:w + \seq_map_function:NN #4 \__clist_set_from_seq:n } } } -\cs_new:Npn \__clist_wrap_item:n #1 +\cs_new:Npn \__clist_set_from_seq:n #1 { , - \tl_if_empty:oTF { \__clist_set_from_seq:w #1 ~ , #1 ~ } - { \exp_not:n {#1} } + \__clist_if_wrap:nTF {#1} { \exp_not:n { {#1} } } + { \exp_not:n {#1} } } -\cs_new:Npn \__clist_set_from_seq:w #1 , #2 ~ { } \cs_generate_variant:Nn \clist_set_from_seq:NN { Nc } \cs_generate_variant:Nn \clist_set_from_seq:NN { c , cc } \cs_generate_variant:Nn \clist_gset_from_seq:NN { Nc } @@ -6587,37 +6699,10 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \clist_if_exist:c \cs_if_exist:c { TF , T , F , p } -\cs_new:Npn \__clist_trim_spaces_generic:nw #1#2 , - { - \__tl_trim_spaces:nn {#2} - { \exp_args:No \__clist_trim_spaces_generic:nn } {#1} - } -\cs_new:Npn \__clist_trim_spaces_generic:nn #1#2 { #2 {#1} } -\cs_new:Npn \__clist_trim_spaces:n #1 - { - \__clist_trim_spaces_generic:nw - { \__clist_trim_spaces:nn { } } - \q_mark #1 , - \q_recursion_tail, \q_recursion_stop - } -\cs_new:Npn \__clist_trim_spaces:nn #1 #2 - { - \quark_if_recursion_tail_stop:n {#2} - \tl_if_empty:nTF {#2} - { - \__clist_trim_spaces_generic:nw - { \__clist_trim_spaces:nn {#1} } \q_mark - } - { - #1 \exp_not:n {#2} - \__clist_trim_spaces_generic:nw - { \__clist_trim_spaces:nn { , } } \q_mark - } - } \cs_new_protected:Npn \clist_set:Nn #1#2 - { \tl_set:Nx #1 { \__clist_trim_spaces:n {#2} } } + { \tl_set:Nx #1 { \__clist_sanitize:n {#2} } } \cs_new_protected:Npn \clist_gset:Nn #1#2 - { \tl_gset:Nx #1 { \__clist_trim_spaces:n {#2} } } + { \tl_gset:Nx #1 { \__clist_sanitize:n {#2} } } \cs_generate_variant:Nn \clist_set:Nn { NV , No , Nx , c , cV , co , cx } \cs_generate_variant:Nn \clist_gset:Nn { NV , No , Nx , c , cV , co , cx } \cs_new_protected:Npn \clist_put_left:Nn @@ -6725,6 +6810,7 @@ \cs_new_eq:NN \clist_gpush:co \clist_gput_left:co \cs_new_eq:NN \clist_gpush:cx \clist_gput_left:cx \clist_new:N \l__clist_internal_remove_clist +\seq_new:N \l__clist_internal_remove_seq \cs_new_protected:Npn \clist_remove_duplicates:N { \__clist_remove_duplicates:NN \clist_set_eq:NN } \cs_new_protected:Npn \clist_gremove_duplicates:N @@ -6742,28 +6828,36 @@ \cs_generate_variant:Nn \clist_remove_duplicates:N { c } \cs_generate_variant:Nn \clist_gremove_duplicates:N { c } \cs_new_protected:Npn \clist_remove_all:Nn - { \__clist_remove_all:NNn \tl_set:Nx } + { \__clist_remove_all:NNNn \clist_set_from_seq:NN \tl_set:Nx } \cs_new_protected:Npn \clist_gremove_all:Nn - { \__clist_remove_all:NNn \tl_gset:Nx } -\cs_new_protected:Npn \__clist_remove_all:NNn #1#2#3 + { \__clist_remove_all:NNNn \clist_gset_from_seq:NN \tl_gset:Nx } +\cs_new_protected:Npn \__clist_remove_all:NNNn #1#2#3#4 { - \cs_set:Npn \__clist_tmp:w ##1 , #3 , + \__clist_if_wrap:nTF {#4} { - ##1 - , \q_mark , \use_none_delimit_by_q_stop:w , - \__clist_remove_all: - } - #1 #2 - { - \exp_after:wN \__clist_remove_all: - #2 , \q_mark , #3 , \q_stop + \seq_set_from_clist:NN \l__clist_internal_remove_seq #3 + \seq_remove_all:Nn \l__clist_internal_remove_seq {#4} + #1 #3 \l__clist_internal_remove_seq } - \clist_if_empty:NF #2 { - #1 #2 + \cs_set:Npn \__clist_tmp:w ##1 , #4 , + { + ##1 + , \q_mark , \use_none_delimit_by_q_stop:w , + \__clist_remove_all: + } + #2 #3 { - \exp_args:No \exp_not:o - { \exp_after:wN \use_none:n #2 } + \exp_after:wN \__clist_remove_all: + #3 , \q_mark , #4 , \q_stop + } + \clist_if_empty:NF #3 + { + #2 #3 + { + \exp_args:No \exp_not:o + { \exp_after:wN \use_none:n #3 } + } } } } @@ -6810,19 +6904,36 @@ \cs_new:Npn \__clist_if_empty_n:wNw #1 \q_mark #2#3 \q_stop {#2} \prg_new_protected_conditional:Npnn \clist_if_in:Nn #1#2 { T , F , TF } { - \exp_args:No \__clist_if_in_return:nn #1 {#2} + \exp_args:No \__clist_if_in_return:nnN #1 {#2} #1 } \prg_new_protected_conditional:Npnn \clist_if_in:nn #1#2 { T , F , TF } { \clist_set:Nn \l__clist_internal_clist {#1} - \exp_args:No \__clist_if_in_return:nn \l__clist_internal_clist {#2} + \exp_args:No \__clist_if_in_return:nnN \l__clist_internal_clist {#2} + \l__clist_internal_clist } -\cs_new_protected:Npn \__clist_if_in_return:nn #1#2 +\cs_new_protected:Npn \__clist_if_in_return:nnN #1#2#3 { - \cs_set:Npn \__clist_tmp:w ##1 ,#2, { } - \tl_if_empty:oTF - { \__clist_tmp:w ,#1, {} {} ,#2, } - { \prg_return_false: } { \prg_return_true: } + \__clist_if_wrap:nTF {#2} + { + \cs_set:Npx \__clist_tmp:w ##1 + { + \exp_not:N \tl_if_eq:nnT {##1} + \exp_not:n + { + {#2} + { \clist_map_break:n { \prg_return_true: \use_none:n } } + } + } + \clist_map_function:NN #3 \__clist_tmp:w + \prg_return_false: + } + { + \cs_set:Npn \__clist_tmp:w ##1 ,#2, { } + \tl_if_empty:oTF + { \__clist_tmp:w ,#1, {} {} ,#2, } + { \prg_return_false: } { \prg_return_true: } + } } \prg_generate_conditional_variant:Nnn \clist_if_in:Nn { NV , No , c , cV , co } { T , F , TF } @@ -6834,42 +6945,42 @@ { \exp_last_unbraced:NNo \__clist_map_function:Nw #2 #1 , \q_recursion_tail , - \__prg_break_point:Nn \clist_map_break: { } + \prg_break_point:Nn \clist_map_break: { } } } \cs_new:Npn \__clist_map_function:Nw #1#2 , { - \__quark_if_recursion_tail_break:nN {#2} \clist_map_break: + \quark_if_recursion_tail_break:nN {#2} \clist_map_break: #1 {#2} \__clist_map_function:Nw #1 } \cs_generate_variant:Nn \clist_map_function:NN { c } \cs_new:Npn \clist_map_function:nN #1#2 { - \__clist_trim_spaces_generic:nw { \__clist_map_function_n:Nn #2 } - \q_mark #1, \q_recursion_tail, - \__prg_break_point:Nn \clist_map_break: { } + \exp_after:wN \__clist_map_function_n:Nn \exp_after:wN #2 + \exp:w \__clist_trim_next:w \prg_do_nothing: #1 , \q_recursion_tail , + \prg_break_point:Nn \clist_map_break: { } } \cs_new:Npn \__clist_map_function_n:Nn #1 #2 { - \__quark_if_recursion_tail_break:nN {#2} \clist_map_break: - \tl_if_empty:nF {#2} { \__clist_map_unbrace:Nw #1 #2, } - \__clist_trim_spaces_generic:nw { \__clist_map_function_n:Nn #1 } - \q_mark + \quark_if_recursion_tail_break:nN {#2} \clist_map_break: + \__clist_map_unbrace:Nw #1 #2, + \exp_after:wN \__clist_map_function_n:Nn \exp_after:wN #1 + \exp:w \__clist_trim_next:w \prg_do_nothing: } \cs_new:Npn \__clist_map_unbrace:Nw #1 #2, { #1 {#2} } \cs_new_protected:Npn \clist_map_inline:Nn #1#2 { \clist_if_empty:NF #1 { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \cs_gset_protected:cpn - { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2} + { __clist_map_ \int_use:N \g__kernel_prg_map_int :w } ##1 {#2} \exp_last_unbraced:Nco \__clist_map_function:Nw - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __clist_map_ \int_use:N \g__kernel_prg_map_int :w } #1 , \q_recursion_tail , - \__prg_break_point:Nn \clist_map_break: - { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \clist_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } } } \cs_new_protected:Npn \clist_map_inline:nn #1 @@ -6886,7 +6997,7 @@ { \__clist_map_variable:Nnw #2 {#3} } #1 , \q_recursion_tail , \q_recursion_stop - \__prg_break_point:Nn \clist_map_break: { } + \prg_break_point:Nn \clist_map_break: { } } } \cs_new_protected:Npn \clist_map_variable:nNn #1 @@ -6903,9 +7014,9 @@ } \cs_generate_variant:Nn \clist_map_variable:NNn { c } \cs_new:Npn \clist_map_break: - { \__prg_map_break:Nn \clist_map_break: { } } + { \prg_map_break:Nn \clist_map_break: { } } \cs_new:Npn \clist_map_break:n - { \__prg_map_break:Nn \clist_map_break: } + { \prg_map_break:Nn \clist_map_break: } \cs_new:Npn \clist_count:N #1 { \int_eval:n @@ -7020,10 +7131,8 @@ } } \cs_new:Npn \__clist_item_n_end:n #1 #2 \q_stop - { - \__tl_trim_spaces:nn { \q_mark #1 } - { \exp_last_unbraced:No \__clist_item_n_strip:w } , - } + { \tl_trim_spaces_apply:nN {#1} \__clist_item_n_strip:n } +\cs_new:Npn \__clist_item_n_strip:n #1 { \__clist_item_n_strip:w #1 , } \cs_new:Npn \__clist_item_n_strip:w #1 , { \exp_not:n {#1} } \cs_new_protected:Npn \clist_show:N { \__clist_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \clist_show:N { c } @@ -7031,7 +7140,7 @@ \cs_generate_variant:Nn \clist_log:N { c } \cs_new_protected:Npn \__clist_show:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { #1 { LaTeX/kernel } { show-clist } { \token_to_str:N #2 } @@ -7052,9 +7161,9 @@ \clist_new:N \g_tmpb_clist %% File: l3token.dtx Copyright (C) 2005-2018 The LaTeX3 Project \cs_new_protected:Npn \char_set_catcode:nn #1#2 - { \tex_catcode:D \__int_eval:n {#1} = \__int_eval:n {#2} } + { \tex_catcode:D \int_eval:n {#1} = \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \char_value_catcode:n #1 - { \tex_the:D \tex_catcode:D \__int_eval:n {#1} } + { \tex_the:D \tex_catcode:D \int_eval:n {#1} \exp_stop_f: } \cs_new_protected:Npn \char_show_value_catcode:n #1 { \exp_args:Nf \tl_show:n { \char_value_catcode:n {#1} } } \cs_new_protected:Npn \char_set_catcode_escape:N #1 @@ -7122,27 +7231,27 @@ \cs_new_protected:Npn \char_set_catcode_invalid:n #1 { \char_set_catcode:nn {#1} { 15 } } \cs_new_protected:Npn \char_set_mathcode:nn #1#2 - { \tex_mathcode:D \__int_eval:n {#1} = \__int_eval:n {#2} } + { \tex_mathcode:D \int_eval:n {#1} = \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \char_value_mathcode:n #1 - { \tex_the:D \tex_mathcode:D \__int_eval:n {#1} } + { \tex_the:D \tex_mathcode:D \int_eval:n {#1} \exp_stop_f: } \cs_new_protected:Npn \char_show_value_mathcode:n #1 { \exp_args:Nf \tl_show:n { \char_value_mathcode:n {#1} } } \cs_new_protected:Npn \char_set_lccode:nn #1#2 - { \tex_lccode:D \__int_eval:n {#1} = \__int_eval:n {#2} } + { \tex_lccode:D \int_eval:n {#1} = \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \char_value_lccode:n #1 - { \tex_the:D \tex_lccode:D \__int_eval:n {#1} } + { \tex_the:D \tex_lccode:D \int_eval:n {#1} \exp_stop_f: } \cs_new_protected:Npn \char_show_value_lccode:n #1 { \exp_args:Nf \tl_show:n { \char_value_lccode:n {#1} } } \cs_new_protected:Npn \char_set_uccode:nn #1#2 - { \tex_uccode:D \__int_eval:n {#1} = \__int_eval:n {#2} } + { \tex_uccode:D \int_eval:n {#1} = \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \char_value_uccode:n #1 - { \tex_the:D \tex_uccode:D \__int_eval:n {#1} } + { \tex_the:D \tex_uccode:D \int_eval:n {#1} \exp_stop_f: } \cs_new_protected:Npn \char_show_value_uccode:n #1 { \exp_args:Nf \tl_show:n { \char_value_uccode:n {#1} } } \cs_new_protected:Npn \char_set_sfcode:nn #1#2 - { \tex_sfcode:D \__int_eval:n {#1} = \__int_eval:n {#2} } + { \tex_sfcode:D \int_eval:n {#1} = \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \char_value_sfcode:n #1 - { \tex_the:D \tex_sfcode:D \__int_eval:n {#1} } + { \tex_the:D \tex_sfcode:D \int_eval:n {#1} \exp_stop_f: } \cs_new_protected:Npn \char_show_value_sfcode:n #1 { \exp_args:Nf \tl_show:n { \char_value_sfcode:n {#1} } } \seq_new:N \l_char_special_seq @@ -7171,47 +7280,37 @@ \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 } -\__kernel_patch_args:nNNpn { { \__int_eval:n {#1} } { \__int_eval:n {#2} } } +\cs_new_eq:NN \__char_int_to_roman:w \tex_romannumeral:D \cs_new:Npn \char_generate:nn #1#2 { \exp:w \exp_after:wN \__char_generate_aux:w - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; - } -\cs_new:Npn \__char_generate:nn #1#2 - { - \exp:w \exp_after:wN - \__char_generate_aux:nnw \exp_after:wN - { \__int_value:w \__int_eval:w #1 } {#2} \exp_end: + \int_value:w \int_eval:n {#1} \exp_after:wN ; + \int_value:w \int_eval:n {#2} ; } \cs_new:Npn \__char_generate_aux:w #1 ; #2 ; { - \if_int_compare:w #2 = 13 \exp_stop_f: - \__kernel_msg_expandable_error:nn { kernel } { char-active } + \if_int_compare:w #2 = 10 \exp_stop_f: + \if_int_compare:w #1 = 0 \exp_stop_f: + \__kernel_msg_expandable_error:nn { kernel } { char-null-space } + \else: + \__kernel_msg_expandable_error:nn { kernel } { char-space } + \fi: \else: - \if_int_compare:w #2 = 10 \exp_stop_f: - \if_int_compare:w #1 = 0 \exp_stop_f: - \__kernel_msg_expandable_error:nn { kernel } { char-null-space } - \else: - \__kernel_msg_expandable_error:nn { kernel } { char-space } - \fi: + \if_int_odd:w 0 + \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi: + \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi: + \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi: + \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f: + \__kernel_msg_expandable_error:nn { kernel } + { char-invalid-catcode } \else: \if_int_odd:w 0 - \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi: - \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi: - \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi: - \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f: + \if_int_compare:w #1 < 0 \exp_stop_f: 1 \fi: + \if_int_compare:w #1 > \c_max_char_int 1 \fi: \exp_stop_f: \__kernel_msg_expandable_error:nn { kernel } - { char-invalid-catcode } + { char-out-of-range } \else: - \if_int_odd:w 0 - \if_int_compare:w #1 < 0 \exp_stop_f: 1 \fi: - \if_int_compare:w #1 > \c__char_max_int 1 \fi: \exp_stop_f: - \__kernel_msg_expandable_error:nn { kernel } - { char-out-of-range } - \else: - \__char_generate_aux:nnw {#1} {#2} - \fi: + \__char_generate_aux:nnw {#1} {#2} \fi: \fi: \fi: @@ -7223,16 +7322,15 @@ \cs_set:Npn ^^L { } \char_set_catcode_other:n { 0 } \if_int_odd:w 0 - \cs_if_exist:NT \luatex_directlua:D { 1 } - \cs_if_exist:NT \utex_charcat:D { 1 } \exp_stop_f: - \int_const:Nn \c__char_max_int { 1114111 } - \cs_if_exist:NTF \luatex_directlua:D + \sys_if_engine_luatex:T { 1 } + \sys_if_engine_xetex:T { 1 } \exp_stop_f: + \sys_if_engine_luatex:TF { \cs_new:Npn \__char_generate_aux:nnw #1#2#3 \exp_end: { #3 - \exp_after:wN \exp_end: - \luatex_directlua:D { l3kernel.charcat(#1, #2) } + \exp_after:wN \exp_after:wN \exp_after:wN \exp_end: + \lua_now_x:n { l3kernel.charcat(#1, #2) } } } { @@ -7240,11 +7338,21 @@ { #3 \exp_after:wN \exp_end: - \utex_charcat:D #1 ~ #2 ~ + \utex_charcat:D #1 \exp_stop_f: #2 \exp_stop_f: + } + \cs_new_eq:NN \__char_generate_auxii:nnw \__char_generate_aux:nnw + \cs_gset:Npn \__char_generate_aux:nnw #1#2#3 \exp_end: + { + #3 + \if_int_compare:w #2 = 13 \exp_stop_f: + \__kernel_msg_expandable_error:nn { kernel } { char-active } + \else: + \__char_generate_auxii:nnw {#1} {#2} + \fi: + \exp_end: } } \else: - \int_const:Nn \c__char_max_int { 255 } \tl_set:Nn \l__char_tmp_tl { \exp_not:N \or: } \char_set_catcode_group_begin:n { 0 } % { \tl_put_right:Nn \l__char_tmp_tl { ^^@ \if_false: } } @@ -7257,7 +7365,7 @@ \tl_put_right:Nn \l__char_tmp_tl { \or: - \etex_unexpanded:D \exp_after:wN + \__kernel_exp_not:w \exp_after:wN { \exp_after:wN ^^@ \exp_after:wN } } \tl_put_right:Nn \l__char_tmp_tl { \or: } @@ -7283,16 +7391,16 @@ \exp_args:Nx \tex_lowercase:D { \tl_const:Nn - \exp_not:c { c__char_ \__int_to_roman:w #1 _tl } + \exp_not:c { c__char_ \__char_int_to_roman:w #1 _tl } { \exp_not:o \l__char_tmp_tl } } } - \int_step_function:nnnN { 0 } { 1 } { 11 } \__char_tmp:n + \int_step_function:nnN { 0 } { 11 } \__char_tmp:n \group_begin: \tl_replace_once:Nnn \l__char_tmp_tl { ^^@ } { \ERROR } \__char_tmp:n { 12 } \group_end: - \int_step_function:nnnN { 13 } { 1 } { 255 } \__char_tmp:n + \int_step_function:nnN { 13 } { 255 } \__char_tmp:n \cs_new:Npn \__char_generate_aux:nnw #1#2#3 \exp_end: { #3 @@ -7301,16 +7409,16 @@ \exp_after:wN \exp_after:wN \if_case:w #2 \exp_last_unbraced:Nv \exp_stop_f: - { c__char_ \__int_to_roman:w #1 _tl } + { c__char_ \__char_int_to_roman:w #1 _tl } \fi: } \fi: \group_end: \tl_const:Nx \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } \group_begin: - \__chk_if_free_cs:N \c_group_begin_token + \__kernel_chk_if_free_cs:N \c_group_begin_token \tex_global:D \tex_let:D \c_group_begin_token { - \__chk_if_free_cs:N \c_group_end_token + \__kernel_chk_if_free_cs:N \c_group_end_token \tex_global:D \tex_let:D \c_group_end_token } \char_set_catcode_math_toggle:N \* \cs_new_eq:NN \c_math_toggle_token * @@ -7320,7 +7428,7 @@ \cs_new_eq:NN \c_math_superscript_token ^ \char_set_catcode_math_subscript:N \* \cs_new_eq:NN \c_math_subscript_token * - \__chk_if_free_cs:N \c_space_token + \__kernel_chk_if_free_cs:N \c_space_token \use:n { \tex_global:D \tex_let:D \c_space_token = ~ } ~ \cs_new_eq:NN \c_catcode_letter_token a \cs_new_eq:NN \c_catcode_other_token 1 @@ -7416,11 +7524,9 @@ ##1 \tl_to_str:n { ma } ##2 \c_colon_str ##3 \exp_not:N \q_stop } { - \if_int_compare:w \__str_if_eq_x:nn { #2 } { cro } = 0 \exp_stop_f: - \prg_return_true: - \else: - \prg_return_false: - \fi: + \str_if_eq_x:nnTF { #2 } { cro } + { \prg_return_true: } + { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_cs:N #1 { p , T , F , TF } { @@ -7474,7 +7580,7 @@ \exp_not:N \prg_return_false: \exp_not:N \else: } - \exp_not:N \__str_if_eq_x_return:nn + \exp_not:N \str_if_eq_x:nnTF { \exp_not:N \exp_after:wN \exp_not:c { __token_delimit_by_ #2 :w } @@ -7482,6 +7588,8 @@ ? \tl_to_str:n {#2} \exp_not:N \q_stop } { \exp_not:n {#3} } + { \exp_not:N \prg_return_true: } + { \exp_not:N \prg_return_false: } \cs_if_exist:cT { tex_ #2 :D } { \exp_not:N \fi: @@ -7761,15 +7869,15 @@ } \__kernel_patch_deprecation:nnNNpn { 2018-12-31 } { \cs_new_eq:NN } \cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } -%% File: l3prop.dtx Copyright (C) 1990-2017 The LaTeX3 Project -\__scan_new:N \s__prop +%% File: l3prop.dtx Copyright (C) 1990-2018 The LaTeX3 Project +\scan_new:N \s__prop \cs_new:Npn \__prop_pair:wn #1 \s__prop #2 { \__kernel_msg_expandable_error:nn { kernel } { misused-prop } } \tl_new:N \l__prop_internal_tl \tl_const:Nn \c_empty_prop { \s__prop } \cs_new_protected:Npn \prop_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_prop } \cs_generate_variant:Nn \prop_new:N { c } @@ -7815,20 +7923,24 @@ \cs_new:Npn \__prop_from_keyval_loop:w #1 , { \quark_if_recursion_tail_stop:o { \use_none:n #1 } - \__prop_from_keyval_split:Nw \__prop_from_keyval_key:w + \__prop_from_keyval_split:Nw \__prop_from_keyval_key:n #1 = = \q_stop { \use_none:n #1 } \__prop_from_keyval_loop:w \q_mark } \cs_new:Npn \__prop_from_keyval_split:Nw #1#2 = { - \__tl_trim_spaces:nn {#2} - { \exp_last_unbraced:No #1 } \q_nil + \tl_trim_spaces_apply:oN { \use_none:n #2 } #1 + \q_nil } +\cs_new:Npn \__prop_from_keyval_key:n #1 + { \__prop_from_keyval_key:w #1 } \cs_new:Npn \__prop_from_keyval_key:w #1 \q_nil #2 \q_stop { - \__prop_from_keyval_split:Nw \__prop_from_keyval_value:w + \__prop_from_keyval_split:Nw \__prop_from_keyval_value:n \q_mark #2 \q_stop {#1} } +\cs_new:Npn \__prop_from_keyval_value:n #1 + { \__prop_from_keyval_value:w #1 } \cs_new:Npn \__prop_from_keyval_value:w #1 \q_nil #2 \q_stop #3#4 { \tl_if_empty:nF { #3 #1 #2 } @@ -7839,8 +7951,9 @@ \s__prop { \exp_not:n {#1} } } { - \exp_args:Nnno \__kernel_msg_expandable_error:nnn - { kernel } { prop-keyval } {#4} + \__kernel_msg_expandable_error:nnf + { kernel } { prop-keyval } + { \exp_after:wN \exp_stop_f: #4 } } } } @@ -7905,12 +8018,12 @@ { \exp_last_unbraced:Noo \__prop_item_Nn:nwwn { \tl_to_str:n {#2} } #1 \__prop_pair:wn \tl_to_str:n {#2} \s__prop { } - \__prg_break_point: + \prg_break_point: } \cs_new:Npn \__prop_item_Nn:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 { \str_if_eq_x:nnTF {#1} {#3} - { \__prg_break:n { \exp_not:n {#4} } } + { \prg_break:n { \exp_not:n {#4} } } { \__prop_item_Nn:nwwn {#1} } } \cs_generate_variant:Nn \prop_item:Nn { c } @@ -7990,7 +8103,7 @@ \exp_last_unbraced:Noo \__prop_if_in:nwwn { \tl_to_str:n {#2} } #1 \__prop_pair:wn \tl_to_str:n {#2} \s__prop { } \q_recursion_tail - \__prg_break_point: + \prg_break_point: } \cs_new:Npn \__prop_if_in:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 { @@ -8005,7 +8118,7 @@ \else: \prg_return_true: \fi: - \__prg_break: + \prg_break: } \prg_generate_conditional_variant:Nnn \prop_if_in:Nn { NV , No , c , cV , co } { p , T , F , TF } @@ -8022,15 +8135,16 @@ { NV , No , c , cV , co } { T , F , TF } \cs_new:Npn \prop_map_function:NN #1#2 { - \exp_last_unbraced:NNo \__prop_map_function:Nwwn #2 #1 - \__prop_pair:wn \q_recursion_tail \s__prop { } - \__prg_break_point:Nn \prop_map_break: { } + \exp_after:wN \use_i_ii:nnn + \exp_after:wN \__prop_map_function:Nwwn + \exp_after:wN #2 + #1 + \prg_break: \__prop_pair:wn \s__prop { } \prg_break_point: + \prg_break_point:Nn \prop_map_break: { } } \cs_new:Npn \__prop_map_function:Nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 { - \if_meaning:w \q_recursion_tail #3 - \exp_after:wN \prop_map_break: - \fi: + #2 #1 {#3} {#4} \__prop_map_function:Nwwn #1 } @@ -8038,29 +8152,29 @@ \cs_new_protected:Npn \prop_map_inline:Nn #1#2 { \cs_gset_eq:cN - { __prg_map_ \int_use:N \g__prg_map_int :wn } \__prop_pair:wn - \int_gincr:N \g__prg_map_int + { __prop_map_ \int_use:N \g__kernel_prg_map_int :wn } \__prop_pair:wn + \int_gincr:N \g__kernel_prg_map_int \cs_gset_protected:Npn \__prop_pair:wn ##1 \s__prop ##2 {#2} #1 - \__prg_break_point:Nn \prop_map_break: + \prg_break_point:Nn \prop_map_break: { - \int_gdecr:N \g__prg_map_int + \int_gdecr:N \g__kernel_prg_map_int \cs_gset_eq:Nc \__prop_pair:wn - { __prg_map_ \int_use:N \g__prg_map_int :wn } + { __prop_map_ \int_use:N \g__kernel_prg_map_int :wn } } } \cs_generate_variant:Nn \prop_map_inline:Nn { c } \cs_new:Npn \prop_map_break: - { \__prg_map_break:Nn \prop_map_break: { } } + { \prg_map_break:Nn \prop_map_break: { } } \cs_new:Npn \prop_map_break:n - { \__prg_map_break:Nn \prop_map_break: } + { \prg_map_break:Nn \prop_map_break: } \cs_new_protected:Npn \prop_show:N { \__prop_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \prop_show:N { c } \cs_new_protected:Npn \prop_log:N { \__prop_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \prop_log:N { c } \cs_new_protected:Npn \__prop_show:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { #1 { LaTeX/kernel } { show-prop } { \token_to_str:N #2 } @@ -8079,8 +8193,11 @@ { \prg_return_true: } { \prg_return_false: } } \__kernel_patch:nnNNpn { } - { \__kernel_debug_log:x { Defining~message~ #1 / #2 ~\msg_line_context: } } -\cs_new_protected:Npn \__chk_if_free_msg:nn #1#2 + { + \__kernel_debug_log:x + { Defining~message~ #1 / #2 ~\msg_line_context: } + } +\cs_new_protected:Npn \__msg_chk_free:nn #1#2 { \msg_if_exist:nnT {#1} {#2} { @@ -8090,7 +8207,7 @@ } \cs_new_protected:Npn \msg_new:nnnn #1#2 { - \__chk_if_free_msg:nn {#1} {#2} + \__msg_chk_free:nn {#1} {#2} \msg_gset:nnnn {#1} {#2} } \cs_new_protected:Npn \msg_new:nnn #1#2#3 @@ -8195,9 +8312,9 @@ \iow_newline: ! } - \__iow_with:Nnn \tex_newlinechar:D { `\^^J } + \__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J } { - \__iow_with:Nnn \tex_errorcontextlines:D { -1 } + \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 } { \group_begin: \cs_set_protected:Npn & @@ -8389,9 +8506,9 @@ \tl_if_empty:nF {#1} { \exp_args:No \iow_term:n { \use_none:n #1 } } \tl_set:Nn \l__msg_internal_tl {#2} - \__iow_with:Nnn \tex_newlinechar:D { 10 } + \__kernel_iow_with:Nnn \tex_newlinechar:D { 10 } { - \__iow_with:Nnn \tex_errorcontextlines:D { -1 } + \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 } { \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN { \exp_after:wN \l__msg_internal_tl } @@ -8411,6 +8528,7 @@ \seq_new:N \l__msg_class_loop_seq \cs_new_protected:Npn \__msg_use:nnnnnnn #1#2#3#4#5#6#7 { + \use:c { conditionally@traceoff } \msg_if_exist:nnTF {#2} {#3} { \__msg_class_chk_exist:nT {#1} @@ -8428,6 +8546,7 @@ } } { \__kernel_msg_error:nnxx { kernel } { message-unknown } {#2} {#3} } + \use:c { conditionally@traceon } } \cs_new_protected:Npn \__msg_use_code: { } \cs_new_protected:Npn \__msg_use_redirect_name:n #1 @@ -8709,6 +8828,8 @@ LaTeX~has~been~asked~to~define~'#1'~as~a~protected~predicate.~ Only~expandable~tests~can~have~a~predicate~version. } +\__kernel_msg_new:nnn { kernel } { randint-backward-range } + { Bounds~ordered~backwards~in~\int_rand:nn {#1}~{#2}. } \__kernel_msg_new:nnnn { kernel } { conditional-form-unknown } { Conditional~form~'#1'~for~function~'#2'~unknown. } { @@ -8716,6 +8837,35 @@ LaTeX~has~been~asked~to~define~the~conditional~form~'#1'~of~ the~function~'#2',~but~only~'TF',~'T',~'F',~and~'p'~forms~exist. } +\__kernel_msg_new:nnnn { kernel } { key-no-property } + { No~property~given~in~definition~of~key~'#1'. } + { + \c__msg_coding_error_text_tl + Inside~\keys_define:nn each~key~name~ + needs~a~property: \\ \\ + \iow_indent:n { #1 .<property> } \\ \\ + LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property. + } +\__kernel_msg_new:nnnn { kernel } { key-property-boolean-values-only } + { The~property~'#1'~accepts~boolean~values~only. } + { + \c__msg_coding_error_text_tl + The~property~'#1'~only~accepts~the~values~'true'~and~'false'. + } +\__kernel_msg_new:nnnn { kernel } { key-property-requires-value } + { The~property~'#1'~requires~a~value. } + { + \c__msg_coding_error_text_tl + LaTeX~was~asked~to~set~property~'#1'~for~key~'#2'.\\ + No~value~was~given~for~the~property,~and~one~is~required. + } +\__kernel_msg_new:nnnn { kernel } { key-property-unknown } + { The~key~property~'#1'~is~unknown. } + { + \c__msg_coding_error_text_tl + LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':~ + this~property~is~not~defined. + } \__kernel_msg_new:nnnn { kernel } { scanmark-already-defined } { Scan~mark~#1~already~defined. } { @@ -8746,6 +8896,14 @@ with~a~signature~starting~with~'#1',~but~cannot~change~an~argument~ from~type~'#3'~to~type~'#4'. } +\__kernel_msg_new:nnnn { kernel } { invalid-exp-args } + { Invalid~variant~specifier~'#1'~in~'#2'. } + { + \c__msg_coding_error_text_tl + LaTeX~has~been~asked~to~create~an~\iow_char:N\\exp_args:N...~ + function~with~signature~'N#2'~but~'#1'~is~not~a~valid~argument~ + specifier. + } \__kernel_msg_new:nnn { kernel } { deprecated-variant } { Variant~form~'#1'~deprecated~for~base~form~'#2'.~ @@ -8757,7 +8915,7 @@ {#4} { :~base~form~is~already~a~variant. } } { . } } -\bool_if:NTF \l@expl@enable@debug@bool +\__kernel_if_debug:TF { \__kernel_msg_new:nnnn { kernel } { debug } { The~debugging~option~'#1'~does~not~exist~\msg_line_context:. } @@ -8771,14 +8929,19 @@ { Inconsistent~local/global~assignment } { \c__msg_coding_error_text_tl - \if:w l #2 Local \else: Global \fi: \ + \if:w l #2 Local \else: Global \fi: \ % assignment~to~a~ - \if:w l #1 local \else: \if:w g #1 global \else: constant \fi: \fi: \ + \if:w l #1 local + \else: + \if:w g #1 global \else: constant \fi: + \fi: + \ % variable~'#3'. } \__kernel_msg_new:nnnn { kernel } { non-declared-variable } { The~variable~#1~has~not~been~declared~\msg_line_context:. } { + \c__msg_coding_error_text_tl Checking~is~active,~and~you~have~tried~do~so~something~like: \\ \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\ without~first~having: \\ @@ -8892,230 +9055,17 @@ \__kernel_msg_expandable_error:nnnnnn {#1} {#2} { } { } { } { } } +\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnnnn { nnffff } +\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnnn { nnfff } +\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnn { nnff } +\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnn { nnf } %% File: l3file.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\str_new:N \g_file_curr_dir_str -\str_new:N \g_file_curr_ext_str -\str_new:N \g_file_curr_name_str -\cs_if_exist:NT \@currname - { \str_gset_eq:NN \g_file_curr_name_str \@currname } -\seq_new:N \g__file_stack_seq -\group_begin: - \cs_set_protected:Npn \__file_tmp:w #1#2#3 - { - \tl_if_blank:nTF {#1} - { - \cs_set:Npn \__file_tmp:w ##1 " ##2 " ##3 \q_stop { { } {##2} { } } - \seq_gput_right:Nx \g__file_stack_seq - { - \exp_after:wN \__file_tmp:w \tex_jobname:D - " \tex_jobname:D " \q_stop - } - } - { - \seq_gput_right:Nn \g__file_stack_seq { { } {#1} {#2} } - \__file_tmp:w - } - } - \cs_if_exist:NT \@currnamestack - { \exp_after:wN \__file_tmp:w \@currnamestack } -\group_end: -\seq_new:N \g__file_record_seq -\tl_new:N \l__file_tmp_tl -\str_new:N \l__file_base_name_str -\str_new:N \l__file_full_name_str -\str_new:N \l__file_dir_str -\str_new:N \l__file_ext_str -\str_new:N \l__file_name_str -\seq_new:N \l_file_search_path_seq -\seq_new:N \l__file_tmp_seq -\cs_new_protected:Npn \__file_name_sanitize:nN #1#2 - { - \group_begin: - \seq_map_inline:Nn \l_char_active_seq - { - \tl_set:Nx \l__file_tmp_tl { \iow_char:N ##1 } - \char_set_active_eq:NN ##1 \l__file_tmp_tl - } - \tl_set:Nx \l__file_tmp_tl {#1} - \tl_set:Nx \l__file_tmp_tl - { \tl_to_str:N \l__file_tmp_tl } - \exp_args:NNNV \group_end: - \str_set:Nn #2 \l__file_tmp_tl - } -\cs_new_protected:Npn \__file_name_quote:nN #1#2 - { - \str_set:Nx #2 {#1} - \int_if_even:nF - { 0 \tl_map_function:NN #2 \__file_name_quote_aux:n } - { - \__kernel_msg_error:nnx - { kernel } { unbalanced-quote-in-filename } {#2} - } - \tl_remove_all:Nn #2 { " } - \tl_if_in:NnT #2 { ~ } - { \str_set:Nx #2 { " \exp_not:V #2 " } } - } -\cs_new:Npn \__file_name_quote_aux:n #1 - { \token_if_eq_charcode:NNT #1 " { + 1 } } -\cs_new_protected:Npn \file_get_full_name:nN #1#2 - { - \__file_name_sanitize:nN {#1} \l__file_base_name_str - \__file_get_full_name_search:nN { } \use:n - \seq_map_inline:Nn \l_file_search_path_seq - { \__file_get_full_name_search:nN { ##1 / } \seq_map_break:n } - \cs_if_exist:NT \input@path - { - \tl_map_inline:Nn \input@path - { \__file_get_full_name_search:nN { ##1 } \tl_map_break:n } - } - \str_clear:N \l__file_full_name_str - \__prg_break_point: - \str_if_empty:NF \l__file_full_name_str - { - \exp_args:NV \file_parse_full_name:nNNN \l__file_full_name_str - \l__file_dir_str \l__file_name_str \l__file_ext_str - \str_if_empty:NT \l__file_ext_str - { - \__ior_open:No \g__file_internal_ior - { \l__file_full_name_str .tex } - \ior_if_eof:NF \g__file_internal_ior - { \str_put_right:Nn \l__file_full_name_str { .tex } } - } - } - \str_set_eq:NN #2 \l__file_full_name_str - \ior_close:N \g__file_internal_ior - } -\cs_generate_variant:Nn \file_get_full_name:nN { V } -\cs_new_protected:Npn \__file_get_full_name_search:nN #1#2 - { - \__file_name_quote:nN - { \tl_to_str:n {#1} \l__file_base_name_str } - \l__file_full_name_str - \__ior_open:No \g__file_internal_ior \l__file_full_name_str - \ior_if_eof:NF \g__file_internal_ior { #2 { \__prg_break: } } - } -\prg_new_protected_conditional:Npnn \file_if_exist:n #1 { T , F , TF } - { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str - { \prg_return_false: } - { \prg_return_true: } - } -\cs_new_protected:Npn \__file_missing:n #1 - { - \__file_name_sanitize:nN {#1} \l__file_base_name_str - \__kernel_msg_error:nnx { kernel } { file-not-found } - { \l__file_base_name_str } - } -\cs_new_protected:Npn \file_input:n #1 - { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str - { \__file_missing:n {#1} } - { \__file_input:V \l__file_full_name_str } - } -\cs_new_protected:Npn \__file_input:n #1 - { - \clist_if_exist:NTF \@filelist - { \@addtofilelist {#1} } - { \seq_gput_right:Nn \g__file_record_seq {#1} } - \__file_input_push:n {#1} - \tex_input:D #1 \c_space_tl - \__file_input_pop: - } -\cs_generate_variant:Nn \__file_input:n { V } -\cs_new_protected:Npn \__file_input_push:n #1 - { - \seq_gpush:Nx \g__file_stack_seq - { - { \g_file_curr_dir_str } - { \g_file_curr_name_str } - { \g_file_curr_ext_str } - } - \file_parse_full_name:nNNN {#1} - \l__file_dir_str \l__file_name_str \l__file_ext_str - \str_gset_eq:NN \g_file_curr_dir_str \l__file_dir_str - \str_gset_eq:NN \g_file_curr_name_str \l__file_name_str - \str_gset_eq:NN \g_file_curr_ext_str \l__file_ext_str - } -\cs_new_protected:Npn \__file_input_pop: - { - \seq_gpop:NN \g__file_stack_seq \l__file_tmp_tl - \exp_after:wN \__file_input_pop:nnn \l__file_tmp_tl - } -\cs_new_protected:Npn \__file_input_pop:nnn #1#2#3 - { - \str_gset:Nn \g_file_curr_dir_str {#1} - \str_gset:Nn \g_file_curr_name_str {#2} - \str_gset:Nn \g_file_curr_ext_str {#3} - } -\cs_new_protected:Npn \file_parse_full_name:nNNN #1#2#3#4 - { - \exp_after:wN \__file_parse_full_name_auxi:w - \tl_to_str:n { #1 " #1 " } \q_stop #2#3#4 - } -\cs_new_protected:Npn \__file_parse_full_name_auxi:w #1 " #2 " #3 \q_stop #4#5#6 - { - \__file_parse_full_name_split:nNNNTF {#2} / #4 #5 - { \str_if_empty:NT #4 { \str_set:Nn #4 { / } } } - { } - \exp_args:No \__file_parse_full_name_split:nNNNTF {#5} . #5 #6 - { \str_put_left:Nn #6 { . } } - { - \str_set_eq:NN #5 #6 - \str_clear:N #6 - } - } -\cs_new_protected:Npn \__file_parse_full_name_split:nNNNTF #1#2#3#4 - { - \cs_set_protected:Npn \__file_tmp:w ##1 ##2 #2 ##3 \q_stop - { - \tl_if_empty:nTF {##3} - { - \str_set:Nn #4 {##2} - \tl_if_empty:nTF {##1} - { - \str_clear:N #3 - \use_ii:nn - } - { - \str_set:Nx #3 { \str_tail:n {##1} } - \use_i:nn - } - } - { \__file_tmp:w { ##1 #2 ##2 } ##3 \q_stop } - } - \__file_tmp:w { } #1 #2 \q_stop - } -\cs_new_protected:Npn \file_show_list: { \__file_list:N \msg_show:nnxxxx } -\cs_new_protected:Npn \file_log_list: { \__file_list:N \msg_log:nnxxxx } -\cs_new_protected:Npn \__file_list:N #1 - { - \seq_clear:N \l__file_tmp_seq - \clist_if_exist:NT \@filelist - { - \exp_args:NNx \seq_set_from_clist:Nn \l__file_tmp_seq - { \tl_to_str:N \@filelist } - } - \seq_concat:NNN \l__file_tmp_seq \l__file_tmp_seq \g__file_record_seq - \seq_remove_duplicates:N \l__file_tmp_seq - #1 { LaTeX/kernel } { file-list } - { \seq_map_function:NN \l__file_tmp_seq \__file_list_aux:n } { } { } { } - } -\cs_new:Npn \__file_list_aux:n #1 { \iow_newline: #1 } -\AtBeginDocument - { - \exp_args:NNx \seq_set_from_clist:Nn \l__file_tmp_seq - { \tl_to_str:N \@filelist } - \seq_gconcat:NNN \g__file_record_seq \g__file_record_seq \l__file_tmp_seq - } \int_const:Nn \c_term_ior { 16 } \seq_new:N \g__ior_streams_seq \tl_new:N \l__ior_stream_tl \prop_new:N \g__ior_streams_prop -\int_step_inline:nnnn +\int_step_inline:nnn { 0 } - { 1 } { \cs_if_exist:NTF \normalend { \tex_count:D 38 ~ } @@ -9132,22 +9082,23 @@ \ior_new:N \g_tmpa_ior \ior_new:N \g_tmpb_ior \cs_new_protected:Npn \ior_open:Nn #1#2 - { \ior_open:NnF #1 {#2} { \__file_missing:n {#2} } } + { \ior_open:NnF #1 {#2} { \__kernel_file_missing:n {#2} } } \cs_generate_variant:Nn \ior_open:Nn { c } +\str_new:N \l__ior_file_name_str \prg_new_protected_conditional:Npnn \ior_open:Nn #1#2 { T , F , TF } { - \file_get_full_name:nN {#2} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str + \file_get_full_name:nN {#2} \l__ior_file_name_str + \str_if_empty:NTF \l__ior_file_name_str { \prg_return_false: } { - \__ior_open:No #1 \l__file_full_name_str + \__kernel_ior_open:No #1 \l__ior_file_name_str \prg_return_true: } } \prg_generate_conditional_variant:Nnn \ior_open:Nn { c } { T , F , TF } \exp_args:NNf \cs_new_protected:Npn \__ior_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newread } } -\cs_new_protected:Npn \__ior_open:Nn #1#2 +\cs_new_protected:Npn \__kernel_ior_open:Nn #1#2 { \ior_close:N #1 \seq_gpop:NNTF \g__ior_streams_seq \l__ior_stream_tl @@ -9158,7 +9109,7 @@ \__ior_open_stream:Nn #1 {#2} } } -\cs_generate_variant:Nn \__ior_open:Nn { No } +\cs_generate_variant:Nn \__kernel_ior_open:Nn { No } \cs_new_protected:Npn \__ior_open_stream:Nn #1#2 { \tex_global:D \tex_chardef:D #1 = \l__ior_stream_tl \scan_stop: @@ -9210,33 +9161,33 @@ { \tex_read:D #1 to #2 } \cs_new_protected:Npn \ior_str_get:NN #1#2 { - \use:x + \exp_args:Nno \use:n { \int_set:Nn \tex_endlinechar:D { -1 } - \exp_not:n { \etex_readline:D #1 to #2 } - \int_set:Nn \tex_endlinechar:D { \int_use:N \tex_endlinechar:D } - } + \etex_readline:D #1 to #2 + \int_set:Nn \tex_endlinechar:D + } { \int_use:N \tex_endlinechar:D } } \cs_new:Npn \ior_map_break: - { \__prg_map_break:Nn \ior_map_break: { } } + { \prg_map_break:Nn \ior_map_break: { } } \cs_new:Npn \ior_map_break:n - { \__prg_map_break:Nn \ior_map_break: } + { \prg_map_break:Nn \ior_map_break: } \cs_new_protected:Npn \ior_map_inline:Nn { \__ior_map_inline:NNn \ior_get:NN } \cs_new_protected:Npn \ior_str_map_inline:Nn { \__ior_map_inline:NNn \ior_str_get:NN } \cs_new_protected:Npn \__ior_map_inline:NNn { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:Nc \__ior_map_inline:NNNn - { __prg_map_ \int_use:N \g__prg_map_int :n } + { __ior_map_ \int_use:N \g__kernel_prg_map_int :n } } \cs_new_protected:Npn \__ior_map_inline:NNNn #1#2#3#4 { \cs_gset_protected:Npn #1 ##1 {#4} \ior_if_eof:NF #3 { \__ior_map_inline_loop:NNN #1#2#3 } - \__prg_break_point:Nn \ior_map_break: - { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \ior_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } } \cs_new_protected:Npn \__ior_map_inline_loop:NNN #1#2#3 { @@ -9248,24 +9199,20 @@ } } \tl_new:N \l__ior_internal_tl -\ior_new:N \g__file_internal_ior \int_const:Nn \c_log_iow { -1 } \int_const:Nn \c_term_iow { - \cs_if_exist:NTF \luatex_directlua:D - { - \int_compare:nNnTF \luatex_luatexversion:D > { 80 } - { 128 } - { 16 } - } + \bool_lazy_and:nnTF + { \sys_if_engine_luatex_p: } + { \int_compare_p:nNn \luatex_luatexversion:D > { 80 } } + { 128 } { 16 } } \seq_new:N \g__iow_streams_seq \tl_new:N \l__iow_stream_tl \prop_new:N \g__iow_streams_prop -\int_step_inline:nnnn +\int_step_inline:nnn { 0 } - { 1 } { \cs_if_exist:NTF \normalend { \tex_count:D 39 ~ } @@ -9283,16 +9230,17 @@ \iow_new:N \g_tmpb_iow \exp_args:NNf \cs_new_protected:Npn \__iow_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newwrite } } +\str_new:N \l__iow_file_name_str \cs_new_protected:Npn \iow_open:Nn #1#2 { - \__file_name_sanitize:nN {#2} \l__file_base_name_str + \__kernel_file_name_sanitize:nN {#2} \l__iow_file_name_str \iow_close:N #1 \seq_gpop:NNTF \g__iow_streams_seq \l__iow_stream_tl - { \__iow_open_stream:NV #1 \l__file_base_name_str } + { \__iow_open_stream:NV #1 \l__iow_file_name_str } { \__iow_new:N #1 \tl_set:Nx \l__iow_stream_tl { \int_eval:n {#1} } - \__iow_open_stream:NV #1 \l__file_base_name_str + \__iow_open_stream:NV #1 \l__iow_file_name_str } } \cs_generate_variant:Nn \iow_open:Nn { c } @@ -9333,13 +9281,13 @@ \cs_new_protected:Npn \iow_shipout:Nn #1#2 { \tex_write:D #1 { \exp_not:n {#2} } } \cs_generate_variant:Nn \iow_shipout:Nn { c, Nx, cx } -\cs_new_protected:Npn \__iow_with:Nnn #1#2 +\cs_new_protected:Npn \__kernel_iow_with:Nnn #1#2 { \int_compare:nNnTF {#1} = {#2} { \use:n } - { \exp_args:No \__iow_with_aux:nNnn { \int_use:N #1 } #1 {#2} } + { \exp_args:No \__iow_with:nNnn { \int_use:N #1 } #1 {#2} } } -\cs_new_protected:Npn \__iow_with_aux:nNnn #1#2#3#4 +\cs_new_protected:Npn \__iow_with:nNnn #1#2#3#4 { \int_set:Nn #2 {#3} #4 @@ -9347,7 +9295,7 @@ } \cs_new_protected:Npn \iow_now:Nn #1#2 { - \__iow_with:Nnn \tex_newlinechar:D { `\^^J } + \__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J } { \tex_immediate:D \tex_write:D #1 { \exp_not:n {#2} } } } \cs_generate_variant:Nn \iow_now:Nn { c, Nx, cx } @@ -9367,8 +9315,9 @@ \cs_new_protected:Npn \__iow_set_indent:n #1 { \tl_set:Nx \l__iow_one_indent_tl - { \exp_args:No \__str_to_other_fast:n { \tl_to_str:n {#1} } } - \int_set:Nn \l__iow_one_indent_int { \str_count:N \l__iow_one_indent_tl } + { \exp_args:No \__kernel_str_to_other_fast:n { \tl_to_str:n {#1} } } + \int_set:Nn \l__iow_one_indent_int + { \str_count:N \l__iow_one_indent_tl } \exp_last_unbraced:NNo \cs_set:Npn \__iow_unindent:w \l__iow_one_indent_tl { } } @@ -9415,6 +9364,7 @@ \cs_new_protected:Npn \iow_wrap:nnnN #1#2#3#4 { \group_begin: + \use:c { conditionally@traceoff } \int_set:Nn \tex_escapechar:D { -1 } \cs_set:Npx \{ { \token_to_str:N \{ } \cs_set:Npx \# { \token_to_str:N \# } @@ -9441,7 +9391,7 @@ { \tl_set:Nx \l__iow_wrap_tl { - \exp_args:No \__str_to_other_fast:n \l__iow_wrap_tl + \exp_args:No \__kernel_str_to_other_fast:n \l__iow_wrap_tl \c__iow_wrap_end_marker_tl } \tl_set:Nx \l__iow_wrap_tl @@ -9500,7 +9450,7 @@ \tex_edef:D \l__iow_line_part_tl { \if_false: } \fi: #1 \exp_after:wN \__iow_wrap_line_loop:w - \__int_value:w \__int_eval:w + \int_value:w \int_eval:w } \cs_new:Npn \__iow_wrap_line_loop:w #1 ; #2#3#4#5#6#7#8#9 { @@ -9509,7 +9459,7 @@ \fi: #2 #3 #4 #5 #6 #7 #8 #9 \exp_after:wN \__iow_wrap_line_loop:w - \__int_value:w \__int_eval:w #1 - 8 ; + \int_value:w \int_eval:w #1 - 8 ; } \cs_new:Npn \__iow_wrap_line_aux:Nw #1#2#3 \exp_after:wN #4 ; { @@ -9533,7 +9483,7 @@ \cs_new:Npn \__iow_wrap_line_end:NnnnnnnnN #1#2#3#4#5#6#7#8#9 { #2 #3 #4 #5 #6 #7 #8 - \use_none:nnnnn \__int_eval:w 8 - ; #9 + \use_none:nnnnn \int_eval:w 8 - ; #9 \token_if_eq_charcode:NNTF \c_space_token #9 { \__iow_wrap_line_end:nw { } } { \if_false: { \fi: } \__iow_wrap_break:w #9 } @@ -9545,7 +9495,7 @@ \__iow_wrap_next_line:w } \cs_new:Npn \__iow_wrap_end_chunk:w - #1 \__int_eval:w #2 - #3 ; #4#5 \q_stop + #1 \int_eval:w #2 - #3 ; #4#5 \q_stop { \if_false: { \fi: } \exp_args:Nf \__iow_wrap_next:nw { \int_eval:n { #2 - #4 } } @@ -9641,13 +9591,235 @@ } \tl_clear:N \l__iow_line_tl } -\cs_set_protected:Npn \__iow_tmp:w #1 +\cs_new:Npn \__iow_wrap_trim:N #1 + { \tl_if_empty:NF #1 { \exp_after:wN \__iow_wrap_trim:w #1 \q_stop } } +\exp_last_unbraced:NNNNo + \cs_new:Npn \__iow_wrap_trim:w #1 \c_catcode_other_space_tl \q_stop {#1} +\ior_new:N \g__file_internal_ior +\str_new:N \g_file_curr_dir_str +\str_new:N \g_file_curr_ext_str +\str_new:N \g_file_curr_name_str +\cs_if_exist:NT \@currname + { \str_gset_eq:NN \g_file_curr_name_str \@currname } +\seq_new:N \g__file_stack_seq +\group_begin: + \cs_set_protected:Npn \__file_tmp:w #1#2#3 + { + \tl_if_blank:nTF {#1} + { + \cs_set:Npn \__file_tmp:w ##1 " ##2 " ##3 \q_stop + { { } {##2} { } } + \seq_gput_right:Nx \g__file_stack_seq + { + \exp_after:wN \__file_tmp:w \tex_jobname:D + " \tex_jobname:D " \q_stop + } + } + { + \seq_gput_right:Nn \g__file_stack_seq { { } {#1} {#2} } + \__file_tmp:w + } + } + \cs_if_exist:NT \@currnamestack + { \exp_after:wN \__file_tmp:w \@currnamestack } +\group_end: +\seq_new:N \g__file_record_seq +\tl_new:N \l__file_tmp_tl +\str_new:N \l__file_base_name_str +\str_new:N \l__file_full_name_str +\str_new:N \l__file_dir_str +\str_new:N \l__file_ext_str +\str_new:N \l__file_name_str +\seq_new:N \l_file_search_path_seq +\seq_new:N \l__file_tmp_seq +\cs_new_protected:Npn \__kernel_file_name_sanitize:nN #1#2 + { + \group_begin: + \seq_map_inline:Nn \l_char_active_seq + { + \tl_set:Nx \l__file_tmp_tl { \iow_char:N ##1 } + \char_set_active_eq:NN ##1 \l__file_tmp_tl + } + \tl_set:Nx \l__file_tmp_tl {#1} + \tl_set:Nx \l__file_tmp_tl + { \tl_to_str:N \l__file_tmp_tl } + \exp_args:NNNV \group_end: + \str_set:Nn #2 \l__file_tmp_tl + } +\cs_new_protected:Npn \__file_name_quote:nN #1#2 { - \cs_new:Npn \__iow_wrap_trim:N ##1 - { \tl_if_empty:NF ##1 { \exp_after:wN \__iow_wrap_trim:w ##1 \q_stop } } - \cs_new:Npn \__iow_wrap_trim:w ##1 #1 \q_stop {##1} + \str_set:Nx #2 {#1} + \int_if_even:nF + { 0 \tl_map_function:NN #2 \__file_name_quote_aux:n } + { + \__kernel_msg_error:nnx + { kernel } { unbalanced-quote-in-filename } {#2} + } + \tl_remove_all:Nn #2 { " } + \tl_if_in:NnT #2 { ~ } + { \str_set:Nx #2 { " \exp_not:V #2 " } } + } +\cs_new:Npn \__file_name_quote_aux:n #1 + { \token_if_eq_charcode:NNT #1 " { + 1 } } +\cs_new_protected:Npn \file_get_full_name:nN #1#2 + { + \__kernel_file_name_sanitize:nN {#1} \l__file_base_name_str + \__file_get_full_name_search:nN { } \use:n + \seq_map_inline:Nn \l_file_search_path_seq + { \__file_get_full_name_search:nN { ##1 / } \seq_map_break:n } + \cs_if_exist:NT \input@path + { + \tl_map_inline:Nn \input@path + { \__file_get_full_name_search:nN { ##1 } \tl_map_break:n } + } + \str_clear:N \l__file_full_name_str + \prg_break_point: + \str_if_empty:NF \l__file_full_name_str + { + \exp_args:NV \file_parse_full_name:nNNN \l__file_full_name_str + \l__file_dir_str \l__file_name_str \l__file_ext_str + \str_if_empty:NT \l__file_ext_str + { + \__kernel_ior_open:No \g__file_internal_ior + { \l__file_full_name_str .tex } + \ior_if_eof:NF \g__file_internal_ior + { \str_put_right:Nn \l__file_full_name_str { .tex } } + } + } + \str_set_eq:NN #2 \l__file_full_name_str + \ior_close:N \g__file_internal_ior + } +\cs_generate_variant:Nn \file_get_full_name:nN { V } +\cs_new_protected:Npn \__file_get_full_name_search:nN #1#2 + { + \__file_name_quote:nN + { \tl_to_str:n {#1} \l__file_base_name_str } + \l__file_full_name_str + \__kernel_ior_open:No \g__file_internal_ior \l__file_full_name_str + \ior_if_eof:NF \g__file_internal_ior { #2 { \prg_break: } } + } +\prg_new_protected_conditional:Npnn \file_if_exist:n #1 { T , F , TF } + { + \file_get_full_name:nN {#1} \l__file_full_name_str + \str_if_empty:NTF \l__file_full_name_str + { \prg_return_false: } + { \prg_return_true: } + } +\cs_new_protected:Npn \__kernel_file_missing:n #1 + { + \__kernel_file_name_sanitize:nN {#1} \l__file_base_name_str + \__kernel_msg_error:nnx { kernel } { file-not-found } + { \l__file_base_name_str } + } +\cs_new_protected:Npn \file_input:n #1 + { + \file_get_full_name:nN {#1} \l__file_full_name_str + \str_if_empty:NTF \l__file_full_name_str + { \__kernel_file_missing:n {#1} } + { \__file_input:V \l__file_full_name_str } + } +\cs_new_protected:Npn \__file_input:n #1 + { + \clist_if_exist:NTF \@filelist + { \@addtofilelist {#1} } + { \seq_gput_right:Nn \g__file_record_seq {#1} } + \__file_input_push:n {#1} + \tex_input:D #1 \c_space_tl + \__file_input_pop: + } +\cs_generate_variant:Nn \__file_input:n { V } +\cs_new_protected:Npn \__file_input_push:n #1 + { + \seq_gpush:Nx \g__file_stack_seq + { + { \g_file_curr_dir_str } + { \g_file_curr_name_str } + { \g_file_curr_ext_str } + } + \file_parse_full_name:nNNN {#1} + \l__file_dir_str \l__file_name_str \l__file_ext_str + \str_gset_eq:NN \g_file_curr_dir_str \l__file_dir_str + \str_gset_eq:NN \g_file_curr_name_str \l__file_name_str + \str_gset_eq:NN \g_file_curr_ext_str \l__file_ext_str + } +\cs_new_eq:NN \__kernel_file_input_push:n \__file_input_push:n +\cs_new_protected:Npn \__file_input_pop: + { + \seq_gpop:NN \g__file_stack_seq \l__file_tmp_tl + \exp_after:wN \__file_input_pop:nnn \l__file_tmp_tl + } +\cs_new_eq:NN \__kernel_file_input_pop: \__file_input_pop: +\cs_new_protected:Npn \__file_input_pop:nnn #1#2#3 + { + \str_gset:Nn \g_file_curr_dir_str {#1} + \str_gset:Nn \g_file_curr_name_str {#2} + \str_gset:Nn \g_file_curr_ext_str {#3} + } +\cs_new_protected:Npn \file_parse_full_name:nNNN #1#2#3#4 + { + \exp_after:wN \__file_parse_full_name_auxi:w + \tl_to_str:n { #1 " #1 " } \q_stop #2#3#4 + } +\cs_new_protected:Npn \__file_parse_full_name_auxi:w + #1 " #2 " #3 \q_stop #4#5#6 + { + \__file_parse_full_name_split:nNNNTF {#2} / #4 #5 + { \str_if_empty:NT #4 { \str_set:Nn #4 { / } } } + { } + \exp_args:No \__file_parse_full_name_split:nNNNTF {#5} . #5 #6 + { \str_put_left:Nn #6 { . } } + { + \str_set_eq:NN #5 #6 + \str_clear:N #6 + } + } +\cs_new_protected:Npn \__file_parse_full_name_split:nNNNTF #1#2#3#4 + { + \cs_set_protected:Npn \__file_tmp:w ##1 ##2 #2 ##3 \q_stop + { + \tl_if_empty:nTF {##3} + { + \str_set:Nn #4 {##2} + \tl_if_empty:nTF {##1} + { + \str_clear:N #3 + \use_ii:nn + } + { + \str_set:Nx #3 { \str_tail:n {##1} } + \use_i:nn + } + } + { \__file_tmp:w { ##1 #2 ##2 } ##3 \q_stop } + } + \__file_tmp:w { } #1 #2 \q_stop + } +\cs_new_protected:Npn \file_show_list: { \__file_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \file_log_list: { \__file_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \__file_list:N #1 + { + \seq_clear:N \l__file_tmp_seq + \clist_if_exist:NT \@filelist + { + \exp_args:NNx \seq_set_from_clist:Nn \l__file_tmp_seq + { \tl_to_str:N \@filelist } + } + \seq_concat:NNN \l__file_tmp_seq \l__file_tmp_seq \g__file_record_seq + \seq_remove_duplicates:N \l__file_tmp_seq + #1 { LaTeX/kernel } { file-list } + { \seq_map_function:NN \l__file_tmp_seq \__file_list_aux:n } + { } { } { } + } +\cs_new:Npn \__file_list_aux:n #1 { \iow_newline: #1 } +\AtBeginDocument + { + \exp_args:NNx \seq_set_from_clist:Nn \l__file_tmp_seq + { \tl_to_str:N \@filelist } + \seq_gconcat:NNN + \g__file_record_seq + \g__file_record_seq + \l__file_tmp_seq } -\exp_args:NV \__iow_tmp:w \c_catcode_other_space_tl \__kernel_msg_new:nnnn { kernel } { file-not-found } { File~'#1'~not~found. } { @@ -9690,7 +9862,7 @@ \tl_gset:Nn \g_file_current_name_tl { \g_file_curr_name_str } \__kernel_deprecation_code:nn { - \__deprecation_error:Nnn \g_file_current_name_tl + \__kernel_deprecation_error:Nnn \g_file_current_name_tl { \g_file_curr_name_str } { 2018-12-31 } } { \tex_def:D \g_file_current_name_tl { \g_file_curr_name_str } } @@ -9698,7 +9870,7 @@ { \seq_put_right:Nn \l_file_search_path_seq } \cs_new_protected:Npn \file_path_include:n #1 { - \__file_name_sanitize:nN {#1} \l__file_full_name_str + \__kernel_file_name_sanitize:nN {#1} \l__file_full_name_str \seq_if_in:NVF \l_file_search_path_seq \l__file_full_name_str { \seq_put_right:NV \l_file_search_path_seq \l__file_full_name_str } } @@ -9706,7 +9878,7 @@ { \seq_remove_all:Nn \l_file_search_path_seq } \cs_new_protected:Npn \file_path_remove:n #1 { - \__file_name_sanitize:nN {#1} \l__file_full_name_str + \__kernel_file_name_sanitize:nN {#1} \l__file_full_name_str \seq_remove_all:NV \l_file_search_path_seq \l__file_full_name_str } \__kernel_patch_deprecation:nnNNpn { 2018-12-31 } { \file_get_full_name:nN } @@ -9733,7 +9905,7 @@ \cs_new_eq:NN \__dim_eval_end: \tex_relax:D \cs_new_protected:Npn \dim_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs:w newdimen \cs_end: #1 } \cs_generate_variant:Nn \dim_new:N { c } @@ -9790,7 +9962,10 @@ { \tex_advance:D #1 by \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } \__dim_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \dim_gadd:Nn #1#2 - { \tex_global:D \tex_advance:D #1 by \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } + { + \tex_global:D \tex_advance:D #1 by + \__dim_eval:w #2 \__dim_eval_end: \scan_stop: + } \cs_generate_variant:Nn \dim_add:Nn { c } \cs_generate_variant:Nn \dim_gadd:Nn { c } \__dim_tmp:w \__kernel_chk_var_local:N @@ -9798,7 +9973,10 @@ { \tex_advance:D #1 by - \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } \__dim_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \dim_gsub:Nn #1#2 - { \tex_global:D \tex_advance:D #1 by - \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } + { + \tex_global:D \tex_advance:D #1 by + -\__dim_eval:w #2 \__dim_eval_end: \scan_stop: + } \cs_generate_variant:Nn \dim_sub:Nn { c } \cs_generate_variant:Nn \dim_gsub:Nn { c } \__kernel_patch_args:nNNpn @@ -9847,7 +10025,7 @@ \cs_new:Npn \dim_ratio:nn #1#2 { \__dim_ratio:n {#1} / \__dim_ratio:n {#2} } \cs_new:Npn \__dim_ratio:n #1 - { \__int_value:w \__dim_eval:w (#1) \__dim_eval_end: } + { \int_value:w \__dim_eval:w (#1) \__dim_eval_end: } \__kernel_patch_conditional_args:nNNpnn { { \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_compare:nNn } @@ -9862,9 +10040,9 @@ \prg_new_conditional:Npnn \dim_compare:n #1 { p , T , F , TF } { \exp_after:wN \__dim_compare:w - \dim_use:N \__dim_eval:w #1 \__prg_compare_error: + \dim_use:N \__dim_eval:w #1 \__dim_compare_error: } -\cs_new:Npn \__dim_compare:w #1 \__prg_compare_error: +\cs_new:Npn \__dim_compare:w #1 \__dim_compare_error: { \exp_after:wN \if_false: \exp:w \exp_end_continue_f:w \__dim_compare:wNN #1 ? { = \__dim_compare_end:w \else: } \q_stop @@ -9893,6 +10071,12 @@ #1 \reverse_if:N #2 > #3 = { #1 #2 < #3 } \cs_new:Npn \__dim_compare_end:w #1 \prg_return_false: #2 \q_stop { #1 \prg_return_false: \else: \prg_return_true: \fi: } +\cs_new_protected:Npn \__dim_compare_error: + { + \if_int_compare:w \c_zero \c_zero \fi: + = + \__dim_compare_error: + } \cs_new:Npn \dim_case:nnTF #1 { \exp:w @@ -9921,7 +10105,8 @@ { \__dim_case_end:nw {#3} } { \__dim_case:nw {#1} } } -\cs_new_eq:NN \__dim_case_end:nw \__prg_case_end:nw +\cs_new:Npn \__dim_case_end:nw #1#2#3 \q_mark #4#5 \q_stop + { \exp_end: #1 #4 } \cs_new:Npn \dim_while_do:nn #1#2 { \dim_compare:nT {#1} @@ -9980,9 +10165,18 @@ } \__kernel_patch_args:nNNpn { - { \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_step_function:nnnN } - { \__kernel_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_step_function:nnnN } - { \__kernel_chk_expr:nNnN {#3} \__dim_eval:w { } \dim_step_function:nnnN } + { + \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } + \dim_step_function:nnnN + } + { + \__kernel_chk_expr:nNnN {#2} \__dim_eval:w { } + \dim_step_function:nnnN + } + { + \__kernel_chk_expr:nNnN {#3} \__dim_eval:w { } + \dim_step_function:nnnN + } } \cs_new:Npn \dim_step_function:nnnN #1#2#3 { @@ -10016,17 +10210,17 @@ } \cs_new_protected:Npn \dim_step_inline:nnnn { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:NNc \__dim_step:NNnnnn \cs_gset_protected:Npn - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __dim_map_ \int_use:N \g__kernel_prg_map_int :w } } \cs_new_protected:Npn \dim_step_variable:nnnNn #1#2#3#4#5 { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:NNc \__dim_step:NNnnnn \cs_gset_protected:Npx - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __dim_map_ \int_use:N \g__kernel_prg_map_int :w } {#1}{#2}{#3} { \tl_set:Nn \exp_not:N #4 {##1} @@ -10037,15 +10231,12 @@ { #1 #2 ##1 {#6} \dim_step_function:nnnN {#3} {#4} {#5} #2 - \__prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__kernel_prg_map_int } } \__kernel_patch_args:nNNpn { { \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_eval:n } } \cs_new:Npn \dim_eval:n #1 { \dim_use:N \__dim_eval:w #1 \__dim_eval_end: } -\__kernel_patch_args:nNNpn - { { \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } \__dim_eval:n } } -\cs_new:Npn \__dim_eval:n #1 { \__dim_eval:w #1 \__dim_eval_end: } \cs_new_eq:NN \dim_use:N \tex_the:D \cs_new:Npn \dim_use:c #1 { \tex_the:D \cs:w #1 \cs_end: } \__kernel_patch_args:nNNpn @@ -10068,9 +10259,14 @@ \cs_new:Npn \dim_to_decimal_in_bp:n #1 { \dim_to_decimal:n { ( #1 ) * 800 / 803 } } \__kernel_patch_args:nNNpn - { { \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_to_decimal_in_sp:n } } + { + { + \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { } + \dim_to_decimal_in_sp:n + } + } \cs_new:Npn \dim_to_decimal_in_sp:n #1 - { \int_eval:n { \__dim_eval:w #1 \__dim_eval_end: } } + { \int_value:w \__dim_eval:w #1 \__dim_eval_end: } \cs_new:Npn \dim_to_decimal_in_unit:nn #1#2 { \dim_to_decimal:n @@ -10095,7 +10291,7 @@ \dim_new:N \g_tmpb_dim \cs_new_protected:Npn \skip_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs:w newskip \cs_end: #1 } \cs_generate_variant:Nn \skip_new:N { c } @@ -10122,7 +10318,7 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \skip_if_exist:c \cs_if_exist:c { TF , T , F , p } -\cs_set_protected:Npn \__dim_tmp:w #1#2#3 +\cs_set_protected:Npn \__skip_tmp:w #1#2#3 { \__kernel_patch_args:nnnNNpn { #1 ##1 } @@ -10130,10 +10326,10 @@ { {##1} { \__kernel_chk_expr:nNnN {##2} \etex_glueexpr:D { } #3 } } #2 #3 } -\__dim_tmp:w \__kernel_chk_var_local:N +\__skip_tmp:w \__kernel_chk_var_local:N \cs_new_protected:Npn \skip_set:Nn #1#2 { #1 ~ \etex_glueexpr:D #2 \scan_stop: } -\__dim_tmp:w \__kernel_chk_var_global:N +\__skip_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \skip_gset:Nn #1#2 { \tex_global:D #1 ~ \etex_glueexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \skip_set:Nn { c } @@ -10142,33 +10338,29 @@ \cs_generate_variant:Nn \skip_set_eq:NN { c , Nc , cc } \cs_new_protected:Npn \skip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \skip_gset_eq:NN { c , Nc , cc } -\__dim_tmp:w \__kernel_chk_var_local:N +\__skip_tmp:w \__kernel_chk_var_local:N \cs_new_protected:Npn \skip_add:Nn #1#2 { \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: } -\__dim_tmp:w \__kernel_chk_var_global:N +\__skip_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \skip_gadd:Nn #1#2 { \tex_global:D \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \skip_add:Nn { c } \cs_generate_variant:Nn \skip_gadd:Nn { c } -\__dim_tmp:w \__kernel_chk_var_local:N +\__skip_tmp:w \__kernel_chk_var_local:N \cs_new_protected:Npn \skip_sub:Nn #1#2 { \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: } -\__dim_tmp:w \__kernel_chk_var_global:N +\__skip_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \skip_gsub:Nn #1#2 { \tex_global:D \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \skip_sub:Nn { c } \cs_generate_variant:Nn \skip_gsub:Nn { c } \prg_new_conditional:Npnn \skip_if_eq:nn #1#2 { p , T , F , TF } { - \if_int_compare:w - \__str_if_eq_x:nn { \skip_eval:n { #1 } } { \skip_eval:n { #2 } } - = 0 \exp_stop_f: - \prg_return_true: - \else: - \prg_return_false: - \fi: + \str_if_eq_x:nnTF { \skip_eval:n { #1 } } { \skip_eval:n { #2 } } + { \prg_return_true: } + { \prg_return_false: } } -\cs_set_protected:Npn \__dim_tmp:w #1 +\cs_set_protected:Npn \__skip_tmp:w #1 { \__kernel_patch_conditional_args:nNNpnn { @@ -10185,7 +10377,7 @@ } \cs_new:Npn \__skip_if_finite:wwNw ##1 #1 ##2 ; ##3 ##4 \q_stop {##3} } -\exp_args:No \__dim_tmp:w { \tl_to_str:n { fil } } +\exp_args:No \__skip_tmp:w { \tl_to_str:n { fil } } \__kernel_patch_args:nNNpn { { \__kernel_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_eval:n } } \cs_new:Npn \skip_eval:n #1 @@ -10194,12 +10386,22 @@ \cs_new:Npn \skip_use:c #1 { \tex_the:D \cs:w #1 \cs_end: } \cs_new_eq:NN \skip_horizontal:N \tex_hskip:D \__kernel_patch_args:nNNpn - { { \__kernel_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_horizontal:n } } + { + { + \__kernel_chk_expr:nNnN {#1} \etex_glueexpr:D { } + \skip_horizontal:n + } + } \cs_new:Npn \skip_horizontal:n #1 { \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop: } \cs_new_eq:NN \skip_vertical:N \tex_vskip:D \__kernel_patch_args:nNNpn - { { \__kernel_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_vertical:n } } + { + { + \__kernel_chk_expr:nNnN {#1} \etex_glueexpr:D { } + \skip_vertical:n + } + } \cs_new:Npn \skip_vertical:n #1 { \skip_vertical:N \etex_glueexpr:D #1 \scan_stop: } \cs_generate_variant:Nn \skip_horizontal:N { c } @@ -10220,7 +10422,7 @@ \skip_new:N \g_tmpb_skip \cs_new_protected:Npn \muskip_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs:w newmuskip \cs_end: #1 } \cs_generate_variant:Nn \muskip_new:N { c } @@ -10249,7 +10451,7 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \muskip_if_exist:c \cs_if_exist:c { TF , T , F , p } -\cs_set_protected:Npn \__dim_tmp:w #1#2#3 +\cs_set_protected:Npn \__skip_tmp:w #1#2#3 { \__kernel_patch_args:nnnNNpn { #1 ##1 } @@ -10263,10 +10465,10 @@ } #2 #3 } -\__dim_tmp:w \__kernel_chk_var_local:N +\__skip_tmp:w \__kernel_chk_var_local:N \cs_new_protected:Npn \muskip_set:Nn #1#2 { #1 ~ \etex_muexpr:D #2 \scan_stop: } -\__dim_tmp:w \__kernel_chk_var_global:N +\__skip_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \muskip_gset:Nn #1#2 { \tex_global:D #1 ~ \etex_muexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \muskip_set:Nn { c } @@ -10277,18 +10479,18 @@ \__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } \cs_new_protected:Npn \muskip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \muskip_gset_eq:NN { c , Nc , cc } -\__dim_tmp:w \__kernel_chk_var_local:N +\__skip_tmp:w \__kernel_chk_var_local:N \cs_new_protected:Npn \muskip_add:Nn #1#2 { \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: } -\__dim_tmp:w \__kernel_chk_var_global:N +\__skip_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \muskip_gadd:Nn #1#2 { \tex_global:D \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \muskip_add:Nn { c } \cs_generate_variant:Nn \muskip_gadd:Nn { c } -\__dim_tmp:w \__kernel_chk_var_local:N +\__skip_tmp:w \__kernel_chk_var_local:N \cs_new_protected:Npn \muskip_sub:Nn #1#2 { \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: } -\__dim_tmp:w \__kernel_chk_var_global:N +\__skip_tmp:w \__kernel_chk_var_global:N \cs_new_protected:Npn \muskip_gsub:Nn #1#2 { \tex_global:D \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \muskip_sub:Nn { c } @@ -10400,7 +10602,9 @@ \if_meaning:w \l__keyval_key_tl \c_empty_tl \exp_after:wN \__keyval_split_tidy:w \else: - \exp_after:wN \__keyval_split_value:NNw \exp_after:wN #1 \exp_after:wN #2 + \exp_after:wN \__keyval_split_value:NNw + \exp_after:wN #1 + \exp_after:wN #2 \exp_after:wN \q_mark \fi: } @@ -10410,7 +10614,9 @@ \cs_set:Npx \__keyval_action: { \exp_not:N #1 { \exp_not:o \l__keyval_key_tl } } \else: - \if:w \scan_stop: \etex_detokenize:D \exp_after:wN { \use_none:n #4 } + \if:w + \scan_stop: + \__kernel_tl_to_str:w \exp_after:wN { \use_none:n #4 } \scan_stop: \__keyval_def:Nn \l__keyval_value_tl {#3} \cs_set:Npx \__keyval_action: @@ -10421,14 +10627,19 @@ } \else: \cs_set:Npn \__keyval_action: - { \__kernel_msg_error:nn { kernel } { misplaced-equals-sign } } + { + \__kernel_msg_error:nn { kernel } + { misplaced-equals-sign } + } \fi: \fi: \__keyval_action: } \cs_new_protected:Npn \__keyval_split_tidy:w #1 \q_stop { - \if:w \scan_stop: \etex_detokenize:D \exp_after:wN { \use_none:n #1 } + \if:w + \scan_stop: + \__kernel_tl_to_str:w \exp_after:wN { \use_none:n #1 } \scan_stop: \else: \exp_after:wN \__keyval_empty_key: @@ -10438,9 +10649,12 @@ \cs_new_protected:Npn \__keyval_empty_key: { \__kernel_msg_error:nn { kernel } { misplaced-equals-sign } } \cs_new_protected:Npn \__keyval_def:Nn #1#2 - { \tl_set:Nx #1 { \__tl_trim_spaces:nn {#2} \__keyval_def_aux:n } } + { + \tl_set:Nx #1 + { \tl_trim_spaces_apply:oN { \use_none:n #2 } \__keyval_def_aux:n } + } \cs_new:Npn \__keyval_def_aux:n #1 - { \exp_after:wN \__keyval_def_aux:w #1 \q_stop } + { \__keyval_def_aux:w #1 \q_stop } \cs_new:Npn \__keyval_def_aux:w #1 \q_stop { \exp_not:n {#1} } \__kernel_msg_new:nnnn { kernel } { misplaced-equals-sign } { Misplaced~equals~sign~in~key-value~input~\msg_line_number: } @@ -10497,7 +10711,7 @@ { \tl_if_empty:NF \l__keys_property_tl { - \__kernel_msg_error:nnxx { kernel } { property-unknown } + \__kernel_msg_error:nnxx { kernel } { key-property-unknown } { \l__keys_property_tl } { \l_keys_path_tl } } } @@ -10505,7 +10719,8 @@ \cs_new_protected:Npn \__keys_property_find:n #1 { \tl_set:Nx \l__keys_property_tl { \__keys_remove_spaces:n {#1} } - \exp_after:wN \__keys_property_find:w \l__keys_property_tl . . \q_stop {#1} + \exp_after:wN \__keys_property_find:w \l__keys_property_tl . . + \q_stop {#1} } \cs_new_protected:Npn \__keys_property_find:w #1 . #2 . #3 \q_stop #4 { @@ -10552,18 +10767,15 @@ { \use:c { \c__keys_props_root_tl \l__keys_property_tl } } { \__kernel_msg_error:nnxx { kernel } - { property-requires-value } { \l__keys_property_tl } + { key-property-requires-value } { \l__keys_property_tl } { \l_keys_path_tl } } } { \use:c { \c__keys_props_root_tl \l__keys_property_tl } {#1} } } -\use:x - { - \cs_new:Npn \exp_not:N \__keys_define_code:w - ##1 \c_colon_str ##2 \exp_not:N \q_stop - } - { \tl_if_empty:nTF {#2} } +\exp_last_unbraced:NNNNo + \cs_new:Npn \__keys_define_code:w #1 \c_colon_str #2 \q_stop + { \tl_if_empty:nTF {#2} } \cs_new_protected:Npn \__keys_bool_set:Nn #1#2 { \bool_if_exist:NF #1 { \bool_new:N #1 } @@ -10606,7 +10818,10 @@ { \c__keys_type_root_tl \__keys_parent:o \l_keys_path_tl } { \str_if_eq_x:nnTF - { \exp_not:v { \c__keys_type_root_tl \__keys_parent:o \l_keys_path_tl } } + { + \exp_not:v + { \c__keys_type_root_tl \__keys_parent:o \l_keys_path_tl } + } { choice } { \__kernel_msg_error:nnxx { kernel } { nested-choice-key } @@ -10618,7 +10833,8 @@ } \cs_new_protected:Npn \__keys_choice_make_aux:N #1 { - \cs_set_nopar:cpn { \c__keys_type_root_tl \l_keys_path_tl } { choice } + \cs_set_nopar:cpn { \c__keys_type_root_tl \l_keys_path_tl } + { choice } \__keys_cmd_set:nn { \l_keys_path_tl } { #1 {##1} } \__keys_cmd_set:nn { \l_keys_path_tl / unknown } { @@ -10637,7 +10853,8 @@ \clist_map_inline:nn {#2} { \int_incr:N \l_keys_choice_int - \__keys_cmd_set:nx { \l_keys_path_tl / \__keys_remove_spaces:n {##1} } + \__keys_cmd_set:nx + { \l_keys_path_tl / \__keys_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 @@ -10734,7 +10951,8 @@ } } { - \__kernel_msg_error:nnx { kernel } { property-boolean-values-only } + \__kernel_msg_error:nnx { kernel } + { key-property-boolean-values-only } { .value_ #1 :n } } } @@ -11110,7 +11328,8 @@ } } { - \cs_if_exist:cTF { \c__keys_code_root_tl \l__keys_module_tl / unknown } + \cs_if_exist:cTF + { \c__keys_code_root_tl \l__keys_module_tl / unknown } { \cs:w \c__keys_code_root_tl \l__keys_module_tl / unknown \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } @@ -11189,7 +11408,10 @@ \exp_args:Nnf \msg_show_item_unbraced:nn { code } { \exp_args:Nc \token_get_replacement_spec:N - { \c__keys_code_root_tl \__keys_remove_spaces:n { #2 / #3 } } + { + \c__keys_code_root_tl + \__keys_remove_spaces:n { #2 / #3 } + } } } } @@ -11204,15 +11426,6 @@ The~key~'#1'~only~accepts~predefined~values,~ and~'#2'~is~not~one~of~these. } -\__kernel_msg_new:nnnn { kernel } { key-no-property } - { No~property~given~in~definition~of~key~'#1'. } - { - \c__msg_coding_error_text_tl - Inside~\keys_define:nn each~key~name~ - needs~a~property: \\ \\ - \iow_indent:n { #1 .<property> } \\ \\ - LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property. - } \__kernel_msg_new:nnnn { kernel } { key-unknown } { The~key~'#1'~is~unknown~and~is~being~ignored. } { @@ -11225,26 +11438,6 @@ The~key~'#1'~cannot~be~defined~as~a~choice~as~the~parent~key~'#2'~is~ itself~a~choice. } -\__kernel_msg_new:nnnn { kernel } { property-boolean-values-only } - { The~property~'#1'~accepts~boolean~values~only. } - { - \c__msg_coding_error_text_tl - The~property~'#1'~only~accepts~the~values~'true'~and~'false'. - } -\__kernel_msg_new:nnnn { kernel } { property-requires-value } - { The~property~'#1'~requires~a~value. } - { - \c__msg_coding_error_text_tl - LaTeX~was~asked~to~set~property~'#1'~for~key~'#2'.\\ - No~value~was~given~for~the~property,~and~one~is~required. - } -\__kernel_msg_new:nnnn { kernel } { property-unknown } - { The~key~property~'#1'~is~unknown. } - { - \c__msg_coding_error_text_tl - LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':~ - this~property~is~not~defined. - } \__kernel_msg_new:nnnn { kernel } { value-forbidden } { The~key~'#1'~does~not~take~a~value. } { @@ -11266,6 +11459,9 @@ } %% File: l3fp.dtx Copyright (C) 2011-2018 The LaTeX3 Project %% File: l3fp-aux.dtx Copyright(C) 2011-2018 The LaTeX3 Project +\cs_new_eq:NN \__fp_int_eval:w \etex_numexpr:D +\cs_new_eq:NN \__fp_int_eval_end: \scan_stop: +\cs_new_eq:NN \__fp_int_to_roman:w \tex_romannumeral:D \cs_new:Npn \__fp_use_none_stop_f:n #1 { \exp_stop_f: } \cs_new:Npn \__fp_use_s:n #1 { #1; } \cs_new:Npn \__fp_use_s:nn #1#2 { #1#2; } @@ -11278,16 +11474,16 @@ \cs_new:Npn \__fp_use_i:www #1; #2; #3; { #1; } \cs_new_protected:Npn \__fp_misused:n #1 { \__kernel_msg_error:nnx { kernel } { misused-fp } { \fp_to_tl:n {#1} } } -\__scan_new:N \s__fp +\scan_new:N \s__fp \cs_new_protected:Npn \__fp_chk:w #1 ; { \__fp_misused:n { \s__fp \__fp_chk:w #1 ; } } -\__scan_new:N \s__fp_mark -\__scan_new:N \s__fp_stop -\__scan_new:N \s__fp_invalid -\__scan_new:N \s__fp_underflow -\__scan_new:N \s__fp_overflow -\__scan_new:N \s__fp_division -\__scan_new:N \s__fp_exact +\scan_new:N \s__fp_mark +\scan_new:N \s__fp_stop +\scan_new:N \s__fp_invalid +\scan_new:N \s__fp_underflow +\scan_new:N \s__fp_overflow +\scan_new:N \s__fp_division +\scan_new:N \s__fp_exact \tl_const:Nn \c_zero_fp { \s__fp \__fp_chk:w 0 0 \s__fp_exact ; } \tl_const:Nn \c_minus_zero_fp { \s__fp \__fp_chk:w 0 2 \s__fp_exact ; } \tl_const:Nn \c_inf_fp { \s__fp \__fp_chk:w 2 0 \s__fp_exact ; } @@ -11320,7 +11516,7 @@ \fi: } \cs_new:Npn \__fp_neg_sign:N #1 - { \__int_eval:w 2 - #1 \__int_eval_end: } + { \__fp_int_eval:w 2 - #1 \__fp_int_eval_end: } \cs_new:Npn \__fp_sanitize:Nw #1 #2; { \if_case:w @@ -11370,16 +11566,16 @@ { \exp_after:wN \__fp_exp_after_normal:Nwwwww \exp_after:wN #2 - \__int_value:w #3 \exp_after:wN ; - \__int_value:w 1 #4 \exp_after:wN ; - \__int_value:w 1 #5 \exp_after:wN ; - \__int_value:w 1 #6 \exp_after:wN ; - \__int_value:w 1 #7 \exp_after:wN ; #1 + \int_value:w #3 \exp_after:wN ; + \int_value:w 1 #4 \exp_after:wN ; + \int_value:w 1 #5 \exp_after:wN ; + \int_value:w 1 #6 \exp_after:wN ; + \int_value:w 1 #7 \exp_after:wN ; #1 } \cs_new:Npn \__fp_exp_after_normal:Nwwwww #1 #2; 1 #3 ; 1 #4 ; 1 #5 ; 1 #6 ; { \s__fp \__fp_chk:w 1 #1 {#2} {#3} {#4} {#5} {#6} ; } -\__scan_new:N \s__fp_tuple +\scan_new:N \s__fp_tuple \cs_new_protected:Npn \__fp_tuple_chk:w #1 ; { \__fp_misused:n { \s__fp_tuple \__fp_tuple_chk:w #1 ; } } \tl_const:Nn \c__fp_empty_tuple_fp @@ -11388,24 +11584,24 @@ { \__fp_tuple_count:w \s__fp_tuple \__fp_tuple_chk:w {#1} ; } \cs_new:Npn \__fp_tuple_count:w \s__fp_tuple \__fp_tuple_chk:w #1 ; { - \__int_value:w \__int_eval:w 0 - \__fp_tuple_count_loop:Nw #1 { ? \__prg_break: } ; - \__prg_break_point: - \__int_eval_end: + \int_value:w \__fp_int_eval:w 0 + \__fp_tuple_count_loop:Nw #1 { ? \prg_break: } ; + \prg_break_point: + \__fp_int_eval_end: } \cs_new:Npn \__fp_tuple_count_loop:Nw #1#2; { \use_none:n #1 + 1 \__fp_tuple_count_loop:Nw } \cs_new:Npn \__fp_if_type_fp:NTwFw #1 \s__fp #2 #3 \q_stop {#2} \cs_new:Npn \__fp_array_if_all_fp:nTF #1 { - \__fp_array_if_all_fp_loop:w #1 { \s__fp \__prg_break: } ; - \__prg_break_point: \use_i:nn + \__fp_array_if_all_fp_loop:w #1 { \s__fp \prg_break: } ; + \prg_break_point: \use_i:nn } \cs_new:Npn \__fp_array_if_all_fp_loop:w #1#2 ; { \__fp_if_type_fp:NTwFw #1 \__fp_array_if_all_fp_loop:w - \s__fp { \__prg_break:n \use_iii:nnn } + \s__fp { \prg_break:n \use_iii:nnn } \q_stop } \cs_new:Npn \__fp_type_from_scan:N #1 @@ -11421,12 +11617,9 @@ \exp_not:N \token_to_str:N #1 \exp_not:N \q_mark \tl_to_str:n { s__fp _? } \exp_not:N \q_mark \exp_not:N \q_stop } -\use:x - { - \cs_new:Npn \exp_not:N \__fp_type_from_scan:w - ##1 \tl_to_str:n { s__fp } ##2 \exp_not:N \q_mark ##3 \exp_not:N \q_stop - {##2} - } +\exp_last_unbraced:NNNNo + \cs_new:Npn \__fp_type_from_scan:w #1 + { \tl_to_str:n { s__fp } } #2 \q_mark #3 \q_stop {#2} \cs_new:Npn \__fp_change_func_type:NNN #1#2#3 { \__fp_if_type_fp:NTwFw @@ -11465,7 +11658,8 @@ \cs_new_eq:NN \__fp_exp_after_stop_f:nw \use_none:nn \cs_new:Npn \__fp_exp_after_tuple_o:w { \__fp_exp_after_tuple_f:nw { \exp_after:wN \exp_stop_f: } } -\cs_new:Npn \__fp_exp_after_tuple_f:nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 ; +\cs_new:Npn \__fp_exp_after_tuple_f:nw + #1 \s__fp_tuple \__fp_tuple_chk:w #2 ; { \exp_after:wN \s__fp_tuple \exp_after:wN \__fp_tuple_chk:w @@ -11512,7 +11706,7 @@ \if_meaning:w 2 #1 + 1 \fi: - \__int_eval_end: + \__fp_int_eval_end: #2#3#4; {#5} ; } \cs_new:Npn \__fp_basics_pack_weird_high:NNNNNNNNw @@ -11521,10 +11715,10 @@ { \cs:w __fp_decimate_ - \if_int_compare:w \__int_eval:w #1 > \c__fp_prec_int + \if_int_compare:w \__fp_int_eval:w #1 > \c__fp_prec_int tiny \else: - \__int_to_roman:w \__int_eval:w #1 + \__fp_int_to_roman:w \__fp_int_eval:w #1 \fi: :Nnnnn \cs_end: @@ -11538,7 +11732,7 @@ \cs_new:cpn { __fp_decimate_ #1 :Nnnnn } ##1 ##2##3##4##5 { \exp_after:wN ##1 - \__int_value:w + \int_value:w \exp_after:wN \__fp_round_digit:Nw #2 ; \__fp_decimate_pack:nnnnnnnnnnw #3 ; } @@ -11599,7 +11793,7 @@ \or: \__fp_case_return:nw { - \exp_after:wN \__fp_small_int_true:wTF \__int_value:w + \exp_after:wN \__fp_small_int_true:wTF \int_value:w \if_meaning:w 2 #2 - \fi: 1 0000 0000 ; } \else: \__fp_case_return:nw \use_ii:nn @@ -11617,7 +11811,7 @@ { \if_meaning:w 0 #1 \exp_after:wN \__fp_small_int_true:wTF - \__int_value:w \if_meaning:w 2 #5 - \fi: + \int_value:w \if_meaning:w 2 #5 - \fi: \if_int_compare:w #2 > 0 \exp_stop_f: 1 0000 0000 \else: @@ -11641,11 +11835,30 @@ #2 \s__fp_mark { #3 #1 } #4 } +\cs_new:Npn \__fp_str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} } +\sys_if_engine_luatex:T + { + \cs_set:Npn \__fp_str_if_eq_x:nn #1#2 + { + \luatex_directlua:D + { + l3kernel.strcmp + ( + " \luatex_luaescapestring:D {#1}", + " \luatex_luaescapestring:D {#2}" + ) + } + } + } \cs_new:Npn \__fp_func_to_name:N #1 - { \exp_last_unbraced:Nf \__fp_func_to_name_aux:w { \cs_to_str:N #1 } X } + { + \exp_last_unbraced:Nf + \__fp_func_to_name_aux:w { \cs_to_str:N #1 } X + } \cs_set_protected:Npn \__fp_tmp:w #1 #2 { \cs_new:Npn \__fp_func_to_name_aux:w ##1 #1 ##2 #2 ##3 X {##2} } -\exp_args:Nff \__fp_tmp:w { \tl_to_str:n { __fp_ } } { \tl_to_str:n { _o: } } +\exp_args:Nff \__fp_tmp:w { \tl_to_str:n { __fp_ } } + { \tl_to_str:n { _o: } } \__kernel_msg_new:nnnn { kernel } { misused-fp } { A~floating~point~with~value~'#1'~was~misused. } { @@ -11689,7 +11902,7 @@ { #1 \__fp_error:nnfn { fp-invalid } {##2} { \fp_to_tl:n { ##3; } } { } - \flag_raise:n { fp_invalid_operation } + \flag_raise_if_clear:n { fp_invalid_operation } ##1 } \exp_args:Nno \use:n @@ -11698,7 +11911,7 @@ #1 \__fp_error:nffn { fp-invalid-ii } { \fp_to_tl:n { ##2; } } { \fp_to_tl:n { ##3; } } {##1} - \flag_raise:n { fp_invalid_operation } + \flag_raise_if_clear:n { fp_invalid_operation } \exp_after:wN \c_nan_fp } \exp_args:Nno \use:n @@ -11706,7 +11919,7 @@ { #1 \__fp_error:nffn { fp-invalid } {##1} {##2} { } - \flag_raise:n { fp_invalid_operation } + \flag_raise_if_clear:n { fp_invalid_operation } \exp_after:wN \c_nan_fp } } @@ -11723,7 +11936,7 @@ { #1 \__fp_error:nnfn { fp-zero-div } {##2} { \fp_to_tl:n { ##3; } } { } - \flag_raise:n { fp_division_by_zero } + \flag_raise_if_clear:n { fp_division_by_zero } \exp_after:wN ##1 } \exp_args:Nno \use:n @@ -11732,7 +11945,7 @@ #1 \__fp_error:nffn { fp-zero-div-ii } { \fp_to_tl:n { ##3; } } { \fp_to_tl:n { ##4; } } {##2} - \flag_raise:n { fp_division_by_zero } + \flag_raise_if_clear:n { fp_division_by_zero } \exp_after:wN ##1 } } @@ -11763,7 +11976,7 @@ { \fp_to_tl:n { \s__fp \__fp_chk:w ##1##2##3; } } { \token_if_eq_meaning:NNF 0 ##2 { - } #4 } {#2} - \flag_raise:n { fp_#2 } + \flag_raise_if_clear:n { fp_#2 } #3 ##2 } } @@ -11914,11 +12127,11 @@ \exp_after:wN \__fp_round:NNN \exp_after:wN #1 \exp_after:wN #2 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_int_odd:w 0 \if_meaning:w 0 #3 1 \fi: \if_meaning:w 5 #3 1 \fi: \exp_stop_f: - \if_int_compare:w \__int_eval:w #4 > 0 \exp_stop_f: + \if_int_compare:w \__fp_int_eval:w #4 > 0 \exp_stop_f: 1 + \fi: \fi: @@ -11930,8 +12143,8 @@ \if_int_odd:w \if_meaning:w 0 #1 1 \else: \if_meaning:w 5 #1 1 \else: 0 \fi: \fi: \exp_stop_f: - \if_int_compare:w \__int_eval:w #2 > 0 \exp_stop_f: - \__int_eval:w 1 + + \if_int_compare:w \__fp_int_eval:w #2 > 0 \exp_stop_f: + \__fp_int_eval:w 1 + \fi: \fi: #1 @@ -11946,7 +12159,8 @@ } \cs_new_eq:NN \__fp_round_to_pinf_neg:NNN \__fp_round_to_ninf:NNN \cs_new_eq:NN \__fp_round_to_nearest_neg:NNN \__fp_round_to_nearest:NNN -\cs_new_eq:NN \__fp_round_to_nearest_ninf_neg:NNN \__fp_round_to_nearest_pinf:NNN +\cs_new_eq:NN \__fp_round_to_nearest_ninf_neg:NNN + \__fp_round_to_nearest_pinf:NNN \cs_new:Npn \__fp_round_to_nearest_zero_neg:NNN #1 #2 #3 { \if_int_compare:w #3 < \c__fp_five_int \else: @@ -11954,7 +12168,8 @@ \fi: 0 \exp_stop_f: } -\cs_new_eq:NN \__fp_round_to_nearest_pinf_neg:NNN \__fp_round_to_nearest_ninf:NNN +\cs_new_eq:NN \__fp_round_to_nearest_pinf_neg:NNN + \__fp_round_to_nearest_ninf:NNN \cs_new_eq:NN \__fp_round_neg:NNN \__fp_round_to_nearest_neg:NNN \cs_new:Npn \__fp_round_o:Nw #1 { @@ -11965,7 +12180,7 @@ \cs_new:Npn \__fp_round_aux_o:Nw #1#2 @ { \if_case:w - \__int_eval:w \__fp_array_count:n {#2} \__int_eval_end: + \__fp_int_eval:w \__fp_array_count:n {#2} \__fp_int_eval_end: \__fp_round_no_arg_o:Nw #1 \exp:w \or: \__fp_round:Nwn #1 #2 {0} \exp:w \or: \__fp_round:Nww #1 #2 \exp:w @@ -12034,7 +12249,7 @@ \if_meaning:w 1 #2 \exp_after:wN \__fp_round_normal:NwNNnw \exp_after:wN #1 - \__int_value:w #5 + \int_value:w #5 \else: \exp_after:wN \__fp_exp_after_o:w \fi: @@ -12048,25 +12263,25 @@ \cs_new:Npn \__fp_round_normal:NnnwNNnn #1#2#3#4; #5#6 { \exp_after:wN \__fp_round_normal:NNwNnn - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_int_compare:w #2 > 0 \exp_stop_f: - 1 \__int_value:w #2 + 1 \int_value:w #2 \exp_after:wN \__fp_round_pack:Nw - \__int_value:w \__int_eval:w 1#3 + + \int_value:w \__fp_int_eval:w 1#3 + \else: \if_int_compare:w #3 > 0 \exp_stop_f: - 1 \__int_value:w #3 + + 1 \int_value:w #3 + \fi: \fi: \exp_after:wN #5 \exp_after:wN #6 \use_none:nnnnnnn #3 #1 - \__int_eval_end: + \__fp_int_eval_end: 0000 0000 0000 0000 ; #6 } \cs_new:Npn \__fp_round_pack:Nw #1 - { \if_meaning:w 2 #1 + 1 \fi: \__int_eval_end: } + { \if_meaning:w 2 #1 + 1 \fi: \__fp_int_eval_end: } \cs_new:Npn \__fp_round_normal:NNwNnn #1 #2 { \if_meaning:w 0 #2 @@ -12091,7 +12306,7 @@ \else: \exp_after:wN \__fp_round_special_aux:Nw \exp_after:wN #4 - \__int_value:w \__int_eval:w 1 + \int_value:w \__fp_int_eval:w 1 \if_meaning:w 1 #1 -#6 \else: +#5 \fi: \fi: ; @@ -12191,7 +12406,8 @@ } \cs_new:cpn { __fp_exp_after_?_f:nw } #1#2 { - \__kernel_msg_expandable_error:nnn { kernel } { bad-variable } {#2} + \__kernel_msg_expandable_error:nnn { kernel } { bad-variable } + {#2} \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w #1 } \cs_set_protected:Npn \__fp_tmp:w #1 @@ -12204,9 +12420,15 @@ \str_if_eq:nnTF {##2} { \protect } { \cs_if_eq:NNTF ##2 #1 { \use_i:nn } { \use:n } - { \__kernel_msg_expandable_error:nnn { kernel } { fp-robust-cmd } } + { + \__kernel_msg_expandable_error:nnn { kernel } + { fp-robust-cmd } + } + } + { + \__kernel_msg_expandable_error:nnn { kernel } + { bad-variable } {##2} } - { \__kernel_msg_expandable_error:nnn { kernel } { bad-variable } {##2} } } } } @@ -12216,12 +12438,10 @@ \exp_after:wN \__fp_parse_infix_after_operand:NwN \exp_after:wN #1 \exp:w \exp_end_continue_f:w - \if_meaning:w \box_wd:N #2 \__fp_parse_one_register_wd:w \fi: - \if_meaning:w \box_ht:N #2 \__fp_parse_one_register_wd:w \fi: - \if_meaning:w \box_dp:N #2 \__fp_parse_one_register_wd:w \fi: + \__fp_parse_one_register_special:N #2 \exp_after:wN \__fp_parse_one_register_aux:Nw \exp_after:wN #2 - \__int_value:w + \int_value:w \exp_after:wN \__fp_parse_exponent:N \exp:w \__fp_parse_expand:w } @@ -12251,8 +12471,32 @@ \cs_new:Npn \__fp_parse_one_register_dim:ww #1; #2; { \exp_after:wN \__fp_from_dim_test:ww - \__int_value:w #2 \exp_after:wN , - \__int_value:w \__dim_eval:w #1 pt ; + \int_value:w #2 \exp_after:wN , + \int_value:w \dim_to_decimal_in_sp:n { #1 pt } ; + } +\cs_new:Npn \__fp_parse_one_register_special:N #1 + { + \if_meaning:w \box_wd:N #1 \__fp_parse_one_register_wd:w \fi: + \if_meaning:w \box_ht:N #1 \__fp_parse_one_register_wd:w \fi: + \if_meaning:w \box_dp:N #1 \__fp_parse_one_register_wd:w \fi: + \if_meaning:w \infty #1 + \__fp_parse_one_register_math:NNw \infty #1 + \fi: + \if_meaning:w \pi #1 + \__fp_parse_one_register_math:NNw \pi #1 + \fi: + } +\cs_new:Npn \__fp_parse_one_register_math:NNw + #1#2#3#4 \__fp_parse_expand:w + { + #3 + \str_if_eq:nnTF {#1} {#2} + { + \__kernel_msg_expandable_error:nnn + { kernel } { fp-infty-pi } {#1} + \c_nan_fp + } + { #4 \__fp_parse_expand:w } } \cs_new:Npn \__fp_parse_one_register_wd:w #1#2 \exp_after:wN #3#4 \__fp_parse_expand:w @@ -12265,8 +12509,7 @@ { \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \__int_value:w \__dim_eval:w - \exp_after:wN \use:n \exp_after:wN { \tex_the:D #1 #2 } ; + \int_value:w \dim_to_decimal_in_sp:n { #1 #2 } ; } \cs_new:Npn \__fp_parse_one_digit:NN #1 { @@ -12274,12 +12517,12 @@ \exp_after:wN #1 \exp:w \exp_end_continue_f:w \exp_after:wN \__fp_sanitize:wN - \__int_value:w \__int_eval:w 0 \__fp_parse_trim_zeros:N + \int_value:w \__fp_int_eval:w 0 \__fp_parse_trim_zeros:N } \cs_new:Npn \__fp_parse_one_other:NN #1 #2 { \if_int_compare:w - \__int_eval:w + \__fp_int_eval:w ( `#2 \if_int_compare:w `#2 > `Z - 32 \fi: ) / 26 = 3 \exp_stop_f: \exp_after:wN \__fp_parse_word:Nw @@ -12303,7 +12546,8 @@ { \cs_if_exist_use:cF { __fp_parse_word_#2:N } { - \cs_if_exist_use:cF { __fp_parse_caseless_ \str_fold_case:n {#2} :N } + \cs_if_exist_use:cF + { __fp_parse_caseless_ \str_fold_case:n {#2} :N } { \__kernel_msg_expandable_error:nnn { kernel } { unknown-fp-word } {#2} @@ -12320,7 +12564,7 @@ \if_catcode:w \scan_stop: \exp_not:N #1 0 \else: - \__int_eval:w + \__fp_int_eval:w ( `#1 \if_int_compare:w `#1 > `Z - 32 \fi: ) / 26 \fi: = 3 \exp_stop_f: @@ -12404,14 +12648,14 @@ \cs_new:Npn \__fp_parse_zero: { \exp_after:wN ; \exp_after:wN 1 - \__int_value:w \__fp_parse_exponent:N + \int_value:w \__fp_parse_exponent:N } \cs_new:Npn \__fp_parse_small:N #1 { \exp_after:wN \__fp_parse_pack_leading:NNNNNww - \__int_value:w \__int_eval:w 1 \token_to_str:N #1 + \int_value:w \__fp_int_eval:w 1 \token_to_str:N #1 \exp_after:wN \__fp_parse_small_leading:wwNN - \__int_value:w 1 + \int_value:w 1 \exp_after:wN \__fp_parse_digits_vii:N \exp:w \__fp_parse_expand:w } @@ -12420,11 +12664,11 @@ #1 #2 \exp_after:wN \__fp_parse_pack_trailing:NNNNNNww \exp_after:wN 0 - \__int_value:w \__int_eval:w 1 + \int_value:w \__fp_int_eval:w 1 \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: \token_to_str:N #4 \exp_after:wN \__fp_parse_small_trailing:wwNN - \__int_value:w 1 + \int_value:w 1 \exp_after:wN \__fp_parse_digits_vi:N \exp:w \else: @@ -12461,7 +12705,7 @@ \cs_new:Npn \__fp_parse_large:N #1 { \exp_after:wN \__fp_parse_large_leading:wwNN - \__int_value:w 1 \token_to_str:N #1 + \int_value:w 1 \token_to_str:N #1 \exp_after:wN \__fp_parse_digits_vii:N \exp:w \__fp_parse_expand:w } @@ -12469,19 +12713,19 @@ { + \c__fp_half_prec_int - #3 \exp_after:wN \__fp_parse_pack_leading:NNNNNww - \__int_value:w \__int_eval:w 1 #1 + \int_value:w \__fp_int_eval:w 1 #1 \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: \exp_after:wN \__fp_parse_large_trailing:wwNN - \__int_value:w 1 \token_to_str:N #4 + \int_value:w 1 \token_to_str:N #4 \exp_after:wN \__fp_parse_digits_vi:N \exp:w \else: \if:w . \exp_not:N #4 \exp_after:wN \__fp_parse_small_leading:wwNN - \__int_value:w 1 + \int_value:w 1 \cs:w __fp_parse_digits_ - \__int_to_roman:w #3 + \__fp_int_to_roman:w #3 :N \exp_after:wN \cs_end: \exp:w @@ -12489,7 +12733,7 @@ #2 \exp_after:wN \__fp_parse_pack_trailing:NNNNNNww \exp_after:wN 0 - \__int_value:w 1 0000 0000 + \int_value:w 1 0000 0000 \__fp_parse_exponent:Nw #4 \fi: \fi: @@ -12500,20 +12744,20 @@ \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: \exp_after:wN \__fp_parse_pack_trailing:NNNNNNww \exp_after:wN \c__fp_half_prec_int - \__int_value:w \__int_eval:w 1 #1 \token_to_str:N #4 + \int_value:w \__fp_int_eval:w 1 #1 \token_to_str:N #4 \exp_after:wN \__fp_parse_large_round:NN \exp_after:wN #4 \exp:w \else: \exp_after:wN \__fp_parse_pack_trailing:NNNNNNww - \__int_value:w \__int_eval:w 7 - #3 \exp_stop_f: - \__int_value:w \__int_eval:w 1 #1 + \int_value:w \__fp_int_eval:w 7 - #3 \exp_stop_f: + \int_value:w \__fp_int_eval:w 1 #1 \if:w . \exp_not:N #4 \exp_after:wN \__fp_parse_small_trailing:wwNN - \__int_value:w 1 + \int_value:w 1 \cs:w __fp_parse_digits_ - \__int_to_roman:w #3 + \__fp_int_to_roman:w #3 :N \exp_after:wN \cs_end: \exp:w @@ -12553,7 +12797,7 @@ \cs_new:Npn \__fp_parse_round_after:wN #1; #2 { + #2 \exp_after:wN ; - \__int_value:w \__int_eval:w #1 + \__fp_parse_exponent:N + \int_value:w \__fp_int_eval:w #1 + \__fp_parse_exponent:N } \cs_new:Npn \__fp_parse_small_round:NN #1#2 { @@ -12563,9 +12807,9 @@ \exp_after:wN 0 \exp_after:wN #1 \exp_after:wN #2 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_parse_round_after:wN - \__int_value:w \__int_eval:w 0 * \__int_eval:w 0 + \int_value:w \__fp_int_eval:w 0 * \__fp_int_eval:w 0 \exp_after:wN \__fp_parse_round_loop:N \exp:w \else: @@ -12581,9 +12825,9 @@ \exp_after:wN 0 \exp_after:wN #1 \exp_after:wN #2 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_parse_large_round_aux:wNN - \__int_value:w \__int_eval:w 1 + \int_value:w \__fp_int_eval:w 1 \exp_after:wN \__fp_parse_round_loop:N \else: %^^A could be dot, or e, or other \exp_after:wN \__fp_parse_large_round_test:NN @@ -12606,9 +12850,9 @@ { + #2 \exp_after:wN \__fp_parse_round_after:wN - \__int_value:w \__int_eval:w #1 + \int_value:w \__fp_int_eval:w #1 \if:w . \exp_not:N #3 - + 0 * \__int_eval:w 0 + + 0 * \__fp_int_eval:w 0 \exp_after:wN \__fp_parse_round_loop:N \exp:w \exp_after:wN \__fp_parse_expand:w \else: @@ -12620,7 +12864,7 @@ \cs_new:Npn \__fp_parse_exponent:Nw #1 #2 \__fp_parse_expand:w { \exp_after:wN ; - \__int_value:w #2 \__fp_parse_exponent:N #1 + \int_value:w #2 \__fp_parse_exponent:N #1 } \cs_new:Npn \__fp_parse_exponent:N #1 { @@ -12684,7 +12928,7 @@ \if_catcode:w \scan_stop: \exp_not:N #1 \if_meaning:w \scan_stop: #1 \if_int_compare:w - \__str_if_eq_x:nn { \s__fp } { \exp_not:N #1 } + \__fp_str_if_eq_x:nn { \s__fp } { \exp_not:N #1 } = 0 \exp_stop_f: 0 \__kernel_msg_expandable_error:nnn @@ -12698,9 +12942,9 @@ \fi: \else: \if_int_compare:w - \__str_if_eq_x:nn { \__int_value:w #1 } { \tex_the:D #1 } + \__fp_str_if_eq_x:nn { \int_value:w #1 } { \tex_the:D #1 } = 0 \exp_stop_f: - \__int_value:w #1 + \int_value:w #1 \else: 0 \__kernel_msg_expandable_error:nnn @@ -12774,7 +13018,7 @@ \exp_after:wN #1 \exp:w \exp_end_continue_f:w \exp_after:wN \__fp_sanitize:wN - \__int_value:w \__int_eval:w 0 \__fp_parse_strim_zeros:N + \int_value:w \__fp_int_eval:w 0 \__fp_parse_strim_zeros:N } \cs_new:cpn { __fp_parse_prefix_(:Nw } #1 { @@ -12862,7 +13106,7 @@ { \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \__int_value:w \__dim_eval:w 1 #1 \exp_after:wN ; + \int_value:w \dim_to_decimal_in_sp:n { 1 #1 } \exp_after:wN ; \exp:w \exp_end_continue_f:w \__fp_parse_infix:NN } } @@ -12986,7 +13230,7 @@ { \if_catcode:w \scan_stop: \exp_not:N #2 \if_int_compare:w - \__str_if_eq_x:nn { \s__fp_mark } { \exp_not:N #2 } + \__fp_str_if_eq_x:nn { \s__fp_mark } { \exp_not:N #2 } = 0 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN \__fp_parse_infix_mark:NNN @@ -12996,7 +13240,7 @@ \fi: \else: \if_int_compare:w - \__int_eval:w + \__fp_int_eval:w ( `#2 \if_int_compare:w `#2 > `Z - 32 \fi: ) / 26 = 3 \exp_stop_f: \exp_after:wN \exp_after:wN @@ -13211,7 +13455,8 @@ \cs_new:Npn \__fp_parse_compare_auxi:NNNNNNN #1#2#3#4#5#6#7 { \if_case:w - \__int_eval:w \exp_after:wN ` \token_to_str:N #7 - `< \__int_eval_end: + \__fp_int_eval:w \exp_after:wN ` \token_to_str:N #7 - `< + \__fp_int_eval_end: \__fp_parse_compare_auxii:NNNNN #2#2#4#5#6 \or: \__fp_parse_compare_auxii:NNNNN #2#3#2#5#6 \or: \__fp_parse_compare_auxii:NNNNN #2#3#4#2#6 @@ -13337,8 +13582,8 @@ \exp_after:wN { \exp:w \exp_end_continue_f:w \__fp_tuple_map_loop_o:nw {#1} #2 - { \s__fp \__prg_break: } ; - \__prg_break_point: + { \s__fp \prg_break: } ; + \prg_break_point: \exp_after:wN } \exp_after:wN ; } \cs_new:Npn \__fp_tuple_map_loop_o:nw #1#2#3 ; @@ -13357,9 +13602,9 @@ \exp_after:wN { \exp:w \exp_end_continue_f:w \__fp_tuple_mapthread_loop_o:nw {#1} - #2 { \s__fp \__prg_break: } ; @ - #3 { \s__fp \__prg_break: } ; - \__prg_break_point: + #2 { \s__fp \prg_break: } ; @ + #3 { \s__fp \prg_break: } ; + \prg_break_point: \exp_after:wN } \exp_after:wN ; } \cs_new:Npn \__fp_tuple_mapthread_loop_o:nw #1#2#3 ; #4 @ #5#6 ; @@ -13392,7 +13637,7 @@ { \exp_after:wN \__fp_function_args:Nwn \exp_after:wN #2 - \__int_value:w #3 \exp_after:wN ; \exp_after:wN + \int_value:w #3 \exp_after:wN ; \exp_after:wN } \exp:w \__fp_parse_operand:Nw \c__fp_prec_func_int \__fp_parse_expand:w @@ -13453,6 +13698,8 @@ { #1~expects~between~#2~and~#3~arguments. } \__kernel_msg_new:nnn { kernel } { fp-bad-args } { Arguments~in~#1#2~are~invalid. } +\__kernel_msg_new:nnn { kernel } { fp-infty-pi } + { Math~command~#1 is~not~an~fp } \cs_if_exist:cT { @unexpandable@protect } { \__kernel_msg_new:nnn { kernel } { fp-robust-cmd } @@ -13501,7 +13748,7 @@ \cs_generate_variant:Nn \fp_log:N { c } \cs_new_protected:Npn \__fp_show:NN #1#2 { - \__kernel_check_defined:NT #2 + \__kernel_chk_defined:NT #2 { \exp_args:Nx #1 { \token_to_str:N #2 = \fp_to_tl:N #2 } } } \cs_new_protected:Npn \fp_show:n @@ -13544,7 +13791,7 @@ \if_int_compare:w \exp_after:wN \__fp_compare_aux:wn \exp:w \exp_end_continue_f:w \__fp_parse:n {#1} {#3} - = \__int_eval:w `#2 - `= \__int_eval_end: + = \__fp_int_eval:w `#2 - `= \__fp_int_eval_end: \prg_return_true: \else: \prg_return_false: @@ -13576,7 +13823,7 @@ \s__fp \__fp_chk:w #1 #2 #3; \s__fp \__fp_chk:w #4 #5 #6; { - \__int_value:w + \int_value:w \if_meaning:w 3 #1 \exp_after:wN \__fp_compare_nan:w \fi: \if_meaning:w 3 #4 \exp_after:wN \__fp_compare_nan:w \fi: \if_meaning:w 2 #5 - \fi: @@ -13606,13 +13853,14 @@ \s__fp_tuple \__fp_tuple_chk:w #1; \s__fp_tuple \__fp_tuple_chk:w #2; { - \int_compare:nNnTF { \__fp_array_count:n {#1} } = { \__fp_array_count:n {#2} } + \int_compare:nNnTF { \__fp_array_count:n {#1} } = + { \__fp_array_count:n {#2} } { - \__int_value:w 0 + \int_value:w 0 \__fp_tuple_compare_back_loop:w - #1 { \s__fp \__prg_break: } ; @ - #2 { \s__fp \__prg_break: } ; - \__prg_break_point: + #1 { \s__fp \prg_break: } ; @ + #2 { \s__fp \prg_break: } ; + \prg_break_point: \exp_stop_f: } { 2 } @@ -13624,7 +13872,7 @@ \if_int_compare:w \__fp_compare_back_any:ww #1 #2 ; #4 #5 ; = 0 \exp_stop_f: \else: - 2 \exp_after:wN \__prg_break: + 2 \exp_after:wN \prg_break: \fi: \__fp_tuple_compare_back_loop:w #3 @ } @@ -13714,11 +13962,11 @@ \cs_generate_variant:Nn \fp_step_function:nnnN { nnnc } \cs_new:Npn \__fp_step:wwwN #1#2; #3#4; #5#6; #7 { - \__fp_if_type_fp:NTwFw #1 { } \s__fp \__prg_break: \q_stop - \__fp_if_type_fp:NTwFw #3 { } \s__fp \__prg_break: \q_stop - \__fp_if_type_fp:NTwFw #5 { } \s__fp \__prg_break: \q_stop + \__fp_if_type_fp:NTwFw #1 { } \s__fp \prg_break: \q_stop + \__fp_if_type_fp:NTwFw #3 { } \s__fp \prg_break: \q_stop + \__fp_if_type_fp:NTwFw #5 { } \s__fp \prg_break: \q_stop \use_i:nnnn { \__fp_step_fp:wwwN #1#2; #3#4; #5#6; #7 } - \__prg_break_point: + \prg_break_point: \use:n { \__fp_error:nfff { fp-step-tuple } { \fp_to_tl:n { #1#2 ; } } @@ -13735,7 +13983,10 @@ } { \token_if_eq_meaning:NNTF #2 0 - { \__kernel_msg_expandable_error:nnn { kernel } { zero-step } {#6} } + { + \__kernel_msg_expandable_error:nnn { kernel } + { zero-step } {#6} + } { \__fp_error:nnfn { fp-bad-step } { } { \fp_to_tl:n { \s__fp \__fp_chk:w #2#3#4 ; } } {#6} @@ -13763,17 +14014,17 @@ \cs_generate_variant:Nn \__fp_step:NnnnnN { Nf } \cs_new_protected:Npn \fp_step_inline:nnnn { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:NNc \__fp_step:NNnnnn \cs_gset_protected:Npn - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __fp_map_ \int_use:N \g__kernel_prg_map_int :w } } \cs_new_protected:Npn \fp_step_variable:nnnNn #1#2#3#4#5 { - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:NNc \__fp_step:NNnnnn \cs_gset_protected:Npx - { __prg_map_ \int_use:N \g__prg_map_int :w } + { __fp_map_ \int_use:N \g__kernel_prg_map_int :w } {#1} {#2} {#3} { \tl_set:Nn \exp_not:N #4 {##1} @@ -13784,7 +14035,7 @@ { #1 #2 ##1 {#6} \fp_step_function:nnnN {#3} {#4} {#5} #2 - \__prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__kernel_prg_map_int } } \__kernel_msg_new:nnn { kernel } { fp-step-tuple } { Tuple~argument~in~fp_step_...~{#1}{#2}{#3}. } @@ -13870,7 +14121,8 @@ \cs_new:Npn \__fp_|_o:ww { \__fp_&_o:ww \else: } \cs_new:Npn \__fp_|_tuple_o:ww { \__fp_&_tuple_o:ww \else: } \cs_new:Npn \__fp_tuple_|_o:ww #1; #2; { \__fp_exp_after_tuple_o:w #1; } - \cs_new:Npn \__fp_tuple_|_tuple_o:ww #1; #2; { \__fp_exp_after_tuple_o:w #1; } + \cs_new:Npn \__fp_tuple_|_tuple_o:ww #1; #2; + { \__fp_exp_after_tuple_o:w #1; } \group_end: \cs_new:Npn \__fp_and_return:wNw #1; \fi: #2; { \fi: \__fp_exp_after_o:w #1; } @@ -13945,11 +14197,11 @@ \fi: \fi: \exp_stop_f: - \exp_after:wN \__fp_add_zeros_o:Nww \__int_value:w - \or: \exp_after:wN \__fp_add_normal_o:Nww \__int_value:w - \or: \exp_after:wN \__fp_add_inf_o:Nww \__int_value:w + \exp_after:wN \__fp_add_zeros_o:Nww \int_value:w + \or: \exp_after:wN \__fp_add_normal_o:Nww \int_value:w + \or: \exp_after:wN \__fp_add_inf_o:Nww \int_value:w \or: \__fp_case_return_i_o:ww - \else: \exp_after:wN \__fp_add_return_ii_o:Nww \__int_value:w + \else: \exp_after:wN \__fp_add_return_ii_o:Nww \int_value:w \fi: #1 #5 \s__fp \__fp_chk:w #2 #3 ; @@ -13995,15 +14247,15 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_int_compare:w #2 > #5 \exp_stop_f: #2 - \exp_after:wN \__fp_add_big_i_o:wNww \__int_value:w - + \exp_after:wN \__fp_add_big_i_o:wNww \int_value:w - \else: #5 - \exp_after:wN \__fp_add_big_ii_o:wNww \__int_value:w + \exp_after:wN \__fp_add_big_ii_o:wNww \int_value:w \fi: - \__int_eval:w #5 - #2 ; #1 #3; + \__fp_int_eval:w #5 - #2 ; #1 #3; } \cs_new:Npn \__fp_add_big_i_o:wNww #1; #2 #3; #4; { @@ -14024,9 +14276,9 @@ \cs_new:Npn \__fp_add_significand_o:NnnwnnnnN #1 #2#3 #4; #5#6#7#8 { \exp_after:wN \__fp_add_significand_test_o:N - \__int_value:w \__int_eval:w 1#5#6 + #2 + \int_value:w \__fp_int_eval:w 1#5#6 + #2 \exp_after:wN \__fp_add_significand_pack:NNNNNNN - \__int_value:w \__int_eval:w 1#7#8 + #3 ; #1 + \int_value:w \__fp_int_eval:w 1#7#8 + #3 ; #1 } \cs_new:Npn \__fp_add_significand_pack:NNNNNNN #1 #2#3#4#5#6#7 { @@ -14047,9 +14299,9 @@ #1; #2; #3#4 ; #5#6 { \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1 #1 + \int_value:w \__fp_int_eval:w 1 #1 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1 #2 #3#4 + \int_value:w \__fp_int_eval:w 1 #2 #3#4 + \__fp_round:NNN #6 #4 #5 \exp_after:wN ; } @@ -14058,13 +14310,13 @@ { + 1 \exp_after:wN \__fp_basics_pack_weird_high:NNNNNNNNw - \__int_value:w \__int_eval:w 1 1 #1 + \int_value:w \__fp_int_eval:w 1 1 #1 \exp_after:wN \__fp_basics_pack_weird_low:NNNNw - \__int_value:w \__int_eval:w 1 #2#3 + + \int_value:w \__fp_int_eval:w 1 #2#3 + \exp_after:wN \__fp_round:NNN \exp_after:wN #6 \exp_after:wN #3 - \__int_value:w \__fp_round_digit:Nw #4 #5 ; + \int_value:w \__fp_round_digit:Nw #4 #5 ; \exp_after:wN ; } \cs_new:Npn \__fp_sub_npos_o:NnwNnw #1#2#3; \s__fp \__fp_chk:w 1 #4#5#6; @@ -14082,20 +14334,20 @@ \cs_new:Npn \__fp_sub_npos_ii_o:Nnwnw #1 #2; #3; { \exp_after:wN \__fp_sub_npos_i_o:Nnwnw - \__int_value:w \__fp_neg_sign:N #1 + \int_value:w \__fp_neg_sign:N #1 #3; #2; } \cs_new:Npn \__fp_sub_npos_i_o:Nnwnw #1 #2#3; #4#5; { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w #2 \if_int_compare:w #2 = #4 \exp_stop_f: \exp_after:wN \__fp_sub_back_near_o:nnnnnnnnN \else: \exp_after:wN \__fp_decimate:nNnnnn \exp_after:wN - { \__int_value:w \__int_eval:w #2 - #4 - 1 \exp_after:wN } + { \int_value:w \__fp_int_eval:w #2 - #4 - 1 \exp_after:wN } \exp_after:wN \__fp_sub_back_far_o:NnnwnnnnN \fi: #5 @@ -14105,9 +14357,9 @@ \cs_new:Npn \__fp_sub_back_near_o:nnnnnnnnN #1#2#3#4 #5#6#7#8 #9 { \exp_after:wN \__fp_sub_back_near_after:wNNNNw - \__int_value:w \__int_eval:w 10#5#6 - #1#2 - 11 + \int_value:w \__fp_int_eval:w 10#5#6 - #1#2 - 11 \exp_after:wN \__fp_sub_back_near_pack:NNNNNNw - \__int_value:w \__int_eval:w 11#7#8 - #3#4 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 11#7#8 - #3#4 \exp_after:wN ; } \cs_new:Npn \__fp_sub_back_near_pack:NNNNNNw #1#2#3#4#5#6#7 ; { + #1#2 ; {#3#4#5#6} {#7} ; } @@ -14121,7 +14373,7 @@ \cs_new:Npn \__fp_sub_back_shift:wnnnn ; #1#2 { \exp_after:wN \__fp_sub_back_shift_ii:ww - \__int_value:w #1 #2 0 ; + \int_value:w #1 #2 0 ; } \cs_new:Npn \__fp_sub_back_shift_ii:ww #1 0 ; #2#3 ; { @@ -14129,7 +14381,7 @@ - 7 - \exp_after:wN \use_i:nnn \exp_after:wN \__fp_sub_back_shift_iii:NNNNNNNNw - \__int_value:w #2#3 0 ~ 123456789; + \int_value:w #2#3 0 ~ 123456789; \else: - \__fp_sub_back_shift_iii:NNNNNNNNw #1 123456789; \fi: @@ -14137,7 +14389,7 @@ \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_sub_back_shift_iv:nnnnw \exp_after:wN ; - \__int_value:w + \int_value:w #1 ~ #2#3 0 ~ 0000 0000 0000 000 ; } \cs_new:Npn \__fp_sub_back_shift_iii:NNNNNNNNw #1#2#3#4#5#6#7#8#9; {#8} @@ -14181,9 +14433,9 @@ { - 1 \exp_after:wN \__fp_sub_back_near_after:wNNNNw - \__int_value:w \__int_eval:w 1#30 - #1 - 11 + \int_value:w \__fp_int_eval:w 1#30 - #1 - 11 \exp_after:wN \__fp_sub_back_near_pack:NNNNNNw - \__int_value:w \__int_eval:w 11 0000 0000 + #40 - #2 + \int_value:w \__fp_int_eval:w 11 0000 0000 + #40 - #2 - \exp_after:wN \__fp_round_neg:NNN \exp_after:wN #6 \use_none:nnnnnnn #2 #5 @@ -14199,15 +14451,15 @@ \cs_new:Npn \__fp_sub_back_very_far_ii_o:nnNwwNN #1#2 ; #3 ; #4 ~ #5; #6#7 { \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1#4 - #1 - 1 + \int_value:w \__fp_int_eval:w 1#4 - #1 - 1 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 2#5 - #2 + \int_value:w \__fp_int_eval:w 2#5 - #2 - \exp_after:wN \__fp_round_neg:NNN \exp_after:wN #7 - \__int_value:w - \if_int_odd:w \__int_eval:w #5 - #2 \__int_eval_end: + \int_value:w + \if_int_odd:w \__fp_int_eval:w #5 - #2 \__fp_int_eval_end: 1 \else: 2 \fi: - \__int_value:w \__fp_round_digit:Nw #3 #6 ; + \int_value:w \__fp_round_digit:Nw #3 #6 ; \exp_after:wN ; } \cs_new:cpn { __fp_*_o:ww } @@ -14221,7 +14473,7 @@ \cs_new:Npn \__fp_mul_cases_o:NnNnww #1#2#3#4 \s__fp \__fp_chk:w #5#6#7; \s__fp \__fp_chk:w #8#9 { - \if_case:w \__int_eval:w + \if_case:w \__fp_int_eval:w \if_int_compare:w #5 #8 = 11 ~ 1 \else: @@ -14240,7 +14492,7 @@ \fi: \fi: \if_meaning:w #6 #9 - 1 \fi: - \__int_eval_end: + \__fp_int_eval_end: \__fp_case_use:nw { #3 0 } \or: \__fp_case_use:nw { #3 2 } \or: \__fp_case_return_i_o:ww @@ -14261,7 +14513,7 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w #4 + #8 \__fp_mul_significand_o:nnnnNnnnn #5 #1 #9 } @@ -14269,19 +14521,21 @@ { \exp_after:wN \__fp_mul_significand_test_f:NNN \exp_after:wN #5 - \__int_value:w \__int_eval:w 99990000 + #1*#6 + + \int_value:w \__fp_int_eval:w 99990000 + #1*#6 + \exp_after:wN \__fp_mul_significand_keep:NNNNNw - \__int_value:w \__int_eval:w 99990000 + #1*#7 + #2*#6 + + \int_value:w \__fp_int_eval:w 99990000 + #1*#7 + #2*#6 + \exp_after:wN \__fp_mul_significand_keep:NNNNNw - \__int_value:w \__int_eval:w 99990000 + #1*#8 + #2*#7 + #3*#6 + + \int_value:w \__fp_int_eval:w 99990000 + #1*#8 + #2*#7 + #3*#6 + \exp_after:wN \__fp_mul_significand_drop:NNNNNw - \__int_value:w \__int_eval:w 99990000 + #1*#9 + #2*#8 + #3*#7 + #4*#6 + + \int_value:w \__fp_int_eval:w 99990000 + #1*#9 + #2*#8 + + #3*#7 + #4*#6 + \exp_after:wN \__fp_mul_significand_drop:NNNNNw - \__int_value:w \__int_eval:w 99990000 + #2*#9 + #3*#8 + #4*#7 + + \int_value:w \__fp_int_eval:w 99990000 + #2*#9 + #3*#8 + + #4*#7 + \exp_after:wN \__fp_mul_significand_drop:NNNNNw - \__int_value:w \__int_eval:w 99990000 + #3*#9 + #4*#8 + + \int_value:w \__fp_int_eval:w 99990000 + #3*#9 + #4*#8 + \exp_after:wN \__fp_mul_significand_drop:NNNNNw - \__int_value:w \__int_eval:w 100000000 + #4*#9 ; + \int_value:w \__fp_int_eval:w 100000000 + #4*#9 ; ; \exp_after:wN ; } \cs_new:Npn \__fp_mul_significand_drop:NNNNNw #1#2#3#4#5 #6; @@ -14300,25 +14554,25 @@ \cs_new:Npn \__fp_mul_significand_large_f:NwwNNNN #1 #2; #3; #4#5#6#7; + { \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1#2 + \int_value:w \__fp_int_eval:w 1#2 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1#3#4#5#6#7 + \int_value:w \__fp_int_eval:w 1#3#4#5#6#7 + \exp_after:wN \__fp_round:NNN \exp_after:wN #1 \exp_after:wN #7 - \__int_value:w \__fp_round_digit:Nw + \int_value:w \__fp_round_digit:Nw } \cs_new:Npn \__fp_mul_significand_small_f:NNwwwN #1 #2#3; #4#5; #6; + #7 { - 1 \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1#3#4 + \int_value:w \__fp_int_eval:w 1#3#4 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1#5#6#7 + \int_value:w \__fp_int_eval:w 1#5#6#7 + \exp_after:wN \__fp_round:NNN \exp_after:wN #1 \exp_after:wN #7 - \__int_value:w \__fp_round_digit:Nw + \int_value:w \__fp_round_digit:Nw } \cs_new:cpn { __fp_/_o:ww } { @@ -14340,10 +14594,10 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w #3 - #6 \exp_after:wN \__fp_div_significand_i_o:wnnw - \__int_value:w \__int_eval:w #7 \use_i:nnnn #8 + 1 ; + \int_value:w \__fp_int_eval:w #7 \use_i:nnnn #8 + 1 ; #4 {#7}{#8}#9 ; #1 @@ -14351,15 +14605,15 @@ \cs_new:Npn \__fp_div_significand_i_o:wnnw #1 ; #2#3 #4 ; { \exp_after:wN \__fp_div_significand_test_o:w - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \__int_value:w \__int_eval:w 999999 + #2 #3 0 / #1 ; + \int_value:w \__fp_int_eval:w 999999 + #2 #3 0 / #1 ; #2 #3 ; #4 - { \exp_after:wN \__fp_div_significand_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_div_significand_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_div_significand_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_div_significand_iii:wwnnnnn \__int_value:w #1 } + { \exp_after:wN \__fp_div_significand_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_div_significand_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_div_significand_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_div_significand_iii:wwnnnnn \int_value:w #1 } } \cs_new:Npn \__fp_div_significand_calc:wwnnnnnnn 1#1 { @@ -14369,52 +14623,54 @@ \exp_after:wN \__fp_div_significand_calc_ii:wwnnnnnnn \fi: } -\cs_new:Npn \__fp_div_significand_calc_i:wwnnnnnnn #1; #2;#3#4 #5#6#7#8 #9 +\cs_new:Npn \__fp_div_significand_calc_i:wwnnnnnnn + #1; #2;#3#4 #5#6#7#8 #9 { 1 1 #1 #9 \exp_after:wN ; - \__int_value:w \__int_eval:w \c__fp_Bigg_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_leading_shift_int + #2 - #1 * #5 - #5#60 \exp_after:wN \__fp_pack_Bigg:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_Bigg_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_middle_shift_int + #3 - #1 * #6 - #70 \exp_after:wN \__fp_pack_Bigg:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_Bigg_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_middle_shift_int + #4 - #1 * #7 - #80 \exp_after:wN \__fp_pack_Bigg:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_Bigg_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_trailing_shift_int - #1 * #8 ; {#5}{#6}{#7}{#8} } -\cs_new:Npn \__fp_div_significand_calc_ii:wwnnnnnnn #1; #2;#3#4 #5#6#7#8 #9 +\cs_new:Npn \__fp_div_significand_calc_ii:wwnnnnnnn + #1; #2;#3#4 #5#6#7#8 #9 { 1 0 #1 #9 \exp_after:wN ; - \__int_value:w \__int_eval:w \c__fp_Bigg_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_leading_shift_int + #2 - #1 * #5 \exp_after:wN \__fp_pack_Bigg:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_Bigg_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_middle_shift_int + #3 - #1 * #6 \exp_after:wN \__fp_pack_Bigg:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_Bigg_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_middle_shift_int + #4 - #1 * #7 \exp_after:wN \__fp_pack_Bigg:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_Bigg_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_Bigg_trailing_shift_int - #1 * #8 ; {#5}{#6}{#7}{#8} } \cs_new:Npn \__fp_div_significand_ii:wwn #1; #2;#3 { \exp_after:wN \__fp_div_significand_pack:NNN - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \__int_value:w \__int_eval:w 999999 + #2 #3 0 / #1 ; #2 #3 ; + \int_value:w \__fp_int_eval:w 999999 + #2 #3 0 / #1 ; #2 #3 ; } \cs_new:Npn \__fp_div_significand_iii:wwnnnnn #1; #2;#3#4#5 #6#7 { 0 \exp_after:wN \__fp_div_significand_iv:wwnnnnnnn - \__int_value:w \__int_eval:w ( 2 * #2 #3) / #6 #7 ; % <- P + \int_value:w \__fp_int_eval:w ( 2 * #2 #3) / #6 #7 ; % <- P #2 ; {#3} {#4} {#5} {#6} {#7} } @@ -14422,17 +14678,17 @@ { + 5 * #1 \exp_after:wN \__fp_div_significand_vi:Nw - \__int_value:w \__int_eval:w -20 + 2*#2#3 - #1*#6#7 + + \int_value:w \__fp_int_eval:w -20 + 2*#2#3 - #1*#6#7 + \exp_after:wN \__fp_div_significand_v:NN - \__int_value:w \__int_eval:w 199980 + 2*#4 - #1*#8 + + \int_value:w \__fp_int_eval:w 199980 + 2*#4 - #1*#8 + \exp_after:wN \__fp_div_significand_v:NN - \__int_value:w \__int_eval:w 200000 + 2*#5 - #1*#9 ; + \int_value:w \__fp_int_eval:w 200000 + 2*#5 - #1*#9 ; } -\cs_new:Npn \__fp_div_significand_v:NN #1#2 { #1#2 \__int_eval_end: + } +\cs_new:Npn \__fp_div_significand_v:NN #1#2 { #1#2 \__fp_int_eval_end: + } \cs_new:Npn \__fp_div_significand_vi:Nw #1#2; { \if_meaning:w 0 #1 - \if_int_compare:w \__int_eval:w #2 > 0 + 1 \fi: + \if_int_compare:w \__fp_int_eval:w #2 > 0 + 1 \fi: \else: \if_meaning:w - #1 - \else: + \fi: 1 \fi: @@ -14452,9 +14708,9 @@ 0 #1; #2; #3; #4#5#6#7#8; #9 { \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1 #1#2 + \int_value:w \__fp_int_eval:w 1 #1#2 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1 #3#4#5#6#7 + \int_value:w \__fp_int_eval:w 1 #3#4#5#6#7 + \__fp_round:NNN #9 #7 #8 \exp_after:wN ; } @@ -14463,13 +14719,13 @@ { + 1 \exp_after:wN \__fp_basics_pack_weird_high:NNNNNNNNw - \__int_value:w \__int_eval:w 1 #1 #2 + \int_value:w \__fp_int_eval:w 1 #1 #2 \exp_after:wN \__fp_basics_pack_weird_low:NNNNw - \__int_value:w \__int_eval:w 1 #3 #4 #5 #6 + + \int_value:w \__fp_int_eval:w 1 #3 #4 #5 #6 + \exp_after:wN \__fp_round:NNN \exp_after:wN #9 \exp_after:wN #6 - \__int_value:w \__fp_round_digit:Nw #7 #8 ; + \int_value:w \__fp_round_digit:Nw #7 #8 ; \exp_after:wN ; } \cs_new:Npn \__fp_sqrt_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ @@ -14486,7 +14742,7 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN 0 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_int_odd:w #1 \exp_stop_f: \exp_after:wN \__fp_sqrt_npos_auxi_o:wwnnN \fi: @@ -14507,11 +14763,11 @@ { \if_int_compare:w #1 = #2 \exp_stop_f: \exp_after:wN \__fp_sqrt_auxi_o:NNNNwnnN - \__int_value:w \__int_eval:w 9999 9999 + + \int_value:w \__fp_int_eval:w 9999 9999 + \exp_after:wN \__fp_use_none_until_s:w \fi: \exp_after:wN \__fp_sqrt_Newton_o:wwn - \__int_value:w \__int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 ; + \int_value:w \__fp_int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 ; #1; {#3} } \cs_new:Npn \__fp_sqrt_auxi_o:NNNNwnnN 1 #1#2#3#4#5; @@ -14523,32 +14779,32 @@ \cs_new:Npn \__fp_sqrt_auxii_o:NnnnnnnnN #1 #2#3#4#5#6 #7#8#9 { \exp_after:wN #1 - \__int_value:w \__int_eval:w \c__fp_big_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int + #7 - #2 * #2 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int - 2 * #2 * #3 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + #8 - #3 * #3 - 2 * #2 * #4 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int - 2 * #3 * #4 - 2 * #2 * #5 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + #9 000 0000 - #4 * #4 - 2 * #3 * #5 - 2 * #2 * #6 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int - 2 * #4 * #5 - 2 * #3 * #6 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int - #5 * #5 - 2 * #4 * #6 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int - 2 * #5 * #6 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \c__fp_big_trailing_shift_int - #6 * #6 ; % ( @@ -14560,18 +14816,18 @@ { \if_int_compare:w #1 > 1 \exp_stop_f: \exp_after:wN \__fp_sqrt_auxiv_o:NNNNNw - \__int_value:w \__int_eval:w (#1#2 %) + \int_value:w \__fp_int_eval:w (#1#2 %) \else: \if_int_compare:w #1#2 > 1 \exp_stop_f: \exp_after:wN \__fp_sqrt_auxv_o:NNNNNw - \__int_value:w \__int_eval:w (#1#2#3 %) + \int_value:w \__fp_int_eval:w (#1#2#3 %) \else: \if_int_compare:w #1#2#3 > 1 \exp_stop_f: \exp_after:wN \__fp_sqrt_auxvi_o:NNNNNw - \__int_value:w \__int_eval:w (#1#2#3#4 %) + \int_value:w \__fp_int_eval:w (#1#2#3#4 %) \else: \exp_after:wN \__fp_sqrt_auxvii_o:NNNNNw - \__int_value:w \__int_eval:w (#1#2#3#4#5 %) + \int_value:w \__fp_int_eval:w (#1#2#3#4#5 %) \fi: \fi: \fi: @@ -14592,11 +14848,11 @@ \cs_new:Npn \__fp_sqrt_auxviii_o:nnnnnnn #1#2 #3#4#5#6#7 { \exp_after:wN \__fp_sqrt_auxix_o:wnwnw - \__int_value:w \__int_eval:w #3 + \int_value:w \__fp_int_eval:w #3 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w #1 + 1#4#5 + \int_value:w \__fp_int_eval:w #1 + 1#4#5 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w #2 + 1#6#7 ; + \int_value:w \__fp_int_eval:w #2 + 1#6#7 ; } \cs_new:Npn \__fp_sqrt_auxix_o:wnwnw #1; #2#3; #4#5; { @@ -14606,7 +14862,7 @@ \cs_new:Npn \__fp_sqrt_auxx_o:Nnnnnnnn #1#2#3 #4#5#6#7#8 { \exp_after:wN \__fp_sqrt_auxxi_o:wwnnN - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w (#8 + 2499) / 5000 * 5000 ; {#4} {#5} {#6} {#7} ; } @@ -14630,10 +14886,10 @@ \fi: \fi: \exp_after:wN \__fp_sqrt_auxxiv_o:wnnnnnnnN - \__int_value:w 9998 + \int_value:w 9998 \else: \exp_after:wN \__fp_sqrt_auxxiv_o:wnnnnnnnN - \__int_value:w 10000 + \int_value:w 10000 \fi: ; } @@ -14645,18 +14901,18 @@ \cs_new:Npn \__fp_sqrt_auxxiv_o:wnnnnnnnN #1; #2#3#4#5#6 #7#8#9 { \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1 0000 0000 + #2#3 + \int_value:w \__fp_int_eval:w 1 0000 0000 + #2#3 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1 0000 0000 + \int_value:w \__fp_int_eval:w 1 0000 0000 + #4#5 \if_int_compare:w #6 > #1 \exp_stop_f: + 1 \fi: + \exp_after:wN \__fp_round:NNN \exp_after:wN 0 \exp_after:wN 0 - \__int_value:w + \int_value:w \exp_after:wN \use_i:nn \exp_after:wN \__fp_round_digit:Nw - \__int_value:w \__int_eval:w #6 + 19999 - #1 ; + \int_value:w \__fp_int_eval:w #6 + 19999 - #1 ; \exp_after:wN ; } \cs_new:Npn \__fp_sign_o:w ? \s__fp \__fp_chk:w #1#2; @ @@ -14677,7 +14933,7 @@ \exp_after:wN \s__fp \exp_after:wN \__fp_chk:w \exp_after:wN #2 - \__int_value:w + \int_value:w \if_case:w #3 \exp_stop_f: #1 \or: 1 \or: 0 \fi: \exp_stop_f: #4; } @@ -14718,43 +14974,43 @@ } \__fp_tmp:w + \__fp_tmp:w - -%% File: l3fp-extended.dtx Copyright (C) 2011-2017 The LaTeX3 Project +%% File: l3fp-extended.dtx Copyright (C) 2011-2018 The LaTeX3 Project \tl_const:Nn \c__fp_one_fixed_tl { {10000} {0000} {0000} {0000} {0000} {0000} ; } \cs_new:Npn \__fp_fixed_continue:wn #1; #2 { #2 #1; } \cs_new:Npn \__fp_fixed_add_one:wN #1#2; #3 { \exp_after:wN #3 \exp_after:wN - { \__int_value:w \__int_eval:w \c__fp_myriad_int + #1 } #2 ; + { \int_value:w \__fp_int_eval:w \c__fp_myriad_int + #1 } #2 ; } \cs_new:Npn \__fp_fixed_div_myriad:wn #1#2#3#4#5#6; { \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int + #1 ; {#2}{#3}{#4}{#5}; } \cs_new:Npn \__fp_fixed_mul_after:wwn #1; #2; #3 { #3 {#1} #2; } \cs_new:Npn \__fp_fixed_mul_short:wwn #1#2#3#4#5#6; #7#8#9; { \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int + #1*#7 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #1*#8 + #2*#7 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #1*#9 + #2*#8 + #3*#7 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #2*#9 + #3*#8 + #4*#7 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #3*#9 + #4*#8 + #5*#7 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int + #4*#9 + #5*#8 + #6*#7 + ( #5*#9 + #6*#8 + #6*#9 / \c__fp_myriad_int ) / \c__fp_myriad_int ; ; @@ -14763,7 +15019,7 @@ { \exp_after:wN \__fp_fixed_div_int_after:Nw \exp_after:wN #8 - \__int_value:w \__int_eval:w - 1 + \int_value:w \__fp_int_eval:w - 1 \__fp_fixed_div_int:wnN #1; {#7} \__fp_fixed_div_int_auxi:wnn #2; {#7} \__fp_fixed_div_int_auxi:wnn @@ -14775,7 +15031,7 @@ \cs_new:Npn \__fp_fixed_div_int:wnN #1; #2 #3 { \exp_after:wN #3 - \__int_value:w \__int_eval:w #1 / #2 - 1 ; + \int_value:w \__fp_int_eval:w #1 / #2 - 1 ; {#2} {#1} } @@ -14783,9 +15039,9 @@ { + #1 \exp_after:wN \__fp_fixed_div_int_pack:Nw - \__int_value:w \__int_eval:w 9999 + \int_value:w \__fp_int_eval:w 9999 \exp_after:wN \__fp_fixed_div_int:wnN - \__int_value:w \__int_eval:w #3 - #1*#2 \__int_eval_end: + \int_value:w \__fp_int_eval:w #3 - #1*#2 \__fp_int_eval_end: } \cs_new:Npn \__fp_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + 2 ; } \cs_new:Npn \__fp_fixed_div_int_pack:Nw #1 #2; { + #1; {#2} } @@ -14795,16 +15051,16 @@ \cs_new:Npn \__fp_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6; #7#8 { \exp_after:wN \__fp_fixed_add_after:NNNNNwn - \__int_value:w \__int_eval:w 9 9999 9998 + #2#3 #1 #7#8 + \int_value:w \__fp_int_eval:w 9 9999 9998 + #2#3 #1 #7#8 \exp_after:wN \__fp_fixed_add_pack:NNNNNwn - \__int_value:w \__int_eval:w 1 9999 9998 + #4#5 + \int_value:w \__fp_int_eval:w 1 9999 9998 + #4#5 \__fp_fixed_add:nnNnnnwn #6 #1 } \cs_new:Npn \__fp_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8 { #3 #4#5 \exp_after:wN \__fp_fixed_add_pack:NNNNNwn - \__int_value:w \__int_eval:w 2 0000 0000 #3 #6#7 + #1#2 ; {#8} ; + \int_value:w \__fp_int_eval:w 2 0000 0000 #3 #6#7 + #1#2 ; {#8} ; } \cs_new:Npn \__fp_fixed_add_pack:NNNNNwn #1 #2#3#4#5 #6; #7 { + #1 ; {#7} {#2#3#4#5} {#6} } @@ -14813,21 +15069,21 @@ \cs_new:Npn \__fp_fixed_mul:wwn #1#2#3#4 #5; #6#7#8#9 { \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #1*#6 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #1*#7 + #2*#6 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #1*#8 + #2*#7 + #3*#6 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #1*#9 + #2*#8 + #3*#7 + #4*#6 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int + #2*#9 + #3*#8 + #4*#7 + ( #3*#9 + #4*#8 + \__fp_fixed_mul:nnnnnnnw #5 {#6}{#7} {#1}{#2} @@ -14840,9 +15096,9 @@ \cs_new:Npn \__fp_fixed_mul_add:wwwn #1; #2; #3#4#5#6#7#8; { \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_big_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + #3 #4 + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + #3 #4 \__fp_fixed_mul_add:Nwnnnwnnn + + #5 #6 ; #2 ; #1 ; #2 ; + + #7 #8 ; ; @@ -14850,9 +15106,9 @@ \cs_new:Npn \__fp_fixed_mul_sub_back:wwwn #1; #2; #3#4#5#6#7#8; { \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_big_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + #3 #4 + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + #3 #4 \__fp_fixed_mul_add:Nwnnnwnnn - + #5 #6 ; #2 ; #1 ; #2 ; - + #7 #8 ; ; @@ -14860,9 +15116,10 @@ \cs_new:Npn \__fp_fixed_one_minus_mul:wwn #1; #2; { \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_big_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + 1 0000 0000 + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + + 1 0000 0000 \__fp_fixed_mul_add:Nwnnnwnnn - ; #2 ; #1 ; #2 ; - ; ; @@ -14871,20 +15128,20 @@ { #1 #7*#3 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int #1 #7*#4 #1 #8*#3 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int #1 #7*#5 #1 #8*#4 #1 #9*#3 #2 \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int #1 \__fp_fixed_mul_add:nnnnwnnnn {#7}{#8}{#9} } \cs_new:Npn \__fp_fixed_mul_add:nnnnwnnnn #1#2#3#4#5; #6#7#8#9 { ( #1*#9 + #2*#8 + #3*#7 + #4*#6 ) \exp_after:wN \__fp_pack_big:NNNNNNw - \__int_value:w \__int_eval:w \c__fp_big_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_big_trailing_shift_int \__fp_fixed_mul_add:nnnnwnnwN { #6 + #4*#7 + #3*#8 + #2*#9 + #1 } { #7 + #4*#8 + #3*#9 + #2 } @@ -14899,7 +15156,7 @@ \cs_new:Npn \__fp_ep_to_fixed:wwn #1,#2 { \exp_after:wN \__fp_ep_to_fixed_auxi:www - \__int_value:w \__int_eval:w 1 0000 0000 + #2 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 1 0000 0000 + #2 \exp_after:wN ; \exp:w \exp_end_continue_f:w \prg_replicate:nn { 4 - \int_max:nn {#1} { -32 } } { 0 } ; } @@ -14917,10 +15174,10 @@ \cs_new:Npn \__fp_ep_to_ep:wwN #1,#2#3#4#5#6#7; #8 { \exp_after:wN #8 - \__int_value:w \__int_eval:w #1 + 4 + \int_value:w \__fp_int_eval:w #1 + 4 \exp_after:wN \use_i:nn \exp_after:wN \__fp_ep_to_ep_loop:N - \__int_value:w \__int_eval:w 1 0000 0000 + #2 \__int_eval_end: + \int_value:w \__fp_int_eval:w 1 0000 0000 + #2 \__fp_int_eval_end: #3#4#5#6#7 ; ; ! } \cs_new:Npn \__fp_ep_to_ep_loop:N #1 @@ -14976,7 +15233,7 @@ \cs_new:Npn \__fp_ep_mul_raw:wwwwN #1,#2; #3,#4; #5 { \__fp_fixed_mul:wwn #2; #4; - { \exp_after:wN #5 \__int_value:w \__int_eval:w #1 + #3 , } + { \exp_after:wN #5 \int_value:w \__fp_int_eval:w #1 + #3 , } } \cs_new:Npn \__fp_ep_div:wwwwn #1,#2; #3,#4; { @@ -14990,15 +15247,15 @@ \cs_new:Npn \__fp_ep_div_esti:wwwwn #1,#2#3; #4, { \exp_after:wN \__fp_ep_div_estii:wwnnwwn - \__int_value:w \__int_eval:w 10 0000 0000 / ( #2 + 1 ) + \int_value:w \__fp_int_eval:w 10 0000 0000 / ( #2 + 1 ) \exp_after:wN ; - \__int_value:w \__int_eval:w #4 - #1 + 1 , + \int_value:w \__fp_int_eval:w #4 - #1 + 1 , {#2} #3; } \cs_new:Npn \__fp_ep_div_estii:wwnnwwn #1; #2,#3#4#5; #6; #7 { \exp_after:wN \__fp_ep_div_estiii:NNNNNwwwn - \__int_value:w \__int_eval:w 10 0000 0000 - 1750 + \int_value:w \__fp_int_eval:w 10 0000 0000 - 1750 + #1 000 + (10 0000 0000 / #3 - #1) * (1000 - #4 / 10) ; {#3}{#4}#5; #6; { #7 #2, } } @@ -15011,11 +15268,11 @@ \cs_new:Npn \__fp_ep_div_epsi:wnNNNNNn #1#2#3#4#5#6; { \exp_after:wN \__fp_ep_div_epsii:wwnNNNNNn - \__int_value:w \__int_eval:w 1 9998 - #2 + \int_value:w \__fp_int_eval:w 1 9998 - #2 \exp_after:wN \__fp_ep_div_eps_pack:NNNNNw - \__int_value:w \__int_eval:w 1 9999 9998 - #3#4 + \int_value:w \__fp_int_eval:w 1 9999 9998 - #3#4 \exp_after:wN \__fp_ep_div_eps_pack:NNNNNw - \__int_value:w \__int_eval:w 2 0000 0000 - #5#6 ; ; + \int_value:w \__fp_int_eval:w 2 0000 0000 - #5#6 ; ; } \cs_new:Npn \__fp_ep_div_eps_pack:NNNNNw #1#2#3#4#5#6; { + #1 ; {#2#3#4#5} {#6} } @@ -15039,7 +15296,7 @@ \cs_new:Npn \__fp_ep_isqrt_auxi:wwn #1, { \exp_after:wN \__fp_ep_isqrt_auxii:wwnnnwn - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \int_if_odd:nTF {#1} { (1 - #1) / 2 , 535 , { 0 } { } } { 1 - #1 / 2 , 168 , { } { 0 } } @@ -15055,15 +15312,15 @@ \exp_after:wN \__fp_ep_isqrt_estii:wwwnnwn \fi: \exp_after:wN \__fp_ep_isqrt_esti:wwwnnwn - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w (#1 + 1 0050 0000 #4 / (#1 * #3)) / 2 , #1, #3, {#4} } \cs_new:Npn \__fp_ep_isqrt_estii:wwwnnwn #1, #2, #3, #4#5 { \exp_after:wN \__fp_ep_isqrt_estiii:NNNNNwwwn - \__int_value:w \__int_eval:w 1000 0000 + #2 * #2 #5 * 5 - \exp_after:wN , \__int_value:w \__int_eval:w 10000 + #2 ; + \int_value:w \__fp_int_eval:w 1000 0000 + #2 * #2 #5 * 5 + \exp_after:wN , \int_value:w \__fp_int_eval:w 10000 + #2 ; } \cs_new:Npn \__fp_ep_isqrt_estiii:NNNNNwwwn 1#1#2#3#4#5#6, 1#7#8; #9; { @@ -15086,7 +15343,7 @@ \__fp_fixed_mul:wwn #1; } \cs_new:Npn \__fp_ep_to_float_o:wwN #1, - { + \__int_eval:w #1 \__fp_fixed_to_float_o:wN } + { + \__fp_int_eval:w #1 \__fp_fixed_to_float_o:wN } \cs_new:Npn \__fp_ep_inv_to_float_o:wwN #1,#2; { \__fp_ep_div:wwwwn 1,{1000}{0000}{0000}{0000}{0000}{0000}; #1,#2; @@ -15099,18 +15356,19 @@ \__fp_fixed_mul:wwn #1; {5729}{5779}{5130}{8232}{0876}{7981}; { \__fp_ep_to_float_o:wwN 2, } } -\cs_new:Npn \__fp_fixed_to_float_o:Nw #1#2; { \__fp_fixed_to_float_o:wN #2; #1 } +\cs_new:Npn \__fp_fixed_to_float_o:Nw #1#2; + { \__fp_fixed_to_float_o:wN #2; #1 } \cs_new:Npn \__fp_fixed_to_float_o:wN #1#2#3#4#5#6; #7 - { - + \__int_eval:w \c__fp_block_int % for the 8-digit-at-the-start thing. + { % for the 8-digit-at-the-start thing + + \__fp_int_eval:w \c__fp_block_int \exp_after:wN \exp_after:wN \exp_after:wN \__fp_fixed_to_loop:N \exp_after:wN \use_none:n - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w 1 0000 0000 + #1 \exp_after:wN \__fp_use_none_stop_f:n - \__int_value:w 1#2 \exp_after:wN \__fp_use_none_stop_f:n - \__int_value:w 1#3#4 \exp_after:wN \__fp_use_none_stop_f:n - \__int_value:w 1#5#6 + \int_value:w 1#2 \exp_after:wN \__fp_use_none_stop_f:n + \int_value:w 1#3#4 \exp_after:wN \__fp_use_none_stop_f:n + \int_value:w 1#5#6 \exp_after:wN ; \exp_after:wN ; } @@ -15151,11 +15409,11 @@ \cs_new:Npn \__fp_fixed_to_float_round_up:wnnnnw ; #1#2#3#4 ; { \exp_after:wN \__fp_basics_pack_high:NNNNNw - \__int_value:w \__int_eval:w 1 #1#2 + \int_value:w \__fp_int_eval:w 1 #1#2 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1 #3#4 + 1 ; + \int_value:w \__fp_int_eval:w 1 #3#4 + 1 ; } -%% File: l3fp-expo.dtx Copyright (C) 2011-2017 The LaTeX3 Project +%% File: l3fp-expo.dtx Copyright (C) 2011-2018 The LaTeX3 Project \cs_new:Npn \__fp_parse_word_exp:N { \__fp_parse_unary_function:NNN \__fp_exp_o:w ? } \cs_new:Npn \__fp_parse_word_ln:N @@ -15186,25 +15444,25 @@ \cs_new:Npn \__fp_ln_npos_o:w \s__fp \__fp_chk:w 10#1#2#3; { %^^A todo: ln(1) should be "exact zero", not "underflow" \exp_after:wN \__fp_sanitize:Nw - \__int_value:w % for the overall sign + \int_value:w % for the overall sign \if_int_compare:w #1 < 1 \exp_stop_f: 2 \else: 0 \fi: \exp_after:wN \exp_stop_f: - \__int_value:w \__int_eval:w % for the exponent + \int_value:w \__fp_int_eval:w % for the exponent \__fp_ln_significand:NNNNnnnN #2#3 \__fp_ln_exponent:wn {#1} } \cs_new:Npn \__fp_ln_significand:NNNNnnnN #1#2#3#4 { \exp_after:wN \__fp_ln_x_ii:wnnnn - \__int_value:w + \int_value:w \if_case:w #1 \exp_stop_f: \or: \if_int_compare:w #2 < 4 \exp_stop_f: - \__int_eval:w 10 - #2 + \__fp_int_eval:w 10 - #2 \else: 6 \fi: @@ -15220,14 +15478,14 @@ \cs_new:Npn \__fp_ln_x_ii:wnnnn #1; #2#3#4#5 { \exp_after:wN \__fp_ln_div_after:Nw - \cs:w c__fp_ln_ \__int_to_roman:w #1 _fixed_tl \exp_after:wN \cs_end: - \__int_value:w + \cs:w c__fp_ln_ \__fp_int_to_roman:w #1 _fixed_tl \exp_after:wN \cs_end: + \int_value:w \exp_after:wN \__fp_ln_x_iv:wnnnnnnnn - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_ln_x_iii_var:NNNNNw - \__int_value:w \__int_eval:w 9999 9990 + #1*#2#3 + + \int_value:w \__fp_int_eval:w 9999 9990 + #1*#2#3 + \exp_after:wN \__fp_ln_x_iii:NNNNNNw - \__int_value:w \__int_eval:w 10 0000 0000 + #1*#4#5 ; + \int_value:w \__fp_int_eval:w 10 0000 0000 + #1*#4#5 ; {20000} {0000} {0000} {0000} } %^^A todo: reoptimize (a generalization attempt failed). \cs_new:Npn \__fp_ln_x_iii:NNNNNNw #1#2 #3#4#5#6 #7; @@ -15240,33 +15498,33 @@ \cs_new:Npn \__fp_ln_x_iv:wnnnnnnnn #1; #2#3#4#5 #6#7#8#9 { \exp_after:wN \__fp_div_significand_pack:NNN - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \__fp_ln_div_i:w #1 ; #6 #7 ; {#8} {#9} {#2} {#3} {#4} {#5} - { \exp_after:wN \__fp_ln_div_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_ln_div_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_ln_div_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_ln_div_ii:wwn \__int_value:w #1 } - { \exp_after:wN \__fp_ln_div_vi:wwn \__int_value:w #1 } + { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } + { \exp_after:wN \__fp_ln_div_vi:wwn \int_value:w #1 } } \cs_new:Npn \__fp_ln_div_i:w #1; { \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \__int_value:w \__int_eval:w 999999 + 2 0000 0000 / #1 ; % Q1 + \int_value:w \__fp_int_eval:w 999999 + 2 0000 0000 / #1 ; % Q1 } \cs_new:Npn \__fp_ln_div_ii:wwn #1; #2;#3 % y; B1;B2 <- for k=1 { \exp_after:wN \__fp_div_significand_pack:NNN - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \__int_value:w \__int_eval:w 999999 + #2 #3 / #1 ; % Q2 + \int_value:w \__fp_int_eval:w 999999 + #2 #3 / #1 ; % Q2 #2 #3 ; } \cs_new:Npn \__fp_ln_div_vi:wwn #1; #2;#3#4#5 #6#7#8#9 %y;F1;F2F3F4x1x2x3x4 { \exp_after:wN \__fp_div_significand_pack:NNN - \__int_value:w \__int_eval:w 1000000 + #2 #3 / #1 ; % Q6 + \int_value:w \__fp_int_eval:w 1000000 + #2 #3 / #1 ; % Q6 } \cs_new:Npn \__fp_ln_div_after:Nw #1#2; { @@ -15283,39 +15541,40 @@ \exp_after:wN \__fp_ln_t_large:NNw \exp_after:wN + % <sign> \exp_after:wN #1 - \__int_value:w \__int_eval:w 9999 - #2 \exp_after:wN ; - \__int_value:w \__int_eval:w 9999 - #3 \exp_after:wN ; - \__int_value:w \__int_eval:w 9999 - #4 \exp_after:wN ; - \__int_value:w \__int_eval:w 9999 - #5 \exp_after:wN ; - \__int_value:w \__int_eval:w 9999 - #6 \exp_after:wN ; - \__int_value:w \__int_eval:w 1 0000 - #7 ; + \int_value:w \__fp_int_eval:w 9999 - #2 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 9999 - #3 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 9999 - #4 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 9999 - #5 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 9999 - #6 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 1 0000 - #7 ; } \cs_new:Npn \__fp_ln_t_large:NNw #1 #2 #3; #4; #5; #6; #7; #8; { \exp_after:wN \__fp_ln_square_t_after:w - \__int_value:w \__int_eval:w 9999 0000 + #3*#3 + \int_value:w \__fp_int_eval:w 9999 0000 + #3*#3 \exp_after:wN \__fp_ln_square_t_pack:NNNNNw - \__int_value:w \__int_eval:w 9999 0000 + 2*#3*#4 + \int_value:w \__fp_int_eval:w 9999 0000 + 2*#3*#4 \exp_after:wN \__fp_ln_square_t_pack:NNNNNw - \__int_value:w \__int_eval:w 9999 0000 + 2*#3*#5 + #4*#4 + \int_value:w \__fp_int_eval:w 9999 0000 + 2*#3*#5 + #4*#4 \exp_after:wN \__fp_ln_square_t_pack:NNNNNw - \__int_value:w \__int_eval:w 9999 0000 + 2*#3*#6 + 2*#4*#5 + \int_value:w \__fp_int_eval:w 9999 0000 + 2*#3*#6 + 2*#4*#5 \exp_after:wN \__fp_ln_square_t_pack:NNNNNw - \__int_value:w \__int_eval:w 1 0000 0000 + 2*#3*#7 + 2*#4*#6 + #5*#5 + \int_value:w \__fp_int_eval:w + 1 0000 0000 + 2*#3*#7 + 2*#4*#6 + #5*#5 + (2*#3*#8 + 2*#4*#7 + 2*#5*#6) / 1 0000 % ; ; ; \exp_after:wN \__fp_ln_twice_t_after:w - \__int_value:w \__int_eval:w -1 + 2*#3 + \int_value:w \__fp_int_eval:w -1 + 2*#3 \exp_after:wN \__fp_ln_twice_t_pack:Nw - \__int_value:w \__int_eval:w 9999 + 2*#4 + \int_value:w \__fp_int_eval:w 9999 + 2*#4 \exp_after:wN \__fp_ln_twice_t_pack:Nw - \__int_value:w \__int_eval:w 9999 + 2*#5 + \int_value:w \__fp_int_eval:w 9999 + 2*#5 \exp_after:wN \__fp_ln_twice_t_pack:Nw - \__int_value:w \__int_eval:w 9999 + 2*#6 + \int_value:w \__fp_int_eval:w 9999 + 2*#6 \exp_after:wN \__fp_ln_twice_t_pack:Nw - \__int_value:w \__int_eval:w 9999 + 2*#7 + \int_value:w \__fp_int_eval:w 9999 + 2*#7 \exp_after:wN \__fp_ln_twice_t_pack:Nw - \__int_value:w \__int_eval:w 10000 + 2*#8 ; ; + \int_value:w \__fp_int_eval:w 10000 + 2*#8 ; ; { \__fp_ln_c:NwNw #1 } #2 } @@ -15337,7 +15596,7 @@ \__fp_fixed_mul:wwn #3; { \exp_after:wN \__fp_ln_Taylor_loop:www - \__int_value:w \__int_eval:w #1 - 2 ; + \int_value:w \__fp_int_eval:w #1 - 2 ; } #3; } @@ -15345,7 +15604,7 @@ { \fi: \exp_after:wN \__fp_fixed_mul:wwn - \exp_after:wN { \__int_value:w \__int_eval:w 10000 + #2 } #3; + \exp_after:wN { \int_value:w \__fp_int_eval:w 10000 + #2 } #3; } \cs_new:Npn \__fp_ln_c:NwNw #1 #2; #3 { @@ -15361,16 +15620,16 @@ \if_case:w #2 \exp_stop_f: 0 \__fp_case_return:nw { \__fp_fixed_to_float_o:Nw 2 } \or: - \exp_after:wN \__fp_ln_exponent_one:ww \__int_value:w + \exp_after:wN \__fp_ln_exponent_one:ww \int_value:w \else: \if_int_compare:w #2 > 0 \exp_stop_f: \exp_after:wN \__fp_ln_exponent_small:NNww \exp_after:wN 0 - \exp_after:wN \__fp_fixed_sub:wwn \__int_value:w + \exp_after:wN \__fp_fixed_sub:wwn \int_value:w \else: \exp_after:wN \__fp_ln_exponent_small:NNww \exp_after:wN 2 - \exp_after:wN \__fp_fixed_add:wwn \__int_value:w - + \exp_after:wN \__fp_fixed_add:wwn \int_value:w - \fi: \fi: #2; #1; @@ -15429,7 +15688,7 @@ \else: \exp_after:wN \__fp_sanitize:Nw \exp_after:wN 0 - \__int_value:w #1 \__int_eval:w + \int_value:w #1 \__fp_int_eval:w \if_int_compare:w #4 < 0 \exp_stop_f: \exp_after:wN \use_i:nn \else: @@ -15467,7 +15726,7 @@ ; #2#3#4 0000 0000 ; } \cs_new:Npn \__fp_exp_Taylor_ii:ww #1; #2; - { \__fp_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s__stop } + { \__fp_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s_stop } \cs_new:Npn \__fp_exp_Taylor_loop:www #1; #2; #3; { \if_int_compare:w #1 = 1 \exp_stop_f: @@ -15478,18 +15737,18 @@ \__fp_fixed_mul:wwn #2 ; { \exp_after:wN \__fp_exp_Taylor_loop:www - \__int_value:w \__int_eval:w #1 - 1 ; + \int_value:w \__fp_int_eval:w #1 - 1 ; #2 ; } } -\cs_new:Npn \__fp_exp_Taylor_break:Nww #1 #2; #3 \s__stop +\cs_new:Npn \__fp_exp_Taylor_break:Nww #1 #2; #3 \s_stop { \__fp_fixed_add_one:wN #2 ; } \cs_new:Npn \__fp_exp_pos_large:NnnNwn #1#2#3 #4#5; #6 { \exp_after:wN \exp_after:wN - \cs:w __fp_exp_large_ \__int_to_roman:w #6 :wN \exp_after:wN \cs_end: + \cs:w __fp_exp_large_ \__fp_int_to_roman:w #6 :wN \exp_after:wN \cs_end: \exp_after:wN \c__fp_one_fixed_tl - \__int_value:w #3 #4 \exp_stop_f: + \int_value:w #3 #4 \exp_stop_f: #5 00000 ; } \cs_new:Npn \__fp_exp_large:w #1 \or: #2 \fi: @@ -15646,7 +15905,7 @@ \cs_new:Npn \__fp_pow_normal_o:ww \s__fp \__fp_chk:w 1 #1#2#3; \s__fp \__fp_chk:w #4#5 { - \if_int_compare:w \__str_if_eq_x:nn { #2 #3 } + \if_int_compare:w \__fp_str_if_eq_x:nn { #2 #3 } { 1 {1000} {0000} {0000} {0000} } = 0 \exp_stop_f: \if_int_compare:w #4 #1 = 32 \exp_stop_f: \exp_after:wN \__fp_case_return_ii_o:ww @@ -15676,7 +15935,7 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN 0 - \__int_value:w + \int_value:w \if:w #1 \if_int_compare:w #3 > 0 \exp_stop_f: 0 \else: 2 \fi: \exp_after:wN \__fp_pow_npos_aux:NNnww \exp_after:wN + @@ -15691,7 +15950,7 @@ \cs_new:Npn \__fp_pow_npos_aux:NNnww #1#2#3#4#5; \s__fp \__fp_chk:w 1#6#7#8; { #1 - \__int_eval:w + \__fp_int_eval:w \__fp_ln_significand:NNNNnnnN #4#5 \__fp_pow_exponent:wnN {#3} \__fp_fixed_mul:wwn #8 {0000}{0000} ; @@ -15712,37 +15971,37 @@ \cs_new:Npn \__fp_pow_exponent:Nwnnnnnw #1#2; #3#4#5#6#7#8; { %^^A todo: use that in ln. \exp_after:wN \__fp_fixed_mul_after:wwn - \__int_value:w \__int_eval:w \c__fp_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int #1#2*23025 - #1 #3 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int #1 #2*8509 - #1 #4 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int #1 #2*2994 - #1 #5 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int #1 #2*0456 - #1 #6 \exp_after:wN \__fp_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_trailing_shift_int + \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int #1 #2*8401 - #1 #7 #1 ( #2*7991 - #8 ) / 1 0000 ; ; } \cs_new:Npn \__fp_pow_B:wwN #1#2#3#4#5#6; #7; { \if_int_compare:w #7 < 0 \exp_stop_f: - \exp_after:wN \__fp_pow_C_neg:w \__int_value:w - + \exp_after:wN \__fp_pow_C_neg:w \int_value:w - \else: \if_int_compare:w #7 < 22 \exp_stop_f: - \exp_after:wN \__fp_pow_C_pos:w \__int_value:w + \exp_after:wN \__fp_pow_C_pos:w \int_value:w \else: - \exp_after:wN \__fp_pow_C_overflow:w \__int_value:w + \exp_after:wN \__fp_pow_C_overflow:w \int_value:w \fi: \fi: #7 \exp_after:wN ; - \__int_value:w \__int_eval:w 10 0000 + #1 \__int_eval_end: + \int_value:w \__fp_int_eval:w 10 0000 + #1 \__fp_int_eval_end: #2#3#4#5#6 0000 0000 0000 0000 0000 0000 ; %^^A todo: how many 0? } \cs_new:Npn \__fp_pow_C_overflow:w #1; #2; #3 @@ -15764,11 +16023,11 @@ \exp_after:wN #2 \else: \if_meaning:w 0 #2 - \exp_after:wN \__fp_pow_C_pos_loop:wN \__int_value:w + \exp_after:wN \__fp_pow_C_pos_loop:wN \int_value:w \else: - \exp_after:wN \__fp_pow_C_overflow:w \__int_value:w + \exp_after:wN \__fp_pow_C_overflow:w \int_value:w \fi: - \__int_eval:w #1 - 1 \exp_after:wN ; + \__fp_int_eval:w #1 - 1 \exp_after:wN ; \fi: } \cs_new:Npn \__fp_pow_C_pack:w @@ -15778,7 +16037,7 @@ \if_case:w \__fp_pow_neg_case:w #4 ; \exp_after:wN \__fp_pow_neg_aux:wNN \or: - \if_int_compare:w \__int_eval:w #1 / 2 = 1 \exp_stop_f: + \if_int_compare:w \__fp_int_eval:w #1 / 2 = 1 \exp_stop_f: \__fp_invalid_operation_o:Nww ^ #3; #4; \exp:w \exp_end_continue_f:w \exp_after:wN \exp_after:wN @@ -15794,7 +16053,7 @@ \exp_after:wN \s__fp \exp_after:wN \__fp_chk:w \exp_after:wN #2 - \__int_value:w \__int_eval:w 2 - #3 \__int_eval_end: + \int_value:w \__fp_int_eval:w 2 - #3 \__fp_int_eval_end: } \cs_new:Npn \__fp_pow_neg_case:w \s__fp \__fp_chk:w #1#2#3; { @@ -15959,7 +16218,7 @@ \exp_after:wN #2 \exp_after:wN #3 \exp_after:wN #4 - \__int_value:w \__int_eval:w #5 + \int_value:w \__fp_int_eval:w #5 \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN \if_int_compare:w #7 > #1 0 1 \exp_stop_f: #1 \__fp_trig_large:ww \__fp_trigd_large:ww @@ -15991,8 +16250,8 @@ \cs_new:Npn \__fp_trigd_large_auxi:nnnnwNNNN #1#2#3#4#5; #6#7#8#9 { \exp_after:wN \__fp_trigd_large_auxii:wNw - \__int_value:w \__int_eval:w #1 + #2 - - (#1 + #2 - 4) / 9 * 9 \__int_eval_end: + \int_value:w \__fp_int_eval:w #1 + #2 + - (#1 + #2 - 4) / 9 * 9 \__fp_int_eval_end: #3; #4; #5{#6#7#8#9}; } @@ -16000,8 +16259,8 @@ { + (#1#2 - 4) / 9 * 2 \exp_after:wN \__fp_trigd_large_auxiii:www - \__int_value:w \__int_eval:w #1#2 - - (#1#2 - 4) / 9 * 9 \__int_eval_end: #3 ; + \int_value:w \__fp_int_eval:w #1#2 + - (#1#2 - 4) / 9 * 9 \__fp_int_eval_end: #3 ; } \cs_new:Npn \__fp_trigd_large_auxiii:www #1; #2; #3! { @@ -16182,9 +16441,9 @@ \cs_new:Npn \__fp_trig_large:ww #1, #2#3#4#5#6; { \exp_after:wN \__fp_trig_large_auxi:wwwwww - \__int_value:w \__int_eval:w (#1 - 32) / 64 \exp_after:wN , - \__int_value:w \__int_eval:w (#1 - 4) / 8 \exp_after:wN , - \__int_value:w #1 \__fp_trig_inverse_two_pi: ; + \int_value:w \__fp_int_eval:w (#1 - 32) / 64 \exp_after:wN , + \int_value:w \__fp_int_eval:w (#1 - 4) / 8 \exp_after:wN , + \int_value:w #1 \__fp_trig_inverse_two_pi: ; {#2}{#3}{#4}{#5} ; } \cs_new:Npn \__fp_trig_large_auxi:wwwwww #1, #2, #3, #4! @@ -16206,7 +16465,7 @@ { \exp_after:wN \__fp_use_i_until_s:nw \exp_after:wN \__fp_trig_large_auxvii:w - \__int_value:w \__int_eval:w \c__fp_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int \prg_replicate:nn { 13 } { \__fp_trig_large_auxvi:wnnnnnnnn } + \c__fp_trailing_shift_int - \c__fp_middle_shift_int @@ -16216,7 +16475,7 @@ \cs_new:Npn \__fp_trig_large_auxvi:wnnnnnnnn #1; #2#3#4#5#6#7#8#9 { \exp_after:wN \__fp_trig_large_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #2*#9 + #3*#8 + #4*#7 + #5*#6 #1; {#2}{#3}{#4}{#5} {#7}{#8}{#9} } @@ -16225,7 +16484,7 @@ \cs_new:Npn \__fp_trig_large_auxvii:w #1#2#3 { \exp_after:wN \__fp_trig_large_auxviii:ww - \__int_value:w \__int_eval:w (#1#2#3 - 62) / 125 ; + \int_value:w \__fp_int_eval:w (#1#2#3 - 62) / 125 ; #1#2#3 } \cs_new:Npn \__fp_trig_large_auxviii:ww #1; @@ -16243,7 +16502,7 @@ { \exp_after:wN \__fp_use_i_until_s:nw \exp_after:wN \__fp_trig_large_auxxi:w - \__int_value:w \__int_eval:w \c__fp_leading_shift_int + \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int \prg_replicate:nn { 13 } { \__fp_trig_large_auxx:wNNNNN } + \c__fp_trailing_shift_int - \c__fp_middle_shift_int @@ -16252,14 +16511,14 @@ \cs_new:Npn \__fp_trig_large_auxx:wNNNNN #1; #2 #3#4#5#6 { \exp_after:wN \__fp_trig_large_pack:NNNNNw - \__int_value:w \__int_eval:w \c__fp_middle_shift_int + \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int #2 8 * #3#4#5#6 #1; #2 } \cs_new:Npn \__fp_trig_large_auxxi:w #1; { \exp_after:wN \__fp_ep_mul_raw:wwwwN - \__int_value:w \__int_eval:w 0 \__fp_ep_to_ep_loop:N #1 ; ; ! + \int_value:w \__fp_int_eval:w 0 \__fp_ep_to_ep_loop:N #1 ; ; ! 0,{7853}{9816}{3397}{4483}{0961}{5661}; \__fp_trig_small:ww } @@ -16269,8 +16528,8 @@ { \exp_after:wN \__fp_sin_series_aux_o:NNnwww \exp_after:wN #1 - \__int_value:w - \if_int_odd:w \__int_eval:w (#3 + 2) / 4 \__int_eval_end: + \int_value:w + \if_int_odd:w \__fp_int_eval:w (#3 + 2) / 4 \__fp_int_eval_end: #2 \else: \if_meaning:w #2 0 2 \else: 0 \fi: @@ -16280,7 +16539,7 @@ } \cs_new:Npn \__fp_sin_series_aux_o:NNnwww #1#2#3 #4; #5,#6; { - \if_int_odd:w \__int_eval:w #3 / 2 \__int_eval_end: + \if_int_odd:w \__fp_int_eval:w #3 / 2 \__fp_int_eval_end: \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn @@ -16313,7 +16572,7 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #2 - \__int_value:w \__int_eval:w #1 + \int_value:w \__fp_int_eval:w #1 } #2 } @@ -16322,8 +16581,8 @@ \__fp_fixed_mul:wwn #4; #4; { \exp_after:wN \__fp_tan_series_aux_o:Nnwww - \__int_value:w - \if_int_odd:w \__int_eval:w #3 / 2 \__int_eval_end: + \int_value:w + \if_int_odd:w \__fp_int_eval:w #3 / 2 \__fp_int_eval_end: \exp_after:wN \reverse_if:N \fi: \if_meaning:w #1#2 2 \else: 0 \fi: @@ -16348,7 +16607,7 @@ \__fp_fixed_mul_sub_back:wwwn#3;{10000}{0000}{0000}{0000}{0000}{0000}; { \reverse_if:N \if_int_odd:w - \__int_eval:w (#2 - 1) / 2 \__int_eval_end: + \__fp_int_eval:w (#2 - 1) / 2 \__fp_int_eval_end: \exp_after:wN \__fp_reverse_args:Nww \fi: \__fp_ep_div:wwwwn 0, @@ -16357,7 +16616,7 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 - \__int_value:w \__int_eval:w \__fp_ep_to_float_o:wwN + \int_value:w \__fp_int_eval:w \__fp_ep_to_float_o:wwN } #1 } @@ -16400,7 +16659,7 @@ { \exp_after:wN \__fp_atan_combine_o:NwwwwwN \exp_after:wN #2 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_meaning:w 2 #5 7 - \fi: #3 \exp_after:wN ; \c__fp_one_fixed_tl {0000}{0000}{0000}{0000}{0000}{0000}; @@ -16417,9 +16676,9 @@ { \exp_after:wN \__fp_atan_combine_o:NwwwwwN \exp_after:wN #1 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_meaning:w 2 #4 - 7 - \__int_eval:w + 7 - \__fp_int_eval:w \fi: \if_int_compare:w \__fp_ep_compare:wwww #2,#3; #5,#6; > 0 \exp_stop_f: @@ -16431,8 +16690,9 @@ \cs_new:Npn \__fp_atan_div:wnwwnw #1,#2#3; #4,#5#6; { \if_int_compare:w - \__int_eval:w 41421 * #5 < #2 000 - \if_case:w \__int_eval:w #4 - #1 \__int_eval_end: 00 \or: 0 \fi: + \__fp_int_eval:w 41421 * #5 < #2 000 + \if_case:w \__fp_int_eval:w #4 - #1 \__fp_int_eval_end: + 00 \or: 0 \fi: \exp_stop_f: \exp_after:wN \__fp_atan_near:wwwn \fi: @@ -16472,7 +16732,7 @@ \__fp_rrot:www \__fp_fixed_mul_sub_back:wwwn #2; #3; { \exp_after:wN \__fp_atan_Taylor_loop:www - \__int_value:w \__int_eval:w #1 - 2 ; + \int_value:w \__fp_int_eval:w #1 - 2 ; } #3; } @@ -16483,7 +16743,7 @@ { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 - \__int_value:w \__int_eval:w + \int_value:w \__fp_int_eval:w \if_meaning:w 0 #2 \exp_after:wN \use_i:nn \else: @@ -16494,7 +16754,7 @@ \__fp_fixed_mul:wwn #3; #4; { \exp_after:wN \__fp_atan_combine_aux:ww - \__int_value:w \__int_eval:w #2 / 2 ; #2; + \int_value:w \__fp_int_eval:w #2 / 2 ; #2; } } { #7 \__fp_fixed_to_float_o:wN \__fp_fixed_to_float_rad_o:wN } @@ -16552,7 +16812,7 @@ \if_int_compare:w #5 < 1 \exp_stop_f: \exp_after:wN \__fp_use_none_until_s:w \fi: - \if_int_compare:w \__int_eval:w #5 + #6#7 + #8#9 = 1000 0001 ~ + \if_int_compare:w \__fp_int_eval:w #5 + #6#7 + #8#9 = 1000 0001 ~ \exp_after:wN \__fp_use_none_until_s:w \fi: \__fp_use_i:ww @@ -16648,11 +16908,11 @@ \cs_new:Npn \__fp_trim_zeros:w #1 ; { \__fp_trim_zeros_loop:w #1 - ; \__fp_trim_zeros_loop:w 0; \__fp_trim_zeros_dot:w .; \s__stop + ; \__fp_trim_zeros_loop:w 0; \__fp_trim_zeros_dot:w .; \s_stop } \cs_new:Npn \__fp_trim_zeros_loop:w #1 0; #2 { #2 #1 ; #2 } \cs_new:Npn \__fp_trim_zeros_dot:w #1 .; { \__fp_trim_zeros_end:w #1 ; } -\cs_new:Npn \__fp_trim_zeros_end:w #1 ; #2 \s__stop { #1 } +\cs_new:Npn \__fp_trim_zeros_end:w #1 ; #2 \s_stop { #1 } \cs_new:Npn \fp_to_scientific:N #1 { \exp_after:wN \__fp_to_scientific_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_scientific:N { c } @@ -16702,7 +16962,7 @@ { \exp_after:wN \__fp_to_scientific_normal:wNw \exp_after:wN e - \__int_value:w \__int_eval:w #2 - 1 + \int_value:w \__fp_int_eval:w #2 - 1 ; #3 #4 #5 #6 ; } \cs_new:Npn \__fp_to_scientific_normal:wNw #1 ; #2#3; @@ -16778,7 +17038,7 @@ } \cs_new:Npn \__fp_to_decimal_large:Nnnw #1#2#3#4; { - \exp_after:wN \__fp_trim_zeros:w \__int_value:w + \exp_after:wN \__fp_trim_zeros:w \int_value:w \if_int_compare:w #2 > 0 \exp_stop_f: #2 \fi: @@ -16825,7 +17085,7 @@ { \exp_after:wN \__fp_to_tl_scientific:wNw \exp_after:wN e - \__int_value:w \__int_eval:w #2 - 1 + \int_value:w \__fp_int_eval:w #2 - 1 ; #3 #4 #5 #6 ; } \cs_new:Npn \__fp_to_tl_scientific:wNw #1 ; #2#3; @@ -16871,7 +17131,7 @@ \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \__int_value:w \etex_glueexpr:D #1 ; + \int_value:w \etex_glueexpr:D #1 ; } \cs_new:Npn \__fp_from_dim_test:ww #1, #2 { @@ -16879,11 +17139,11 @@ \__fp_case_return:nw { \exp_after:wN \c_zero_fp } \else: \exp_after:wN \__fp_from_dim:wNw - \__int_value:w \__int_eval:w #1 - 4 + \int_value:w \__fp_int_eval:w #1 - 4 \if_meaning:w - #2 - \exp_after:wN , \exp_after:wN 2 \__int_value:w + \exp_after:wN , \exp_after:wN 2 \int_value:w \else: - \exp_after:wN , \exp_after:wN 0 \__int_value:w #2 + \exp_after:wN , \exp_after:wN 0 \int_value:w #2 \fi: \fi: } @@ -16917,8 +17177,8 @@ \__fp_expand:n { { \use_ii:nn } - \__fp_array_to_clist_loop:Nw #1 { ? \__prg_break: } ; - \__prg_break_point: + \__fp_array_to_clist_loop:Nw #1 { ? \prg_break: } ; + \prg_break_point: } } } @@ -16950,149 +17210,285 @@ \exp_after:wN \c_nan_fp } \cs_new_eq:NN \__fp_randint_o:Nw \__fp_rand_o:Nw + \cs_new:Npn \int_rand:nn #1#2 + { + \__kernel_msg_expandable_error:nn { kernel } { fp-no-random } + \int_eval:n {#1} + } } \cs_if_exist:NT \pdftex_uniformdeviate:D { -\cs_new:Npn \__fp_rand_uniform: - { \pdftex_uniformdeviate:D \c__fp_rand_size_int } -\int_const:Nn \c__fp_rand_size_int { 268 435 456 } -\int_const:Nn \c__fp_rand_four_int { 268 430 000 } -\int_const:Nn \c__fp_rand_eight_int { 200 000 000 } -\cs_new:Npn \__fp_rand_myriads:n #1 - { - \__fp_rand_myriads_loop:nn #1 - { ? \use_i_delimit_by_q_stop:nw \__fp_rand_myriads_last: } - { ? \use_none_delimit_by_q_stop:w } \q_stop - } -\cs_new:Npn \__fp_rand_myriads_loop:nn #1#2 - { - \use_none:n #2 - \exp_after:wN \__fp_rand_myriads_get:w - \__int_value:w \__fp_rand_uniform: ; {#1}{#2} - } -\cs_new:Npn \__fp_rand_myriads_get:w #1 ; - { - \if_int_compare:w #1 < \c__fp_rand_eight_int - \exp_after:wN \use_none:n - \__int_value:w \__int_eval:w - \c__fp_rand_eight_int + #1 \__int_eval_end: - \exp_after:wN \use_i:nnn - \else: - \if_int_compare:w #1 < \c__fp_rand_four_int - \exp_after:wN \use_none:nnnnn - \__int_value:w \__int_eval:w - \c__fp_rand_four_int + #1 \__int_eval_end: - \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn - \fi: - \fi: - \__fp_rand_myriads_loop:nn - } -\cs_new:Npn \__fp_rand_myriads_last: - { - \exp_after:wN \__fp_rand_myriads_last:w - \__int_value:w \__fp_rand_uniform: ; - } -\cs_new:Npn \__fp_rand_myriads_last:w #1 ; - { - \if_int_compare:w #1 < \c__fp_rand_four_int - \exp_after:wN \use_none:nnnnn - \__int_value:w \__int_eval:w - \c__fp_rand_four_int + #1 \__int_eval_end: - \else: - \exp_after:wN \__fp_rand_myriads_last: - \fi: - } -\cs_new:Npn \__fp_rand_o:Nw ? #1 @ - { - \tl_if_empty:nTF {#1} - { \__fp_rand_o: } + \cs_new:Npn \__fp_rand_uniform: + { \pdftex_uniformdeviate:D \c__fp_rand_size_int } + \int_const:Nn \c__fp_rand_size_int { 268 435 456 } + \int_const:Nn \c__fp_rand_four_int { 268 430 000 } + \int_const:Nn \c__fp_rand_eight_int { 200 000 000 } + \cs_new:Npn \__fp_rand_myriads:n #1 { - \__kernel_msg_expandable_error:nnnnn - { kernel } { fp-num-args } { rand() } { 0 } { 0 } - \exp_after:wN \c_nan_fp + \__fp_rand_myriads_loop:nn #1 + { ? \use_i_delimit_by_q_stop:nw \__fp_rand_myriads_last: } + { ? \use_none_delimit_by_q_stop:w } \q_stop } - } -\cs_new:Npn \__fp_rand_o: - { \__fp_parse_o:n { . \__fp_rand_myriads:n { xxxx } } } -\cs_new:Npn \__fp_randint_o:Nw ? - { - \__fp_parse_function_one_two:nnw - { randint } - { \__fp_randint_default:w \__fp_randint_o:w } - } -\cs_new:Npn \__fp_randint_default:w #1 { \exp_after:wN #1 \c_one_fp } -\cs_new:Npn \__fp_randint_badarg:w \s__fp \__fp_chk:w #1#2#3; - { - \__fp_int:wTF \s__fp \__fp_chk:w #1#2#3; + \cs_new:Npn \__fp_rand_myriads_loop:nn #1#2 { - \if_meaning:w 1 #1 - \if_int_compare:w - \use_i_delimit_by_q_stop:nw #3 \q_stop > \c__fp_prec_int - 1 \exp_stop_f: + \use_none:n #2 + \exp_after:wN \__fp_rand_myriads_get:w + \int_value:w \__fp_rand_uniform: ; {#1}{#2} + } + \cs_new:Npn \__fp_rand_myriads_get:w #1 ; + { + \if_int_compare:w #1 < \c__fp_rand_eight_int + \exp_after:wN \use_none:n + \int_value:w \__fp_int_eval:w + \c__fp_rand_eight_int + #1 \__fp_int_eval_end: + \exp_after:wN \use_i:nnn + \else: + \if_int_compare:w #1 < \c__fp_rand_four_int + \exp_after:wN \use_none:nnnnn + \int_value:w \__fp_int_eval:w + \c__fp_rand_four_int + #1 \__fp_int_eval_end: + \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn \fi: \fi: + \__fp_rand_myriads_loop:nn + } + \cs_new:Npn \__fp_rand_myriads_last: + { + \exp_after:wN \__fp_rand_myriads_last:w + \int_value:w \__fp_rand_uniform: ; + } + \cs_new:Npn \__fp_rand_myriads_last:w #1 ; + { + \if_int_compare:w #1 < \c__fp_rand_four_int + \exp_after:wN \use_none:nnnnn + \int_value:w \__fp_int_eval:w + \c__fp_rand_four_int + #1 \__fp_int_eval_end: + \else: + \exp_after:wN \__fp_rand_myriads_last: + \fi: + } + \cs_new:Npn \__fp_rand_o:Nw ? #1 @ + { + \tl_if_empty:nTF {#1} + { \__fp_rand_o: } + { + \__kernel_msg_expandable_error:nnnnn + { kernel } { fp-num-args } { rand() } { 0 } { 0 } + \exp_after:wN \c_nan_fp + } + } + \cs_new:Npn \__fp_rand_o: + { \__fp_parse_o:n { . \__fp_rand_myriads:n { xxxx } } } + \cs_new:Npn \__fp_randint_o:Nw ? + { + \__fp_parse_function_one_two:nnw + { randint } + { \__fp_randint_default:w \__fp_randint_o:w } + } + \cs_new:Npn \__fp_randint_default:w #1 { \exp_after:wN #1 \c_one_fp } + \cs_new:Npn \__fp_randint_badarg:w \s__fp \__fp_chk:w #1#2#3; + { + \__fp_int:wTF \s__fp \__fp_chk:w #1#2#3; + { + \if_meaning:w 1 #1 + \if_int_compare:w + \use_i_delimit_by_q_stop:nw #3 \q_stop > \c__fp_prec_int + 1 \exp_stop_f: + \fi: + \fi: + } + { 1 \exp_stop_f: } + } + \cs_new:Npn \__fp_randint_o:w #1; #2; @ + { + \if_case:w + \__fp_randint_badarg:w #1; + \__fp_randint_badarg:w #2; + \fp_compare:nNnTF { #1; } > { #2; } { 1 } { 0 } \exp_stop_f: + \exp_after:wN \exp_after:wN \exp_after:wN \__fp_randint_e:wnn + \__fp_parse:n { #2; - #1; } { #1; } { #2; } + \or: + \__fp_invalid_operation_tl_o:ff + { randint } { \__fp_array_to_clist:n { #1; #2; } } + \exp:w + \fi: + \exp_after:wN \exp_end: + } + \cs_new:Npn \__fp_randint_e:wnn #1; + { + \exp_after:wN \__fp_randint_e:wwNnn + \int_value:w \__fp_rand_uniform: \exp_after:wN ; + \exp:w \exp_end_continue_f:w + \fp_compare:nNnTF { #1 ; } < \c__fp_rand_size_int + { \fp_to_int:n { #1 ; + 1 } ; \__fp_randint_narrow_e:nnnn } + { + \fp_to_int:n { floor(#1 ; * 1e-8 + 1) } ; + \__fp_randint_wide_e:nnnn + } + } + \cs_new:Npn \__fp_randint_e:wwNnn #1 ; #2 ; + { + \exp_after:wN \__fp_randint_e:wwwNnn + \int_value:w \int_mod:nn {#1} {#2} ; #1 ; #2 ; + } + \cs_new:Npn \__fp_randint_e:wwwNnn #1 ; #2 ; #3 ; #4 + { + \int_compare:nNnTF { #2 - #1 + #3 } > \c__fp_rand_size_int + { + \exp_after:wN \__fp_randint_e:wwNnn + \int_value:w \__fp_rand_uniform: ; #3 ; #4 + } + { #4 {#1} {#3} } + } + \cs_new:Npn \__fp_randint_narrow_e:nnnn #1#2#3#4 + { \__fp_parse_o:n { #3 + #1 } \exp:w } + \cs_new:Npn \__fp_randint_wide_e:nnnn #1#2#3#4 + { + \exp_after:wN \exp_after:wN + \exp_after:wN \__fp_randint_wide_e:wnnn + \__fp_parse:n { #3 + #1e8 + \__fp_rand_myriads:n { xx } } + {#2} {#3} {#4} + } + \cs_new:Npn \__fp_randint_wide_e:wnnn #1 ; #2#3#4 + { + \fp_compare:nNnTF { #1 ; } > {#4} + { + \exp_after:wN \__fp_randint_e:wwNnn + \int_value:w \__fp_rand_uniform: ; #2 ; + \__fp_randint_wide_e:nnnn {#3} {#4} + } + { \__fp_exp_after_o:w #1 ; \exp:w } + } + \cs_new:Npn \int_rand:nn #1#2 + { + \exp_after:wN \__fp_randint:ww + \int_value:w \int_eval:n {#1} \exp_after:wN ; + \int_value:w \int_eval:n {#2} ; + } + \cs_new:Npn \__fp_randint:ww #1; #2; + { + \int_compare:nNnTF {#1} > {#2} + { + \__kernel_msg_expandable_error:nnnn + { kernel } { randint-backward-range } {#1} {#2} + \__fp_randint:ww #2; #1; + } + { + \int_compare:nNnTF {#1} > 0 + { \int_compare:nNnTF { #2 - #1 } < \c__fp_rand_size_int } + { \int_compare:nNnTF {#2} < { #1 + \c__fp_rand_size_int } } + { + \int_eval:n + { + #1 + + \exp_args:Nf \__fp_randint_narrow:n + { \int_eval:n { #2 - #1 + 1 } } + } + } + { \fp_to_int:n { randint(#1,#2) } } + } + } + \cs_new:Npn \__fp_randint_narrow:n #1 + { + \exp_args:Nf \__fp_randint_narrow:nn + { \int_div_truncate:nn \c__fp_rand_size_int {#1} } {#1} + } + \cs_new:Npn \__fp_randint_narrow:nn #1 + { + \exp_args:Nf \__fp_randint_narrow:nnn + { + \int_div_truncate:nn + { \pdftex_uniformdeviate:D \c__fp_rand_size_int } {#1} + } + {#1} + } + \cs_new:Npn \__fp_randint_narrow:nnn #1#2#3 + { + \int_compare:nNnTF {#1} < {#3} + {#1} + { \__fp_randint_narrow:nn {#2} {#3} } } - { 1 \exp_stop_f: } } -\cs_new:Npn \__fp_randint_o:w #1; #2; @ +%% File: l3intarray.dtx Copyright (C) 2017-2018 The LaTeX3 Project +\dim_const:Nn \c__intarray_sp_dim { 1 sp } +\int_new:N \g__intarray_font_int +\__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN g #1 } { } +\cs_new_protected:Npn \intarray_new:Nn #1#2 { - \if_case:w - \__fp_randint_badarg:w #1; - \__fp_randint_badarg:w #2; - \fp_compare:nNnTF { #1; } > { #2; } { 1 } { 0 } \exp_stop_f: - \exp_after:wN \exp_after:wN \exp_after:wN \__fp_randint_e:wnn - \__fp_parse:n { #2; - #1; } { #1; } { #2; } - \or: - \__fp_invalid_operation_tl_o:ff - { randint } { \__fp_array_to_clist:n { #1; #2; } } - \exp:w + \__kernel_chk_if_free_cs:N #1 + \int_gincr:N \g__intarray_font_int + \tex_global:D \tex_font:D #1 + = cmr10~at~ \g__intarray_font_int \c__intarray_sp_dim \scan_stop: + \tex_hyphenchar:D #1 = \int_eval:n {#2} \scan_stop: + \int_compare:nNnT { \tex_hyphenchar:D #1 } > 0 + { \tex_fontdimen:D \tex_hyphenchar:D #1 #1 = \c_zero_dim } + \int_step_inline:nn { 8 } { \tex_fontdimen:D ##1 #1 = \c_zero_dim } + } +\cs_new:Npn \intarray_count:N #1 { \tex_the:D \tex_hyphenchar:D #1 } +\cs_new:Npn \__intarray_bounds:NNnTF #1#2#3#4#5 + { + \if_int_compare:w 1 > #3 \exp_stop_f: + \__intarray_bounds_error:NNn #1 #2 {#3} + #5 + \else: + \if_int_compare:w #3 > \intarray_count:N #2 \exp_stop_f: + \__intarray_bounds_error:NNn #1 #2 {#3} + #5 + \else: + #4 + \fi: \fi: - \exp_after:wN \exp_end: } -\cs_new:Npn \__fp_randint_e:wnn #1; +\cs_new:Npn \__intarray_bounds_error:NNn #1#2#3 { - \exp_after:wN \__fp_randint_e:wwNnn - \__int_value:w \__fp_rand_uniform: \exp_after:wN ; - \exp:w \exp_end_continue_f:w - \fp_compare:nNnTF { #1 ; } < \c__fp_rand_size_int - { \fp_to_int:n { #1 ; + 1 } ; \__fp_randint_narrow_e:nnnn } - { \fp_to_int:n { floor(#1 ; * 1e-8 + 1) } ; \__fp_randint_wide_e:nnnn } + #1 { kernel } { out-of-bounds } + { \token_to_str:N #2 } {#3} { \intarray_count:N #2 } } -\cs_new:Npn \__fp_randint_e:wwNnn #1 ; #2 ; +\cs_new_protected:Npn \__kernel_intarray_gset:Nnn #1#2#3 + { \tex_fontdimen:D #2 #1 #3 \c__intarray_sp_dim } +\cs_new_protected:Npn \intarray_gset:Nnn #1#2#3 { - \exp_after:wN \__fp_randint_e:wwwNnn - \__int_value:w \int_mod:nn {#1} {#2} ; #1 ; #2 ; + \exp_after:wN \__intarray_gset:Nww + \exp_after:wN #1 + \int_value:w \int_eval:n {#2} \exp_after:wN ; + \int_value:w \int_eval:n {#3} ; } -\cs_new:Npn \__fp_randint_e:wwwNnn #1 ; #2 ; #3 ; #4 +\cs_new_protected:Npn \__intarray_gset:Nww #1#2 ; #3 ; { - \int_compare:nNnTF { #2 - #1 + #3 } > \c__fp_rand_size_int + \__intarray_bounds:NNnTF \__kernel_msg_error:nnxxx #1 {#2} { - \exp_after:wN \__fp_randint_e:wwNnn - \__int_value:w \__fp_rand_uniform: ; #3 ; #4 + \if_int_compare:w \int_abs:n {#3} > \c_max_dim + \exp_after:wN \__intarray_gset_overflow:NNnn + \fi: + \__kernel_intarray_gset:Nnn #1 {#2} {#3} } - { #4 {#1} {#3} } + { } } -\cs_new:Npn \__fp_randint_narrow_e:nnnn #1#2#3#4 - { \__fp_parse_o:n { #3 + #1 } \exp:w } -\cs_new:Npn \__fp_randint_wide_e:nnnn #1#2#3#4 +\cs_new_protected:Npn \__intarray_gset_overflow:NNnn #1#2#3#4 { - \exp_after:wN \exp_after:wN - \exp_after:wN \__fp_randint_wide_e:wnnn - \__fp_parse:n { #3 + #1e8 + \__fp_rand_myriads:n { xx } } - {#2} {#3} {#4} + \__kernel_msg_error:nnxxxx { kernel } { overflow } + { \token_to_str:N #2 } {#3} {#4} + { \int_value:w \int_compare:nNnT {#4} < 0 { - } \c_max_dim } + \__kernel_intarray_gset:Nnn #2 {#3} + { \int_value:w \int_compare:nNnT {#4} < 0 { - } \c_max_dim } } -\cs_new:Npn \__fp_randint_wide_e:wnnn #1 ; #2#3#4 +\cs_new:Npn \__kernel_intarray_item:Nn #1#2 + { \int_value:w \tex_fontdimen:D #2 #1 } +\cs_new:Npn \intarray_item:Nn #1#2 { - \fp_compare:nNnTF { #1 ; } > {#4} - { - \exp_after:wN \__fp_randint_e:wwNnn - \__int_value:w \__fp_rand_uniform: ; #2 ; - \__fp_randint_wide_e:nnnn {#3} {#4} - } - { \__fp_exp_after_o:w #1 ; \exp:w } + \exp_after:wN \__intarray_item:Nw + \exp_after:wN #1 + \int_value:w \int_eval:n {#2} ; } +\cs_new:Npn \__intarray_item:Nw #1#2 ; + { + \__intarray_bounds:NNnTF \__kernel_msg_expandable_error:nnfff #1 {#2} + { \__kernel_intarray_item:Nn #1 {#2} } + { 0 } } %% File l3sort.dtx (C) Copyright 2012-2018 The LaTeX3 Project +\seq_new:N \g__sort_internal_seq +\tl_new:N \g__sort_internal_tl \int_new:N \l__sort_length_int \int_new:N \l__sort_min_int \int_new:N \l__sort_top_int @@ -17175,87 +17571,80 @@ } } } -\cs_new_protected:Npn \__sort_main:NNNnNn #1#2#3#4#5#6 +\cs_new_protected:Npn \__sort_main:NNNn #1#2#3#4 + { + \__sort_disable_toksdef: + \__sort_compute_range: + \int_set_eq:NN \l__sort_top_int \l__sort_min_int + #1 #3 + { + \if_int_compare:w \l__sort_top_int = \l__sort_max_int + \__sort_too_long_error:NNw #2 #3 + \fi: + \tex_toks:D \l__sort_top_int {##1} + \int_incr:N \l__sort_top_int + } + \int_set:Nn \l__sort_length_int + { \l__sort_top_int - \l__sort_min_int } + \cs_set:Npn \__sort_compare:nn ##1 ##2 {#4} + \int_set:Nn \l__sort_block_int { 1 } + \__sort_level: + } +\cs_new_protected:Npn \tl_sort:Nn { \__sort_tl:NNn \tl_set_eq:NN } +\cs_generate_variant:Nn \tl_sort:Nn { c } +\cs_new_protected:Npn \tl_gsort:Nn { \__sort_tl:NNn \tl_gset_eq:NN } +\cs_generate_variant:Nn \tl_gsort:Nn { c } +\cs_new_protected:Npn \__sort_tl:NNn #1#2#3 { \group_begin: - \__sort_disable_toksdef: - \__sort_compute_range: - \int_set_eq:NN \l__sort_top_int \l__sort_min_int - #2 #5 - { - \if_int_compare:w \l__sort_top_int = \l__sort_max_int - \__sort_too_long_error:NNw #3 #5 - \fi: - \tex_toks:D \l__sort_top_int {##1} - \int_incr:N \l__sort_top_int - } - \int_set:Nn \l__sort_length_int - { \l__sort_top_int - \l__sort_min_int } - \cs_set:Npn \__sort_compare:nn ##1 ##2 { #6 } - \int_set:Nn \l__sort_block_int { 1 } - \__sort_level: - \use:x - { - \group_end: - #1 \exp_not:N #5 {#4} - } + \__sort_main:NNNn \tl_map_inline:Nn \tl_map_break:n #2 {#3} + \tl_gset:Nx \g__sort_internal_tl + { \__sort_tl_toks:w \l__sort_min_int ; } + \group_end: + #1 #2 \g__sort_internal_tl + \tl_gclear:N \g__sort_internal_tl + \prg_break_point: } -\cs_new_protected:Npn \seq_sort:Nn +\cs_new:Npn \__sort_tl_toks:w #1 ; { - \__sort_main:NNNnNn \tl_set:Nn - \seq_map_inline:Nn \seq_map_break:n - { \s__seq \__sort_toks:NN \exp_not:N \__seq_item:n } + \if_int_compare:w #1 < \l__sort_top_int + { \tex_the:D \tex_toks:D #1 } + \exp_after:wN \__sort_tl_toks:w + \int_value:w \int_eval:n { #1 + 1 } \exp_after:wN ; + \fi: } +\cs_new_protected:Npn \seq_sort:Nn + { \__sort_seq:NNNNn \seq_map_inline:Nn \seq_map_break:n \seq_set_eq:NN } \cs_generate_variant:Nn \seq_sort:Nn { c } \cs_new_protected:Npn \seq_gsort:Nn - { - \__sort_main:NNNnNn \tl_gset:Nn - \seq_map_inline:Nn \seq_map_break:n - { \s__seq \__sort_toks:NN \exp_not:N \__seq_item:n } - } + { \__sort_seq:NNNNn \seq_map_inline:Nn \seq_map_break:n \seq_gset_eq:NN } \cs_generate_variant:Nn \seq_gsort:Nn { c } -\cs_new_protected:Npn \tl_sort:Nn - { - \__sort_main:NNNnNn \tl_set:Nn - \tl_map_inline:Nn \tl_map_break:n - { \__sort_toks:NN \prg_do_nothing: \prg_do_nothing: } - } -\cs_generate_variant:Nn \tl_sort:Nn { c } -\cs_new_protected:Npn \tl_gsort:Nn +\cs_new_protected:Npn \clist_sort:Nn { - \__sort_main:NNNnNn \tl_gset:Nn - \tl_map_inline:Nn \tl_map_break:n - { \__sort_toks:NN \prg_do_nothing: \prg_do_nothing: } + \__sort_seq:NNNNn \clist_map_inline:Nn \clist_map_break:n + \clist_set_from_seq:NN } -\cs_generate_variant:Nn \tl_gsort:Nn { c } -\cs_new_protected:Npn \clist_sort:Nn - { \__sort_clist:NNn \tl_set:Nn } +\cs_generate_variant:Nn \clist_sort:Nn { c } \cs_new_protected:Npn \clist_gsort:Nn - { \__sort_clist:NNn \tl_gset:Nn } -\cs_generate_variant:Nn \clist_sort:Nn { c } -\cs_generate_variant:Nn \clist_gsort:Nn { c } -\cs_new_protected:Npn \__sort_clist:NNn #1#2#3 { - \clist_if_empty:NF #2 - { - \__sort_main:NNNnNn #1 - \clist_map_inline:Nn \clist_map_break:n - { - \exp_last_unbraced:Nf \use_none:n - { \__sort_toks:NN \exp_args:No \__clist_wrap_item:n } - } - #2 {#3} - } + \__sort_seq:NNNNn \clist_map_inline:Nn \clist_map_break:n + \clist_gset_from_seq:NN } -\cs_new:Npn \__sort_toks:NN #1#2 - { \__sort_toks:NNw #1 #2 \l__sort_min_int ; } -\cs_new:Npn \__sort_toks:NNw #1#2#3 ; +\cs_generate_variant:Nn \clist_gsort:Nn { c } +\cs_new_protected:Npn \__sort_seq:NNNNn #1#2#3#4#5 { - \if_int_compare:w #3 < \l__sort_top_int - #1 #2 { \tex_the:D \tex_toks:D #3 } - \exp_after:wN \__sort_toks:NNw \exp_after:wN #1 \exp_after:wN #2 - \__int_value:w \__int_eval:w #3 + 1 \exp_after:wN ; - \fi: + \group_begin: + \__sort_main:NNNn #1 #2 #4 {#5} + \seq_gset_from_inline_x:Nnn \g__sort_internal_seq + { + \int_step_function:nnN + { \l__sort_min_int } { \l__sort_top_int - 1 } + } + { \tex_the:D \tex_toks:D ##1 } + \group_end: + #3 #4 \g__sort_internal_seq + \seq_gclear:N \g__sort_internal_seq + \prg_break_point: } \cs_new_protected:Npn \__sort_level: { @@ -17307,9 +17696,17 @@ \__sort_return_none_error: } \cs_new_protected:Npn \sort_return_same: #1 \__sort_return_mark:N - { #1 \__sort_return_mark:N \__sort_return_two_error:w \__sort_return_same: } + { + #1 + \__sort_return_mark:N + \__sort_return_two_error:w \__sort_return_same: + } \cs_new_protected:Npn \sort_return_swapped: #1 \__sort_return_mark:N - { #1 \__sort_return_mark:N \__sort_return_two_error:w \__sort_return_swapped: } + { + #1 + \__sort_return_mark:N + \__sort_return_two_error:w \__sort_return_swapped: + } \cs_new_protected:Npn \__sort_return_mark:N #1 { } \cs_new_protected:Npn \__sort_return_none_error: { @@ -17359,50 +17756,55 @@ { \__sort_quick_prepare:Nnnn #2 { } { } #1 - { \__prg_break_point: \__sort_quick_prepare_end:NNNnw } + { \prg_break_point: \__sort_quick_prepare_end:NNNnw } \q_stop } } } \cs_new:Npn \__sort_quick_prepare:Nnnn #1#2#3#4 { - \__prg_break: #4 \__prg_break_point: + \prg_break: #4 \prg_break_point: \__sort_quick_prepare:Nnnn #1 { #2 #3 } { #1 {#4} } } \cs_new:Npn \__sort_quick_prepare_end:NNNnw #1#2#3#4#5 \q_stop { \__sort_quick_split:NnNn #4 \__sort_quick_end:nnTFNn { } \q_mark { \__sort_quick_cleanup:w \exp_stop_f: } - \s__stop \q_stop + \s_stop \q_stop } -\cs_new:Npn \__sort_quick_cleanup:w #1 \s__stop \q_stop {#1} +\cs_new:Npn \__sort_quick_cleanup:w #1 \s_stop \q_stop {#1} \cs_new:Npn \__sort_quick_split:NnNn #1#2#3#4 { - #3 {#2} {#4} \__sort_quick_only_ii:NnnnnNn \__sort_quick_only_i:NnnnnNn + #3 {#2} {#4} \__sort_quick_only_ii:NnnnnNn + \__sort_quick_only_i:NnnnnNn \__sort_quick_single_end:nnnwnw { #3 {#4} } { } { } {#2} } \cs_new:Npn \__sort_quick_only_i:NnnnnNn #1#2#3#4#5#6#7 { - #6 {#5} {#7} \__sort_quick_split_ii:NnnnnNn \__sort_quick_only_i:NnnnnNn + #6 {#5} {#7} \__sort_quick_split_ii:NnnnnNn + \__sort_quick_only_i:NnnnnNn \__sort_quick_only_i_end:nnnwnw { #6 {#7} } { #3 #2 } { } {#5} } \cs_new:Npn \__sort_quick_only_ii:NnnnnNn #1#2#3#4#5#6#7 { - #6 {#5} {#7} \__sort_quick_only_ii:NnnnnNn \__sort_quick_split_i:NnnnnNn + #6 {#5} {#7} \__sort_quick_only_ii:NnnnnNn + \__sort_quick_split_i:NnnnnNn \__sort_quick_only_ii_end:nnnwnw { #6 {#7} } { } { #4 #2 } {#5} } \cs_new:Npn \__sort_quick_split_i:NnnnnNn #1#2#3#4#5#6#7 { - #6 {#5} {#7} \__sort_quick_split_ii:NnnnnNn \__sort_quick_split_i:NnnnnNn + #6 {#5} {#7} \__sort_quick_split_ii:NnnnnNn + \__sort_quick_split_i:NnnnnNn \__sort_quick_split_end:nnnwnw { #6 {#7} } { #3 #2 } {#4} {#5} } \cs_new:Npn \__sort_quick_split_ii:NnnnnNn #1#2#3#4#5#6#7 { - #6 {#5} {#7} \__sort_quick_split_ii:NnnnnNn \__sort_quick_split_i:NnnnnNn + #6 {#5} {#7} \__sort_quick_split_ii:NnnnnNn + \__sort_quick_split_i:NnnnnNn \__sort_quick_split_end:nnnwnw { #6 {#7} } {#3} { #4 #2 } {#5} } @@ -17436,7 +17838,7 @@ { \cs_set_eq:NN \__sort_merge_blocks_aux: \prg_do_nothing: \cs_set_eq:NN \__sort_merge_blocks: \prg_do_nothing: - \cs_set_protected:Npn \__sort_level: \use:x ##1 { \group_end: } + \cs_set_protected:Npn \__sort_level: { \group_end: \prg_break: } } \cs_new_protected:Npn \__sort_disable_toksdef: { \cs_set_eq:NN \toksdef \__sort_disabled_toksdef:n } @@ -17451,7 +17853,8 @@ { Allocation~of~\iow_char:N\\toks~registers~impossible~while~sorting. } { The~comparison~code~used~for~sorting~a~list~has~attempted~to~ - define~#1~as~a~new~\iow_char:N\\toks~register~using~\iow_char:N\\newtoks~ + define~#1~as~a~new~\iow_char:N\\toks~register~using~ + \iow_char:N\\newtoks~ or~a~similar~command.~The~list~will~not~be~sorted. } \cs_new_protected:Npn \__sort_too_long_error:NNw #1#2 \fi: @@ -17468,7 +17871,7 @@ { TeX~has~#2~toks~registers~still~available:~ this~only~allows~to~sort~with~up~to~#3~ - items.~All~extra~items~will~be~deleted. + items.~The~list~will~not~be~sorted. } \__kernel_msg_new:nnnn { kernel } { return-none } { The~comparison~code~did~not~return. } @@ -17491,75 +17894,8 @@ \cs_new_protected:Npn \sort_ordered: { \sort_return_same: } \__kernel_patch_deprecation:nnNNpn { 2018-12-31 } { \sort_return_swapped: } \cs_new_protected:Npn \sort_reversed: { \sort_return_swapped: } -%% File: l3tl-build.dtx Copyright (C) 2011-2017 The LaTeX3 Project -\int_new:N \l__tl_build_start_index_int -\int_new:N \l__tl_build_index_int -\tl_new:N \l__tl_build_result_tl -\cs_new_protected:Npn \__tl_build_unpack: - { - \tl_put_right:Nx \l__tl_build_result_tl - { - \exp_after:wN \__tl_build_unpack_loop:w - \int_use:N \l__tl_build_start_index_int ; - \__prg_break_point: - } - } -\cs_new:Npn \__tl_build_unpack_loop:w #1 ; - { - \if_int_compare:w #1 = \l__tl_build_index_int - \exp_after:wN \__prg_break: - \fi: - \tex_the:D \tex_toks:D #1 \exp_stop_f: - \exp_after:wN \__tl_build_unpack_loop:w - \int_use:N \__int_eval:w #1 + 1 ; - } -\cs_new_protected:Npn \__tl_build:Nw - { \__tl_build_aux:NNw \tl_set:Nn } -\cs_new_protected:Npn \__tl_build_x:Nw - { \__tl_build_aux:NNw \tl_set:Nx } -\cs_new_protected:Npn \__tl_gbuild:Nw - { \__tl_build_aux:NNw \tl_gset:Nn } -\cs_new_protected:Npn \__tl_gbuild_x:Nw - { \__tl_build_aux:NNw \tl_gset:Nx } -\cs_new_protected:Npn \__tl_build_aux:NNw #1#2 - { - \group_begin: - \cs_set:Npn \__tl_build_end_assignment:n - { \group_end: #1 #2 } - \int_zero:N \l__tl_build_start_index_int - \int_zero:N \l__tl_build_index_int - \tl_clear:N \l__tl_build_result_tl - } -\cs_new_protected:Npn \__tl_build_end: - { - \__tl_build_unpack: - \exp_args:No - \__tl_build_end_assignment:n \l__tl_build_result_tl - } -\cs_new_eq:NN \__tl_build_end_assignment:n \use_none:n -\cs_new_protected:Npn \__tl_build_one:n #1 - { - \tex_toks:D \l__tl_build_index_int {#1} - \int_incr:N \l__tl_build_index_int - \if_int_compare:w \l__tl_build_index_int > \c_max_register_int - \__tl_build_unpack: - \l__tl_build_index_int \l__tl_build_start_index_int - \fi: - } -\cs_new_protected:Npn \__tl_build_one:o #1 - { - \tex_toks:D \l__tl_build_index_int \exp_after:wN {#1} - \int_incr:N \l__tl_build_index_int - \if_int_compare:w \l__tl_build_index_int > \c_max_register_int - \__tl_build_unpack: - \l__tl_build_index_int \l__tl_build_start_index_int - \fi: - } -\cs_new_protected:Npn \__tl_build_one:x #1 - { \use:x { \__tl_build_one:n {#1} } } -%% File: l3tl-analysis.dtx Copyright (C) 2011-2017 The LaTeX3 Project% -\__scan_new:N \s__tl -\tl_new:N \l__tl_analysis_internal_tl +%% File: l3tl-analysis.dtx Copyright (C) 2011-2018 The LaTeX3 Project +\scan_new:N \s__tl \cs_new_eq:NN \l__tl_analysis_token ? \cs_new_eq:NN \l__tl_analysis_char_token ? \int_new:N \l__tl_analysis_normal_int @@ -17576,7 +17912,7 @@ \cs_new:Npn \__tl_analysis_cs_space_count:NN #1 #2 { \exp_after:wN #1 - \__int_value:w \__int_eval:w 0 + \int_value:w \int_eval:w 0 \exp_after:wN \__tl_analysis_cs_space_count:w \token_to_str:N #2 \fi: \__tl_analysis_cs_space_count_end:w ; ~ ! @@ -17588,7 +17924,7 @@ \__tl_analysis_cs_space_count:w } \cs_new:Npn \__tl_analysis_cs_space_count_end:w ; #1 \fi: #2 ! - { \exp_after:wN ; \__int_value:w \str_count_ignore_spaces:n {#1} ; } + { \exp_after:wN ; \int_value:w \str_count_ignore_spaces:n {#1} ; } \cs_new_protected:Npn \__tl_analysis:n #1 { \group_begin: @@ -17605,7 +17941,9 @@ \tex_lccode:D 0 = #1 \exp_stop_f: \tex_lowercase:D { \tex_let:D ^^@ } \tex_undefined:D } - \cs_if_exist:NT \ptex_kanjiskip:D + \bool_lazy_or:nnT + { \sys_if_engine_ptex_p: } + { \sys_if_engine_uptex_p: } { \cs_gset_protected:Npn \__tl_analysis_disable:n #1 { @@ -17718,7 +18056,8 @@ \tex_advance:D \l__tl_analysis_type_int \l__tl_analysis_type_int \fi: \tex_skip:D \l__tl_analysis_index_int - = \l__tl_analysis_normal_int sp plus \l__tl_analysis_type_int sp \scan_stop: + = \l__tl_analysis_normal_int sp + plus \l__tl_analysis_type_int sp \scan_stop: \int_incr:N \l__tl_analysis_index_int \int_zero:N \l__tl_analysis_normal_int \if_int_compare:w \l__tl_analysis_nesting_int = -1 \exp_stop_f: @@ -17746,7 +18085,7 @@ { \if_int_compare:w #1 > 0 \exp_stop_f: \tex_skip:D \l__tl_analysis_index_int - = \__int_eval:w \l__tl_analysis_normal_int + 1 sp \scan_stop: + = \int_eval:n { \l__tl_analysis_normal_int + 1 } sp \exp_stop_f: \tex_advance:D \l__tl_analysis_index_int #1 \exp_stop_f: \else: \tex_advance:D @@ -17758,13 +18097,13 @@ \tl_gset:Nx \g__tl_analysis_result_tl { \__tl_analysis_b_loop:w 0; #1 - \__prg_break_point: + \prg_break_point: } } \cs_new:Npn \__tl_analysis_b_loop:w #1; { \exp_after:wN \__tl_analysis_b_normals:ww - \__int_value:w \tex_skip:D #1 ; #1 ; + \int_value:w \tex_skip:D #1 ; #1 ; } \cs_new:Npn \__tl_analysis_b_normals:ww #1; { @@ -17794,17 +18133,21 @@ \token_to_str:N C \exp_not:N \else: \exp_not:N \if_catcode:w #1 \c_catcode_letter_token \token_to_str:N B \exp_not:N \else: - \exp_not:N \if_catcode:w #1 \c_math_toggle_token 3 \exp_not:N \else: - \exp_not:N \if_catcode:w #1 \c_alignment_token 4 \exp_not:N \else: - \exp_not:N \if_catcode:w #1 \c_math_superscript_token 7 \exp_not:N \else: - \exp_not:N \if_catcode:w #1 \c_math_subscript_token 8 \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_math_toggle_token 3 + \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_alignment_token 4 + \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_math_superscript_token 7 + \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_math_subscript_token 8 + \exp_not:N \else: \exp_not:N \if_catcode:w #1 \c_space_token \token_to_str:N A \exp_not:N \else: 6 \exp_not:n { \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: } - \exp_not:N \__int_value:w `#1 \s__tl + \exp_not:N \int_value:w `#1 \s__tl \exp_not:N \exp_after:wN \exp_not:N \__tl_analysis_b_normals:ww - \exp_not:N \__int_value:w \exp_not:N \__int_eval:w - 1 + + \exp_not:N \int_value:w \exp_not:N \int_eval:w - 1 + } \cs_new:Npn \__tl_analysis_b_cs:Nww #1 { @@ -17814,15 +18157,15 @@ \cs_new:Npn \__tl_analysis_b_cs_test:ww #1 ; #2 ; #3 ; #4 ; { \exp_after:wN \__tl_analysis_b_normals:ww - \__int_value:w \__int_eval:w + \int_value:w \int_eval:w \if_int_compare:w #1 = 0 \exp_stop_f: #3 \else: - \tex_skip:D \__int_eval:w #4 + #1 \__int_eval_end: + \tex_skip:D \int_eval:n { #4 + #1 } \exp_stop_f: \fi: - #2 \exp_after:wN ; - \__int_value:w \__int_eval:w #4 + #1 ; + \int_value:w \int_eval:n { #4 + #1 } ; } \group_begin: \char_set_catcode_other:N A @@ -17831,7 +18174,7 @@ { \fi: \if_int_compare:w #1 = \l__tl_analysis_index_int - \exp_after:wN \__prg_break: + \exp_after:wN \prg_break: \fi: \tex_the:D \tex_toks:D #1 \s__tl \if_case:w \etex_gluestretch:D \tex_skip:D #1 \exp_stop_f: @@ -17841,17 +18184,17 @@ \else: 2 \fi: \if_int_odd:w \etex_gluestretch:D \tex_skip:D #1 \exp_stop_f: - \exp_after:wN \__tl_analysis_b_special_char:wN \__int_value:w + \exp_after:wN \__tl_analysis_b_special_char:wN \int_value:w \else: - \exp_after:wN \__tl_analysis_b_special_space:w \__int_value:w + \exp_after:wN \__tl_analysis_b_special_space:w \int_value:w \fi: - \__int_eval:w 1 + #1 \exp_after:wN ; + \int_eval:n { 1 + #1 } \exp_after:wN ; \token_to_str:N } \group_end: \cs_new:Npn \__tl_analysis_b_special_char:wN #1 ; #2 { - \__int_value:w `#2 \s__tl + \int_value:w `#2 \s__tl \__tl_analysis_b_loop:w #1 ; } \cs_new:Npn \__tl_analysis_b_special_space:w #1 ; ~ @@ -17859,27 +18202,34 @@ 32 \s__tl \__tl_analysis_b_loop:w #1 ; } -\cs_new_protected:Npn \__tl_analysis_map_inline:nn #1 +\cs_new_protected:Npn \tl_analysis_map_inline:nn #1 { \__tl_analysis:n {#1} - \int_gincr:N \g__prg_map_int + \int_gincr:N \g__kernel_prg_map_int \exp_args:Nc \__tl_analysis_map_inline_aux:Nn - { __tl_analysis_map_inline_ \int_use:N \g__prg_map_int :wNw } + { __tl_analysis_map_inline_ \int_use:N \g__kernel_prg_map_int :wNw } } +\cs_new_protected:Npn \tl_analysis_map_inline:Nn #1 + { \exp_args:No \tl_analysis_map_inline:nn #1 } \cs_new_protected:Npn \__tl_analysis_map_inline_aux:Nn #1#2 { \cs_gset_protected:Npn #1 ##1 \s__tl ##2 ##3 \s__tl { \use_none:n ##2 + \__tl_analysis_map_inline_aux:nnn {##1} {##3} {##2} + } + \cs_gset_protected:Npn \__tl_analysis_map_inline_aux:nnn ##1##2##3 + { #2 #1 } \exp_after:wN #1 \g__tl_analysis_result_tl \s__tl { ? \tl_map_break: } \s__tl - \__prg_break_point:Nn \tl_map_break: { \int_gdecr:N \g__prg_map_int } + \prg_break_point:Nn \tl_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } } -\cs_new_protected:Npn \tl_show_analysis:N #1 +\cs_new_protected:Npn \tl_analysis_show:N #1 { \tl_if_exist:NTF #1 { @@ -17889,7 +18239,7 @@ } { \tl_show:N #1 } } -\cs_new_protected:Npn \tl_show_analysis:n #1 +\cs_new_protected:Npn \tl_analysis_show:n #1 { \__tl_analysis:n {#1} \msg_show:nnxxxx { LaTeX / kernel } { show-tl-analysis } @@ -17898,8 +18248,8 @@ \cs_new:Npn \__tl_analysis_show: { \exp_after:wN \__tl_analysis_show_loop:wNw \g__tl_analysis_result_tl - \s__tl { ? \__prg_break: } \s__tl - \__prg_break_point: + \s__tl { ? \prg_break: } \s__tl + \prg_break_point: } \cs_new:Npn \__tl_analysis_show_loop:wNw #1 \s__tl #2 #3 \s__tl { @@ -17928,14 +18278,14 @@ { \token_if_expandable:NF #1 { - \token_if_chardef:NTF #1 \__prg_break: { } - \token_if_mathchardef:NTF #1 \__prg_break: { } - \token_if_dim_register:NTF #1 \__prg_break: { } - \token_if_int_register:NTF #1 \__prg_break: { } - \token_if_skip_register:NTF #1 \__prg_break: { } - \token_if_toks_register:NTF #1 \__prg_break: { } + \token_if_chardef:NTF #1 \prg_break: { } + \token_if_mathchardef:NTF #1 \prg_break: { } + \token_if_dim_register:NTF #1 \prg_break: { } + \token_if_int_register:NTF #1 \prg_break: { } + \token_if_skip_register:NTF #1 \prg_break: { } + \token_if_toks_register:NTF #1 \prg_break: { } \use_none:nnn - \__prg_break_point: + \prg_break_point: \use:n { \exp_after:wN = \tex_the:D #1 } } } @@ -17975,12 +18325,21 @@ { is~empty } { contains~the~tokens: #2 } } +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } + { \tl_analysis_show:N } +\cs_new_protected:Npn \tl_show_analysis:N #1 + { \tl_analysis_show:N #1 } +\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } + { \tl_analysis_show:n } +\cs_new_protected:Npn \tl_show_analysis:n #1 + { \tl_analysis_show:n {#1} } %% File: l3regex.dtx Copyright (C) 2011-2018 The LaTeX3 Project +\cs_new_eq:NN \__regex_int_eval:w \etex_numexpr:D \cs_new_protected:Npn \__regex_standard_escapechar: { \int_set:Nn \tex_escapechar:D { `\\ } } \cs_new:Npn \__regex_toks_use:w { \tex_the:D \tex_toks:D } \cs_new_protected:Npn \__regex_toks_clear:N #1 - { \tex_toks:D #1 { } } + { \__regex_toks_set:Nn #1 { } } \cs_new_eq:NN \__regex_toks_set:Nn \tex_toks:D \cs_new_protected:Npn \__regex_toks_set:No #1 { \__regex_toks_set:Nn #1 \exp_after:wN } @@ -18021,14 +18380,15 @@ \bool_new:N \l__regex_internal_bool \seq_new:N \l__regex_internal_seq \tl_new:N \g__regex_internal_tl +\tl_new:N \l__regex_build_tl \tl_const:Nn \c__regex_no_match_regex { \__regex_branch:n { \__regex_class:NnnnN \c_true_bool { } { 1 } { 0 } \c_true_bool } } -\__intarray_new:Nn \g__regex_charcode_intarray { 65536 } -\__intarray_new:Nn \g__regex_catcode_intarray { 65536 } -\__intarray_new:Nn \g__regex_balance_intarray { 65536 } +\intarray_new:Nn \g__regex_charcode_intarray { 65536 } +\intarray_new:Nn \g__regex_catcode_intarray { 65536 } +\intarray_new:Nn \g__regex_balance_intarray { 65536 } \int_new:N \l__regex_balance_int \tl_new:N \l__regex_cs_name_tl \int_const:Nn \c__regex_ascii_min_int { 0 } @@ -18091,12 +18451,14 @@ \if_int_compare:w \l__regex_curr_char_int > `Z \exp_stop_f: \if_int_compare:w \l__regex_curr_char_int > `z \exp_stop_f: \else: \if_int_compare:w \l__regex_curr_char_int < `a \exp_stop_f: \else: - \int_sub:Nn \l__regex_case_changed_char_int { \c__regex_ascii_lower_int } + \int_sub:Nn \l__regex_case_changed_char_int + { \c__regex_ascii_lower_int } \fi: \fi: \else: \if_int_compare:w \l__regex_curr_char_int < `A \exp_stop_f: \else: - \int_add:Nn \l__regex_case_changed_char_int { \c__regex_ascii_lower_int } + \int_add:Nn \l__regex_case_changed_char_int + { \c__regex_ascii_lower_int } \fi: \fi: } @@ -18114,7 +18476,7 @@ } \cs_new_protected:Npn \__regex_item_catcode:nT #1 { - \if_int_odd:w \__int_eval:n { #1 / \__regex_item_catcode: } + \if_int_odd:w \int_eval:n { #1 / \__regex_item_catcode: } \exp_stop_f: \exp_after:wN \use:n \else: \exp_after:wN \use_none:n @@ -18136,7 +18498,8 @@ { \tl_set:Nx \l__regex_internal_a_tl { \scan_stop: \__regex_curr_cs_to_str: \scan_stop: } - \tl_if_in:noTF { \scan_stop: #1 \scan_stop: } \l__regex_internal_a_tl + \tl_if_in:noTF { \scan_stop: #1 \scan_stop: } + \l__regex_internal_a_tl { \__regex_break_true:w } { } } { } @@ -18150,12 +18513,14 @@ \__regex_single_match: \__regex_disable_submatches: \__regex_build_for_cs:n {#1} - \bool_set_eq:NN \l__regex_saved_success_bool \g__regex_success_bool + \bool_set_eq:NN \l__regex_saved_success_bool + \g__regex_success_bool \exp_args:NV \__regex_match:n \l__regex_cs_name_tl \if_meaning:w \c_true_bool \g__regex_success_bool \group_insert_after:N \__regex_break_true:w \fi: - \bool_gset_eq:NN \g__regex_success_bool \l__regex_saved_success_bool + \bool_gset_eq:NN \g__regex_success_bool + \l__regex_saved_success_bool \group_end: } } @@ -18237,26 +18602,29 @@ \__kernel_patch:nnNNpn { \__regex_trace_push:nnN { regex } { 1 } \__regex_escape_use:nnnn - \__tl_build:Nw \l__regex_internal_a_tl - \__tl_build_one:n { \__regex_trace_pop:nnN { regex } { 1 } \__regex_escape_use:nnnn } - \use_none:nn + \group_begin: + \tl_set:Nx \l__regex_internal_a_tl + { \__regex_trace_pop:nnN { regex } { 1 } \__regex_escape_use:nnnn } + \use_none:nnn } { } \cs_new_protected:Npn \__regex_escape_use:nnnn #1#2#3#4 { - \__tl_build:Nw \l__regex_internal_a_tl + \group_begin: + \tl_clear:N \l__regex_internal_a_tl \cs_set:Npn \__regex_escape_unescaped:N ##1 { #1 } \cs_set:Npn \__regex_escape_escaped:N ##1 { #2 } \cs_set:Npn \__regex_escape_raw:N ##1 { #3 } \__regex_standard_escapechar: - \tl_gset:Nx \g__regex_internal_tl { \__str_to_other_fast:n {#4} } - \tl_set:Nx \l__regex_internal_b_tl + \tl_gset:Nx \g__regex_internal_tl + { \__kernel_str_to_other_fast:n {#4} } + \tl_put_right:Nx \l__regex_internal_a_tl { \exp_after:wN \__regex_escape_loop:N \g__regex_internal_tl - { break } \__prg_break_point: + { break } \prg_break_point: } - \__tl_build_one:o \l__regex_internal_b_tl - \__tl_build_end: + \exp_after:wN + \group_end: \l__regex_internal_a_tl } \cs_new:Npn \__regex_escape_loop:N #1 @@ -18275,12 +18643,11 @@ \cs_new_eq:NN \__regex_escape_unescaped:N ? \cs_new_eq:NN \__regex_escape_escaped:N ? \cs_new_eq:NN \__regex_escape_raw:N ? -\cs_new_eq:NN \__regex_escape_break:w \__prg_break: +\cs_new_eq:NN \__regex_escape_break:w \prg_break: \cs_new:cpn { __regex_escape_/break:w } { - \if_false: { \fi: } - \__kernel_msg_error:nn { kernel } { trailing-backslash } - \exp_after:wN \use_none:n \exp_after:wN { \if_false: } \fi: + \__kernel_msg_expandable_error:nn { kernel } { trailing-backslash } + \prg_break: } \cs_new:cpn { __regex_escape_~:w } { } \cs_new:cpx { __regex_escape_/a:w } @@ -18298,17 +18665,14 @@ \cs_new:cpn { __regex_escape_/x:w } \__regex_escape_loop:N { \exp_after:wN \__regex_escape_x_end:w - \__int_value:w "0 \__regex_escape_x_test:N + \int_value:w "0 \__regex_escape_x_test:N } \cs_new:Npn \__regex_escape_x_end:w #1 ; { \int_compare:nNnTF {#1} > \c_max_char_int { - \if_false: { \fi: } - \__tl_build_one:o \l__regex_internal_b_tl - \__kernel_msg_error:nnx { kernel } { x-overflow } {#1} - \tl_set:Nx \l__regex_internal_b_tl - { \if_false: } \fi: + \__kernel_msg_expandable_error:nnff { kernel } { x-overflow } + {#1} { \int_to_Hex:n {#1} } } { \exp_last_unbraced:Nf \__regex_escape_raw:N @@ -18368,11 +18732,8 @@ } \cs_new:Npn \__regex_escape_x_loop_error:n #1 { - \if_false: { \fi: } - \__tl_build_one:o \l__regex_internal_b_tl - \__kernel_msg_error:nnx { kernel } { x-missing-rbrace } {#1} - \tl_set:Nx \l__regex_internal_b_tl - { \if_false: } \fi: \__regex_escape_loop:N #1 + \__kernel_msg_expandable_error:nnn { kernel } { x-missing-rbrace } {#1} + \__regex_escape_loop:N #1 } \prg_new_conditional:Npnn \__regex_hexadecimal_use:N #1 { TF } { @@ -18380,7 +18741,7 @@ #1 \prg_return_true: \else: \if_case:w - \__int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a } + \int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a } A \or: B \or: C @@ -18544,20 +18905,24 @@ \if_int_compare:w \l__regex_mode_int = \c__regex_catcode_mode_int \int_set_eq:NN \l__regex_mode_int \c__regex_outer_mode_int \else: - \if_int_compare:w \l__regex_mode_int = \c__regex_catcode_in_class_mode_int + \if_int_compare:w \l__regex_mode_int = + \c__regex_catcode_in_class_mode_int \int_set_eq:NN \l__regex_mode_int \c__regex_class_mode_int \fi: \fi: } \cs_new_protected:Npn \__regex_compile:w { - \__tl_build_x:Nw \l__regex_internal_regex + \group_begin: + \tl_build_begin:N \l__regex_build_tl \int_zero:N \l__regex_group_level_int - \int_set_eq:NN \l__regex_default_catcodes_int \c__regex_all_catcodes_int + \int_set_eq:NN \l__regex_default_catcodes_int + \c__regex_all_catcodes_int \int_set_eq:NN \l__regex_catcodes_int \l__regex_default_catcodes_int \cs_set:Npn \__regex_item_equal:n { \__regex_item_caseful_equal:n } \cs_set:Npn \__regex_item_range:nn { \__regex_item_caseful_range:nn } - \__tl_build_one:n { \__regex_branch:n { \if_false: } \fi: } + \tl_build_put_right:Nn \l__regex_build_tl + { \__regex_branch:n { \if_false: } \fi: } } \cs_new_protected:Npn \__regex_compile_end: { @@ -18574,17 +18939,23 @@ \prg_replicate:nn { \l__regex_group_level_int } { - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \if_false: { \fi: } \if_false: { \fi: } { 1 } { 0 } \c_true_bool } - \__tl_build_end: - \__tl_build_one:o \l__regex_internal_regex + \tl_build_end:N \l__regex_build_tl + \exp_args:NNNo + \group_end: + \tl_build_put_right:Nn \l__regex_build_tl + { \l__regex_build_tl } } \fi: - \__tl_build_one:n { \if_false: { \fi: } } - \__tl_build_end: + \tl_build_put_right:Nn \l__regex_build_tl { \if_false: { \fi: } } + \tl_build_end:N \l__regex_build_tl + \exp_args:NNNx + \group_end: + \tl_set:Nn \l__regex_internal_regex { \l__regex_build_tl } } \cs_new_protected:Npn \__regex_compile:n #1 { @@ -18625,17 +18996,18 @@ \cs_if_exist_use:cF { __regex_compile_/#1: } { \__regex_compile_raw:N #1 } } -\cs_new_protected:Npn \__regex_compile_one:x #1 +\cs_new_protected:Npn \__regex_compile_one:n #1 { \__regex_mode_quit_c: \__regex_if_in_class:TF { } { - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \__regex_class:NnnnN \c_true_bool { \if_false: } \fi: } } - \__tl_build_one:x + \tl_build_put_right:Nx \l__regex_build_tl { - \if_int_compare:w \l__regex_catcodes_int < \c__regex_all_catcodes_int + \if_int_compare:w \l__regex_catcodes_int < + \c__regex_all_catcodes_int \__regex_item_catcode:nT { \int_use:N \l__regex_catcodes_int } { \exp_not:N \exp_not:n {#1} } \else: @@ -18664,7 +19036,10 @@ { \__regex_compile_quantifier_none: #1 #2 } } \cs_new_protected:Npn \__regex_compile_quantifier_none: - { \__tl_build_one:n { \if_false: { \fi: } { 1 } { 0 } \c_false_bool } } + { + \tl_build_put_right:Nn \l__regex_build_tl + { \if_false: { \fi: } { 1 } { 0 } \c_false_bool } + } \cs_new_protected:Npn \__regex_compile_quantifier_abort:xNN #1#2#3 { \__regex_compile_quantifier_none: @@ -18675,9 +19050,13 @@ \cs_new_protected:Npn \__regex_compile_quantifier_lazyness:nnNN #1#2#3#4 { \str_if_eq:nnTF { #3 #4 } { \__regex_compile_special:N ? } - { \__tl_build_one:n { \if_false: { \fi: } { #1 } { #2 } \c_true_bool } } { - \__tl_build_one:n { \if_false: { \fi: } { #1 } { #2 } \c_false_bool } + \tl_build_put_right:Nn \l__regex_build_tl + { \if_false: { \fi: } { #1 } { #2 } \c_true_bool } + } + { + \tl_build_put_right:Nn \l__regex_build_tl + { \if_false: { \fi: } { #1 } { #2 } \c_false_bool } #3 #4 } } @@ -18734,7 +19113,8 @@ \str_if_eq_x:nnTF { #1 #2 } { \__regex_compile_special:N \c_right_brace_str } { - \if_int_compare:w \l__regex_internal_a_int > \l__regex_internal_b_int + \if_int_compare:w \l__regex_internal_a_int > + \l__regex_internal_b_int \__kernel_msg_error:nnxx { kernel } { backwards-quantifier } { \int_use:N \l__regex_internal_a_int } { \int_use:N \l__regex_internal_b_int } @@ -18768,14 +19148,14 @@ \str_if_eq:nnTF {#2#3} { \__regex_compile_special:N - } { \__regex_compile_range:Nw #1 } { - \__regex_compile_one:x - { \__regex_item_equal:n { \__int_value:w `#1 ~ } } + \__regex_compile_one:n + { \__regex_item_equal:n { \int_value:w `#1 } } #2 #3 } } { - \__regex_compile_one:x - { \__regex_item_equal:n { \__int_value:w `#1 ~ } } + \__regex_compile_one:n + { \__regex_item_equal:n { \int_value:w `#1 } } #2 #3 } } @@ -18802,24 +19182,24 @@ \if_int_compare:w `#1 > `#3 \exp_stop_f: \__kernel_msg_error:nnxx { kernel } { range-backwards } {#1} {#3} \else: - \__tl_build_one:x + \tl_build_put_right:Nx \l__regex_build_tl { \if_int_compare:w `#1 = `#3 \exp_stop_f: \__regex_item_equal:n \else: - \__regex_item_range:nn { \__int_value:w `#1 ~ } + \__regex_item_range:nn { \int_value:w `#1 } \fi: - { \__int_value:w `#3 ~ } + { \int_value:w `#3 } } \fi: } { \__kernel_msg_warning:nnxx { kernel } { range-missing-end } {#1} { \c_backslash_str #3 } - \__tl_build_one:x + \tl_build_put_right:Nx \l__regex_build_tl { - \__regex_item_equal:n { \__int_value:w `#1 ~ } - \__regex_item_equal:n { \__int_value:w `- ~ } + \__regex_item_equal:n { \int_value:w `#1 \exp_stop_f: } + \__regex_item_equal:n { \int_value:w `- \exp_stop_f: } } #2#3 } @@ -18828,7 +19208,7 @@ { \exp_not:N \__regex_if_in_class:TF { \__regex_compile_raw:N . } - { \__regex_compile_one:x \exp_not:c { __regex_prop_.: } } + { \__regex_compile_one:n \exp_not:c { __regex_prop_.: } } } \cs_new_protected:cpn { __regex_prop_.: } { @@ -18839,10 +19219,10 @@ \cs_set_protected:Npn \__regex_tmp:w #1#2 { \cs_new_protected:cpx { __regex_compile_/#1: } - { \__regex_compile_one:x \exp_not:c { __regex_prop_#1: } } + { \__regex_compile_one:n \exp_not:c { __regex_prop_#1: } } \cs_new_protected:cpx { __regex_compile_/#2: } { - \__regex_compile_one:x + \__regex_compile_one:n { \__regex_item_reverse:n \exp_not:c { __regex_prop_#1: } } } } @@ -18852,12 +19232,12 @@ \__regex_tmp:w v V \__regex_tmp:w w W \cs_new_protected:cpn { __regex_compile_/N: } - { \__regex_compile_one:x \__regex_prop_N: } + { \__regex_compile_one:n \__regex_prop_N: } \cs_new_protected:Npn \__regex_compile_anchor:NF #1#2 { \__regex_if_in_class_or_catcode:TF {#2} { - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \__regex_assertion:Nn \c_true_bool { \__regex_anchor:N #1 } } } } @@ -18882,7 +19262,7 @@ \__regex_if_in_class_or_catcode:TF { \__regex_compile_raw_error:N b } { - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \__regex_assertion:Nn \c_true_bool { \__regex_b_test: } } } } @@ -18891,7 +19271,7 @@ \__regex_if_in_class_or_catcode:TF { \__regex_compile_raw_error:N B } { - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \__regex_assertion:Nn \c_false_bool { \__regex_b_test: } } } } @@ -18899,8 +19279,9 @@ { \__regex_if_in_class:TF { - \if_int_compare:w \l__regex_mode_int > \c__regex_catcode_in_class_mode_int - \__tl_build_one:n { \if_false: { \fi: } } + \if_int_compare:w \l__regex_mode_int > + \c__regex_catcode_in_class_mode_int + \tl_build_put_right:Nn \l__regex_build_tl { \if_false: { \fi: } } \fi: \tex_advance:D \l__regex_mode_int - 15 \exp_stop_f: \tex_divide:D \l__regex_mode_int 13 \exp_stop_f: @@ -18932,7 +19313,7 @@ \cs_new_protected:Npn \__regex_compile_class_catcode:w #1; { \if_int_compare:w \l__regex_mode_int = \c__regex_catcode_mode_int - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \__regex_class:NnnnN \c_true_bool { \if_false: } \fi: } \fi: \int_set_eq:NN \l__regex_catcodes_int \l__regex_default_catcodes_int @@ -18942,14 +19323,14 @@ } \cs_new_protected:Npn \__regex_compile_class:TFNN #1#2#3#4 { - \l__regex_mode_int = \__int_value:w \l__regex_mode_int 3 \exp_stop_f: + \l__regex_mode_int = \int_value:w \l__regex_mode_int 3 \exp_stop_f: \str_if_eq:nnTF { #3 #4 } { \__regex_compile_special:N ^ } { - \__tl_build_one:n { #2 { \if_false: } \fi: } + \tl_build_put_right:Nn \l__regex_build_tl { #2 { \if_false: } \fi: } \__regex_compile_class:NN } { - \__tl_build_one:n { #1 { \if_false: } \fi: } + \tl_build_put_right:Nn \l__regex_build_tl { #1 { \if_false: } \fi: } \__regex_compile_class:NN #3 #4 } } @@ -18966,8 +19347,14 @@ \str_case:nn { #2 } { : { \__regex_compile_class_posix:NNNNw } - = { \__kernel_msg_warning:nnx { kernel } { posix-unsupported } { = } } - . { \__kernel_msg_warning:nnx { kernel } { posix-unsupported } { . } } + = { + \__kernel_msg_warning:nnx { kernel } + { posix-unsupported } { = } + } + . { + \__kernel_msg_warning:nnx { kernel } + { posix-unsupported } { . } + } } } \__regex_compile_raw:N [ #1 #2 @@ -18999,7 +19386,7 @@ { \cs_if_exist:cTF { __regex_posix_ \l__regex_internal_a_tl : } { - \__regex_compile_one:x + \__regex_compile_one:n { \bool_if:NF \l__regex_internal_bool \__regex_item_reverse:n \exp_not:c { __regex_posix_ \l__regex_internal_a_tl : } @@ -19024,20 +19411,24 @@ } \cs_new_protected:Npn \__regex_compile_group_begin:N #1 { - \__tl_build_one:n { #1 { \if_false: } \fi: } + \tl_build_put_right:Nn \l__regex_build_tl { #1 { \if_false: } \fi: } \__regex_mode_quit_c: - \__tl_build:Nw \l__regex_internal_regex + \group_begin: + \tl_build_begin:N \l__regex_build_tl \int_set_eq:NN \l__regex_default_catcodes_int \l__regex_catcodes_int \int_incr:N \l__regex_group_level_int - \__tl_build_one:n { \__regex_branch:n { \if_false: } \fi: } + \tl_build_put_right:Nn \l__regex_build_tl + { \__regex_branch:n { \if_false: } \fi: } } \cs_new_protected:Npn \__regex_compile_group_end: { \if_int_compare:w \l__regex_group_level_int > 0 \exp_stop_f: - \__tl_build_one:n { \if_false: { \fi: } } - \__tl_build_end: + \tl_build_put_right:Nn \l__regex_build_tl { \if_false: { \fi: } } + \tl_build_end:N \l__regex_build_tl + \exp_args:NNNx + \group_end: + \tl_build_put_right:Nn \l__regex_build_tl { \l__regex_build_tl } \int_set_eq:NN \l__regex_catcodes_int \l__regex_default_catcodes_int - \__tl_build_one:o \l__regex_internal_regex \exp_after:wN \__regex_compile_quantifier:w \else: \__kernel_msg_warning:nn { kernel } { extra-rparen } @@ -19047,7 +19438,15 @@ \cs_new_protected:cpn { __regex_compile_(: } { \__regex_if_in_class:TF { \__regex_compile_raw:N ( } - { \__regex_compile_lparen:w } + { + \if_int_compare:w \l__regex_mode_int = + \c__regex_catcode_in_class_mode_int + \__kernel_msg_error:nn { kernel } { c-lparen-in-class } + \exp_after:wN \__regex_compile_raw:N \exp_after:wN ( + \else: + \exp_after:wN \__regex_compile_lparen:w + \fi: + } } \cs_new_protected:Npn \__regex_compile_lparen:w #1#2#3#4 { @@ -19071,7 +19470,7 @@ { \__regex_if_in_class:TF { \__regex_compile_raw:N | } { - \__tl_build_one:n + \tl_build_put_right:Nn \l__regex_build_tl { \if_false: { \fi: } \__regex_branch:n { \if_false: } \fi: } } } @@ -19088,8 +19487,10 @@ { \str_if_eq:nnTF { #1 #2 } { \__regex_compile_special:N ) } { - \cs_set:Npn \__regex_item_equal:n { \__regex_item_caseless_equal:n } - \cs_set:Npn \__regex_item_range:nn { \__regex_item_caseless_range:nn } + \cs_set:Npn \__regex_item_equal:n + { \__regex_item_caseless_equal:n } + \cs_set:Npn \__regex_item_range:nn + { \__regex_item_caseless_range:nn } } { \__kernel_msg_warning:nnx { kernel } { unknown-option } { (?i #2 } @@ -19104,8 +19505,10 @@ \str_if_eq:nnTF { #1 #2 #3 #4 } { \__regex_compile_raw:N i \__regex_compile_special:N ) } { - \cs_set:Npn \__regex_item_equal:n { \__regex_item_caseful_equal:n } - \cs_set:Npn \__regex_item_range:nn { \__regex_item_caseful_range:nn } + \cs_set:Npn \__regex_item_equal:n + { \__regex_item_caseful_equal:n } + \cs_set:Npn \__regex_item_range:nn + { \__regex_item_caseful_range:nn } } { \__kernel_msg_warning:nnx { kernel } { unknown-option } { (?-#2#4 } @@ -19123,7 +19526,8 @@ { \int_if_exist:cTF { c__regex_catcode_#2_int } { - \int_set_eq:Nc \l__regex_catcodes_int { c__regex_catcode_#2_int } + \int_set_eq:Nc \l__regex_catcodes_int + { c__regex_catcode_#2_int } \l__regex_mode_int = \if_case:w \l__regex_mode_int \c__regex_catcode_mode_int @@ -19194,7 +19598,7 @@ } \cs_new_protected:Npn \__regex_compile_c_lbrack_add:N #1 { - \if_int_odd:w \__int_eval:n { \l__regex_catcodes_int / #1 } + \if_int_odd:w \int_eval:n { \l__regex_catcodes_int / #1 } \exp_stop_f: \else: \int_add:Nn \l__regex_catcodes_int {#1} \fi: @@ -19233,11 +19637,14 @@ \exp_after:wN \__regex_compile_cs_aux:Nn \l__regex_internal_regex \q_nil \q_nil \q_recursion_stop } - \exp_args:Nx \__regex_compile_one:x + \exp_args:Nx \__regex_compile_one:n { \flag_if_raised:nTF { __regex_cs } { \__regex_item_cs:n { \exp_not:o \l__regex_internal_regex } } - { \__regex_item_exact_cs:n { \tl_tail:N \l__regex_internal_a_tl } } + { + \__regex_item_exact_cs:n + { \tl_tail:N \l__regex_internal_a_tl } + } } } \cs_new:Npn \__regex_compile_cs_aux:Nn #1#2 @@ -19250,7 +19657,7 @@ \__regex_compile_cs_aux:Nn } { - \quark_if_nil:NF #1 { \flag_raise:n { __regex_cs } } + \quark_if_nil:NF #1 { \flag_raise_if_clear:n { __regex_cs } } \use_none_delimit_by_q_recursion_stop:w } } @@ -19272,7 +19679,7 @@ { \quark_if_nil:NF #1 { - \flag_raise:n { __regex_cs } + \flag_raise_if_clear:n { __regex_cs } \use_i_delimit_by_q_recursion_stop:nw } \use_none_delimit_by_q_recursion_stop:w @@ -19283,7 +19690,8 @@ \__regex_if_in_class_or_catcode:TF { \__regex_compile_raw_error:N u #1 #2 } { - \str_if_eq_x:nnTF {#1#2} { \__regex_compile_special:N \c_left_brace_str } + \str_if_eq_x:nnTF {#1#2} + { \__regex_compile_special:N \c_left_brace_str } { \tl_set:Nx \l__regex_internal_a_tl { \if_false: } \fi: \__regex_compile_u_loop:NN @@ -19325,8 +19733,11 @@ \cs_new_protected:Npn \__regex_compile_u_in_cs: { \tl_gset:Nx \g__regex_internal_tl - { \exp_args:No \__str_to_other_fast:n { \l__regex_internal_a_tl } } - \__tl_build_one:x + { + \exp_args:No \__kernel_str_to_other_fast:n + { \l__regex_internal_a_tl } + } + \tl_build_put_right:Nx \l__regex_build_tl { \tl_map_function:NN \g__regex_internal_tl \__regex_compile_u_in_cs_aux:n @@ -19335,21 +19746,22 @@ \cs_new:Npn \__regex_compile_u_in_cs_aux:n #1 { \__regex_class:NnnnN \c_true_bool - { \__regex_item_caseful_equal:n { \__int_value:w `#1 } } + { \__regex_item_caseful_equal:n { \int_value:w `#1 } } { 1 } { 0 } \c_false_bool } \cs_new_protected:Npn \__regex_compile_u_not_cs: { - \exp_args:No \__tl_analysis_map_inline:nn { \l__regex_internal_a_tl } + \tl_analysis_map_inline:Nn \l__regex_internal_a_tl { - \__tl_build_one:n + \tl_build_put_right:Nx \l__regex_build_tl { \__regex_class:NnnnN \c_true_bool { - \if_int_compare:w "##2 = 0 \exp_stop_f: - \__regex_item_exact_cs:n { \exp_after:wN \cs_to_str:N ##1 } + \if_int_compare:w "##3 = 0 \exp_stop_f: + \__regex_item_exact_cs:n + { \exp_after:wN \cs_to_str:N ##1 } \else: - \__regex_item_exact:nn { \__int_value:w "##2 } { ##3 } + \__regex_item_exact:nn { \int_value:w "##3 } { ##2 } \fi: } { 1 } { 0 } \c_false_bool @@ -19359,17 +19771,20 @@ \cs_new_protected:cpn { __regex_compile_/K: } { \int_compare:nNnTF \l__regex_mode_int = \c__regex_outer_mode_int - { \__tl_build_one:n { \__regex_command_K: } } + { \tl_build_put_right:Nn \l__regex_build_tl { \__regex_command_K: } } { \__regex_compile_raw_error:N K } } \cs_new_protected:Npn \__regex_show:N #1 { - \__tl_build:Nw \l__regex_internal_a_tl + \group_begin: + \tl_build_begin:N \l__regex_build_tl \cs_set_protected:Npn \__regex_branch:n { - \seq_pop_right:NN \l__regex_show_prefix_seq \l__regex_internal_a_tl + \seq_pop_right:NN \l__regex_show_prefix_seq + \l__regex_internal_a_tl \__regex_show_one:n { +-branch } - \seq_put_right:No \l__regex_show_prefix_seq \l__regex_internal_a_tl + \seq_put_right:No \l__regex_show_prefix_seq + \l__regex_internal_a_tl \use:n } \cs_set_protected:Npn \__regex_group:nnnN @@ -19382,13 +19797,19 @@ \cs_set_protected:Npn \__regex_command_K: { \__regex_show_one:n { reset~match~start~(\iow_char:N\\K) } } \cs_set_protected:Npn \__regex_assertion:Nn ##1##2 - { \__regex_show_one:n { \bool_if:NF ##1 { negative~ } assertion:~##2 } } + { + \__regex_show_one:n + { \bool_if:NF ##1 { negative~ } assertion:~##2 } + } \cs_set:Npn \__regex_b_test: { word~boundary } \cs_set_eq:NN \__regex_anchor:N \__regex_show_anchor_to_str:N \cs_set_protected:Npn \__regex_item_caseful_equal:n ##1 { \__regex_show_one:n { char~code~\int_eval:n{##1} } } \cs_set_protected:Npn \__regex_item_caseful_range:nn ##1##2 - { \__regex_show_one:n { range~[\int_eval:n{##1}, \int_eval:n{##2}] } } + { + \__regex_show_one:n + { range~[\int_eval:n{##1}, \int_eval:n{##2}] } + } \cs_set_protected:Npn \__regex_item_caseless_equal:n ##1 { \__regex_show_one:n { char~code~\int_eval:n{##1}~(caseless) } } \cs_set_protected:Npn \__regex_item_caseless_range:nn ##1##2 @@ -19411,12 +19832,15 @@ \seq_clear:N \l__regex_show_prefix_seq \__regex_show_push:n { ~ } \cs_if_exist_use:N #1 - \__tl_build_end: + \tl_build_end:N \l__regex_build_tl + \exp_args:NNNo + \group_end: + \tl_set:Nn \l__regex_internal_a_tl { \l__regex_build_tl } } \cs_new_protected:Npn \__regex_show_one:n #1 { \int_incr:N \l__regex_show_lines_int - \__tl_build_one:x + \tl_build_put_right:Nx \l__regex_build_tl { \exp_not:N \iow_newline: \seq_map_function:NN \l__regex_show_prefix_seq \use:n @@ -19445,42 +19869,39 @@ } \cs_set:Npn \__regex_show_class:NnnnN #1#2#3#4#5 { - \__tl_build:Nw \l__regex_internal_a_tl + \group_begin: + \tl_build_begin:N \l__regex_build_tl \int_zero:N \l__regex_show_lines_int \__regex_show_push:n {~} #2 - \exp_last_unbraced:Nf - \int_case:nnF { \l__regex_show_lines_int } + \int_compare:nTF { \l__regex_show_lines_int = 0 } + { + \group_end: + \__regex_show_one:n { \bool_if:NTF #1 { Fail } { Pass } } + } { - {0} + \bool_if:nTF + { #1 && \int_compare_p:n { \l__regex_show_lines_int = 1 } } { - \__tl_build_end: - \__regex_show_one:n { \bool_if:NTF #1 { Fail } { Pass } } + \group_end: + #2 + \tl_build_put_right:Nn \l__regex_build_tl + { \__regex_msg_repeated:nnN {#3} {#4} #5 } } - {1} { - \__tl_build_end: - \bool_if:NTF #1 - { - #2 - \__tl_build_one:n { \__regex_msg_repeated:nnN {#3} {#4} #5 } - } + \tl_build_end:N \l__regex_build_tl + \exp_args:NNNo + \group_end: + \tl_set:Nn \l__regex_internal_a_tl \l__regex_build_tl + \__regex_show_one:n { - \__regex_show_one:n - { Don't~match~\__regex_msg_repeated:nnN {#3} {#4} #5 } - \__tl_build_one:o \l__regex_internal_a_tl + \bool_if:NTF #1 { Match } { Don't~match } + \__regex_msg_repeated:nnN {#3} {#4} #5 } + \tl_build_put_right:Nx \l__regex_build_tl + { \exp_not:o \l__regex_internal_a_tl } } } - { - \__tl_build_end: - \__regex_show_one:n - { - \bool_if:NTF #1 { M } { Don't~m } atch - \__regex_msg_repeated:nnN {#3} {#4} #5 - } - \__tl_build_one:o \l__regex_internal_a_tl - } } \cs_new:Npn \__regex_show_anchor_to_str:N #1 { @@ -19708,8 +20129,8 @@ { \int_use:N \l__regex_capturing_group_int } { \int_use:N \l__regex_capturing_group_int } #1 - { ?? \__prg_break:n } { } - \__prg_break_point: + { ?? \prg_break:n } { } + \prg_break_point: } } \cs_new_protected:Npn \__regex_group_resetting_loop:nnNn #1#2#3#4 @@ -19762,7 +20183,7 @@ \l__regex_right_state_int \l__regex_max_state_int \int_set_eq:NN \l__regex_internal_a_int \l__regex_left_state_int \int_set_eq:NN \l__regex_internal_b_int \l__regex_max_state_int - \if_int_compare:w \__int_eval:n {#1} > 1 \exp_stop_f: + \if_int_compare:w \int_eval:n {#1} > 1 \exp_stop_f: \int_set:Nn \l__regex_internal_c_int { ( #1 - 1 ) @@ -19882,7 +20303,10 @@ \__regex_action_submatch:n { 0< } \bool_set_true:N \l__regex_fresh_thread_bool \__regex_action_free:n - { \int_eval:n { \l__regex_right_state_int - \l__regex_left_state_int } } + { + \int_eval:n + { \l__regex_right_state_int - \l__regex_left_state_int } + } \bool_set_false:N \l__regex_fresh_thread_bool } } @@ -19901,8 +20325,8 @@ \int_new:N \l__regex_step_int \int_new:N \l__regex_min_active_int \int_new:N \l__regex_max_active_int -\__intarray_new:Nn \g__regex_state_active_intarray { 65536 } -\__intarray_new:Nn \g__regex_thread_state_intarray { 65536 } +\intarray_new:Nn \g__regex_state_active_intarray { 65536 } +\intarray_new:Nn \g__regex_thread_state_intarray { 65536 } \tl_new:N \l__regex_every_match_tl \bool_new:N \l__regex_fresh_thread_bool \bool_new:N \l__regex_empty_success_bool @@ -19922,8 +20346,8 @@ \int_set:Nn \l__regex_curr_pos_int { 2 * \l__regex_max_state_int } \__regex_query_set:nnn { } { -1 } { -2 } \int_set_eq:NN \l__regex_min_pos_int \l__regex_curr_pos_int - \__tl_analysis_map_inline:nn {#1} - { \__regex_query_set:nnn {##1} {"##2} {##3} } + \tl_analysis_map_inline:nn {#1} + { \__regex_query_set:nnn {##1} {"##3} {##2} } \int_set_eq:NN \l__regex_max_pos_int \l__regex_curr_pos_int \__regex_query_set:nnn { } { -1 } { -2 } \__regex_match_init: @@ -19935,9 +20359,12 @@ \cs_new_protected:Npn \__regex_match_init: { \bool_gset_false:N \g__regex_success_bool - \int_step_inline:nnnn - \l__regex_min_state_int { 1 } { \l__regex_max_state_int - 1 } - { \__intarray_gset_fast:Nnn \g__regex_state_active_intarray {##1} { 1 } } + \int_step_inline:nnn + \l__regex_min_state_int { \l__regex_max_state_int - 1 } + { + \__kernel_intarray_gset:Nnn + \g__regex_state_active_intarray {##1} { 1 } + } \int_set_eq:NN \l__regex_min_active_int \l__regex_max_state_int \int_zero:N \l__regex_step_int \int_set_eq:NN \l__regex_success_pos_int \l__regex_min_pos_int @@ -19950,7 +20377,10 @@ { \if_meaning:w \c_true_bool \l__regex_empty_success_bool \cs_set:Npn \__regex_if_two_empty_matches:F - { \int_compare:nNnF \l__regex_start_pos_int = \l__regex_curr_pos_int } + { + \int_compare:nNnF + \l__regex_start_pos_int = \l__regex_curr_pos_int + } \else: \cs_set_eq:NN \__regex_if_two_empty_matches:F \use:n \fi: @@ -19968,7 +20398,11 @@ \cs_new_protected:Npn \__regex_single_match: { \tl_set:Nn \l__regex_every_match_tl - { \bool_gset_eq:NN \g__regex_success_bool \l__regex_match_success_bool } + { + \bool_gset_eq:NN + \g__regex_success_bool + \l__regex_match_success_bool + } } \cs_new_protected:Npn \__regex_multi_match:n #1 { @@ -19991,14 +20425,13 @@ \use:x { \int_set_eq:NN \l__regex_max_active_int \l__regex_min_active_int - \int_step_function:nnnN + \int_step_function:nnN { \l__regex_min_active_int } - { 1 } { \l__regex_max_active_int - 1 } \__regex_match_one_active:n } - \__prg_break_point: - \bool_set_false:N \l__regex_fresh_thread_bool %^^A was arg of break_point:n + \prg_break_point: + \bool_set_false:N \l__regex_fresh_thread_bool \if_int_compare:w \l__regex_max_active_int > \l__regex_min_active_int \if_int_compare:w \l__regex_curr_pos_int < \l__regex_max_pos_int \exp_after:wN \exp_after:wN \exp_after:wN \__regex_match_loop: @@ -20008,16 +20441,16 @@ \cs_new:Npn \__regex_match_one_active:n #1 { \__regex_use_state_and_submatches:nn - { \__intarray_item_fast:Nn \g__regex_thread_state_intarray {#1} } + { \__kernel_intarray_item:Nn \g__regex_thread_state_intarray {#1} } { \__regex_toks_use:w #1 } } \cs_new_protected:Npn \__regex_query_set:nnn #1#2#3 { - \__intarray_gset_fast:Nnn \g__regex_charcode_intarray + \__kernel_intarray_gset:Nnn \g__regex_charcode_intarray { \l__regex_curr_pos_int } {#3} - \__intarray_gset_fast:Nnn \g__regex_catcode_intarray + \__kernel_intarray_gset:Nnn \g__regex_catcode_intarray { \l__regex_curr_pos_int } {#2} - \__intarray_gset_fast:Nnn \g__regex_balance_intarray + \__kernel_intarray_gset:Nnn \g__regex_balance_intarray { \l__regex_curr_pos_int } { \l__regex_balance_int } \__regex_toks_set:Nn \l__regex_curr_pos_int {#1} \int_incr:N \l__regex_curr_pos_int @@ -20029,28 +20462,32 @@ \cs_new_protected:Npn \__regex_query_get: { \l__regex_curr_char_int - = \__intarray_item_fast:Nn \g__regex_charcode_intarray + = \__kernel_intarray_item:Nn \g__regex_charcode_intarray { \l__regex_curr_pos_int } \scan_stop: \l__regex_curr_catcode_int - = \__intarray_item_fast:Nn \g__regex_catcode_intarray + = \__kernel_intarray_item:Nn \g__regex_catcode_intarray { \l__regex_curr_pos_int } \scan_stop: } \__kernel_patch:nnNNpn - { \__regex_trace:nnx { regex } { 2 } { state~\int_use:N \l__regex_curr_state_int } } + { + \__regex_trace:nnx { regex } { 2 } + { state~\int_use:N \l__regex_curr_state_int } + } { } \cs_new_protected:Npn \__regex_use_state: { - \__intarray_gset_fast:Nnn \g__regex_state_active_intarray + \__kernel_intarray_gset:Nnn \g__regex_state_active_intarray { \l__regex_curr_state_int } { \l__regex_step_int } \__regex_toks_use:w \l__regex_curr_state_int - \__intarray_gset_fast:Nnn \g__regex_state_active_intarray - { \l__regex_curr_state_int } { \l__regex_step_int + 1 } + \__kernel_intarray_gset:Nnn \g__regex_state_active_intarray + { \l__regex_curr_state_int } + { \int_eval:n { \l__regex_step_int + 1 } } } \cs_new_protected:Npn \__regex_use_state_and_submatches:nn #1 #2 { \int_set:Nn \l__regex_curr_state_int {#1} \if_int_compare:w - \__intarray_item_fast:Nn \g__regex_state_active_intarray + \__kernel_intarray_item:Nn \g__regex_state_active_intarray { \l__regex_curr_state_int } < \l__regex_step_int \tl_set:Nn \l__regex_curr_submatches_prop {#2} @@ -20077,7 +20514,7 @@ \exp_not:n { \if_int_compare:w - \__intarray_item_fast:Nn \g__regex_state_active_intarray + \__kernel_intarray_item:Nn \g__regex_state_active_intarray { \l__regex_curr_state_int } #1 \exp_after:wN \__regex_use_state: @@ -20091,13 +20528,13 @@ } \cs_new_protected:Npn \__regex_action_cost:n #1 { - \exp_args:No \__regex_store_state:n - { \__int_value:w \__int_eval:n { \l__regex_curr_state_int + #1 } } + \exp_args:Nx \__regex_store_state:n + { \int_eval:n { \l__regex_curr_state_int + #1 } } } \cs_new_protected:Npn \__regex_store_state:n #1 { \__regex_store_submatches: - \__intarray_gset_fast:Nnn \g__regex_thread_state_intarray + \__kernel_intarray_gset:Nnn \g__regex_thread_state_intarray { \l__regex_max_active_int } {#1} \int_incr:N \l__regex_max_active_int } @@ -20126,7 +20563,7 @@ \int_set_eq:NN \l__regex_success_pos_int \l__regex_curr_pos_int \prop_set_eq:NN \l__regex_success_submatches_prop \l__regex_curr_submatches_prop - \__prg_break: + \prg_break: } } \int_new:N \l__regex_replacement_csnames_int @@ -20138,51 +20575,65 @@ \cs_new:Npn \__regex_replacement_do_one_match:n #1 { \__regex_query_range:nn - { \__intarray_item_fast:Nn \g__regex_submatch_prev_intarray {#1} } - { \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray {#1} } + { \__kernel_intarray_item:Nn \g__regex_submatch_prev_intarray {#1} } + { \__kernel_intarray_item:Nn \g__regex_submatch_begin_intarray {#1} } } \cs_new:Npn \__regex_replacement_exp_not:N #1 { \exp_not:n {#1} } \cs_new:Npn \__regex_query_range:nn #1#2 { \exp_after:wN \__regex_query_range_loop:ww - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; - \__prg_break_point: + \int_value:w \__regex_int_eval:w #1 \exp_after:wN ; + \int_value:w \__regex_int_eval:w #2 ; + \prg_break_point: } \cs_new:Npn \__regex_query_range_loop:ww #1 ; #2 ; { \if_int_compare:w #1 < #2 \exp_stop_f: \else: - \exp_after:wN \__prg_break: + \exp_after:wN \prg_break: \fi: \__regex_toks_use:w #1 \exp_stop_f: \exp_after:wN \__regex_query_range_loop:ww - \__int_value:w \__int_eval:w #1 + 1 ; #2 ; + \int_value:w \__regex_int_eval:w #1 + 1 ; #2 ; } \cs_new:Npn \__regex_query_submatch:n #1 { \__regex_query_range:nn - { \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray {#1} } - { \__intarray_item_fast:Nn \g__regex_submatch_end_intarray {#1} } + { \__kernel_intarray_item:Nn \g__regex_submatch_begin_intarray {#1} } + { \__kernel_intarray_item:Nn \g__regex_submatch_end_intarray {#1} } } \cs_new_protected:Npn \__regex_submatch_balance:n #1 { - \__int_eval:n + \int_eval:n { \int_compare:nNnTF - { \__intarray_item_fast:Nn \g__regex_submatch_end_intarray {#1} } = 0 + { + \__kernel_intarray_item:Nn + \g__regex_submatch_end_intarray {#1} + } + = 0 { 0 } { - \__intarray_item_fast:Nn \g__regex_balance_intarray - { \__intarray_item_fast:Nn \g__regex_submatch_end_intarray {#1} } + \__kernel_intarray_item:Nn \g__regex_balance_intarray + { + \__kernel_intarray_item:Nn + \g__regex_submatch_end_intarray {#1} + } } - \int_compare:nNnTF - { \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray {#1} } = 0 + { + \__kernel_intarray_item:Nn + \g__regex_submatch_begin_intarray {#1} + } + = 0 { 0 } { - \__intarray_item_fast:Nn \g__regex_balance_intarray - { \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray {#1} } + \__kernel_intarray_item:Nn \g__regex_balance_intarray + { + \__kernel_intarray_item:Nn + \g__regex_submatch_begin_intarray {#1} + } } } } @@ -20191,7 +20642,8 @@ { \__regex_trace_pop:nnN { regex } { 1 } \__regex_replacement:n } \cs_new_protected:Npn \__regex_replacement:n #1 { - \__tl_build:Nw \l__regex_internal_a_tl + \group_begin: + \tl_build_begin:N \l__regex_build_tl \int_zero:N \l__regex_balance_int \tl_clear:N \l__regex_balance_tl \__regex_escape_use:nnnn @@ -20210,7 +20662,7 @@ \if_int_compare:w \l__regex_replacement_csnames_int > 0 \exp_stop_f: \__kernel_msg_error:nnx { kernel } { replacement-missing-rbrace } { \int_use:N \l__regex_replacement_csnames_int } - \__tl_build_one:x + \tl_build_put_right:Nx \l__regex_build_tl { \prg_replicate:nn \l__regex_replacement_csnames_int \cs_end: } \fi: \seq_if_empty:NF \l__regex_replacement_category_seq @@ -20225,23 +20677,31 @@ \l__regex_balance_tl - \__regex_submatch_balance:n {##1} } - \__tl_build_end: - \exp_args:No \__regex_replacement_aux:n \l__regex_internal_a_tl + \tl_build_end:N \l__regex_build_tl + \exp_args:NNo + \group_end: + \__regex_replacement_aux:n \l__regex_build_tl } \cs_new_protected:Npn \__regex_replacement_aux:n #1 { \cs_set:Npn \__regex_replacement_do_one_match:n ##1 { \__regex_query_range:nn - { \__intarray_item_fast:Nn \g__regex_submatch_prev_intarray {##1} } - { \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray {##1} } + { + \__kernel_intarray_item:Nn + \g__regex_submatch_prev_intarray {##1} + } + { + \__kernel_intarray_item:Nn + \g__regex_submatch_begin_intarray {##1} + } #1 } } \cs_new_protected:Npn \__regex_replacement_normal:n #1 { \tl_if_empty:NTF \l__regex_replacement_category_tl - { \__tl_build_one:n {#1} } + { \tl_build_put_right:Nn \l__regex_build_tl {#1} } { % ( \token_if_eq_charcode:NNTF #1 ) { @@ -20249,7 +20709,11 @@ \l__regex_replacement_category_tl } { - \use:c { __regex_replacement_c_ \l__regex_replacement_category_tl :w } + \use:c + { + __regex_replacement_c_ + \l__regex_replacement_category_tl :w + } \__regex_replacement_normal:n {#1} } } @@ -20269,16 +20733,22 @@ \cs_new_protected:Npn \__regex_replacement_put_submatch:n #1 { \if_int_compare:w #1 < \l__regex_capturing_group_int - \__tl_build_one:n { \__regex_query_submatch:n { #1 + ##1 } } + \tl_build_put_right:Nn \l__regex_build_tl + { \__regex_query_submatch:n { \int_eval:n { #1 + ##1 } } } \if_int_compare:w \l__regex_replacement_csnames_int = 0 \exp_stop_f: \tl_put_right:Nn \l__regex_balance_tl - { + \__regex_submatch_balance:n { \__int_eval:n { #1+##1 } } } + { + + \__regex_submatch_balance:n + { \exp_not:N \int_eval:n { #1 + ##1 } } + } \fi: \fi: } \cs_new_protected:Npn \__regex_replacement_g:w #1#2 { - \str_if_eq_x:nnTF { #1#2 } { \__regex_replacement_normal:n \c_left_brace_str } + \str_if_eq_x:nnTF + { #1#2 } + { \__regex_replacement_normal:n \c_left_brace_str } { \l__regex_internal_a_int = \__regex_replacement_g_digits:NN } { \__regex_replacement_error:NNN g #1 #2 } } @@ -20326,22 +20796,26 @@ \cs_new_protected:Npn \__regex_replacement_cu_aux:Nw #1 { \if_case:w \l__regex_replacement_csnames_int - \__tl_build_one:n { \exp_not:n { \exp_after:wN #1 \cs:w } } + \tl_build_put_right:Nn \l__regex_build_tl + { \exp_not:n { \exp_after:wN #1 \cs:w } } \else: - \__tl_build_one:n { \exp_not:n { \exp_after:wN \tl_to_str:V \cs:w } } + \tl_build_put_right:Nn \l__regex_build_tl + { \exp_not:n { \exp_after:wN \tl_to_str:V \cs:w } } \fi: \int_incr:N \l__regex_replacement_csnames_int } \cs_new_protected:Npn \__regex_replacement_u:w #1#2 { - \str_if_eq_x:nnTF { #1#2 } { \__regex_replacement_normal:n \c_left_brace_str } + \str_if_eq_x:nnTF + { #1#2 } + { \__regex_replacement_normal:n \c_left_brace_str } { \__regex_replacement_cu_aux:Nw \exp_not:V } { \__regex_replacement_error:NNN u #1#2 } } \cs_new_protected:Npn \__regex_replacement_rbrace:N #1 { \if_int_compare:w \l__regex_replacement_csnames_int > 0 \exp_stop_f: - \__tl_build_one:n \cs_end: + \tl_build_put_right:Nn \l__regex_build_tl { \cs_end: } \int_decr:N \l__regex_replacement_csnames_int \else: \__regex_replacement_normal:n {#1} @@ -20359,7 +20833,11 @@ #2 #3 } { - \str_if_eq:nnTF { #2 #3 } { \__regex_replacement_normal:n ( } % ) + \str_if_eq:nnTF + { #2#3 } + { + \__regex_replacement_normal:n ( % ) + } { \seq_push:NV \l__regex_replacement_category_seq \l__regex_replacement_category_tl @@ -20385,7 +20863,7 @@ \cs_new_protected:Npn \__regex_replacement_char:nNN #1#2#3 { \tex_lccode:D 0 = `#3 \scan_stop: - \tex_lowercase:D { \__tl_build_one:n {#1} } + \tex_lowercase:D { \tl_build_put_right:Nn \l__regex_build_tl {#1} } } \char_set_catcode_active:N \^^@ \cs_new_protected:Npn \__regex_replacement_c_A:w @@ -20400,7 +20878,10 @@ { \exp_not:n { \exp_after:wN ^^@ \if_false: } \fi: } } } \cs_new_protected:Npn \__regex_replacement_c_C:w #1#2 - { \__tl_build_one:n { \exp_not:N \exp_not:N \exp_not:c {#2} } } + { + \tl_build_put_right:Nn \l__regex_build_tl + { \exp_not:N \exp_not:N \exp_not:c {#2} } + } \char_set_catcode_math_subscript:N \^^@ \cs_new_protected:Npn \__regex_replacement_c_D:w { \__regex_replacement_char:nNN { ^^@ } } @@ -20434,7 +20915,7 @@ \__kernel_msg_error:nn { kernel } { replacement-null-space } \fi: \tex_lccode:D `\ = `#2 \scan_stop: - \tex_lowercase:D { \__tl_build_one:n {~} } + \tex_lowercase:D { \tl_build_put_right:Nn \l__regex_build_tl {~} } } \char_set_catcode_alignment:N \^^@ \cs_new_protected:Npn \__regex_replacement_c_T:w @@ -20479,7 +20960,7 @@ } \cs_new_protected:Npn \regex_show:N #1 { - \__kernel_check_defined:NT #1 + \__kernel_chk_defined:NT #1 { \__regex_show:N #1 \msg_show:nnxxxx { LaTeX / kernel } { show-regex } @@ -20525,9 +21006,9 @@ \int_new:N \l__regex_min_submatch_int \int_new:N \l__regex_submatch_int \int_new:N \l__regex_zeroth_submatch_int -\__intarray_new:Nn \g__regex_submatch_prev_intarray { 65536 } -\__intarray_new:Nn \g__regex_submatch_begin_intarray { 65536 } -\__intarray_new:Nn \g__regex_submatch_end_intarray { 65536 } +\intarray_new:Nn \g__regex_submatch_prev_intarray { 65536 } +\intarray_new:Nn \g__regex_submatch_begin_intarray { 65536 } +\intarray_new:Nn \g__regex_submatch_end_intarray { 65536 } \cs_new_protected:Npn \__regex_return: { \if_meaning:w \c_true_bool \g__regex_success_bool @@ -20579,29 +21060,30 @@ \group_begin: \__regex_multi_match:n { - \if_int_compare:w \l__regex_start_pos_int < \l__regex_success_pos_int + \if_int_compare:w + \l__regex_start_pos_int < \l__regex_success_pos_int \__regex_extract: - \__intarray_gset_fast:Nnn \g__regex_submatch_prev_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray { \l__regex_zeroth_submatch_int } { 0 } - \__intarray_gset_fast:Nnn \g__regex_submatch_end_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray { \l__regex_zeroth_submatch_int } { - \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray + \__kernel_intarray_item:Nn \g__regex_submatch_begin_intarray { \l__regex_zeroth_submatch_int } } - \__intarray_gset_fast:Nnn \g__regex_submatch_begin_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_begin_intarray { \l__regex_zeroth_submatch_int } { \l__regex_start_pos_int } \fi: } #1 \__regex_match:n {#2} - \__intarray_gset_fast:Nnn \g__regex_submatch_prev_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray { \l__regex_submatch_int } { 0 } - \__intarray_gset_fast:Nnn \g__regex_submatch_end_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray { \l__regex_submatch_int } { \l__regex_max_pos_int } - \__intarray_gset_fast:Nnn \g__regex_submatch_begin_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_begin_intarray { \l__regex_submatch_int } { \l__regex_start_pos_int } \int_incr:N \l__regex_submatch_int @@ -20614,40 +21096,35 @@ } \cs_new_protected:Npn \__regex_group_end_extract_seq:N #1 { - \cs_set_eq:NN \__seq_item:n \scan_stop: \flag_clear:n { __regex_begin } \flag_clear:n { __regex_end } - \tl_set:Nx \l__regex_internal_a_tl + \seq_set_from_function:NnN \l__regex_internal_seq { - \s__seq - \int_step_function:nnnN - { \l__regex_min_submatch_int } - { 1 } + \int_step_function:nnN { \l__regex_min_submatch_int } { \l__regex_submatch_int - 1 } - \__regex_extract_seq_aux:n } + \__regex_extract_seq_aux:n \int_compare:nNnF - { \flag_height:n { __regex_begin } + \flag_height:n { __regex_end } } - = 0 + { + \flag_height:n { __regex_begin } + + \flag_height:n { __regex_end } + } + = 0 { \__kernel_msg_error:nnxxx { kernel } { result-unbalanced } { splitting~or~extracting~submatches } { \flag_height:n { __regex_end } } { \flag_height:n { __regex_begin } } } - \use:x - { - \group_end: - \tl_set:Nn \exp_not:N #1 { \l__regex_internal_a_tl } - } + \seq_set_map:NNn \l__regex_internal_seq \l__regex_internal_seq {##1} + \exp_args:NNNo + \group_end: + \tl_set:Nn #1 { \l__regex_internal_seq } } \cs_new:Npn \__regex_extract_seq_aux:n #1 { - \__seq_item:n - { - \exp_after:wN \__regex_extract_seq_aux:ww - \__int_value:w \__regex_submatch_balance:n {#1} ; #1; - } + \exp_after:wN \__regex_extract_seq_aux:ww + \int_value:w \__regex_submatch_balance:n {#1} ; #1; } \cs_new:Npn \__regex_extract_seq_aux:ww #1; #2; { @@ -20667,31 +21144,34 @@ \int_set_eq:NN \l__regex_zeroth_submatch_int \l__regex_submatch_int \prg_replicate:nn \l__regex_capturing_group_int { - \__intarray_gset_fast:Nnn \g__regex_submatch_begin_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_begin_intarray { \l__regex_submatch_int } { 0 } - \__intarray_gset_fast:Nnn \g__regex_submatch_end_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray { \l__regex_submatch_int } { 0 } - \__intarray_gset_fast:Nnn \g__regex_submatch_prev_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray { \l__regex_submatch_int } { 0 } \int_incr:N \l__regex_submatch_int } \prop_map_inline:Nn \l__regex_success_submatches_prop { \if_int_compare:w ##1 - 1 \exp_stop_f: - \exp_after:wN \__regex_extract_e:wn \__int_value:w + \exp_after:wN \__regex_extract_e:wn \int_value:w \else: - \exp_after:wN \__regex_extract_b:wn \__int_value:w + \exp_after:wN \__regex_extract_b:wn \int_value:w \fi: - \__int_eval:w \l__regex_zeroth_submatch_int + ##1 {##2} + \__regex_int_eval:w \l__regex_zeroth_submatch_int + ##1 {##2} } - \__intarray_gset_fast:Nnn \g__regex_submatch_prev_intarray + \__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray { \l__regex_zeroth_submatch_int } { \l__regex_start_pos_int } \fi: } \cs_new_protected:Npn \__regex_extract_b:wn #1 < #2 - { \__intarray_gset_fast:Nnn \g__regex_submatch_begin_intarray {#1} {#2} } + { + \__kernel_intarray_gset:Nnn + \g__regex_submatch_begin_intarray {#1} {#2} + } \cs_new_protected:Npn \__regex_extract_e:wn #1 > #2 - { \__intarray_gset_fast:Nnn \g__regex_submatch_end_intarray {#1} {#2} } + { \__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray {#1} {#2} } \cs_new_protected:Npn \__regex_replace_once:nnN #1#2#3 { \group_begin: @@ -20710,10 +21190,11 @@ } \tl_set:Nx \l__regex_internal_a_tl { - \__regex_replacement_do_one_match:n { \l__regex_zeroth_submatch_int } + \__regex_replacement_do_one_match:n + { \l__regex_zeroth_submatch_int } \__regex_query_range:nn { - \__intarray_item_fast:Nn \g__regex_submatch_end_intarray + \__kernel_intarray_item:Nn \g__regex_submatch_end_intarray { \l__regex_zeroth_submatch_int } } { \l__regex_max_pos_int } @@ -20775,26 +21256,20 @@ } } } -\__kernel_msg_new:nnnn { kernel } { trailing-backslash } - { Trailing~escape~character~'\iow_char:N\\'. } - { - A~regular~expression~or~its~replacement~text~ends~with~ - the~escape~character~'\iow_char:N\\'.~It~will~be~ignored. - } -\__kernel_msg_new:nnnn { kernel } { x-missing-rbrace } - { Missing~closing~brace~in~'\iow_char:N\\x'~hexadecimal~sequence. } - { - You~wrote~something~like~ - '\iow_char:N\\x\{...#1'.~ - The~closing~brace~is~missing. - } -\__kernel_msg_new:nnnn { kernel } { x-overflow } - { Character~code~'#1'~too~large~in~'\iow_char:N\\x'~hexadecimal~sequence. } +\use:x { - You~wrote~something~like~ - '\iow_char:N\\x\{\int_to_Hex:n{#1}\}'.~ - The~character~code~#1~is~larger~than~ - the~maximum~value~\int_use:N \c_max_char_int. + \__kernel_msg_new:nnn { kernel } { trailing-backslash } + { Trailing~escape~char~'\iow_char:N\\'~in~regex~or~replacement. } + \__kernel_msg_new:nnn { kernel } { x-missing-rbrace } + { + Missing~brace~'\iow_char:N\}'~in~regex~ + '...\iow_char:N\\x\iow_char:N\{...##1'. + } + \__kernel_msg_new:nnn { kernel } { x-overflow } + { + Character~code~##1~too~large~in~ + \iow_char:N\\x\iow_char:N\{##2\iow_char:N\}~regex. + } } \__kernel_msg_new:nnnn { kernel } { invalid-quantifier } { Braced~quantifier~'#1'~may~not~be~followed~by~'#2'. } @@ -20878,6 +21353,12 @@ control~sequence~or~the~next~group~to~be~made~of~control~sequences.~ It~only~makes~sense~to~follow~it~by~'.'~or~by~a~group. } +\__kernel_msg_new:nnnn { kernel } { c-lparen-in-class } + { Catcode~test~cannot~apply~to~group~in~character~class } + { + Construction~such~as~'\iow_char:N\\cL(abc)'~are~not~allowed~inside~a~ + class~'[...]'~because~classes~do~not~match~multiple~characters~at~once. + } \__kernel_msg_new:nnnn { kernel } { c-missing-rbrace } { Missing~right~brace~inserted~for~'\iow_char:N\\c'~escape. } { @@ -20918,7 +21399,8 @@ \str_if_eq_x:nnTF { } {#2} { reached~the~end~of~the~string~ } { encountered~an~escaped~alphanumeric~character '\iow_char:N\\#2'~ } - when~parsing~the~argument~of~an~'\iow_char:N\\u\iow_char:N\{...\}'~escape. + when~parsing~the~argument~of~an~ + '\iow_char:N\\u\iow_char:N\{...\}'~escape. } \__kernel_msg_new:nnnn { kernel } { posix-unsupported } { POSIX~collating~element~'[#1 ~ #1]'~not~supported. } @@ -21033,7 +21515,8 @@ { Missing~right~parenthesis~inserted~in~replacement~text. } { There~ \int_compare:nTF { #1 = 1 } { was } { were } ~ #1~ - missing~right~\int_compare:nTF { #1 = 1 } { parenthesis } { parentheses } . + missing~right~ + \int_compare:nTF { #1 = 1 } { parenthesis } { parentheses } . } \__kernel_msg_new:nnn { kernel } { show-regex } { @@ -21057,7 +21540,7 @@ } } } -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_new_protected:Npn \__regex_trace_push:nnN #1#2#3 { \__regex_trace:nnx {#1} {#2} { entering~ \token_to_str:N #3 } } @@ -21072,13 +21555,12 @@ } { } \int_new:N \g__regex_trace_regex_int -\__kernel_debug:TF +\__kernel_if_debug:TF { \cs_new_protected:Npn \__regex_trace_states:n #1 { - \int_step_inline:nnnn + \int_step_inline:nnn \l__regex_min_state_int - { 1 } { \l__regex_max_state_int - 1 } { \__regex_trace:nnx { regex } {#1} @@ -21088,9 +21570,19 @@ } { } %% File: l3box.dtx Copyright (C) 2005-2018 The LaTeX3 Project +\cs_new_eq:NN \__box_dim_eval:w \etex_dimexpr:D +\__kernel_patch_args:nNNpn + { + { + \__kernel_chk_expr:nNnN {#1} + \__box_dim_eval:w { } \__box_dim_eval:n + } + } +\cs_new:Npn \__box_dim_eval:n #1 + { \__box_dim_eval:w #1 \scan_stop: } \cs_new_protected:Npn \box_new:N #1 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \cs:w newbox \cs_end: #1 } \cs_generate_variant:Nn \box_new:N { c } @@ -21133,11 +21625,11 @@ \cs_generate_variant:Nn \box_dp:N { c } \cs_generate_variant:Nn \box_wd:N { c } \cs_new_protected:Npn \box_set_dp:Nn #1#2 - { \box_dp:N #1 \__dim_eval:n {#2} } + { \box_dp:N #1 \__box_dim_eval:n {#2} } \cs_new_protected:Npn \box_set_ht:Nn #1#2 - { \box_ht:N #1 \__dim_eval:n {#2} } + { \box_ht:N #1 \__box_dim_eval:n {#2} } \cs_new_protected:Npn \box_set_wd:Nn #1#2 - { \box_wd:N #1 \__dim_eval:n {#2} } + { \box_wd:N #1 \__box_dim_eval:n {#2} } \cs_generate_variant:Nn \box_set_ht:Nn { c } \cs_generate_variant:Nn \box_set_dp:Nn { c } \cs_generate_variant:Nn \box_set_wd:Nn { c } @@ -21146,13 +21638,13 @@ \cs_generate_variant:Nn \box_use_drop:N { c } \cs_generate_variant:Nn \box_use:N { c } \cs_new_protected:Npn \box_move_left:nn #1#2 - { \tex_moveleft:D \__dim_eval:n {#1} #2 } + { \tex_moveleft:D \__box_dim_eval:n {#1} #2 } \cs_new_protected:Npn \box_move_right:nn #1#2 - { \tex_moveright:D \__dim_eval:n {#1} #2 } + { \tex_moveright:D \__box_dim_eval:n {#1} #2 } \cs_new_protected:Npn \box_move_up:nn #1#2 - { \tex_raise:D \__dim_eval:n {#1} #2 } + { \tex_raise:D \__box_dim_eval:n {#1} #2 } \cs_new_protected:Npn \box_move_down:nn #1#2 - { \tex_lower:D \__dim_eval:n {#1} #2 } + { \tex_lower:D \__box_dim_eval:n {#1} #2 } \cs_new_eq:NN \if_hbox:N \tex_ifhbox:D \cs_new_eq:NN \if_vbox:N \tex_ifvbox:D \cs_new_eq:NN \if_box_empty:N \tex_ifvoid:D @@ -21221,7 +21713,10 @@ { \tex_hbox:D \scan_stop: { \color_group_begin: #1 \color_group_end: } } \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set:Nn #1#2 - { \tex_setbox:D #1 \tex_hbox:D { \color_group_begin: #2 \color_group_end: } } + { + \tex_setbox:D #1 \tex_hbox:D + { \color_group_begin: #2 \color_group_end: } + } \__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } \cs_new_protected:Npn \hbox_gset:Nn #1#2 { @@ -21233,13 +21728,13 @@ \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set_to_wd:Nnn #1#2#3 { - \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} + \tex_setbox:D #1 \tex_hbox:D to \__box_dim_eval:n {#2} { \color_group_begin: #3 \color_group_end: } } \__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } \cs_new_protected:Npn \hbox_gset_to_wd:Nnn #1#2#3 { - \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} + \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__box_dim_eval:n {#2} { \color_group_begin: #3 \color_group_end: } } \cs_generate_variant:Nn \hbox_set_to_wd:Nnn { c } @@ -21269,14 +21764,14 @@ \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set_to_wd:Nnw #1#2 { - \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} + \tex_setbox:D #1 \tex_hbox:D to \__box_dim_eval:n {#2} \c_group_begin_token \color_group_begin: } \__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } \cs_new_protected:Npn \hbox_gset_to_wd:Nnw #1#2 { - \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} + \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__box_dim_eval:n {#2} \c_group_begin_token \color_group_begin: } @@ -21284,11 +21779,14 @@ \cs_generate_variant:Nn \hbox_gset_to_wd:Nnw { c } \cs_new_protected:Npn \hbox_to_wd:nn #1#2 { - \tex_hbox:D to \__dim_eval:n {#1} + \tex_hbox:D to \__box_dim_eval:n {#1} { \color_group_begin: #2 \color_group_end: } } \cs_new_protected:Npn \hbox_to_zero:n #1 - { \tex_hbox:D to \c_zero_dim { \color_group_begin: #1 \color_group_end: } } + { + \tex_hbox:D to \c_zero_dim + { \color_group_begin: #1 \color_group_end: } + } \cs_new_protected:Npn \hbox_overlap_left:n #1 { \hbox_to_zero:n { \tex_hss:D #1 } } \cs_new_protected:Npn \hbox_overlap_right:n #1 @@ -21303,7 +21801,7 @@ { \tex_vtop:D { \color_group_begin: #1 \color_group_end: } } \cs_new_protected:Npn \vbox_to_ht:nn #1#2 { - \tex_vbox:D to \__dim_eval:n {#1} + \tex_vbox:D to \__box_dim_eval:n {#1} { \color_group_begin: #2 \color_group_end: } } \cs_new_protected:Npn \vbox_to_zero:n #1 @@ -21342,13 +21840,13 @@ \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3 { - \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} + \tex_setbox:D #1 \tex_vbox:D to \__box_dim_eval:n {#2} { \color_group_begin: #3 \color_group_end: } } \__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } \cs_new_protected:Npn \vbox_gset_to_ht:Nnn #1#2#3 { - \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} + \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__box_dim_eval:n {#2} { \color_group_begin: #3 \color_group_end: } } \cs_generate_variant:Nn \vbox_set_to_ht:Nnn { c } @@ -21378,14 +21876,14 @@ \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_to_ht:Nnw #1#2 { - \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} + \tex_setbox:D #1 \tex_vbox:D to \__box_dim_eval:n {#2} \c_group_begin_token \color_group_begin: } \__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } \cs_new_protected:Npn \vbox_gset_to_ht:Nnw #1#2 { - \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} + \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__box_dim_eval:n {#2} \c_group_begin_token \color_group_begin: } @@ -21397,7 +21895,7 @@ \cs_generate_variant:Nn \vbox_unpack_clear:N { c } \__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_split_to_ht:NNn #1#2#3 - { \tex_setbox:D #1 \tex_vsplit:D #2 to \__dim_eval:n {#3} } + { \tex_setbox:D #1 \tex_vsplit:D #2 to \__box_dim_eval:n {#3} } \fp_new:N \l__box_angle_fp \fp_new:N \l__box_cos_fp \fp_new:N \l__box_sin_fp @@ -21772,11 +22270,12 @@ \dim_new:N \l__coffin_y_dim \dim_new:N \l__coffin_x_prime_dim \dim_new:N \l__coffin_y_prime_dim +\cs_new_eq:NN \__coffin_to_value:N \tex_number:D \prg_new_conditional:Npnn \coffin_if_exist:N #1 { p , T , F , TF } { \cs_if_exist:NTF #1 { - \cs_if_exist:cTF { l__coffin_poles_ \__int_value:w #1 _prop } + \cs_if_exist:cTF { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { \prg_return_true: } { \prg_return_false: } } @@ -21806,11 +22305,11 @@ { \box_new:N #1 \debug_suspend: - \prop_clear_new:c { l__coffin_corners_ \__int_value:w #1 _prop } - \prop_clear_new:c { l__coffin_poles_ \__int_value:w #1 _prop } - \prop_gset_eq:cN { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_clear_new:c { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + \prop_clear_new:c { l__coffin_poles_ \__coffin_to_value:N #1 _prop } + \prop_gset_eq:cN { l__coffin_corners_ \__coffin_to_value:N #1 _prop } \c__coffin_corners_prop - \prop_gset_eq:cN { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_gset_eq:cN { l__coffin_poles_ \__coffin_to_value:N #1 _prop } \c__coffin_poles_prop \debug_resume: } @@ -21930,7 +22429,7 @@ \cs_new_protected:Npn \__coffin_get_pole:NnN #1#2#3 { \prop_get:cnNF - { l__coffin_poles_ \__int_value:w #1 _prop } {#2} #3 + { l__coffin_poles_ \__coffin_to_value:N #1 _prop } {#2} #3 { \__kernel_msg_error:nnxx { kernel } { unknown-coffin-pole } {#2} { \token_to_str:N #1 } @@ -21939,24 +22438,24 @@ } \cs_new_protected:Npn \__coffin_reset_structure:N #1 { - \prop_set_eq:cN { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_set_eq:cN { l__coffin_corners_ \__coffin_to_value:N #1 _prop } \c__coffin_corners_prop - \prop_set_eq:cN { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_set_eq:cN { l__coffin_poles_ \__coffin_to_value:N #1 _prop } \c__coffin_poles_prop } \cs_new_protected:Npn \__coffin_set_eq_structure:NN #1#2 { - \prop_set_eq:cc { l__coffin_corners_ \__int_value:w #1 _prop } - { l__coffin_corners_ \__int_value:w #2 _prop } - \prop_set_eq:cc { l__coffin_poles_ \__int_value:w #1 _prop } - { l__coffin_poles_ \__int_value:w #2 _prop } + \prop_set_eq:cc { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + { l__coffin_corners_ \__coffin_to_value:N #2 _prop } + \prop_set_eq:cc { l__coffin_poles_ \__coffin_to_value:N #1 _prop } + { l__coffin_poles_ \__coffin_to_value:N #2 _prop } } \cs_new_protected:Npn \__coffin_gset_eq_structure:NN #1#2 { - \prop_gset_eq:cc { l__coffin_corners_ \__int_value:w #1 _prop } - { l__coffin_corners_ \__int_value:w #2 _prop } - \prop_gset_eq:cc { l__coffin_poles_ \__int_value:w #1 _prop } - { l__coffin_poles_ \__int_value:w #2 _prop } + \prop_gset_eq:cc { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + { l__coffin_corners_ \__coffin_to_value:N #2 _prop } + \prop_gset_eq:cc { l__coffin_poles_ \__coffin_to_value:N #1 _prop } + { l__coffin_poles_ \__coffin_to_value:N #2 _prop } } \cs_new_protected:Npn \coffin_set_horizontal_pole:Nnn #1#2#3 { @@ -21981,48 +22480,61 @@ } } \cs_new_protected:Npn \__coffin_set_pole:Nnn #1#2#3 - { \prop_put:cnn { l__coffin_poles_ \__int_value:w #1 _prop } {#2} {#3} } + { + \prop_put:cnn { l__coffin_poles_ \__coffin_to_value:N #1 _prop } + {#2} {#3} + } \cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c } \cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c } \cs_generate_variant:Nn \__coffin_set_pole:Nnn { Nnx } \cs_new_protected:Npn \__coffin_update_corners:N #1 { - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } { tl } + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + { tl } { { 0pt } { \dim_eval:n { \box_ht:N #1 } } } - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } { tr } - { { \dim_eval:n { \box_wd:N #1 } } { \dim_eval:n { \box_ht:N #1 } } } - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } { bl } + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + { tr } + { + { \dim_eval:n { \box_wd:N #1 } } + { \dim_eval:n { \box_ht:N #1 } } + } + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + { bl } { { 0pt } { \dim_eval:n { -\box_dp:N #1 } } } - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } { br } - { { \dim_eval:n { \box_wd:N #1 } } { \dim_eval:n { -\box_dp:N #1 } } } + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } + { br } + { + { \dim_eval:n { \box_wd:N #1 } } + { \dim_eval:n { -\box_dp:N #1 } } + } } \cs_new_protected:Npn \__coffin_update_poles:N #1 { - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } { hc } + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { hc } { { \dim_eval:n { 0.5 \box_wd:N #1 } } { 0pt } { 0pt } { 1000pt } } - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } { r } + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { r } { { \dim_eval:n { \box_wd:N #1 } } { 0pt } { 0pt } { 1000pt } } - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } { vc } + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { vc } { { 0pt } { \dim_eval:n { ( \box_ht:N #1 - \box_dp:N #1 ) / 2 } } { 1000pt } { 0pt } } - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } { t } + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { t } { { 0pt } { \dim_eval:n { \box_ht:N #1 } } { 1000pt } { 0pt } } - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } { b } + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { b } { { 0pt } { \dim_eval:n { -\box_dp:N #1 } } @@ -22105,13 +22617,18 @@ \fp_to_dim:n { ( - \dim_to_fp:n {#1} * \l__coffin_slope_x_fp - - ( \dim_to_fp:n {#5} * \l__coffin_slope_y_fp ) + \dim_to_fp:n {#1} * + \l__coffin_slope_x_fp + - ( \dim_to_fp:n {#5} * + \l__coffin_slope_y_fp ) - \dim_to_fp:n {#2} + \dim_to_fp:n {#6} ) / - ( \l__coffin_slope_x_fp - \l__coffin_slope_y_fp ) + ( + \l__coffin_slope_x_fp - + \l__coffin_slope_y_fp + ) } } \__coffin_calculate_intersection_aux:nnnnnN @@ -22153,7 +22670,11 @@ } \__coffin_reset_structure:N \l__coffin_aligned_coffin \prop_clear:c - { l__coffin_corners_ \__int_value:w \l__coffin_aligned_coffin _ prop } + { + l__coffin_corners_ + \__coffin_to_value:N \l__coffin_aligned_coffin + _prop + } \__coffin_update_poles:N \l__coffin_aligned_coffin \dim_compare:nNnTF \l__coffin_offset_x_dim < \c_zero_dim { @@ -22183,8 +22704,11 @@ \box_set_wd:Nn \l__coffin_aligned_coffin { \box_wd:N #1 } \__coffin_reset_structure:N \l__coffin_aligned_coffin \prop_set_eq:cc - { l__coffin_corners_ \__int_value:w \l__coffin_aligned_coffin _prop } - { l__coffin_corners_ \__int_value:w #1 _prop } + { + l__coffin_corners_ + \__coffin_to_value:N \l__coffin_aligned_coffin _prop + } + { l__coffin_corners_ \__coffin_to_value:N #1 _prop } \__coffin_update_poles:N \l__coffin_aligned_coffin \__coffin_offset_poles:Nnn #1 { 0pt } { 0pt } \__coffin_offset_poles:Nnn #4 @@ -22223,7 +22747,7 @@ } \cs_new_protected:Npn \__coffin_offset_poles:Nnn #1#2#3 { - \prop_map_inline:cn { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { \__coffin_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} } } \cs_new_protected:Npn \__coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 @@ -22242,13 +22766,16 @@ } \cs_new_protected:Npn \__coffin_offset_corners:Nnn #1#2#3 { - \prop_map_inline:cn { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_corners_ \__coffin_to_value:N #1 _prop } { \__coffin_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} } } \cs_new_protected:Npn \__coffin_offset_corner:Nnnnn #1#2#3#4#5#6 { \prop_put:cnx - { l__coffin_corners_ \__int_value:w \l__coffin_aligned_coffin _prop } + { + l__coffin_corners_ + \__coffin_to_value:N \l__coffin_aligned_coffin _prop + } { #1 - #2 } { { \dim_eval:n { #3 + #5 } } @@ -22398,7 +22925,7 @@ \rule { 1pt } { 1pt } } \prop_set_eq:Nc \l__coffin_display_poles_prop - { l__coffin_poles_ \__int_value:w #1 _prop } + { l__coffin_poles_ \__coffin_to_value:N #1 _prop } \__coffin_get_pole:NnN #1 { H } \l__coffin_pole_a_tl \__coffin_get_pole:NnN #1 { T } \l__coffin_pole_b_tl \tl_if_eq:NNT \l__coffin_pole_a_tl \l__coffin_pole_b_tl @@ -22509,7 +23036,7 @@ } { \prop_map_function:cN - { l__coffin_poles_ \int_eval:n {#2} _prop } + { l__coffin_poles_ \__coffin_to_value:N #2 _prop } \msg_show_item_unbraced:nn } { } @@ -22518,10 +23045,9 @@ \__kernel_msg_new:nnnn { kernel } { no-pole-intersection } { No~intersection~between~coffin~poles. } { - \c__msg_coding_error_text_tl LaTeX~was~asked~to~find~the~intersection~between~two~poles,~ but~they~do~not~have~a~unique~meeting~point:~ - the~value~(0~pt,~0~pt)~will~be~used. + the~value~(0pt,~0pt)~will~be~used. } \__kernel_msg_new:nnnn { kernel } { unknown-coffin } { Unknown~coffin~'#1'. } @@ -22529,7 +23055,6 @@ \__kernel_msg_new:nnnn { kernel } { unknown-coffin-pole } { Pole~'#1'~unknown~for~coffin~'#2'. } { - \c__msg_coding_error_text_tl LaTeX~was~asked~to~find~a~typesetting~pole~for~a~coffin,~ but~either~the~coffin~does~not~exist~or~the~pole~name~is~wrong. } @@ -22538,147 +23063,172 @@ Size~of~coffin~#1 : #2 \\ Poles~of~coffin~#1 : #3 . } -%% File: l3sys.dtx Copyright (C) 2015-2017 The LaTeX3 Project -\str_const:Nx \c_sys_jobname_str { \tex_jobname:D } -\int_const:Nn \c_sys_minute_int - { \int_mod:nn { \tex_time:D } { 60 } } -\int_const:Nn \c_sys_hour_int - { \int_div_truncate:nn { \tex_time:D } { 60 } } -\int_const:Nn \c_sys_day_int { \tex_day:D } -\int_const:Nn \c_sys_month_int { \tex_month:D } -\int_const:Nn \c_sys_year_int { \tex_year:D } -\clist_map_inline:nn { lua , pdf , p , up , xe } - { - \cs_new_eq:cN { sys_if_engine_ #1 tex:T } \use_none:n - \cs_new_eq:cN { sys_if_engine_ #1 tex:F } \use:n - \cs_new_eq:cN { sys_if_engine_ #1 tex:TF } \use_ii:nn - \cs_new_eq:cN { sys_if_engine_ #1 tex_p: } \c_false_bool - } -\cs_if_exist:NT \luatex_luatexversion:D - { - \cs_gset_eq:NN \sys_if_engine_luatex:T \use:n - \cs_gset_eq:NN \sys_if_engine_luatex:F \use_none:n - \cs_gset_eq:NN \sys_if_engine_luatex:TF \use_i:nn - \cs_gset_eq:NN \sys_if_engine_luatex_p: \c_true_bool - \str_const:Nn \c_sys_engine_str { luatex } - } -\cs_if_exist:NT \pdftex_pdftexversion:D - { - \cs_gset_eq:NN \sys_if_engine_pdftex:T \use:n - \cs_gset_eq:NN \sys_if_engine_pdftex:F \use_none:n - \cs_gset_eq:NN \sys_if_engine_pdftex:TF \use_i:nn - \cs_gset_eq:NN \sys_if_engine_pdftex_p: \c_true_bool - \str_const:Nn \c_sys_engine_str { pdftex } - } -\cs_if_exist:NT \ptex_kanjiskip:D - { - \bool_lazy_and:nnTF - { \cs_if_exist_p:N \uptex_disablecjktoken:D } - { \int_compare_p:nNn { \ptex_jis:D "2121 } = { "3000 } } - { - \cs_gset_eq:NN \sys_if_engine_uptex:T \use:n - \cs_gset_eq:NN \sys_if_engine_uptex:F \use_none:n - \cs_gset_eq:NN \sys_if_engine_uptex:TF \use_i:nn - \cs_gset_eq:NN \sys_if_engine_uptex_p: \c_true_bool - \str_const:Nn \c_sys_engine_str { uptex } - } - { - \cs_gset_eq:NN \sys_if_engine_ptex:T \use:n - \cs_gset_eq:NN \sys_if_engine_ptex:F \use_none:n - \cs_gset_eq:NN \sys_if_engine_ptex:TF \use_i:nn - \cs_gset_eq:NN \sys_if_engine_ptex_p: \c_true_bool - \str_const:Nn \c_sys_engine_str { ptex } - } - } -\cs_if_exist:NT \xetex_XeTeXversion:D - { - \cs_gset_eq:NN \sys_if_engine_xetex:T \use:n - \cs_gset_eq:NN \sys_if_engine_xetex:F \use_none:n - \cs_gset_eq:NN \sys_if_engine_xetex:TF \use_i:nn - \cs_gset_eq:NN \sys_if_engine_xetex_p: \c_true_bool - \str_const:Nn \c_sys_engine_str { xetex } - } -\int_compare:nNnTF - { \cs_if_exist_use:NF \pdftex_pdfoutput:D { 0 } } > { 0 } - { - \cs_new_eq:NN \sys_if_output_dvi:T \use_none:n - \cs_new_eq:NN \sys_if_output_dvi:F \use:n - \cs_new_eq:NN \sys_if_output_dvi:TF \use_ii:nn - \cs_new_eq:NN \sys_if_output_dvi_p: \c_false_bool - \cs_new_eq:NN \sys_if_output_pdf:T \use:n - \cs_new_eq:NN \sys_if_output_pdf:F \use_none:n - \cs_new_eq:NN \sys_if_output_pdf:TF \use_i:nn - \cs_new_eq:NN \sys_if_output_pdf_p: \c_true_bool - \str_const:Nn \c_sys_output_str { pdf } - } - { - \cs_new_eq:NN \sys_if_output_dvi:T \use:n - \cs_new_eq:NN \sys_if_output_dvi:F \use_none:n - \cs_new_eq:NN \sys_if_output_dvi:TF \use_i:nn - \cs_new_eq:NN \sys_if_output_dvi_p: \c_true_bool - \cs_new_eq:NN \sys_if_output_pdf:T \use_none:n - \cs_new_eq:NN \sys_if_output_pdf:F \use:n - \cs_new_eq:NN \sys_if_output_pdf:TF \use_ii:nn - \cs_new_eq:NN \sys_if_output_pdf_p: \c_false_bool - \str_const:Nn \c_sys_output_str { dvi } - } -%% File: l3deprecation.dtx (C) Copyright 2017-2018 The LaTeX3 Project -\cs_new_protected:Npn \__deprecation_error:Nnn #1#2#3 +%% File: l3luatex.dtx Copyright (C) 2010-2018 The LaTeX3 Project +\cs_new_eq:NN \__luatex_escape_x:n \luatex_luaescapestring:D +\cs_new_eq:NN \__luatex_now_x:n \luatex_directlua:D +\cs_new_eq:NN \__luatex_shipout_x:n \luatex_latelua:D +\cs_undefine:N \lua_escape_x:n +\cs_undefine:N \lua_now_x:n +\cs_new:Npn \lua_now_x:n #1 { \__luatex_now_x:n {#1} } +\cs_new:Npn \lua_now:n #1 { \lua_now_x:n { \exp_not:n {#1} } } +\cs_new_protected:Npn \lua_shipout_x:n #1 { \__luatex_shiphout_x:n {#1} } +\cs_new_protected:Npn \lua_shipout:n #1 + { \lua_shipout_x:n { \exp_not:n {#1} } } +\cs_new:Npn \lua_escape_x:n #1 { \__luatex_escape_x:n {#1} } +\cs_new:Npn \lua_escape:n #1 { \lua_escape_x:n { \exp_not:n {#1} } } +\sys_if_engine_luatex:F { - \etex_protected:D \tex_outer:D \tex_edef:D #1 + \clist_map_inline:nn { - \exp_not:N \__kernel_msg_expandable_error:nnnnn - { kernel } { deprecated-command } - { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } - \exp_not:N \__kernel_msg_error:nnxxx - { kernel } { deprecated-command } - { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } + \use_x:n , + \lua_escape_x:n , \lua_escape:n , + \lua_now_x:n , \lua_now:n + } + { + \cs_set:Npn #1 ##1 + { + \__kernel_msg_expandable_error:nnn + { kernel } { luatex-required } { #1 } + } + } + \clist_map_inline:nn + { \lua_shipout_x:n , \lua_shipout:n } + { + \cs_set_protected:Npn #1 ##1 + { + \__kernel_msg_error:nnn + { kernel } { luatex-required } { #1 } + } } } -\__deprecation_error:Nnn \file_if_exist_input:nT { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 } -\__deprecation_error:Nnn \file_if_exist_input:nTF { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 } -\__deprecation_error:Nnn \c_job_name_tl { \c_sys_jobname_str } { 2017-01-01 } -\__deprecation_error:Nnn \dim_case:nnn { \dim_case:nnF } { 2015-07-14 } -\__deprecation_error:Nnn \int_case:nnn { \int_case:nnF } { 2015-07-14 } -\__deprecation_error:Nnn \int_from_binary:n { \int_from_bin:n } { 2016-01-05 } -\__deprecation_error:Nnn \int_from_hexadecimal:n { \int_from_hex:n } { 2016-01-05 } -\__deprecation_error:Nnn \int_from_octal:n { \int_from_oct:n } { 2016-01-05 } -\__deprecation_error:Nnn \int_to_binary:n { \int_to_bin:n } { 2016-01-05 } -\__deprecation_error:Nnn \int_to_hexadecimal:n { \int_to_hex:n } { 2016-01-05 } -\__deprecation_error:Nnn \int_to_octal:n { \int_to_oct:n } { 2016-01-05 } -\__deprecation_error:Nnn \ior_get_str:NN { \ior_str_get:NN } { 2018-03-05 } -\__deprecation_error:Nnn \luatex_if_engine_p: { \sys_if_engine_luatex_p: } { 2017-01-01 } -\__deprecation_error:Nnn \luatex_if_engine:F { \sys_if_engine_luatex:F } { 2017-01-01 } -\__deprecation_error:Nnn \luatex_if_engine:T { \sys_if_engine_luatex:T } { 2017-01-01 } -\__deprecation_error:Nnn \luatex_if_engine:TF { \sys_if_engine_luatex:TF } { 2017-01-01 } -\__deprecation_error:Nnn \pdftex_if_engine_p: { \sys_if_engine_pdftex_p: } { 2017-01-01 } -\__deprecation_error:Nnn \pdftex_if_engine:F { \sys_if_engine_pdftex:F } { 2017-01-01 } -\__deprecation_error:Nnn \pdftex_if_engine:T { \sys_if_engine_pdftex:T } { 2017-01-01 } -\__deprecation_error:Nnn \pdftex_if_engine:TF { \sys_if_engine_pdftex:TF } { 2017-01-01 } -\__deprecation_error:Nnn \prop_get:cn { \prop_item:cn } { 2016-01-05 } -\__deprecation_error:Nnn \prop_get:Nn { \prop_item:Nn } { 2016-01-05 } -\__deprecation_error:Nnn \quark_if_recursion_tail_break:N { } { 2015-07-14 } -\__deprecation_error:Nnn \quark_if_recursion_tail_break:n { }{ 2015-07-14 } -\__deprecation_error:Nnn \scan_align_safe_stop: { protected~commands } { 2017-01-01 } -\__deprecation_error:Nnn \str_case:nnn { \str_case:nnF } { 2015-07-14 } -\__deprecation_error:Nnn \str_case:onn { \str_case:onF } { 2015-07-14 } -\__deprecation_error:Nnn \str_case_x:nnn { \str_case_x:nnF } { 2015-07-14 } -\__deprecation_error:Nnn \tl_case:cnn { \tl_case:cnF } { 2015-07-14 } -\__deprecation_error:Nnn \tl_case:Nnn { \tl_case:NnF } { 2015-07-14 } -\__deprecation_error:Nnn \tl_to_lowercase:n { \tex_lowercase:D } { 2018-03-05 } -\__deprecation_error:Nnn \tl_to_uppercase:n { \tex_uppercase:D } { 2018-03-05 } -\__deprecation_error:Nnn \xetex_if_engine_p: { \sys_if_engine_xetex_p: } { 2017-01-01 } -\__deprecation_error:Nnn \xetex_if_engine:F { \sys_if_engine_xetex:F } { 2017-01-01 } -\__deprecation_error:Nnn \xetex_if_engine:T { \sys_if_engine_xetex:T } { 2017-01-01 } -\__deprecation_error:Nnn \xetex_if_engine:TF { \sys_if_engine_xetex:TF } { 2017-01-01 } -\__kernel_deprecation_code:nn +\__kernel_msg_new:nnnn { kernel } { luatex-required } + { LuaTeX~engine~not~in~use!~Ignoring~#1. } { - \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx - { \__kernel_msg_error:nnxxxx } + The~feature~you~are~using~is~only~available~ + with~the~LuaTeX~engine.~LaTeX3~ignored~'#1'. } +%% File: l3unicode.dtx Copyright (C) 2018 The LaTeX3 Project +\ior_new:N \g__char_data_ior +\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { - \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx - { \__kernel_msg_warning:nnxxxx } + \group_begin: + \cs_set_eq:NN \__char_generate:w \utex_char:D + \ior_open:Nn \g__char_data_ior { UnicodeData.txt } + \cs_set_protected:Npn \__char_data_auxi:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; + { \__char_data_auxii:w #1 ; } + \cs_set_protected:Npn \__char_data_auxii:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 \q_stop + { + \tl_if_blank:nF {#7} + { + \str_if_eq:nnF {#5} {#7} + { + \tl_const:cx + { c__char_mixed_case_ \__char_generate:w "#1 _tl } + { \__char_generate:w "#7 } + } + } + } + \ior_map_inline:Nn \g__char_data_ior + { + \tl_if_blank:nF {#1} + { \__char_data_auxi:w #1 \q_stop } + } + \ior_close:N \g__char_data_ior + \ior_open:Nn \g__char_data_ior { CaseFolding.txt } + \cs_set_protected:Npn \__char_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop + { + \str_if_eq:nnTF {#2} { C } + { + \int_compare:nNnF + { \char_value_lccode:n {"#1} } = {"#3} + { + \tl_const:cx + { c__char_fold_case_ \__char_generate:w "#1 _tl } + { \__char_generate:w "#3 } + } + } + { + \str_if_eq:nnT {#2} { F } + { \__char_data_auxii:w #1 ~ #3 ~ \q_stop } + } + } + \cs_set_protected:Npn \__char_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop + { + \tl_const:cx { c__char_fold_case_ \__char_generate:w "#1 _tl } + { + \__char_generate:w "#2 \exp_stop_f: + \__char_generate:w "#3 \exp_stop_f: + \tl_if_blank:nF {#4} + { \__char_generate:w "#4 } + } + } + \ior_str_map_inline:Nn \g__char_data_ior + { + \tl_if_blank:nF {#1} + { + \str_if_eq_x:nnF { \tl_head:n {#1} } { \c_hash_str } + { \__char_data_auxi:w #1 \q_stop } + } + } + \ior_close:N \g__char_data_ior + \ior_open:Nn \g__char_data_ior { SpecialCasing.txt } + \cs_set_protected:Npn \__char_data_auxi:w + #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop + { + \use:n { \__char_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop + \use:n { \__char_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop + \str_if_eq:nnF {#3} {#4} + { \use:n { \__char_data_auxii:w #1 ~ mixed ~ #3 ~ } ~ \q_stop } + } + \cs_set_protected:Npn \__char_data_auxii:w + #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop + { + \tl_if_empty:nF {#4} + { + \tl_const:cx { c__char_ #2 _case_ \__char_generate:w "#1 _tl } + { + \__char_generate:w "#3 \exp_stop_f: + \__char_generate:w "#4 \exp_stop_f: + \tl_if_blank:nF {#5} + { \__char_generate:w "#5 } + } + } + } + \ior_str_map_inline:Nn \g__char_data_ior + { + \tl_if_blank:nF {#1} + { + \str_if_eq_x:nnTF { \tl_head:n {#1} } { \c_hash_str } + { + \str_if_eq_x:nnT + {#1} + { \c_hash_str \c_space_tl Conditional~Mappings } + { \ior_map_break: } + } + { \__char_data_auxi:w #1 \q_stop } + } + } + \ior_close:N \g__char_data_ior + \group_end: + } + { + \group_begin: + \cs_set_protected:Npn \__char_tmp:NN #1#2 + { + \quark_if_recursion_tail_stop:N #2 + \tl_const:cn { c__char_upper_case_ #2 _tl } {#1} + \tl_const:cn { c__char_lower_case_ #1 _tl } {#2} + \tl_const:cn { c__char_fold_case_ #1 _tl } {#2} + \__char_tmp:NN + } + \__char_tmp:NN + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz + ? \q_recursion_tail \q_recursion_stop + \ior_open:Nn \g__char_data_ior { UnicodeData.txt } + \ior_close:N \g__char_data_ior + \group_end: } %% File: l3candidates.dtx Copyright (C) 2012-2018 The LaTeX3 Project \cs_new_protected:Npx \mode_leave_vertical: @@ -22701,9 +23251,9 @@ { \hbox_set:Nn \l__box_internal_box { - \tex_kern:D - \__dim_eval:n {#2} + \tex_kern:D - \__box_dim_eval:n {#2} \box_use:N #1 - \tex_kern:D - \__dim_eval:n {#4} + \tex_kern:D - \__box_dim_eval:n {#4} } \dim_compare:nNnTF { \box_dp:N #1 } > {#3} { @@ -22747,9 +23297,9 @@ { \hbox_set:Nn \l__box_internal_box { - \tex_kern:D - \__dim_eval:n {#2} + \tex_kern:D - \__box_dim_eval:n {#2} \box_use:N #1 - \tex_kern:D \__dim_eval:n { #4 - \box_wd:N #1 } + \tex_kern:D \__box_dim_eval:n { #4 - \box_wd:N #1 } } \dim_compare:nNnTF {#3} < \c_zero_dim { @@ -22758,7 +23308,7 @@ \box_move_down:nn \c_zero_dim { \box_use:N \l__box_internal_box } } - \box_set_dp:Nn \l__box_internal_box { - \__dim_eval:n {#3} } + \box_set_dp:Nn \l__box_internal_box { - \__box_dim_eval:n {#3} } } { \hbox_set:Nn \l__box_internal_box @@ -22782,7 +23332,7 @@ { \hbox_set:Nn \l__box_internal_box { - \box_move_up:nn { - \__dim_eval:n {#5} } + \box_move_up:nn { - \__box_dim_eval:n {#5} } { \box_use:N \l__box_internal_box } } \box_set_ht:Nn \l__box_internal_box \c_zero_dim @@ -22815,9 +23365,9 @@ { \fp_set:Nn \l__coffin_sin_fp { sind ( #2 ) } \fp_set:Nn \l__coffin_cos_fp { cosd ( #2 ) } - \prop_map_inline:cn { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_corners_ \__coffin_to_value:N #1 _prop } { \__coffin_rotate_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:cn { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { \__coffin_rotate_pole:Nnnnnn #1 {##1} ##2 } \__coffin_set_bounding:N #1 \prop_map_inline:Nn \l__coffin_bounding_prop @@ -22828,8 +23378,9 @@ \hbox_set:Nn \l__coffin_internal_box { \tex_kern:D - \__dim_eval:n + \dim_eval:n { \l__coffin_bounding_shift_dim - \l__coffin_left_corner_dim } + \exp_stop_f: \box_move_down:nn { \l__coffin_bottom_corner_dim } { \box_use:N #1 } } @@ -22839,9 +23390,9 @@ \box_set_wd:Nn \l__coffin_internal_box { \l__coffin_right_corner_dim - \l__coffin_left_corner_dim } \hbox_set:Nn #1 { \box_use:N \l__coffin_internal_box } - \prop_map_inline:cn { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_corners_ \__coffin_to_value:N #1 _prop } { \__coffin_shift_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:cn { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { \__coffin_shift_pole:Nnnnnn #1 {##1} ##2 } } \cs_generate_variant:Nn \coffin_rotate:Nn { c } @@ -22850,12 +23401,18 @@ \prop_put:Nnx \l__coffin_bounding_prop { tl } { { 0 pt } { \dim_eval:n { \box_ht:N #1 } } } \prop_put:Nnx \l__coffin_bounding_prop { tr } - { { \dim_eval:n { \box_wd:N #1 } } { \dim_eval:n { \box_ht:N #1 } } } + { + { \dim_eval:n { \box_wd:N #1 } } + { \dim_eval:n { \box_ht:N #1 } } + } \dim_set:Nn \l__coffin_internal_dim { -\box_dp:N #1 } \prop_put:Nnx \l__coffin_bounding_prop { bl } { { 0 pt } { \dim_use:N \l__coffin_internal_dim } } \prop_put:Nnx \l__coffin_bounding_prop { br } - { { \dim_eval:n { \box_wd:N #1 } } { \dim_use:N \l__coffin_internal_dim } } + { + { \dim_eval:n { \box_wd:N #1 } } + { \dim_use:N \l__coffin_internal_dim } + } } \cs_new_protected:Npn \__coffin_rotate_bounding:nnn #1#2#3 { @@ -22866,7 +23423,7 @@ \cs_new_protected:Npn \__coffin_rotate_corner:Nnnn #1#2#3#4 { \__coffin_rotate_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } {#2} + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } {#2} { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } } \cs_new_protected:Npn \__coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 @@ -22906,7 +23463,7 @@ \dim_set:Nn \l__coffin_right_corner_dim { -\c_max_dim } \dim_set:Nn \l__coffin_bottom_corner_dim { \c_max_dim } \dim_set:Nn \l__coffin_left_corner_dim { \c_max_dim } - \prop_map_inline:cn { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_corners_ \__coffin_to_value:N #1 _prop } { \__coffin_find_corner_maxima_aux:nn ##2 } } \cs_new_protected:Npn \__coffin_find_corner_maxima_aux:nn #1#2 @@ -22933,7 +23490,7 @@ } \cs_new_protected:Npn \__coffin_shift_corner:Nnnn #1#2#3#4 { - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _ prop } {#2} + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _ prop } {#2} { { \dim_eval:n { #3 - \l__coffin_left_corner_dim } } { \dim_eval:n { #4 - \l__coffin_bottom_corner_dim } } @@ -22941,7 +23498,7 @@ } \cs_new_protected:Npn \__coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 { - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _ prop } {#2} + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _ prop } {#2} { { \dim_eval:n { #3 - \l__coffin_left_corner_dim } } { \dim_eval:n { #4 - \l__coffin_bottom_corner_dim } } @@ -22967,15 +23524,17 @@ \cs_generate_variant:Nn \coffin_resize:Nnn { c } \cs_new_protected:Npn \__coffin_resize_common:Nnn #1#2#3 { - \prop_map_inline:cn { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_corners_ \__coffin_to_value:N #1 _prop } { \__coffin_scale_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:cn { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_map_inline:cn { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { \__coffin_scale_pole:Nnnnnn #1 {##1} ##2 } \fp_compare:nNnT \l__coffin_scale_x_fp < \c_zero_fp { - \prop_map_inline:cn { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_map_inline:cn + { l__coffin_corners_ \__coffin_to_value:N #1 _prop } { \__coffin_x_shift_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:cn { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_map_inline:cn + { l__coffin_poles_ \__coffin_to_value:N #1 _prop } { \__coffin_x_shift_pole:Nnnnnn #1 {##1} ##2 } } } @@ -23004,7 +23563,7 @@ \cs_new_protected:Npn \__coffin_scale_corner:Nnnn #1#2#3#4 { \__coffin_scale_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } {#2} + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } {#2} { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } } \cs_new_protected:Npn \__coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 @@ -23018,14 +23577,14 @@ } \cs_new_protected:Npn \__coffin_x_shift_corner:Nnnn #1#2#3#4 { - \prop_put:cnx { l__coffin_corners_ \__int_value:w #1 _prop } {#2} + \prop_put:cnx { l__coffin_corners_ \__coffin_to_value:N #1 _prop } {#2} { { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} } } \cs_new_protected:Npn \__coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 { - \prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } {#2} + \prop_put:cnx { l__coffin_poles_ \__coffin_to_value:N #1 _prop } {#2} { { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} {#5} {#6} @@ -23046,7 +23605,7 @@ { \l__file_full_name_str } } } -\cs_if_exist:NTF \luatex_directlua:D +\sys_if_engine_luatex:TF { \cs_set_protected:Npn \__file_get_details:nnN #1#2#3 { @@ -23071,7 +23630,7 @@ { \l__file_full_name_str } } } - \cs_if_exist:NT \xetex_XeTeXversion:D + \sys_if_engine_xetex:T { \cs_set_protected:Npn \__file_get_details:nnN #1#2#3 { @@ -23102,66 +23661,13 @@ { \__file_input:V \l__file_full_name_str } } \cs_new_protected:Npn \file_input_stop: { \tex_endinput:D } -\cs_if_exist:NTF \pdftex_uniformdeviate:D - { - \__kernel_patch_args:nNNpn - { - { \__kernel_chk_expr:nNnN {#1} \__int_eval:w { } \int_rand:nn } - { \__kernel_chk_expr:nNnN {#2} \__int_eval:w { } \int_rand:nn } - } - \cs_new:Npn \int_rand:nn #1#2 - { - \exp_after:wN \__int_rand:ww - \__int_value:w \__int_eval:w #1 \exp_after:wN ; - \__int_value:w \__int_eval:w #2 ; - } - \cs_new:Npn \__int_rand:ww #1; #2; - { - \int_compare:nNnTF {#1} > {#2} - { - \__kernel_msg_expandable_error:nnnn - { kernel } { backward-range } {#1} {#2} - \__int_rand:ww #2; #1; - } - { - \int_compare:nNnTF {#1} > 0 - { \int_compare:nNnTF { #2 - #1 } < \c__fp_rand_size_int } - { \int_compare:nNnTF {#2} < { #1 + \c__fp_rand_size_int } } - { - \exp_args:Nf \__int_rand_narrow:nn - { \int_eval:n { #2 - #1 + 1 } } {#1} - } - { \fp_to_int:n { randint(#1,#2) } } - } - } - \cs_new:Npn \__int_rand_narrow:nn - { - \exp_args:No \__int_rand_narrow:nnn - { \pdftex_uniformdeviate:D \c__fp_rand_size_int } - } - \cs_new:Npn \__int_rand_narrow:nnn #1#2 - { - \exp_args:Nf \__int_rand_narrow:nnnn - { \int_mod:nn {#1} {#2} } {#1} {#2} - } - \cs_new:Npn \__int_rand_narrow:nnnn #1#2#3#4 - { - \int_compare:nNnTF { #2 - #1 + #3 } > \c__fp_rand_size_int - { \__int_rand_narrow:nn {#3} {#4} } - { \int_eval:n { #4 + #1 } } - } - } - { - \cs_new:Npn \int_rand:nn #1#2 - { - \__kernel_msg_expandable_error:nn { kernel } { fp-no-random } - \int_eval:n {#1} - } - } -\cs_if_exist:NT \pdftex_uniformdeviate:D +\__kernel_patch:nnNNpn { \__flag_chk_exist:n {#1} } { } +\cs_new:Npn \flag_raise_if_clear:n #1 { - \__kernel_msg_new:nnn { kernel } { backward-range } - { Bounds~ordered~backwards~in~\int_rand:nn {#1}~{#2}. } + \if_cs_exist:w flag~#1~0 \cs_end: + \else: + \cs:w flag~#1 \cs_end: 0 ; + \fi: } \cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6 { @@ -23216,7 +23722,7 @@ \__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN c #1 } { } \cs_new_protected:Npn \bool_const:Nn #1#2 { - \__chk_if_free_cs:N #1 + \__kernel_chk_if_free_cs:N #1 \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} } \cs_generate_variant:Nn \bool_const:Nn { c } @@ -23232,50 +23738,47 @@ \cs_generate_variant:Nn \prop_count:N { c } \cs_new:Npn \prop_map_tokens:Nn #1#2 { - \exp_last_unbraced:Nno \__prop_map_tokens:nwwn {#2} #1 - \__prop_pair:wn \q_recursion_tail \s__prop { } - \__prg_break_point:Nn \prop_map_break: { } + \exp_last_unbraced:Nno + \use_i:nn { \__prop_map_tokens:nwwn {#2} } #1 + \prg_break: \__prop_pair:wn \s__prop { } \prg_break_point: + \prg_break_point:Nn \prop_map_break: { } } \cs_new:Npn \__prop_map_tokens:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 { - \if_meaning:w \q_recursion_tail #3 - \exp_after:wN \prop_map_break: - \fi: + #2 \use:n {#1} {#3} {#4} \__prop_map_tokens:nwwn {#1} } \cs_generate_variant:Nn \prop_map_tokens:Nn { c } -\cs_new:Npn \prop_rand_key_value:N { \__prop_rand:NN \__prop_rand:nNn } -\cs_new:Npn \__prop_rand:nNn #1#2#3 { \exp_not:n { {#1} {#3} } } -\cs_new:Npn \__prop_rand:NN #1#2 +\cs_new:Npn \prop_rand_key_value:N #1 { - \prop_if_empty:NTF #2 { } + \prop_if_empty:NF #1 { - \exp_after:wN \__prop_rand_item:Nw \exp_after:wN #1 - \__int_value:w \int_rand:nn { 1 } { \prop_count:N #2 } #2 - \q_stop + \exp_after:wN \__prop_rand_item:w + \int_value:w \int_rand:nn { 1 } { \prop_count:N #1 } + #1 \q_stop } } -\cs_new:Npn \__prop_rand_item:Nw #1#2 \s__prop \__prop_pair:wn #3 \s__prop #4 +\cs_generate_variant:Nn \prop_rand_key_value:N { c } +\cs_new:Npn \__prop_rand_item:w #1 \s__prop \__prop_pair:wn #2 \s__prop #3 { - \int_compare:nNnF {#2} > 1 - { \use_i_delimit_by_q_stop:nw { #1 {#3} \exp_not:n {#4} } } - \exp_after:wN \__prop_rand_item:Nw \exp_after:wN #1 - \__int_value:w \int_eval:n { #2 - 1 } \s__prop + \int_compare:nNnF {#1} > 1 + { \use_i_delimit_by_q_stop:nw { \exp_not:n { {#2} {#3} } } } + \exp_after:wN \__prop_rand_item:w + \int_value:w \int_eval:n { #1 - 1 } \s__prop } -\cs_generate_variant:Nn \prop_rand_key_value:N { c } \cs_new:Npn \seq_mapthread_function:NNN #1#2#3 { \exp_after:wN \__seq_mapthread_function:wNN #2 \q_stop #1 #3 } \cs_new:Npn \__seq_mapthread_function:wNN \s__seq #1 \q_stop #2#3 { \exp_after:wN \__seq_mapthread_function:wNw #2 \q_stop #3 - #1 { ? \__prg_break: } { } - \__prg_break_point: + #1 { ? \prg_break: } { } + \prg_break_point: } \cs_new:Npn \__seq_mapthread_function:wNw \s__seq #1 \q_stop #2 { \__seq_mapthread_function:Nnnwnn #2 - #1 { ? \__prg_break: } { } + #1 { ? \prg_break: } { } \q_stop } \cs_new:Npn \__seq_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6 @@ -23306,6 +23809,20 @@ #1 #2 { #3 } \__seq_pop_item_def: } +\cs_new_protected:Npn \seq_set_from_inline_x:Nnn + { \__seq_set_from_inline_x:NNnn \tl_set:Nx } +\cs_new_protected:Npn \seq_gset_from_inline_x:Nnn + { \__seq_set_from_inline_x:NNnn \tl_gset:Nx } +\cs_new_protected:Npn \__seq_set_from_inline_x:NNnn #1#2#3#4 + { + \__seq_push_item_def:n { \exp_not:N \__seq_item:n {#4} } + #1 #2 { \s__seq #3 \__seq_item:n } + \__seq_pop_item_def: + } +\cs_new_protected:Npn \seq_set_from_function:NnN #1#2#3 + { \seq_set_from_inline_x:Nnn #1 {#2} { #3 {##1} } } +\cs_new_protected:Npn \seq_gset_from_function:NnN #1#2#3 + { \seq_gset_from_inline_x:Nnn #1 {#2} { #3 {##1} } } \cs_new:Npn \seq_rand_item:N #1 { \seq_if_empty:NF #1 @@ -23318,6 +23835,56 @@ { \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n } } \cs_generate_variant:Nn \seq_const_from_clist:Nn { c } +\cs_if_exist:NTF \pdftex_uniformdeviate:D + { + \int_new:N \l__seq_internal_a_int + \int_new:N \l__seq_internal_b_int + \seq_new:N \g__seq_internal_seq + \cs_new_protected:Npn \seq_shuffle:N { \__seq_shuffle:NN \seq_set_eq:NN } + \cs_new_protected:Npn \seq_gshuffle:N { \__seq_shuffle:NN \seq_gset_eq:NN } + \cs_new_protected:Npn \__seq_shuffle:NN #1#2 + { + \int_compare:nNnTF { \seq_count:N #2 } > \c_max_register_int + { + \__kernel_msg_error:nnx { kernel } { shuffle-too-large } + { \token_to_str:N #2 } + } + { + \group_begin: + \cs_set_eq:NN \__seq_item:n \__seq_shuffle_item:n + \int_zero:N \l__seq_internal_a_int + #2 + \seq_gset_from_inline_x:Nnn \g__seq_internal_seq + { \int_step_function:nN { \l__seq_internal_a_int } } + { \tex_the:D \tex_toks:D ##1 } + \group_end: + #1 #2 \g__seq_internal_seq + \seq_gclear:N \g__seq_internal_seq + } + } + \cs_new_protected:Npn \__seq_shuffle_item:n + { + \int_incr:N \l__seq_internal_a_int + \int_set:Nn \l__seq_internal_b_int + { 1 + \pdftex_uniformdeviate:D \l__seq_internal_a_int } + \tex_toks:D \l__seq_internal_a_int + = \tex_toks:D \l__seq_internal_b_int + \tex_toks:D \l__seq_internal_b_int + } + \__kernel_msg_new:nnnn { kernel } { shuffle-too-large } + { The~sequence~#1~is~too~long~to~be~shuffled~by~TeX. } + { + TeX~has~ \int_eval:n { \c_max_register_int + 1 } ~ + toks~registers:~this~only~allows~to~shuffle~up~to~ + \int_use:N \c_max_register_int \ items.~ + The~list~will~not~be~shuffled. + } + } + { + \cs_new_protected:Npn \seq_shuffle:N #1 + { \__kernel_msg_error:nn { kernel } { fp-no-random } } + \cs_new_eq:NN \seq_gshuffle:N \seq_shuffle:N + } \cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4 { \skip_if_finite:nTF {#1} @@ -23331,95 +23898,56 @@ #2 } } -\cs_if_exist:NTF \pdftex_uniformdeviate:D - { - \prg_new_conditional:Npnn \sys_if_rand_exist: { p , T , F , TF } - { \prg_return_true: } - } - { - \prg_new_conditional:Npnn \sys_if_rand_exist: { p , T , F , TF } - { \prg_return_false: } - } +\__sys_const:nn { sys_if_rand_exist } + { \cs_if_exist_p:N \pdftex_uniformdeviate:D } \cs_new:Npn \sys_rand_seed: { \tex_the:D \pdftex_randomseed:D } \cs_if_exist:NF \pdftex_randomseed:D { \cs_set:Npn \sys_rand_seed: { 0 } } \cs_new_protected:Npn \sys_gset_rand_seed:n #1 - { \pdftex_setrandomseed:D \__int_eval:n {#1} } + { \pdftex_setrandomseed:D \int_eval:n {#1} \exp_stop_f: } \int_const:Nn \c_sys_shell_escape_int { \sys_if_engine_luatex:TF { \luatex_directlua:D - { - tex.sprint((status.shell_escape~or~os.execute()) .. " ") - } + { tex.sprint(status.shell_escape~or~os.execute()) } } { \pdftex_shellescape:D } } -\prg_new_conditional:Nnn \sys_if_shell: { p , T , F , TF } - { - \if_int_compare:w \c_sys_shell_escape_int = 0 ~ - \prg_return_false: - \else: - \prg_return_true: - \fi: - } -\prg_new_conditional:Nnn \sys_if_shell_unrestricted: { p , T , F , TF } - { - \if_int_compare:w \c_sys_shell_escape_int = 1 ~ - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\prg_new_conditional:Nnn \sys_if_shell_restricted: { p , T , F , TF } - { - \if_int_compare:w \c_sys_shell_escape_int = 2 ~ - \prg_return_true: - \else: - \prg_return_false: - \fi: - } +\__sys_const:nn { sys_if_shell } + { \int_compare_p:nNn \c_sys_shell_escape_int > 0 } +\__sys_const:nn { sys_if_shell_unrestricted } + { \int_compare_p:nNn \c_sys_shell_escape_int = 1 } +\__sys_const:nn { sys_if_shell_restricted } + { \int_compare_p:nNn \c_sys_shell_escape_int = 2 } \sys_if_engine_luatex:F { \int_const:Nn \c__sys_shell_stream_int { 18 } } \sys_if_engine_luatex:TF { \cs_new_protected:Npn \sys_shell_now:n #1 { - \luatex_directlua:D - { - os.execute(" - \luatex_luaescapestring:D { \etex_detokenize:D {#1} } - ") - } + \lua_now_x:n + { os.execute(" \lua_escape_x:n { \tl_to_str:n {#1} } ") } } } { \cs_new_protected:Npn \sys_shell_now:n #1 - { - \iow_now:Nn \c__sys_shell_stream_int { #1 } - } + { \iow_now:Nn \c__sys_shell_stream_int {#1} } } \cs_generate_variant:Nn \sys_shell_now:n { x } \sys_if_engine_luatex:TF { \cs_new_protected:Npn \sys_shell_shipout:n #1 { - \luatex_latelua:D - { - os.execute(" - \luatex_luaescapestring:D { \etex_detokenize:D {#1} } - ") - } + \lua_shipout_x:n + { os.execute(" \lua_escape_x:n { \tl_to_str:n {#1} } ") } } } { \cs_new_protected:Npn \sys_shell_shipout:n #1 - { - \iow_shipout:Nn \c__sys_shell_stream_int { #1 } - } + { \iow_shipout:Nn \c__sys_shell_stream_int {#1} } } \cs_generate_variant:Nn \sys_shell_shipout:n { x } \prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF } @@ -23434,7 +23962,7 @@ } \cs_new:Npn \tl_reverse_tokens:n #1 { - \etex_unexpanded:D \exp_after:wN + \__kernel_exp_not:w \exp_after:wN { \exp:w \__tl_act:NNNnn @@ -23480,9 +24008,9 @@ \cs_generate_variant:Nn \tl_gset_from_file:Nnn { c } \cs_new_protected:Npn \__tl_set_from_file:NNnn #1#2#3#4 { - \file_get_full_name:nN {#4} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str - { \__file_missing:n {#4} } + \file_get_full_name:nN {#4} \l__tl_file_name_str + \str_if_empty:NTF \l__tl_file_name_str + { \__kernel_file_missing:n {#4} } { \group_begin: \exp_args:No \etex_everyeof:D @@ -23490,7 +24018,7 @@ #3 \scan_stop: \exp_after:wN \__tl_from_file_do:w \exp_after:wN \prg_do_nothing: - \tex_input:D \l__file_full_name_str \scan_stop: + \tex_input:D \l__tl_file_name_str \scan_stop: \exp_args:NNNo \group_end: #1 #2 \l__tl_internal_a_tl } @@ -23507,19 +24035,86 @@ \cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c } \cs_new_protected:Npn \__tl_set_from_file_x:NNnn #1#2#3#4 { - \file_get_full_name:nN {#4} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str - { \__file_missing:n {#4} } + \file_get_full_name:nN {#4} \l__tl_file_name_str + \str_if_empty:NTF \l__tl_file_name_str + { \__kernel_file_missing:n {#4} } { \group_begin: \etex_everyeof:D { \exp_not:N } #3 \scan_stop: \tl_set:Nx \l__tl_internal_a_tl - { \tex_input:D \l__file_full_name_str \c_space_token } + { \tex_input:D \l__tl_file_name_str \c_space_token } \exp_args:NNNo \group_end: #1 #2 \l__tl_internal_a_tl } } +\str_new:N \l__tl_file_name_str +\cs_new:Npn \char_lower_case:N #1 + { \__char_change_case:nNN { lower } \char_value_lccode:n #1 } +\cs_new:Npn \char_upper_case:N #1 + { \__char_change_case:nNN { upper } \char_value_uccode:n #1 } +\cs_new:Npn \char_mixed_case:N #1 + { + \tl_if_exist:cTF { c__char_mixed_case_ \token_to_str:N #1 _tl } + { \tl_use:c { c__char_mixed_case_ \token_to_str:N #1 _tl } } + { \char_upper_case:N #1 } + } +\cs_new:Npn \char_fold_case:N #1 + { \__char_change_case:nNN { fold } \char_value_lccode:n #1 } +\cs_new:Npn \__char_change_case:nNN #1#2#3 + { + \tl_if_exist:cTF { c__char_ #1 _case_ \token_to_str:N #3 _tl } + { \tl_use:c { c__char_ #1 _case_ \token_to_str:N #3 _tl } } + { \exp_args:Nf \__char_change_case:nN { #2 { `#3 } } #3 } + } +\cs_new:Npn \__char_change_case:nN #1#2 + { + \int_compare:nNnTF {#1} = 0 + {#2} + { \char_generate:nn {#1} { \char_value_catcode:n {#1} } } + } +\bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } + { + \cs_set_eq:NN \__char_change_case:nN \use_ii:nn + } +\cs_new:Npn \char_codepoint_to_bytes:n #1 + { + \exp_args:Nf \__char_codepoint_to_bytes_auxi:n + { \int_eval:n {#1} } + } +\cs_new:Npn \__char_codepoint_to_bytes_auxi:n #1 + { + \if_int_compare:w #1 > "80 \exp_stop_f: + \if_int_compare:w #1 < "800 \exp_stop_f: + 2 + \__char_codepoint_to_bytes_auxii:Nnn C {#1} { 64 } + \__char_codepoint_to_bytes_auxiii:n {#1} + \else: + \if_int_compare:w #1 < "10000 \exp_stop_f: + 3 + \__char_codepoint_to_bytes_auxii:Nnn E {#1} { 64 * 64 } + \__char_codepoint_to_bytes_auxiii:n + { \int_div_truncate:nn {#1} { 64 } } + \__char_codepoint_to_bytes_auxiii:n {#1} + \else: + 4 + \__char_codepoint_to_bytes_auxii:Nnn F + {#1} { 64 * 64 * 64 } + \__char_codepoint_to_bytes_auxiii:n + { \int_div_truncate:nn {#1} { 64 * 64 } } + \__char_codepoint_to_bytes_auxiii:n + { \int_div_truncate:nn {#1} { 64 } } + \__char_codepoint_to_bytes_auxiii:n {#1} + \fi: + \fi: + \else: + 1 {#1} + \fi: + } +\cs_new:Npn \__char_codepoint_to_bytes_auxii:Nnn #1#2#3 + { { \int_eval:n { "#10 + \int_div_truncate:nn {#2} {#3} } } } +\cs_new:Npn \__char_codepoint_to_bytes_auxiii:n #1 + { { \int_eval:n { \int_mod:nn {#1} { 64 } + 128 } } } \cs_generate_variant:Nn \tl_if_head_eq_catcode:nNTF { o } \cs_new:Npn \tl_lower_case:n { \__tl_change_case:nnn { lower } { } } \cs_new:Npn \tl_upper_case:n { \__tl_change_case:nnn { upper } { } } @@ -23529,7 +24124,7 @@ \cs_new:Npn \tl_mixed_case:nn { \__tl_change_case:nnn { mixed } } \cs_new:Npn \__tl_change_case:nnn #1#2#3 { - \etex_unexpanded:D \exp_after:wN + \__kernel_exp_not:w \exp_after:wN { \exp:w \__tl_change_case_aux:nnn {#1} {#2} {#3} @@ -23687,10 +24282,15 @@ #1 { \__tl_change_case_mixed_skip:N #1 } } -\cs_if_exist:NTF \utex_char:D +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { \cs_new:Npn \__tl_change_case_char:nN #1#2 - { \__tl_change_case_char_auxi:nN {#1} #2 } + { + \__tl_change_case_output:fwn + { \use:c { char_ #1 _case:N } #2 } + } } { \cs_new:Npn \__tl_change_case_char:nN #1#2 @@ -23705,54 +24305,16 @@ { \__tl_change_case_char_UTFviii:nNNNNN {#1} #2 } } } - { \__tl_change_case_char_auxi:nN {#1} #2 } - } - } -\cs_new:Npn \__tl_change_case_char_auxi:nN #1#2 - { \use:c { __tl_change_case_char_ #1 :N } #2 } -\cs_new:Npn \__tl_change_case_char_lower:N #1 - { - \__tl_change_case_output:fwn - { - \cs_if_exist_use:cF { c__unicode_lower_ \token_to_str:N #1 _tl } - { \__tl_change_case_char_auxii:nN { lower } #1 } - } - } -\cs_new:Npn \__tl_change_case_char_upper:N #1 - { - \__tl_change_case_output:fwn - { - \cs_if_exist_use:cF { c__unicode_upper_ \token_to_str:N #1 _tl } - { \__tl_change_case_char_auxii:nN { upper } #1 } - } - } -\cs_new:Npn \__tl_change_case_char_mixed:N #1 - { - \cs_if_exist:cTF { c__unicode_mixed_ \token_to_str:N #1 _tl } - { - \__tl_change_case_output:fwn - { \tl_use:c { c__unicode_mixed_ \token_to_str:N #1 _tl } } - } - { \__tl_change_case_char_upper:N #1 } - } -\cs_if_exist:NTF \utex_char:D - { - \cs_new:Npn \__tl_change_case_char_auxii:nN #1#2 - { - \int_compare:nNnTF { \use:c { __tl_lookup_ #1 :N } #2 } = { 0 } - { \exp_stop_f: #2 } { - \char_generate:nn - { \use:c { __tl_lookup_ #1 :N } #2 } - { \char_value_catcode:n { \use:c { __tl_lookup_ #1 :N } #2 } } + \__tl_change_case_output:fwn + { \use:c { char_ #1 _case:N } #2 } } - } - \cs_new_protected:Npn \__tl_lookup_lower:N #1 { \tex_lccode:D `#1 } - \cs_new_protected:Npn \__tl_lookup_upper:N #1 { \tex_uccode:D `#1 } - \cs_new_eq:NN \__tl_lookup_mixed:N \__tl_lookup_upper:N + } } +\bool_lazy_or:nnF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \cs_new:Npn \__tl_change_case_char_auxii:nN #1#2 { \exp_stop_f: #2 } \cs_new:Npn \__tl_change_case_char_UTFviii:nNNN #1#2#3#4 { \__tl_change_case_char_UTFviii:nnN {#1} {#2#4} #3 } \cs_new:Npn \__tl_change_case_char_UTFviii:nNNNN #1#2#3#4#5 @@ -23761,10 +24323,10 @@ { \__tl_change_case_char_UTFviii:nnN {#1} {#2#4#5#6} #3 } \cs_new:Npn \__tl_change_case_char_UTFviii:nnN #1#2#3 { - \cs_if_exist:cTF { c__unicode_ #1 _ \tl_to_str:n {#2} _tl } + \cs_if_exist:cTF { c__tl_ #1 _case_ \tl_to_str:n {#2} _tl } { \__tl_change_case_output:vwn - { c__unicode_ #1 _ \tl_to_str:n {#2} _tl } + { c__tl_ #1 _case_ \tl_to_str:n {#2} _tl } } { \__tl_change_case_output:nwn {#2} } #3 @@ -23911,7 +24473,7 @@ { \tl_if_head_is_N_type:nTF {#1} { \__tl_change_case_lower_sigma:Nw #1 \q_recursion_stop } - { \c__unicode_final_sigma_tl } + { \c__tl_final_sigma_tl } } \cs_new:Npn \__tl_change_case_lower_sigma:Nw #1#2 \q_recursion_stop { @@ -23922,12 +24484,14 @@ } { \token_if_letter:NTF #1 - { \c__unicode_std_sigma_tl } - { \c__unicode_final_sigma_tl } + { \c__tl_std_sigma_tl } + { \c__tl_final_sigma_tl } } } \cs_new_eq:NN \__tl_change_case_upper_sigma:Nnw \use_ii:nn -\cs_if_exist:NTF \utex_char:D +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { \cs_new:Npn \__tl_change_case_lower_tr:Nnw #1#2 { @@ -23943,7 +24507,7 @@ { \tl_if_head_is_N_type:nTF {#2} { \__tl_change_case_lower_tr_auxii:Nw #2 \q_recursion_stop } - { \__tl_change_case_output:Vwn \c__unicode_dotless_i_tl } + { \__tl_change_case_output:Vwn \c__tl_dotless_i_tl } #1 #2 \q_recursion_stop } \cs_new:Npn \__tl_change_case_lower_tr_auxii:Nw #1#2 \q_recursion_stop @@ -23957,7 +24521,7 @@ \bool_lazy_or:nnTF { \token_if_cs_p:N #1 } { ! \int_compare_p:nNn { `#1 } = { "0307 } } - { \__tl_change_case_output:Vwn \c__unicode_dotless_i_tl } + { \__tl_change_case_output:Vwn \c__tl_dotless_i_tl } { \__tl_change_case_output:nwn { i } \use_i:nn @@ -23969,7 +24533,7 @@ \cs_new:Npn \__tl_change_case_lower_tr:Nnw #1#2 { \int_compare:nNnTF { `#1 } = { "0049 } - { \__tl_change_case_output:Vwn \c__unicode_dotless_i_tl } + { \__tl_change_case_output:Vwn \c__tl_dotless_i_tl } { \int_compare:nNnTF { `#1 } = { 196 } { \__tl_change_case_lower_tr_auxi:Nw #1 {#2} } @@ -23992,7 +24556,7 @@ \cs_new:Npn \__tl_change_case_upper_tr:Nnw #1#2 { \int_compare:nNnTF { `#1 } = { "0069 } - { \__tl_change_case_output:Vwn \c__unicode_dotted_I_tl } + { \__tl_change_case_output:Vwn \c__tl_dotted_I_tl } {#2} } \cs_new_eq:NN \__tl_change_case_lower_az:Nnw \__tl_change_case_lower_tr:Nnw @@ -24000,7 +24564,7 @@ \cs_new:Npn \__tl_change_case_lower_lt:Nnw #1 { \exp_args:Nf \__tl_change_case_lower_lt:nNnw - { \str_case:nVF #1 \c__unicode_accents_lt_tl \exp_stop_f: } + { \str_case:nVF #1 \c__tl_accents_lt_tl \exp_stop_f: } #1 } \cs_new:Npn \__tl_change_case_lower_lt:nNnw #1#2 @@ -24013,7 +24577,7 @@ { { "0049 } i { "004A } j - { "012E } \c__unicode_i_ogonek_tl + { "012E } \c__tl_i_ogonek_tl } \exp_stop_f: } @@ -24056,7 +24620,7 @@ { \int_compare_p:nNn { `#2 } = { "0303 } } } } - { \__tl_change_case_output:Vwn \c__unicode_dot_above_tl } + { \__tl_change_case_output:Vwn \c__tl_dot_above_tl } #1 #2#3 \q_recursion_stop } } @@ -24068,7 +24632,7 @@ { { "0069 } I { "006A } J - { "012F } \c__unicode_I_ogonek_tl + { "012F } \c__tl_I_ogonek_tl } \exp_stop_f: } @@ -24107,76 +24671,60 @@ \cs_new:cpn { __tl_change_case_upper_de-alt:Nnw } #1#2 { \int_compare:nNnTF { `#1 } = { 223 } - { \__tl_change_case_output:Vwn \c__unicode_upper_Eszett_tl } + { \__tl_change_case_output:Vwn \c__tl_upper_Eszett_tl } {#2} } -\cs_new:Npn \__unicode_codepoint_to_UTFviii:n #1 - { - \exp_args:Nf \__unicode_codepoint_to_UTFviii_auxi:n - { \int_eval:n {#1} } - } -\cs_new:Npn \__unicode_codepoint_to_UTFviii_auxi:n #1 +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \if_int_compare:w #1 > "80 ~ - \if_int_compare:w #1 < "800 ~ - 2 - \__unicode_codepoint_to_UTFviii_auxii:Nnn C {#1} { 64 } - \__unicode_codepoint_to_UTFviii_auxiii:n {#1} - \else: - \if_int_compare:w #1 < "10000 ~ - 3 - \__unicode_codepoint_to_UTFviii_auxii:Nnn E {#1} { 64 * 64 } - \__unicode_codepoint_to_UTFviii_auxiii:n {#1} - \__unicode_codepoint_to_UTFviii_auxiii:n - { \int_div_truncate:nn {#1} { 64 } } - \else: - 4 - \__unicode_codepoint_to_UTFviii_auxii:Nnn F - {#1} { 64 * 64 * 64 } - \__unicode_codepoint_to_UTFviii_auxiii:n - { \int_div_truncate:nn {#1} { 64 * 64 } } - \__unicode_codepoint_to_UTFviii_auxiii:n - { \int_div_truncate:nn {#1} { 64 } } - \__unicode_codepoint_to_UTFviii_auxiii:n {#1} - - \fi: - \fi: - \else: - 1 {#1} - \fi: - } -\cs_new:Npn \__unicode_codepoint_to_UTFviii_auxii:Nnn #1#2#3 - { { \int_eval:n { "#10 + \int_div_truncate:nn {#2} {#3} } } } -\cs_new:Npn \__unicode_codepoint_to_UTFviii_auxiii:n #1 - { { \int_eval:n { \int_mod:nn {#1} { 64 } + 128 } } } -\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_upper_Eszett_tl { \utex_char:D "1E9E ~ } + \group_begin: + \cs_set:Npn \__tl_tmp:n #1 + { \char_generate:nn {#1} { \char_value_catcode:n {#1} } } + \tl_const:Nx \c__tl_std_sigma_tl { \__tl_tmp:n { "03C3 } } + \tl_const:Nx \c__tl_final_sigma_tl { \__tl_tmp:n { "03C2 } } + \tl_const:Nx \c__tl_accents_lt_tl + { + \__tl_tmp:n { "00CC } + { + \__tl_tmp:n { "0069 } + \__tl_tmp:n { "0307 } + \__tl_tmp:n { "0300 } + } + \__tl_tmp:n { "00CD } + { + \__tl_tmp:n { "0069 } + \__tl_tmp:n { "0307 } + \__tl_tmp:n { "0301 } + } + \__tl_tmp:n { "0128 } + { + \__tl_tmp:n { "0069 } + \__tl_tmp:n { "0307 } + \__tl_tmp:n { "0303 } + } + } + \tl_const:Nx \c__tl_dot_above_tl { \__tl_tmp:n { "0307 } } + \tl_const:Nx \c__tl_upper_Eszett_tl { \__tl_tmp:n { "1E9E } } + \group_end: } { - \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_upper_Eszett_tl { } + \tl_const:Nn \c__tl_std_sigma_tl { } + \tl_const:Nn \c__tl_final_sigma_tl { } + \tl_const:Nn \c__tl_accents_lt_tl { } + \tl_const:Nn \c__tl_dot_above_tl { } + \tl_const:Nn \c__tl_upper_Eszett_tl { } } \group_begin: - \cs_if_exist:NTF \utex_char:D + \bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { \cs_set_protected:Npn \__tl_tmp:w #1#2 - { \tl_const:Nx #1 { \utex_char:D "#2 ~ } } + { + \tl_const:Nx #1 + { \char_generate:nn {"#2} { \char_value_catcode:n {"#2} } } + } } { \cs_set_protected:Npn \__tl_tmp:w #1#2 @@ -24187,21 +24735,21 @@ \tl_const:Nx #1 { \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \__char_generate:nn {##2} { 13 } + \exp_not:N \char_generate:nn {##2} { 13 } \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \__char_generate:nn {##3} { 13 } + \exp_not:N \char_generate:nn {##3} { 13 } } } \tl_set:Nx \l__tl_internal_a_tl - { \__unicode_codepoint_to_UTFviii:n {"#2} } + { \char_codepoint_to_bytes:n {"#2} } \exp_after:wN \__tl_tmp:w \l__tl_internal_a_tl \group_end: } } - \__tl_tmp:w \c__unicode_dotless_i_tl { 0131 } - \__tl_tmp:w \c__unicode_dotted_I_tl { 0130 } - \__tl_tmp:w \c__unicode_i_ogonek_tl { 012F } - \__tl_tmp:w \c__unicode_I_ogonek_tl { 012E } + \__tl_tmp:w \c__tl_dotless_i_tl { 0131 } + \__tl_tmp:w \c__tl_dotted_I_tl { 0130 } + \__tl_tmp:w \c__tl_i_ogonek_tl { 012F } + \__tl_tmp:w \c__tl_I_ogonek_tl { 012E } \group_end: \group_begin: \bool_lazy_or:nnT @@ -24213,8 +24761,8 @@ \quark_if_recursion_tail_stop:n {#1} \tl_set:Nx \l__tl_internal_a_tl { - \__unicode_codepoint_to_UTFviii:n {"#1} - \__unicode_codepoint_to_UTFviii:n {"#2} + \char_codepoint_to_bytes:n {"#1} + \char_codepoint_to_bytes:n {"#2} } \exp_after:wN \__tl_tmp:w \l__tl_internal_a_tl \__tl_loop:nn @@ -24223,29 +24771,29 @@ { \tl_const:cx { - c__unicode_lower_ + c__tl_lower_case_ \char_generate:nn {#2} { 12 } \char_generate:nn {#3} { 12 } _tl } { \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \__char_generate:nn {#5} { 13 } + \exp_not:N \char_generate:nn {#5} { 13 } \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \__char_generate:nn {#6} { 13 } + \exp_not:N \char_generate:nn {#6} { 13 } } \tl_const:cx { - c__unicode_upper_ + c__tl_upper_case_ \char_generate:nn {#5} { 12 } \char_generate:nn {#6} { 12 } _tl } { \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \__char_generate:nn {#2} { 13 } + \exp_not:N \char_generate:nn {#2} { 13 } \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \__char_generate:nn {#3} { 13 } + \exp_not:N \char_generate:nn {#3} { 13 } } } \__tl_loop:nn @@ -24357,7 +24905,7 @@ { \tl_const:cx { - c__unicode_ #3 _ + c__tl_ #3 _case_ \char_generate:nn {##2} { 12 } \char_generate:nn {##3} { 12 } _tl @@ -24365,7 +24913,7 @@ {#2} } \tl_set:Nx \l__tl_internal_a_tl - { \__unicode_codepoint_to_UTFviii:n { "#1 } } + { \char_codepoint_to_bytes:n { "#1 } } \exp_after:wN \__tl_tmp:w \l__tl_internal_a_tl \group_end: } @@ -24378,8 +24926,10 @@ \cs_set_protected:Npn \__tl_change_case_setup:NN #1#2 { \quark_if_recursion_tail_stop:N #1 - \tl_const:cn { c__tl_change_case_lower_ \token_to_str:N #1 _tl } { #2 } - \tl_const:cn { c__tl_change_case_upper_ \token_to_str:N #2 _tl } { #1 } + \tl_const:cn { c__tl_change_case_lower_ \token_to_str:N #1 _tl } + { #2 } + \tl_const:cn { c__tl_change_case_upper_ \token_to_str:N #2 _tl } + { #1 } \__tl_change_case_setup:NN } \__tl_change_case_setup:NN @@ -24456,6 +25006,120 @@ ` - } +\__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } +\cs_new_protected:Npn \tl_build_begin:N #1 + { \__tl_build_begin:NN \cs_set_nopar:Npx #1 } +\__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } +\cs_new_protected:Npn \tl_build_gbegin:N #1 + { \__tl_build_begin:NN \cs_gset_nopar:Npx #1 } +\cs_new_protected:Npn \__tl_build_begin:NN #1#2 + { \exp_args:Nc \__tl_build_begin:NNN { \cs_to_str:N #2 ' } #2 #1 } +\cs_new_protected:Npn \__tl_build_begin:NNN #1#2#3 + { + #3 #1 { } + #3 #2 + { + \exp_not:n { \exp_end: \exp_end: \exp_end: \exp_end: } + \exp_not:n { \__tl_build_last:NNn #3 #1 { } } + } + } +\cs_new_eq:NN \tl_build_clear:N \tl_build_begin:N +\cs_new_eq:NN \tl_build_gclear:N \tl_build_gbegin:N +\__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } +\cs_new_protected:Npn \tl_build_put_right:Nn #1#2 + { + \cs_set_nopar:Npx #1 + { \exp_after:wN \exp_not:n \exp_after:wN { \exp:w #1 #2 } } + } +\__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } +\cs_new_protected:Npn \tl_build_put_right:Nx #1#2 + { + \cs_set_nopar:Npx #1 + { \exp_after:wN \exp_not:n \exp_after:wN { \exp:w #1 } #2 } + } +\__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } +\cs_new_protected:Npn \tl_build_gput_right:Nn #1#2 + { + \cs_gset_nopar:Npx #1 + { \exp_after:wN \exp_not:n \exp_after:wN { \exp:w #1 #2 } } + } +\__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } +\cs_new_protected:Npn \tl_build_gput_right:Nx #1#2 + { + \cs_gset_nopar:Npx #1 + { \exp_after:wN \exp_not:n \exp_after:wN { \exp:w #1 } #2 } + } +\cs_new_protected:Npn \__tl_build_last:NNn #1#2 + { + \if_false: { { \fi: + \exp_end: \exp_end: \exp_end: \exp_end: \exp_end: + \__tl_build_last:NNn #1 #2 { } + } + } + \if_meaning:w \c_empty_tl #2 + \__tl_build_begin:NN #1 #2 + \fi: + #1 #2 + { + \exp_after:wN \exp_not:n \exp_after:wN + { + \exp:w \if_false: } } \fi: + \exp_after:wN \__tl_build_put:nn \exp_after:wN {#2} + } +\cs_new_protected:Npn \__tl_build_put:nn #1#2 { \__tl_build_put:nw {#2} #1 } +\cs_new_protected:Npn \__tl_build_put:nw #1#2 \__tl_build_last:NNn #3#4#5 + { #2 \__tl_build_last:NNn #3 #4 { #1 #5 } } +\__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { } +\cs_new_protected:Npn \tl_build_put_left:Nn #1 + { \__tl_build_put_left:NNn \cs_set_nopar:Npx #1 } +\cs_generate_variant:Nn \tl_build_put_left:Nn { Nx } +\__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { } +\cs_new_protected:Npn \tl_build_gput_left:Nn #1 + { \__tl_build_put_left:NNn \cs_gset_nopar:Npx #1 } +\cs_generate_variant:Nn \tl_build_gput_left:Nn { Nx } +\cs_new_protected:Npn \__tl_build_put_left:NNn #1#2#3 + { + #1 #2 + { + \exp_after:wN \exp_not:n \exp_after:wN + { + \exp:w \exp_after:wN \__tl_build_put:nn + \exp_after:wN {#2} {#3} + } + } + } +\cs_new_protected:Npn \tl_build_get:NN + { \__tl_build_get:NNN \tl_set:Nx } +\cs_new_protected:Npn \__tl_build_get:NNN #1#2#3 + { #1 #3 { \if_false: { \fi: \exp_after:wN \__tl_build_get:w #2 } } } +\cs_new:Npn \__tl_build_get:w #1 \__tl_build_last:NNn #2#3#4 + { + \exp_not:n {#4} + \if_meaning:w \c_empty_tl #3 + \exp_after:wN \__tl_build_get_end:w + \fi: + \exp_after:wN \__tl_build_get:w #3 + } +\cs_new:Npn \__tl_build_get_end:w #1#2#3 + { \exp_after:wN \exp_not:n \exp_after:wN { \if_false: } \fi: } +\cs_new_protected:Npn \tl_build_end:N #1 + { + \__tl_build_get:NNN \tl_set:Nx #1 #1 + \exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_clear:N + } +\cs_new_protected:Npn \tl_build_gend:N #1 + { + \__tl_build_get:NNN \tl_gset:Nx #1 #1 + \exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_gclear:N + } +\cs_new_protected:Npn \__tl_build_end_loop:NN #1#2 + { + \if_meaning:w \c_empty_tl #1 + \exp_after:wN \use_none:nnnnnn + \fi: + #2 #1 + \exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } #2 + } \cs_new:Npn \tl_rand_item:n #1 { \tl_if_blank:nF {#1} @@ -24469,9 +25133,11 @@ \cs_new:Npn \tl_range_braced:Nnn { \exp_args:No \tl_range_braced:nnn } \cs_generate_variant:Nn \tl_range_braced:Nnn { c } \cs_new:Npn \tl_range_braced:nnn { \__tl_range:Nnnn \__tl_range_braced:w } -\cs_new:Npn \tl_range_unbraced:Nnn { \exp_args:No \tl_range_unbraced:nnn } +\cs_new:Npn \tl_range_unbraced:Nnn + { \exp_args:No \tl_range_unbraced:nnn } \cs_generate_variant:Nn \tl_range_unbraced:Nnn { c } -\cs_new:Npn \tl_range_unbraced:nnn { \__tl_range:Nnnn \__tl_range_unbraced:w } +\cs_new:Npn \tl_range_unbraced:nnn + { \__tl_range:Nnnn \__tl_range_unbraced:w } \cs_new:Npn \__tl_range:Nnnn #1#2#3#4 { \tl_head:f @@ -24498,14 +25164,14 @@ \exp_after:wN { \exp_after:wN } \fi: \exp_after:wN #3 - \__int_value:w \__int_eval:w #2 - #1 \exp_after:wN ; + \int_value:w \int_eval:n { #2 - #1 } \exp_after:wN ; \exp_after:wN { \exp:w \__tl_range_skip:w #1 ; { } #4 } } \cs_new:Npn \__tl_range_skip:w #1 ; #2 { \if_int_compare:w #1 > 0 \exp_stop_f: \exp_after:wN \__tl_range_skip:w - \__int_value:w \__int_eval:w #1 - 1 \exp_after:wN ; + \int_value:w \int_eval:n { #1 - 1 } \exp_after:wN ; \else: \exp_after:wN \exp_end: \fi: @@ -24518,7 +25184,7 @@ { \if_int_compare:w #1 > 1 \exp_stop_f: \exp_after:wN \__tl_range_collect_braced:w - \__int_value:w \__int_eval:w #1 - 1 \exp_after:wN ; + \int_value:w \int_eval:n { #1 - 1 } \exp_after:wN ; \fi: { #2 {#3} } } @@ -24526,7 +25192,7 @@ { \if_int_compare:w #1 > 1 \exp_stop_f: \exp_after:wN \__tl_range_collect_unbraced:w - \__int_value:w \__int_eval:w #1 - 1 \exp_after:wN ; + \int_value:w \int_eval:n { #1 - 1 } \exp_after:wN ; \fi: { #2 #3 } } @@ -24625,45 +25291,107 @@ { \tl_if_empty:nTF {#2} { \__peek_true:w } { \__peek_false:w } } } \cs_new_protected:Npn \peek_N_type:TF - { \__peek_token_generic:NNTF \__peek_execute_branches_N_type: \scan_stop: } + { + \__peek_token_generic:NNTF + \__peek_execute_branches_N_type: \scan_stop: + } \cs_new_protected:Npn \peek_N_type:T { \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: } \cs_new_protected:Npn \peek_N_type:F { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: } -%% File: l3luatex.dtx Copyright (C) 2010-2017 The LaTeX3 Project -\cs_new:Npn \lua_now_x:n #1 { \luatex_directlua:D {#1} } -\cs_new:Npn \lua_now:n #1 { \lua_now_x:n { \exp_not:n {#1} } } -\cs_new_protected:Npn \lua_shipout_x:n #1 { \luatex_latelua:D {#1} } -\cs_new_protected:Npn \lua_shipout:n #1 - { \lua_shipout_x:n { \exp_not:n {#1} } } -\cs_new:Npn \lua_escape_x:n #1 { \luatex_luaescapestring:D {#1} } -\cs_new:Npn \lua_escape:n #1 { \lua_escape_x:n { \exp_not:n {#1} } } -\sys_if_engine_luatex:F +%% File: l3deprecation.dtx (C) Copyright 2017-2018 The LaTeX3 Project +\cs_new_protected:Npn \__kernel_deprecation_error:Nnn #1#2#3 { - \clist_map_inline:nn - { \lua_now_x:n , \lua_now:n , \lua_escape_x:n , \lua_escape:n } - { - \cs_set:Npn #1 ##1 - { - \__kernel_msg_expandable_error:nnn - { kernel } { luatex-required } { #1 } - } - } - \clist_map_inline:nn - { \lua_shipout_x:n , \lua_shipout:n } + \etex_protected:D \tex_outer:D \tex_edef:D #1 { - \cs_set_protected:Npn #1 ##1 - { - \__kernel_msg_error:nnn - { kernel } { luatex-required } { #1 } - } + \exp_not:N \__kernel_msg_expandable_error:nnnnn + { kernel } { deprecated-command } + { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } + \exp_not:N \__kernel_msg_error:nnxxx + { kernel } { deprecated-command } + { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } } } -\__kernel_msg_new:nnnn { kernel } { luatex-required } - { LuaTeX~engine~not~in~use!~Ignoring~#1. } +\__kernel_deprecation_error:Nnn \file_if_exist_input:nT + { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 } +\__kernel_deprecation_error:Nnn \file_if_exist_input:nTF + { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 } +\__kernel_deprecation_error:Nnn \c_job_name_tl + { \c_sys_jobname_str } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \dim_case:nnn + { \dim_case:nnF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \int_case:nnn + { \int_case:nnF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \int_from_binary:n + { \int_from_bin:n } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \int_from_hexadecimal:n + { \int_from_hex:n } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \int_from_octal:n + { \int_from_oct:n } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \int_to_binary:n + { \int_to_bin:n } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \int_to_hexadecimal:n + { \int_to_hex:n } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \int_to_octal:n + { \int_to_oct:n } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \ior_get_str:NN + { \ior_str_get:NN } { 2018-03-05 } +\__kernel_deprecation_error:Nnn \luatex_if_engine_p: + { \sys_if_engine_luatex_p: } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \luatex_if_engine:F + { \sys_if_engine_luatex:F } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \luatex_if_engine:T + { \sys_if_engine_luatex:T } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \luatex_if_engine:TF + { \sys_if_engine_luatex:TF } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \pdftex_if_engine_p: + { \sys_if_engine_pdftex_p: } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \pdftex_if_engine:F + { \sys_if_engine_pdftex:F } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \pdftex_if_engine:T + { \sys_if_engine_pdftex:T } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \pdftex_if_engine:TF + { \sys_if_engine_pdftex:TF } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \prop_get:cn + { \prop_item:cn } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \prop_get:Nn + { \prop_item:Nn } { 2016-01-05 } +\__kernel_deprecation_error:Nnn \quark_if_recursion_tail_break:N + { } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \quark_if_recursion_tail_break:n + { } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \scan_align_safe_stop: + { protected~commands } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \str_case:nnn + { \str_case:nnF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \str_case:onn + { \str_case:onF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \str_case_x:nnn + { \str_case_x:nnF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \tl_case:cnn + { \tl_case:cnF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \tl_case:Nnn + { \tl_case:NnF } { 2015-07-14 } +\__kernel_deprecation_error:Nnn \tl_to_lowercase:n + { \tex_lowercase:D } { 2018-03-05 } +\__kernel_deprecation_error:Nnn \tl_to_uppercase:n + { \tex_uppercase:D } { 2018-03-05 } +\__kernel_deprecation_error:Nnn \xetex_if_engine_p: + { \sys_if_engine_xetex_p: } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \xetex_if_engine:F + { \sys_if_engine_xetex:F } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \xetex_if_engine:T + { \sys_if_engine_xetex:T } { 2017-01-01 } +\__kernel_deprecation_error:Nnn \xetex_if_engine:TF + { \sys_if_engine_xetex:TF } { 2017-01-01 } +\__kernel_deprecation_code:nn { - The~feature~you~are~using~is~only~available~ - with~the~LuaTeX~engine.~LaTeX3~ignored~'#1'. + \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx + { \__kernel_msg_error:nnxxxx } + } + { + \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx + { \__kernel_msg_warning:nnxxxx } } %% %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 3c97eedcba2..b9eda3b5899 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018/03/05}% +\def\ExplFileDate{2018-04-30}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \def\tempa{LaTeX2e}% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua index 81421b5e8fa..279f3c276ad 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -18,7 +18,7 @@ -- This file is part of the "l3kernel bundle" (The Work in LPPL) -- and all files in that bundle must be distributed together. -- --- File: l3luatex.dtx Copyright (C) 2010-2017 The LaTeX3 Project +-- File: l3luatex.dtx Copyright (C) 2010-2018 The LaTeX3 Project l3kernel = l3kernel or { } local io = io local kpse = kpse diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 8199ce752f8..3b5366798c0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018/03/05}% +\def\ExplFileDate{2018-04-30}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% @@ -33,13 +33,13 @@ \DeclareOption{#1=false}{\chardef #2=0 }% \newcommand*#2{}% \chardef #2=0 % - } + }% \expl@create@bool@option{check-declarations}\l@expl@check@declarations@bool \expl@create@bool@option{log-functions}\l@expl@log@functions@bool \expl@create@bool@option{enable-debug}\l@expl@enable@debug@bool \let\expl@create@bool@option\@undefined \chardef\l@expl@enable@debug@bool=0 % -\newcommand*\l@expl@options@clist{} +\newcommand*\l@expl@options@clist{}% \DeclareOption* {% \ifx\l@expl@options@clist\@empty @@ -50,7 +50,7 @@ \expandafter\expandafter\expandafter {\expandafter\l@expl@options@clist\expandafter,\CurrentOption} \fi - } + }% \ProcessOptions\relax \ifodd\l@expl@check@declarations@bool \chardef\l@expl@enable@debug@bool=1 % @@ -62,18 +62,18 @@ {% \ProvidesPackage{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]% \ExplSyntaxOn - } + }% \protected\def\ProvidesExplClass#1#2#3#4% {% \ProvidesClass{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]% \ExplSyntaxOn - } + }% \protected\def\ProvidesExplFile#1#2#3#4% {% \ProvidesFile{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]% \ExplSyntaxOn - } -\input{expl3-code.tex} + }% +\input{expl3-code.tex}% \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname tex\string _let:D\endcsname\relax \expandafter\endinput @@ -237,8 +237,8 @@ \hbox_set:Nn #1 { \resizebox * - { \__dim_eval:n {#2} } - { \__dim_eval:n {#3} } + { \dim_eval:n {#2} } + { \dim_eval:n {#3} } { \box_use:N #1 } } } @@ -246,7 +246,7 @@ { \hbox_set:Nn #1 { - \resizebox * { ! } { \__dim_eval:n {#2} } + \resizebox * { ! } { \dim_eval:n {#2} } { \box_use:N #1 } } } @@ -254,7 +254,7 @@ { \hbox_set:Nn #1 { - \resizebox * { \__dim_eval:n {#2} } { ! } + \resizebox * { \dim_eval:n {#2} } { ! } { \box_use:N #1 } } } @@ -283,7 +283,7 @@ } \tl_put_left:Nn \@pushfilename { - \exp_args:Nx \__file_input_push:n + \exp_args:Nx \__kernel_file_input_push:n { \tl_to_str:N \@currname \tl_to_str:N \@currext @@ -304,7 +304,7 @@ } \tl_put_right:Nn \@popfilename { - \__file_input_pop: + \__kernel_file_input_pop: \tl_if_empty:NTF \l__expl_status_stack_tl { \ExplSyntaxOff } { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \q_stop } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 7fd9385704c..d913db3a652 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -20,7 +20,7 @@ %% %% File: l3doc.dtx Copyright (C) 1990-2018 The LaTeX3 project \RequirePackage{expl3,xparse,calc} -\ProvidesExplClass{l3doc}{2018/03/05}{} +\ProvidesExplClass{l3doc}{2018-04-30}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq @@ -148,11 +148,6 @@ { oo } { TF , T , F } \cs_new_protected:Npn \__codedoc_replace_at_at:N #1 { - \bool_if:NT \l__codedoc_in_implementation_bool - { - \bool_if:NT \l__codedoc_detect_internals_bool - { \__codedoc_detect_internals:N #1 } - } \tl_if_empty:NF \g__codedoc_module_name_tl { \exp_args:NNo \__codedoc_replace_at_at_aux:Nn @@ -169,9 +164,14 @@ \tl_replace_all:Nnn #1 { @ @ } { _ _ #2 } \tl_replace_all:Nnn #1 { \token_to_str:N a a } { @ @ } } +\cs_new_protected:Npn \__codedoc_detect_internals:N #1 + { + \bool_if:NT \l__codedoc_detect_internals_bool + { \__codedoc_detect_internals_aux:N #1 } + } \group_begin: \char_set_catcode_active:N \^^M - \cs_new_protected:Npn \__codedoc_detect_internals:N #1 + \cs_new_protected:Npn \__codedoc_detect_internals_aux:N #1 { \tl_set_eq:NN \l__codedoc_detect_internals_tl #1 \tl_replace_all:Non \l__codedoc_detect_internals_tl { \token_to_str:N _ } { _ } @@ -274,22 +274,23 @@ } \cs_new:Npx \__codedoc_key_get_base_TF:nN #1#2 { - \tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} \scan_stop: } - \tl_if_in:NnTF #2 { \tl_to_str:n { F } \scan_stop: } + \tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} } + \tl_if_in:NoF #2 { \tl_to_str:n {:} } + { \exp_not:N \prg_break: } + \tl_if_in:onT { #2 z } { \tl_to_str:n {TF} z } + { \exp_not:N \prg_break: } + \tl_if_in:onT { #2 z } { \tl_to_str:n {T} z } { - \tl_if_in:NnF #2 { \tl_to_str:n { TF } \scan_stop: } - { - \tl_replace_once:Nnn #2 - { \tl_to_str:n { F } \scan_stop: } - { \tl_to_str:n { TF } \scan_stop: } - } + \tl_put_right:Nn #2 { \tl_to_str:n {F} } + \exp_not:N \prg_break: } + \tl_if_in:onT { #2 z } { \tl_to_str:n {F} z } { - \tl_replace_once:Nnn #2 - { \tl_to_str:n { T } \scan_stop: } - { \tl_to_str:n { TF } \scan_stop: } + \tl_put_right:Nn #2 { z } + \tl_replace_once:Nnn #2 { \tl_to_str:n {F} z } { \tl_to_str:n {TF} } + \exp_not:N \prg_break: } - \tl_remove_once:Nn #2 { \scan_stop: } + \exp_not:N \prg_break_point: } \cs_new:Npn \__codedoc_base_form_aux:nnN #1#2#3 { @@ -539,6 +540,7 @@ \providecommand*\upTeX{up\kern-.2em\hologo{TeX}} \providecommand*\epTeX{$\varepsilon$-\pTeX} \providecommand*\eupTeX{$\varepsilon$-\upTeX} +\providecommand*\ConTeXt{\hologo{ConTeXt}} \DeclareDocumentCommand \cmd { O{} m } { \__codedoc_cmd:no {#1} { \token_to_str:N #2 } } \DeclareDocumentCommand \cs { O{} m } @@ -795,6 +797,7 @@ \tl_remove_all:Nx \l__codedoc_tmpa_tl { \tl_to_str:n { ^ ^ A } } \tl_remove_all:Nx \l__codedoc_tmpa_tl { \iow_char:N \^^I } \tl_remove_all:Nx \l__codedoc_tmpa_tl { \iow_char:N \^^M } + \__codedoc_detect_internals:N \l__codedoc_tmpa_tl \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \exp_args:NNx \seq_set_from_clist:Nn #2 { \tl_to_str:N \l__codedoc_tmpa_tl } @@ -1855,6 +1858,7 @@ { \__codedoc_xmacro_code:w #1 \q_stop } { \tl_set:Nn \l__codedoc_tmpa_tl {#1} + \__codedoc_detect_internals:N \l__codedoc_tmpa_tl \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \tl_use:N \l__codedoc_tmpa_tl } @@ -1862,12 +1866,14 @@ \cs_new_protected:Npn \__codedoc_xmacro_code:w #1 < @ @ = #2 > #3 \q_stop { \tl_set:Nn \l__codedoc_tmpa_tl {#1} + \__codedoc_detect_internals:N \l__codedoc_tmpa_tl \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \tl_gset:Nn \g__codedoc_module_name_tl {#2} \tl_put_right:Nn \l__codedoc_tmpa_tl { < @ @ = #2 > } \tl_set:Nn \l__codedoc_tmpb_tl {#3} + \__codedoc_detect_internals:N \l__codedoc_tmpb_tl \__codedoc_replace_at_at:N \l__codedoc_tmpb_tl \tl_put_right:No \l__codedoc_tmpa_tl { \l__codedoc_tmpb_tl } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index cbeff0221d8..13effe3d15c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -20,8 +20,12 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvidpfmx.def}{2017/03/18}{} + {l3dvidpfmx.def}{2018-04-30}{} {L3 Experimental driver: dvipdfmx} +\cs_new_eq:NN \__driver_literal_x:n \tex_special:D +\cs_new_protected:Npn \__driver_literal:n #1 + { \__driver_literal_x:n { \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_literal:n { x } \cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { @@ -37,7 +41,10 @@ \exp_after:wN \use:n \current@color \c_space_tl 1 } } - { \exp_after:wN \__driver_color_pickup:w \current@color \q_stop #1 } + { + \exp_after:wN \__driver_color_pickup:w + \current@color \q_stop #1 + } } \cs_new_protected:Npn \__driver_color_pickup:w #1 ~ #2 \q_stop #3 { \tl_set:Nn #3 { #1 ~ #2 } } @@ -45,30 +52,42 @@ { } } \cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { cmyk~ #1 ~ #2 ~ #3 ~ #4 } } + { + \__driver_color_select:x + { + cmyk~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } \cs_new_protected:Npn \driver_color_gray:n #1 - { \__driver_color_select:n { gray~ #1 } } + { \__driver_color_select:x { gray~ \fp_eval:n {#1} } } \cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 - { \__driver_color_select:n { rgb~ #1 ~ #2 ~ #3 } } + { + \__driver_color_select:x + { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } \cs_new_protected:Npn \driver_color_spot:nn #1#2 { \__driver_color_select:n { \c_space_tl #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { - \tex_special:D { color~push~ #1 } + \__driver_literal:n { color~push~ #1 } \group_insert_after:N \__driver_color_reset: } +\cs_generate_variant:Nn \__driver_color_select:n { x } \cs_new_protected:Npn \__driver_color_reset: - { \tex_special:D { color~pop } } -\cs_new_protected:Npn \__driver_literal:n #1 - { \tex_special:D { pdf:literal~ #1 } } + { \__driver_literal:n { color~pop } } +\cs_new_protected:Npn \__driver_literal_pdf:n #1 + { \__driver_literal:n { pdf:literal~ #1 } } +\cs_generate_variant:Nn \__driver_literal_pdf:n { x } \cs_new_protected:Npn \__driver_scope_begin: - { \tex_special:D { x:gsave } } + { \__driver_literal:n { x:gsave } } \cs_new_protected:Npn \__driver_scope_end: - { \tex_special:D { x:grestore } } + { \__driver_literal:n { x:grestore } } \cs_new_protected:Npn \driver_box_use_clip:N #1 { \__driver_scope_begin: - \__driver_literal:n + \__driver_literal_pdf:x { 0~ \dim_to_decimal_in_bp:n { -\box_dp:N #1 } ~ @@ -81,9 +100,11 @@ \skip_horizontal:n { \box_wd:N #1 } } \cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2 + { \exp_args:NNf \__driver_box_use_rotate:Nn #1 { \fp_eval:n {#2} } } +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { \__driver_scope_begin: - \tex_special:D + \__driver_literal:x { x:rotate~ \fp_compare:nNnTF {#2} = \c_zero_fp @@ -96,7 +117,7 @@ \cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3 { \__driver_scope_begin: - \tex_special:D + \__driver_literal:x { x:scale~ \fp_eval:n { round ( #2 , 5 ) } ~ @@ -122,7 +143,7 @@ \int_new:N \g__driver_image_int \cs_new_protected:Npn \__driver_image_include_eps:n #1 { - \tex_special:D { PSfile = #1 } + \__driver_literal:n { PSfile = #1 } } \cs_new_protected:Npn \__driver_image_include_jpg:n #1 { \__driver_image_include_auxi:nn {#1} { image } } @@ -148,7 +169,7 @@ { \int_if_exist:cTF { c__driver_image_ #2#1 _int } { - \tex_special:D + \__driver_literal:x { pdf:usexobj~@image \int_use:c { c__driver_image_ #2#1 _int } } } { \__driver_image_include_auxiii:nn {#2} {#1} {#3} } @@ -158,7 +179,7 @@ { \int_gincr:N \g__driver_image_int \int_const:cn { c__driver_image_ #1#2 _int } { \g__driver_image_int } - \tex_special:D + \__driver_literal:x { pdf:#3~ @image \int_use:c { c__driver_image_ #1#2 _int } @@ -187,16 +208,14 @@ } } } -\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal:n +\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_pdf:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: { \driver_draw_scope_begin: } \cs_new_protected:Npn \driver_draw_end: { \driver_draw_scope_end: } -\cs_new_protected:Npn \driver_draw_scope_begin: - { \__driver_draw_literal:n { q } } -\cs_new_protected:Npn \driver_draw_scope_end: - { \__driver_draw_literal:n { Q } } +\cs_new_eq:NN \driver_draw_scope_begin: \__driver_scope_begin: +\cs_new_eq:NN \driver_draw_scope_end: \__driver_scope_end: \cs_new_protected:Npn \driver_draw_moveto:nn #1#2 { \__driver_draw_literal:x @@ -254,25 +273,26 @@ } \cs_new_protected:Npn \driver_draw_discardpath: { \__driver_draw_literal:n { n } } -\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2 +\cs_new_protected:Npn \driver_draw_dash_pattern:nn #1#2 { \__driver_draw_literal:x { - [ ~ - \clist_map_function:nN {#1} \__driver_draw_dash:n + [ + \exp_args:Nf \use:n + { \clist_map_function:nN {#1} \__driver_draw_dash:n } ] ~ \dim_to_decimal_in_bp:n {#2} ~ d } } \cs_new:Npn \__driver_draw_dash:n #1 - { \dim_to_decimal_in_bp:n {#1} ~ } + { ~ \dim_to_decimal_in_bp:n {#1} } \cs_new_protected:Npn \driver_draw_linewidth:n #1 { \__driver_draw_literal:x { \dim_to_decimal_in_bp:n {#1} ~ w } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_literal:x { #1 ~ M } } + { \__driver_draw_literal:x { \fp_eval:n {#1} ~ M } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_literal:n { 0 ~ J } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -286,18 +306,39 @@ \cs_new_protected:Npn \driver_draw_join_bevel: { \__driver_draw_literal:n { 2 ~ j } } \cs_new_protected:Npn \driver_draw_color_fill_cmyk:nnnn #1#2#3#4 - { \__driver_color_fill_select:n { #1 ~ #2 ~ #3 ~ #4 ~ k } } + { + \__driver_color_fill_select:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + k + } + } \cs_new_protected:Npn \driver_draw_color_stroke_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ #4 ~ K } } + { + \__driver_color_select:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + k + } + } \cs_new_protected:Npn \driver_draw_color_fill_gray:n #1 - { \__driver_color_fill_select:n { #1 ~ g } } + { \__driver_color_fill_select:x { \fp_eval:n {#1} ~ g } } \cs_new_protected:Npn \driver_draw_color_stroke_gray:n #1 - { \__driver_color_select:n { #1 ~ G } } + { \__driver_color_select:x { \fp_eval:n {#1} ~ G } } \cs_new_protected:Npn \driver_draw_color_fill_rgb:nnn #1#2#3 - { \__driver_color_fill_select:n { #1 ~ #2 ~ #3 ~ rg } } + { + \__driver_color_fill_select:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg } + } \cs_new_protected:Npn \driver_draw_color_stroke_rgb:nnn #1#2#3 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ RG } } + { + \__driver_color_select:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG } + } \cs_new_eq:NN \__driver_color_fill_select:n \__driver_draw_literal:n +\cs_generate_variant:Nn \__driver_color_fill_select:n { x } \cs_new_protected:Npn \driver_draw_cm:nnnn #1#2#3#4 { \__driver_draw_cm_decompose:nnnnN {#1} {#2} {#3} {#4} @@ -305,20 +346,20 @@ } \cs_new_protected:Npn \__driver_draw_cm:nnnn #1#2#3#4 { - \tex_special:D + \__driver_literal:x { x:rotate~ \fp_compare:nNnTF {#1} = \c_zero_fp { 0 } { \fp_eval:n { round ( -#1 , 5 ) } } } - \tex_special:D + \__driver_literal:x { x:scale~ \fp_eval:n { round ( #2 , 5 ) } ~ \fp_eval:n { round ( #3 , 5 ) } } - \tex_special:D + \__driver_literal:x { x:rotate~ \fp_compare:nNnTF {#4} = \c_zero_fp @@ -371,9 +412,15 @@ \cs_new_protected:Npn \driver_draw_box_use:Nnnnn #1#2#3#4#5 { \__driver_scope_begin: - \tex_special:D { pdf:btrans~matrix~ #2 ~ #3 ~ #4 ~ #5 ~ 0 ~ 0 } + \__driver_literal:x + { + pdf:btrans~matrix~ + \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ + \fp_eval:n {#4} ~ \fp_eval:n {#5} ~ + 0 ~ 0 + } \hbox_overlap_right:n { \box_use:N #1 } - \tex_special:D { pdf:etrans } + \__driver_literal:n { pdf:etrans } \__driver_scope_end: } %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 858d736bd45..161a7b3d201 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -20,8 +20,12 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvips.def}{2017/03/18}{} + {l3dvips.def}{2018-04-30}{} {L3 Experimental driver: dvips} +\cs_new_eq:NN \__driver_literal_x:n \tex_special:D +\cs_new_protected:Npn \__driver_literal:n #1 + { \__driver_literal_x:n { \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_literal:n { x } \cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { @@ -37,7 +41,10 @@ \exp_after:wN \use:n \current@color \c_space_tl 1 } } - { \exp_after:wN \__driver_color_pickup:w \current@color \q_stop #1 } + { + \exp_after:wN \__driver_color_pickup:w + \current@color \q_stop #1 + } } \cs_new_protected:Npn \__driver_color_pickup:w #1 ~ #2 \q_stop #3 { \tl_set:Nn #3 { #1 ~ #2 } } @@ -45,108 +52,118 @@ { } } \cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { cmyk~ #1 ~ #2 ~ #3 ~ #4 } } + { + \__driver_color_select:x + { + cmyk~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } \cs_new_protected:Npn \driver_color_gray:n #1 - { \__driver_color_select:n { gray~ #1 } } + { \__driver_color_select:x { gray~ \fp_eval:n {#1} } } \cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 - { \__driver_color_select:n { rgb~ #1 ~ #2 ~ #3 } } + { + \__driver_color_select:x + { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } \cs_new_protected:Npn \driver_color_spot:nn #1#2 { \__driver_color_select:n { \c_space_tl #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { - \tex_special:D { color~push~ #1 } - \tex_special:D { ps::/l3fc~{ }~def } + \__driver_literal:n { color~push~ #1 } + \__driver_literal_postscript:n { /l3fc~{ }~def } \group_insert_after:N \__driver_color_reset: } +\cs_generate_variant:Nn \__driver_color_select:n { x } \cs_new_protected:Npn \__driver_color_reset: - { \tex_special:D { color~pop } } -\cs_new_protected:Npn \__driver_literal:n #1 + { \__driver_literal:n { color~pop } } +\cs_new_protected:Npn \__driver_literal_postscript:n #1 + { \__driver_literal:n { ps:: #1 } } +\cs_generate_variant:Nn \__driver_literal_postscript:n { x } +\cs_new_protected:Npn \__driver_align_currentpoint_begin: { - \tex_special:D - { - ps: - currentpoint~ - currentpoint~translate~ - #1 ~ - neg~exch~neg~exch~translate - } + \__driver_literal:n { ps::[begin] } + \__driver_literal_postscript:n { currentpoint } + \__driver_literal_postscript:n { currentpoint~translate } } -\cs_new_protected:Npn \__driver_scope_begin: - { \tex_special:D { ps:gsave } } -\cs_new_protected:Npn \__driver_scope_end: - { \tex_special:D { ps:grestore } } -\cs_new:Npn \__driver_absolute_lengths:n #1 +\cs_new_protected:Npn \__driver_align_currentpoint_end: { - matrix~currentmatrix~ - Resolution~72~div~VResolution~72~div~scale~ - DVImag~dup~scale~ - #1 ~ - setmatrix + \__driver_literal_postscript:n { neg~exch~neg~exch~translate } + \__driver_literal:n { ps::[end] } } +\cs_new_protected:Npn \__driver_scope_begin: + { \__driver_literal:n { ps:gsave } } +\cs_new_protected:Npn \__driver_scope_end: + { \__driver_literal:n { ps:grestore } } \cs_new_protected:Npn \driver_box_use_clip:N #1 { \__driver_scope_begin: - \__driver_literal:n + \__driver_align_currentpoint_begin: + \__driver_literal_postscript:n { matrix~currentmatrix } + \__driver_literal_postscript:n + { Resolution~72~div~VResolution~72~div~scale } + \__driver_literal_postscript:n { DVImag~dup~scale } + \__driver_literal_postscript:x { - \__driver_absolute_lengths:n - { - 0 ~ - \dim_to_decimal_in_bp:n { \box_dp:N #1 } ~ - \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~ - \dim_to_decimal_in_bp:n { -\box_ht:N #1 - \box_dp:N #1 } ~ - rectclip - } + 0 ~ + \dim_to_decimal_in_bp:n { \box_dp:N #1 } ~ + \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~ + \dim_to_decimal_in_bp:n { -\box_ht:N #1 - \box_dp:N #1 } ~ + rectclip } + \__driver_literal_postscript:n { setmatrix } + \__driver_align_currentpoint_end: \hbox_overlap_right:n { \box_use:N #1 } \__driver_scope_end: \skip_horizontal:n { \box_wd:N #1 } } \cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2 + { \exp_args:NNf \__driver_box_use_rotate:Nn #1 { \fp_eval:n {#2} } } +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { \__driver_scope_begin: - \__driver_literal:n + \__driver_align_currentpoint_begin: + \__driver_literal_postscript:x { \fp_compare:nNnTF {#2} = \c_zero_fp { 0 } - { \fp_eval:n { round ( -#2 , 5 ) } } ~ + { \fp_eval:n { round ( -(#2) , 5 ) } } ~ rotate } + \__driver_align_currentpoint_end: \box_use:N #1 \__driver_scope_end: } \cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3 { \__driver_scope_begin: - \__driver_literal:n + \__driver_align_currentpoint_begin: + \__driver_literal_postscript:x { \fp_eval:n { round ( #2 , 5 ) } ~ \fp_eval:n { round ( #3 , 5 ) } ~ scale } + \__driver_align_currentpoint_end: \hbox_overlap_right:n { \box_use:N #1 } \__driver_scope_end: } \cs_new_eq:NN \__driver_image_getbb_eps:n \image_read_bb:n \cs_new_protected:Npn \__driver_image_include_eps:n #1 - { - \tex_special:D { PSfile = #1 } - } -\cs_new_protected:Npn \__driver_draw_literal:n #1 - { \tex_special:D { ps:: #1 } } + { \__driver_literal:n { PSfile = #1 } } +\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_postscript:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: { - \__driver_draw_literal:n { [begin] } - \__driver_draw_literal:n { save } - \__driver_draw_literal:n { /l3x~currentpoint~/l3y~exch~def~def } + \__driver_literal:n { ps::[begin] } \__driver_draw_literal:n { @beginspecial } \__driver_draw_literal:n { /l3fc~{ }~def } } \cs_new_protected:Npn \driver_draw_end: { \__driver_draw_literal:n { @endspecial } - \__driver_draw_literal:n { restore } - \__driver_draw_literal:n { [end] } + \__driver_literal:n { ps::[end] } } \cs_new_protected:Npn \driver_draw_scope_begin: { \__driver_draw_literal:n { save } } @@ -155,12 +172,18 @@ \cs_new_protected:Npn \driver_draw_moveto:nn #1#2 { \__driver_draw_literal:x - { \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ moveto } + { + \dim_to_decimal_in_bp:n {#1} ~ + \dim_to_decimal_in_bp:n {#2} ~ moveto + } } \cs_new_protected:Npn \driver_draw_lineto:nn #1#2 { \__driver_draw_literal:x - { \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ lineto } + { + \dim_to_decimal_in_bp:n {#1} ~ + \dim_to_decimal_in_bp:n {#2} ~ lineto + } } \cs_new_protected:Npn \driver_draw_rectangle:nnnn #1#2#3#4 { @@ -190,7 +213,7 @@ { \__driver_draw_literal:n { closepath } } \cs_new_protected:Npn \driver_draw_stroke: { - \__driver_draw_literal:n { stroke } + \__driver_draw_literal:n { stroke } \bool_if:NT \g__driver_draw_clip_bool { \__driver_draw_literal:x @@ -266,25 +289,26 @@ \__driver_draw_literal:n { newpath } \bool_gset_false:N \g__driver_draw_clip_bool } -\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2 +\cs_new_protected:Npn \driver_draw_dash_pattern:nn #1#2 { \__driver_draw_literal:x { - [ ~ - \clist_map_function:nN {#1} \__driver_draw_dash:n + [ + \exp_args:Nf \use:n + { \clist_map_function:nN {#1} \__driver_draw_dash:n } ] ~ \dim_to_decimal_in_bp:n {#2} ~ setdash } } \cs_new:Npn \__driver_draw_dash:n #1 - { \dim_to_decimal_in_bp:n {#1} ~ } + { ~ \dim_to_decimal_in_bp:n {#1} } \cs_new_protected:Npn \driver_draw_linewidth:n #1 { \__driver_draw_literal:x { \dim_to_decimal_in_bp:n {#1} ~ setlinewidth } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_literal:n { #1 ~ setmiterlimit } } + { \__driver_draw_literal:x { \fp_eval:n {#1} ~ setmiterlimit } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_literal:n { 0 ~ setlinecap } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -298,37 +322,77 @@ \cs_new_protected:Npn \driver_draw_join_bevel: { \__driver_draw_literal:n { 2 ~ setlinejoin } } \cs_new_protected:Npn \driver_draw_color_fill_cmyk:nnnn #1#2#3#4 - { \__driver_draw_fill:n { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor } } + { + \__driver_draw_color_fill:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + setcmykcolor + } + } \cs_new_protected:Npn \driver_draw_color_stroke_cmyk:nnnn #1#2#3#4 - { \__driver_draw_stroke:n { cmyk ~ #1 ~ #2 ~ #3 ~ #4 } } + { + \__driver_draw_color_stroke:x + { + cmyk ~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } \cs_new_protected:Npn \driver_draw_color_fill_gray:n #1 - { \__driver_draw_fill:n { #1 ~ setgray } } + { \__driver_draw_color_fill:x { \fp_eval:n {#1} ~ setgray } } \cs_new_protected:Npn \driver_draw_color_stroke_gray:n #1 - { \__driver_draw_stroke:n { gray ~ #1 } } + { \__driver_draw_color_stroke:x { gray ~ \fp_eval:n {#1} } } \cs_new_protected:Npn \driver_draw_color_fill_rgb:nnn #1#2#3 - { \__driver_draw_fill:n { #1 ~ #2 ~ #3 ~ setrgbcolor } } + { + \__driver_draw_color_fill:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ setrgbcolor } + } \cs_new_protected:Npn \driver_draw_color_stroke_rgb:nnn #1#2#3 - { \__driver_draw_stroke:n { rgb ~ #1 ~ #2 ~ #3 } } + { + \__driver_draw_color_stroke:x + { rgb ~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } \cs_new_protected:Npn \__driver_draw_color_fill:n #1 { \__driver_draw_literal:n { /l3fc ~ { #1 } ~ def } } +\cs_generate_variant:Nn \__driver_draw_color_fill:n { x } \cs_new_protected:Npn \__driver_draw_color_stroke:n #1 { - \tex_special:D { color~push~#1 } + \__driver_literal:n { color~push~#1 } \group_insert_after:N \__driver_color_reset: } +\cs_generate_variant:Nn \__driver_draw_color_stroke:n { x } \cs_new_protected:Npn \driver_draw_cm:nnnn #1#2#3#4 - { \__driver_draw_literal:n { [#1 ~ #2 ~ #3 ~ #4 ~ 0 ~ 0 ] ~ concat } } + { + \__driver_draw_literal:n + { + [ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + 0 ~ 0 + ] ~ + concat + } + } \cs_new_protected:Npn \driver_draw_box_use:Nnnnn #1#2#3#4#5 { - \__driver_scope_begin: + \__driver_draw_literal:n { @endspecial } \__driver_draw_literal:n { [end] } + \__driver_draw_literal:n { [begin] } + \__driver_draw_literal:n { save } + \__driver_draw_literal:n { currentpoint } + \__driver_draw_literal:n { currentpoint~translate } + \driver_draw_cm:nnnn { 1 } { 0 } { 0 } { -1 } \driver_draw_cm:nnnn {#2} {#3} {#4} {#5} - \__driver_draw_literal:n { 72~Resolution~div~72~VResolution~div~neg~scale } - \__driver_draw_literal:n { magscale~{1~DVImag~div~dup~scale}~if } - \__driver_draw_literal:n { l3x~neg~l3y~neg~translate } + \driver_draw_cm:nnnn { 1 } { 0 } { 0 } { -1 } + \__driver_draw_literal:n { neg~exch~neg~exch~translate } + \__driver_draw_literal:n { [end] } \hbox_overlap_right:n { \box_use:N #1 } \__driver_draw_literal:n { [begin] } - \__driver_scope_end: + \__driver_draw_literal:n { restore } + \__driver_draw_literal:n { [end] } + \__driver_draw_literal:n { [begin] } + \__driver_draw_literal:n { @beginspecial } } %% %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def index 3cd59d4ffa3..d446e114be2 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def @@ -20,8 +20,12 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvisvgm.def}{2017/03/18}{} + {l3dvisvgm.def}{2018-04-30}{} {L3 Experimental driver: dvisvgm} +\cs_new_eq:NN \__driver_literal_x:n \tex_special:D +\cs_new_protected:Npn \__driver_literal:n #1 + { \__driver_literal_x:n { \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_literal:n { x } \cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { @@ -37,7 +41,10 @@ \exp_after:wN \use:n \current@color \c_space_tl 1 } } - { \exp_after:wN \__driver_color_pickup:w \current@color \q_stop #1 } + { + \exp_after:wN \__driver_color_pickup:w + \current@color \q_stop #1 + } } \cs_new_protected:Npn \__driver_color_pickup:w #1 ~ #2 \q_stop #3 { \tl_set:Nn #3 { #1 ~ #2 } } @@ -45,34 +52,47 @@ { } } \cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { cmyk~ #1 ~ #2 ~ #3 ~ #4 } } + { + \__driver_color_select:x + { + cmyk~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } \cs_new_protected:Npn \driver_color_gray:n #1 - { \__driver_color_select:n { gray~ #1 } } + { \__driver_color_select:x { gray~ \fp_eval:n {#1} } } \cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 - { \__driver_color_select:n { rgb~ #1 ~ #2 ~ #3 } } + { + \__driver_color_select:x + { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } \cs_new_protected:Npn \driver_color_spot:nn #1#2 { \__driver_color_select:n { \c_space_tl #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { - \tex_special:D { color~push~ #1 } + \__driver_literal:n { color~push~ #1 } \group_insert_after:N \__driver_color_reset: } +\cs_generate_variant:Nn \__driver_color_select:n { x } \cs_new_protected:Npn \__driver_color_reset: - { \tex_special:D { color~pop } } -\cs_new_protected:Npn \__driver_literal:n #1 - { \tex_special:D { dvisvgm:raw~ #1 { ?nl } } } + { \__driver_literal:n { color~pop } } +\cs_new_protected:Npn \__driver_literal_svg:n #1 + { \__driver_literal:n { dvisvgm:raw~ #1 { ?nl } } } +\cs_generate_variant:Nn \__driver_literal_svg:n { x } \cs_new_protected:Npn \__driver_scope_begin: - { \__driver_literal:n { <g> } } + { \__driver_literal_svg:n { <g> } } \cs_new_protected:Npn \__driver_scope_end: - { \__driver_literal:n { </g> } } + { \__driver_literal_svg:n { </g> } } \cs_new_protected:Npn \__driver_scope_begin:n #1 - { \__driver_literal:n { <g~ #1 > } } + { \__driver_literal_svg:n { <g~ #1 > } } +\cs_generate_variant:Nn \__driver_scope_begin:n { x } \cs_new_protected:Npn \driver_box_use_clip:N #1 { \int_gincr:N \g__driver_clip_path_int - \__driver_literal:n + \__driver_literal_svg:x { < clipPath~id = " l3cp \int_use:N \g__driver_clip_path_int " > } - \__driver_literal:n + \__driver_literal_svg:x { < path ~ d = @@ -89,7 +109,7 @@ " /> } - \__driver_literal:n + \__driver_literal_svg:n { < /clipPath > } \__driver_scope_begin:n { @@ -99,9 +119,10 @@ scale ( 1 , -1 ) " } - \__driver_scope_begin:n + \__driver_scope_begin:x { - clip-path = "url ( \c_hash_str l3cp \int_use:N \g__driver_clip_path_int ) " + clip-path = + "url ( \c_hash_str l3cp \int_use:N \g__driver_clip_path_int ) " } \__driver_scope_begin:n { @@ -120,12 +141,12 @@ \int_new:N \g__driver_clip_path_int \cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2 { - \__driver_scope_begin:n + \__driver_scope_begin:x { transform = " rotate - ( \fp_eval:n { round ( -#2 , 5 ) } , ~ { ?x } , ~ { ?y } ) + ( \fp_eval:n { round ( -(#2) , 5 ) } , ~ { ?x } , ~ { ?y } ) " } \box_use:N #1 @@ -133,7 +154,7 @@ } \cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3 { - \__driver_scope_begin:n + \__driver_scope_begin:x { transform = " @@ -154,7 +175,7 @@ \cs_new_eq:NN \__driver_image_getbb_jpg:n \image_extract_bb:n \cs_new_protected:Npn \__driver_image_include_png:n #1 { - \tex_special:D + \__driver_literal:x { dvisvgm:img~ \dim_to_decimal:n { \l_image_ury_dim } ~ @@ -163,8 +184,9 @@ } } \cs_new_eq:NN \__driver_image_include_jpg:n \__driver_image_include_png:n -\cs_new:Npn \__driver_image_include_bitmap_quote:w #1 " #2 " #3 \q_stop { #1#2 } -\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal:n +\cs_new:Npn \__driver_image_include_bitmap_quote:w #1 " #2 " #3 \q_stop + { #1#2 } +\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_svg:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: { @@ -312,7 +334,7 @@ \tl_gclear:N \g__driver_draw_path_tl \bool_gset_false:N \g__driver_draw_clip_bool } -\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2 +\cs_new_protected:Npn \driver_draw_dash_pattern:nn #1#2 { \use:x { @@ -339,7 +361,7 @@ \cs_new_protected:Npn \driver_draw_linewidth:n #1 { \__driver_draw_scope:x { stroke-width=" \dim_to_decimal:n {#1} " } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_scope:x { stroke-miterlimit=" #1 " } } + { \__driver_draw_scope:x { stroke-miterlimit=" \fp_eval:n {#1} " } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_scope:n { stroke-linecap="butt" } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -415,11 +437,11 @@ " } } -\cs_new_protected:Npn \driver_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7 +\cs_new_protected:Npn \driver_draw_box_use:Nnnnn #1#2#3#4#5#6#7 { \__driver_scope_begin: \driver_draw_cm:nnnn {#2} {#3} {#4} {#5} - \__driver_literal:n + \__driver_literal_svg:n { < g~ stroke="none"~ @@ -430,7 +452,7 @@ \box_set_ht:Nn #1 { 0pt } \box_set_dp:Nn #1 { 0pt } \box_use:N #1 - \__driver_literal:n { </g> } + \__driver_literal_svg:n { </g> } \__driver_scope_end: } %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index d321543bcae..85caa134571 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -20,8 +20,12 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3pdfmode.def}{2017/03/18}{} + {l3pdfmode.def}{2018-04-30}{} {L3 Experimental driver: PDF mode} +\cs_new_eq:NN \__driver_literal_x:n \tex_special:D +\cs_new_protected:Npn \__driver_literal:n #1 + { \__driver_literal_x:n { \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_literal:n { x } \cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { @@ -60,10 +64,36 @@ } \int_new:N \l__driver_color_stack_int \cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K } } + { + \use:x + { + \__driver_color_cmyk:nnnn + { \fp_eval:n {#1} } + { \fp_eval:n {#2} } + { \fp_eval:n {#3} } + { \fp_eval:n {#4} } + } + } +\cs_new_protected:Npn \__driver_color_cmyk:nnnn #1#2#3#4 + { + \__driver_color_select:n + { #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K } + } \cs_new_protected:Npn \driver_color_gray:n #1 + { \exp_args:Nx \__driver_color_gray:n { \fp_eval:n {#1} } } +\cs_new_protected:Npn \__driver_color_gray:n #1 { \__driver_color_select:n { #1 ~ g ~ #1 ~ G } } \cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 + { + \use:x + { + \__driver_color_rgb:nnn + { \fp_eval:n {#1} } + { \fp_eval:n {#2} } + { \fp_eval:n {#3} } + } + } +\cs_new_protected:Npn \__driver_color_rgb:nnn #1#2#3 { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG } } \cs_new_protected:Npn \driver_color_spot:nn #1#2 { \__driver_color_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ sc ~ #2 ~ SC } } @@ -75,6 +105,7 @@ \exp_not:N \l__driver_color_stack_int push {#1} \group_insert_after:N \exp_not:N \__driver_color_reset: } +\cs_generate_variant:Nn \__driver_color_select:n { x } \cs_new_protected:Npx \__driver_color_reset: { \cs_if_exist:NTF \luatex_pdfextension:D @@ -82,13 +113,14 @@ { \pdftex_pdfcolorstack:D } \exp_not:N \l__driver_color_stack_int pop \scan_stop: } -\cs_new_protected:Npx \__driver_literal:n #1 +\cs_new_protected:Npx \__driver_literal_pdf:n #1 { \cs_if_exist:NTF \luatex_pdfextension:D { \luatex_pdfextension:D literal } { \pdftex_pdfliteral:D } - {#1} + { \exp_not:N \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_literal_pdf:n { x } \cs_new_protected:Npx \__driver_scope_begin: { \cs_if_exist:NTF \luatex_pdfextension:D @@ -106,12 +138,13 @@ \cs_if_exist:NTF \luatex_pdfextension:D { \luatex_pdfextension:D setmatrix } { \pdftex_pdfsetmatrix:D } - {#1} + { \exp_not:N \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_matrix:n { x } \cs_new_protected:Npn \driver_box_use_clip:N #1 { \__driver_scope_begin: - \__driver_literal:n + \__driver_literal_pdf:x { 0~ \dim_to_decimal_in_bp:n { -\box_dp:N #1 } ~ @@ -124,6 +157,8 @@ \skip_horizontal:n { \box_wd:N #1 } } \cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2 + { \exp_args:NNf \__driver_box_use_rotate:Nn #1 { \fp_eval:n {#2} } } +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { \__driver_scope_begin: \box_set_wd:Nn #1 { 0pt } @@ -131,7 +166,7 @@ \fp_compare:nNnT \l__driver_cos_fp = \c_zero_fp { \fp_zero:N \l__driver_cos_fp } \fp_set:Nn \l__driver_sin_fp { round ( sind ( #2 ) , 5 ) } - \__driver_matrix:n + \__driver_matrix:x { \fp_use:N \l__driver_cos_fp \c_space_tl \fp_compare:nNnTF \l__driver_sin_fp = \c_zero_fp @@ -152,7 +187,7 @@ \cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3 { \__driver_scope_begin: - \__driver_matrix:n + \__driver_matrix:x { \fp_eval:n { round ( #2 , 5 ) } ~ 0~0~ @@ -229,16 +264,14 @@ } \cs_new_eq:NN \__driver_image_include_pdf:n \__driver_image_include_jpg:n \cs_new_eq:NN \__driver_image_include_png:n \__driver_image_include_jpg:n -\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal:n +\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_pdf:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: { \driver_draw_scope_begin: } \cs_new_protected:Npn \driver_draw_end: { \driver_draw_scope_end: } -\cs_new_protected:Npn \driver_draw_scope_begin: - { \__driver_draw_literal:n { q } } -\cs_new_protected:Npn \driver_draw_scope_end: - { \__driver_draw_literal:n { Q } } +\cs_new_eq:NN \driver_draw_scope_begin: \__driver_scope_begin: +\cs_new_eq:NN \driver_draw_scope_end: \__driver_scope_end: \cs_new_protected:Npn \driver_draw_moveto:nn #1#2 { \__driver_draw_literal:x @@ -296,25 +329,26 @@ } \cs_new_protected:Npn \driver_draw_discardpath: { \__driver_draw_literal:n { n } } -\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2 +\cs_new_protected:Npn \driver_draw_dash_pattern:nn #1#2 { \__driver_draw_literal:x { - [ ~ - \clist_map_function:nN {#1} \__driver_draw_dash:n + [ + \exp_args:Nf \use:n + { \clist_map_function:nN {#1} \__driver_draw_dash:n } ] ~ \dim_to_decimal_in_bp:n {#2} ~ d } } \cs_new:Npn \__driver_draw_dash:n #1 - { \dim_to_decimal_in_bp:n {#1} ~ } + { ~ \dim_to_decimal_in_bp:n {#1} } \cs_new_protected:Npn \driver_draw_linewidth:n #1 { \__driver_draw_literal:x { \dim_to_decimal_in_bp:n {#1} ~ w } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_literal:x { #1 ~ M } } + { \__driver_draw_literal:x { \fp_eval:n {#1} ~ M } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_literal:n { 0 ~ J } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -328,21 +362,46 @@ \cs_new_protected:Npn \driver_draw_join_bevel: { \__driver_draw_literal:n { 2 ~ j } } \cs_new_protected:Npn \driver_draw_color_fill_cmyk:nnnn #1#2#3#4 - { \__driver_color_fill_select:n { #1 ~ #2 ~ #3 ~ #4 ~ k } } + { + \__driver_color_fill_select:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + k + } + } \cs_new_protected:Npn \driver_draw_color_stroke_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ #4 ~ K } } + { + \__driver_color_select:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + k + } + } \cs_new_protected:Npn \driver_draw_color_fill_gray:n #1 - { \__driver_color_fill_select:n { #1 ~ g } } + { \__driver_color_fill_select:x { \fp_eval:n {#1} ~ g } } \cs_new_protected:Npn \driver_draw_color_stroke_gray:n #1 - { \__driver_color_select:n { #1 ~ G } } + { \__driver_color_select:x { \fp_eval:n {#1} ~ G } } \cs_new_protected:Npn \driver_draw_color_fill_rgb:nnn #1#2#3 - { \__driver_color_fill_select:n { #1 ~ #2 ~ #3 ~ rg } } + { + \__driver_color_fill_select:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg } + } \cs_new_protected:Npn \driver_draw_color_stroke_rgb:nnn #1#2#3 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ RG } } + { + \__driver_color_select:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG } + } \cs_new_eq:NN \__driver_color_fill_select:n \__driver_color_select:n +\cs_generate_variant:Nn \__driver_color_fill_select:n { x } \cs_new_protected:Npn \driver_draw_cm:nnnn #1#2#3#4 { - \__driver_matrix:n { #1 ~ #2 ~ #3 ~ #4 } + \__driver_matrix:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } } \cs_new_protected:Npn \driver_draw_box_use:Nnnnn #1#2#3#4#5 { diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def index d72da1a8865..73cdee51f42 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def @@ -20,8 +20,12 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3xdvidpfmx.def}{2017/03/18}{} + {l3xdvidpfmx.def}{2018-04-30}{} {L3 Experimental driver: xdvipdfmx} +\cs_new_eq:NN \__driver_literal_x:n \tex_special:D +\cs_new_protected:Npn \__driver_literal:n #1 + { \__driver_literal_x:n { \exp_not:n {#1} } } +\cs_generate_variant:Nn \__driver_literal:n { x } \cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { @@ -37,7 +41,10 @@ \exp_after:wN \use:n \current@color \c_space_tl 1 } } - { \exp_after:wN \__driver_color_pickup:w \current@color \q_stop #1 } + { + \exp_after:wN \__driver_color_pickup:w + \current@color \q_stop #1 + } } \cs_new_protected:Npn \__driver_color_pickup:w #1 ~ #2 \q_stop #3 { \tl_set:Nn #3 { #1 ~ #2 } } @@ -45,30 +52,42 @@ { } } \cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { cmyk~ #1 ~ #2 ~ #3 ~ #4 } } + { + \__driver_color_select:x + { + cmyk~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } \cs_new_protected:Npn \driver_color_gray:n #1 - { \__driver_color_select:n { gray~ #1 } } + { \__driver_color_select:x { gray~ \fp_eval:n {#1} } } \cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 - { \__driver_color_select:n { rgb~ #1 ~ #2 ~ #3 } } + { + \__driver_color_select:x + { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } \cs_new_protected:Npn \driver_color_spot:nn #1#2 { \__driver_color_select:n { \c_space_tl #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { - \tex_special:D { color~push~ #1 } + \__driver_literal:n { color~push~ #1 } \group_insert_after:N \__driver_color_reset: } +\cs_generate_variant:Nn \__driver_color_select:n { x } \cs_new_protected:Npn \__driver_color_reset: - { \tex_special:D { color~pop } } -\cs_new_protected:Npn \__driver_literal:n #1 - { \tex_special:D { pdf:literal~ #1 } } + { \__driver_literal:n { color~pop } } +\cs_new_protected:Npn \__driver_literal_pdf:n #1 + { \__driver_literal:n { pdf:literal~ #1 } } +\cs_generate_variant:Nn \__driver_literal_pdf:n { x } \cs_new_protected:Npn \__driver_scope_begin: - { \tex_special:D { x:gsave } } + { \__driver_literal:n { x:gsave } } \cs_new_protected:Npn \__driver_scope_end: - { \tex_special:D { x:grestore } } + { \__driver_literal:n { x:grestore } } \cs_new_protected:Npn \driver_box_use_clip:N #1 { \__driver_scope_begin: - \__driver_literal:n + \__driver_literal_pdf:x { 0~ \dim_to_decimal_in_bp:n { -\box_dp:N #1 } ~ @@ -81,9 +100,11 @@ \skip_horizontal:n { \box_wd:N #1 } } \cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2 + { \exp_args:NNf \__driver_box_use_rotate:Nn #1 { \fp_eval:n {#2} } } +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { \__driver_scope_begin: - \tex_special:D + \__driver_literal:x { x:rotate~ \fp_compare:nNnTF {#2} = \c_zero_fp @@ -96,7 +117,7 @@ \cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3 { \__driver_scope_begin: - \tex_special:D + \__driver_literal:x { x:scale~ \fp_eval:n { round ( #2 , 5 ) } ~ @@ -109,7 +130,7 @@ \int_new:N \g__driver_image_int \cs_new_protected:Npn \__driver_image_include_eps:n #1 { - \tex_special:D { PSfile = #1 } + \__driver_literal:n { PSfile = #1 } } \cs_new_protected:Npn \__driver_image_include_jpg:n #1 { \__driver_image_include_auxi:nn {#1} { image } } @@ -133,7 +154,7 @@ { \int_if_exist:cTF { c__driver_image_ #2#1 _int } { - \tex_special:D + \__driver_literal:x { pdf:usexobj~@image \int_use:c { c__driver_image_ #2#1 _int } } } { \__driver_image_include_auxiii:nn {#2} {#1} {#3} } @@ -143,7 +164,7 @@ { \int_gincr:N \g__driver_image_int \int_const:cn { c__driver_image_ #1#2 _int } { \g__driver_image_int } - \tex_special:D + \__driver_literal:x { pdf:#3~ @image \int_use:c { c__driver_image_ #1#2 _int } @@ -230,16 +251,14 @@ { page~ \int_use:N \l_image_page_int } \__driver_image_getbb_auxiv:VnNnn \l_image_pagebox_tl } -\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal:n +\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_pdf:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: { \driver_draw_scope_begin: } \cs_new_protected:Npn \driver_draw_end: { \driver_draw_scope_end: } -\cs_new_protected:Npn \driver_draw_scope_begin: - { \__driver_draw_literal:n { q } } -\cs_new_protected:Npn \driver_draw_scope_end: - { \__driver_draw_literal:n { Q } } +\cs_new_eq:NN \driver_draw_scope_begin: \__driver_scope_begin: +\cs_new_eq:NN \driver_draw_scope_end: \__driver_scope_end: \cs_new_protected:Npn \driver_draw_moveto:nn #1#2 { \__driver_draw_literal:x @@ -297,25 +316,26 @@ } \cs_new_protected:Npn \driver_draw_discardpath: { \__driver_draw_literal:n { n } } -\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2 +\cs_new_protected:Npn \driver_draw_dash_pattern:nn #1#2 { \__driver_draw_literal:x { - [ ~ - \clist_map_function:nN {#1} \__driver_draw_dash:n + [ + \exp_args:Nf \use:n + { \clist_map_function:nN {#1} \__driver_draw_dash:n } ] ~ \dim_to_decimal_in_bp:n {#2} ~ d } } \cs_new:Npn \__driver_draw_dash:n #1 - { \dim_to_decimal_in_bp:n {#1} ~ } + { ~ \dim_to_decimal_in_bp:n {#1} } \cs_new_protected:Npn \driver_draw_linewidth:n #1 { \__driver_draw_literal:x { \dim_to_decimal_in_bp:n {#1} ~ w } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_literal:x { #1 ~ M } } + { \__driver_draw_literal:x { \fp_eval:n {#1} ~ M } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_literal:n { 0 ~ J } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -329,18 +349,39 @@ \cs_new_protected:Npn \driver_draw_join_bevel: { \__driver_draw_literal:n { 2 ~ j } } \cs_new_protected:Npn \driver_draw_color_fill_cmyk:nnnn #1#2#3#4 - { \__driver_color_fill_select:n { #1 ~ #2 ~ #3 ~ #4 ~ k } } + { + \__driver_color_fill_select:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + k + } + } \cs_new_protected:Npn \driver_draw_color_stroke_cmyk:nnnn #1#2#3#4 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ #4 ~ K } } + { + \__driver_color_select:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + k + } + } \cs_new_protected:Npn \driver_draw_color_fill_gray:n #1 - { \__driver_color_fill_select:n { #1 ~ g } } + { \__driver_color_fill_select:x { \fp_eval:n {#1} ~ g } } \cs_new_protected:Npn \driver_draw_color_stroke_gray:n #1 - { \__driver_color_select:n { #1 ~ G } } + { \__driver_color_select:x { \fp_eval:n {#1} ~ G } } \cs_new_protected:Npn \driver_draw_color_fill_rgb:nnn #1#2#3 - { \__driver_color_fill_select:n { #1 ~ #2 ~ #3 ~ rg } } + { + \__driver_color_fill_select:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg } + } \cs_new_protected:Npn \driver_draw_color_stroke_rgb:nnn #1#2#3 - { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ RG } } + { + \__driver_color_select:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG } + } \cs_new_eq:NN \__driver_color_fill_select:n \__driver_draw_literal:n +\cs_generate_variant:Nn \__driver_color_fill_select:n { x } \cs_new_protected:Npn \driver_draw_cm:nnnn #1#2#3#4 { \__driver_draw_cm_decompose:nnnnN {#1} {#2} {#3} {#4} @@ -348,20 +389,20 @@ } \cs_new_protected:Npn \__driver_draw_cm:nnnn #1#2#3#4 { - \tex_special:D + \__driver_literal:x { x:rotate~ \fp_compare:nNnTF {#1} = \c_zero_fp { 0 } { \fp_eval:n { round ( -#1 , 5 ) } } } - \tex_special:D + \__driver_literal:x { x:scale~ \fp_eval:n { round ( #2 , 5 ) } ~ \fp_eval:n { round ( #3 , 5 ) } } - \tex_special:D + \__driver_literal:x { x:rotate~ \fp_compare:nNnTF {#4} = \c_zero_fp @@ -414,9 +455,15 @@ \cs_new_protected:Npn \driver_draw_box_use:Nnnnn #1#2#3#4#5 { \__driver_scope_begin: - \tex_special:D { pdf:btrans~matrix~ #2 ~ #3 ~ #4 ~ #5 ~ 0 ~ 0 } + \__driver_literal:x + { + pdf:btrans~matrix~ + \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ + \fp_eval:n {#4} ~ \fp_eval:n {#5} ~ + 0 ~ 0 + } \hbox_overlap_right:n { \box_use:N #1 } - \tex_special:D { pdf:etrans } + \__driver_literal:n { pdf:etrans } \__driver_scope_end: } %% |