diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-27 21:26:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-27 21:26:25 +0000 |
commit | fe6cc7d43e9608cb5bb2533480000837d7cf4827 (patch) | |
tree | 3098f2a8b1933b247a3aa7f6b58bb4e7dcca58f0 /Master/texmf-dist/tex/generic/xint/xintkernel.sty | |
parent | 654d2d2ad9ef4fc4de9cfd3b3d6038ef14ad4161 (diff) |
xint (27jul17)
git-svn-id: svn://tug.org/texlive/trunk@44900 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintkernel.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty index b710be4d9c1..92af7369012 100644 --- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty +++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.2k 2017/01/06 +%% The xint bundle 1.2l 2017/07/26 %% Copyright (C) 2013-2017 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- @@ -126,7 +126,7 @@ \catcode36=3 % $ \catcode91=12 % [ \catcode93=12 % ] - \catcode33=12 % ! + \catcode33=12 % ! (xintexpr.sty will use catcode 11) \catcode64=11 % @ LETTER \catcode38=7 % & for \romannumeral`&&@ trick. \catcode124=12 % | @@ -156,7 +156,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2017/01/06 1.2k Paraphernalia for the xint packages (JFB)]% + [2017/07/26 1.2l Paraphernalia for the xint packages (JFB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -168,6 +168,7 @@ \chardef\xint_c_viii 8 \chardef\xint_c_ix 9 \chardef\xint_c_x 10 +\chardef\xint_c_xii 12 \chardef\xint_c_xiv 14 \chardef\xint_c_xvi 16 \chardef\xint_c_xviii 18 @@ -222,11 +223,9 @@ \long\def\xint_gob_til_zeros_iii #1000{}% \long\def\xint_gob_til_zeros_iv #10000{}% \long\def\xint_gob_til_eightzeroes #100000000{}% -\long\def\xint_gob_til_exclam #1!{}% catcode 12 exclam \long\def\xint_gob_til_dot #1.{}% \long\def\xint_gob_til_G #1G{}% \long\def\xint_gob_til_minus #1-{}% -\long\def\xint_gob_til_relax #1\relax {}% \long\def\xint_UDzerominusfork #10-#2#3\krof {#2}% \long\def\xint_UDzerofork #10#2#3\krof {#2}% \long\def\xint_UDsignfork #1-#2#3\krof {#2}% @@ -235,9 +234,11 @@ \long\def\xint_UDzerosfork #100#2#3\krof {#2}% \long\def\xint_UDonezerofork #110#2#3\krof {#2}% \long\def\xint_UDsignsfork #1--#2#3\krof {#2}% -\let\xint_relax\relax -\def\xint_brelax {\xint_relax }% -\long\def\xint_gob_til_xint_relax #1\xint_relax {}% +\let\xint:\char +\long\def\xint_gob_til_xint:#1\xint:{}% +\def\xint_bracedstopper{\xint:}% +\long\def\xint_gob_til_exclam #1!{}% +\long\def\xint_gob_til_sc #1;{}% \long\def\xint_afterfi #1#2\fi {\fi #1}% \long\def\xint_bye #1\xint_bye {}% \long\def\xint_Bye #1\xint_bye {}% @@ -261,36 +262,36 @@ \long\def\xintreverseorder #1% {% \XINT_rord_main {}#1% - \xint_relax + \xint: \xint_bye\xint_bye\xint_bye\xint_bye \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax + \xint: }% \long\def\XINT_rord_main #1#2#3#4#5#6#7#8#9% {% \xint_bye #9\XINT_rord_cleanup\xint_bye \XINT_rord_main {#9#8#7#6#5#4#3#2#1}% }% -\long\edef\XINT_rord_cleanup\xint_bye\XINT_rord_main #1#2\xint_relax +\def\XINT_rord_cleanup #1{% +\long\def\XINT_rord_cleanup\xint_bye\XINT_rord_main ##1##2\xint: {% - \noexpand\expandafter\space\noexpand\xint_gob_til_xint_relax #1% -}% + \expandafter#1\xint_gob_til_xint: ##1% +}}\XINT_rord_cleanup { }% \def\xintLength {\romannumeral0\xintlength }% \def\xintlength #1{\long\def\xintlength ##1% {% \expandafter#1\the\numexpr\XINT_length_loop - ##1\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax - \xint_c_viii\xint_c_vii\xint_c_vi\xint_c_v - \xint_c_iv\xint_c_iii\xint_c_ii\xint_c_i\xint_c_\xint_bye + ##1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint: + \xint_c_viii\xint_c_vii\xint_c_vi\xint_c_v + \xint_c_iv\xint_c_iii\xint_c_ii\xint_c_i\xint_c_\xint_bye \relax }}\xintlength{ }% \long\def\XINT_length_loop #1#2#3#4#5#6#7#8#9% {% - \xint_gob_til_xint_relax #9\XINT_length_finish_a\xint_relax + \xint_gob_til_xint: #9\XINT_length_finish_a\xint: \xint_c_ix+\XINT_length_loop }% -\def\XINT_length_finish_a\xint_relax\xint_c_ix+\XINT_length_loop +\def\XINT_length_finish_a\xint:\xint_c_ix+\XINT_length_loop #1#2#3#4#5#6#7#8#9% {% #9\xint_bye @@ -299,15 +300,15 @@ \long\def\xintlastitem #1% {% \XINT_last_loop {}.#1% - {\xint_relax\XINT_last_loop_enda}{\xint_relax\XINT_last_loop_endb}% - {\xint_relax\XINT_last_loop_endc}{\xint_relax\XINT_last_loop_endd}% - {\xint_relax\XINT_last_loop_ende}{\xint_relax\XINT_last_loop_endf}% - {\xint_relax\XINT_last_loop_endg}{\xint_relax\XINT_last_loop_endh}\xint_bye + {\xint:\XINT_last_loop_enda}{\xint:\XINT_last_loop_endb}% + {\xint:\XINT_last_loop_endc}{\xint:\XINT_last_loop_endd}% + {\xint:\XINT_last_loop_ende}{\xint:\XINT_last_loop_endf}% + {\xint:\XINT_last_loop_endg}{\xint:\XINT_last_loop_endh}\xint_bye }% \long\def\XINT_last_loop #1.#2#3#4#5#6#7#8#9% {% - \xint_gob_til_xint_relax #9% - {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint_relax + \xint_gob_til_xint: #9% + {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint: \XINT_last_loop {#9}.% }% \long\def\XINT_last_loop_enda #1#2\xint_bye{ #1}% @@ -322,8 +323,7 @@ \long\def\xintlengthupto #1#2% {% \expandafter\XINT_lengthupto_loop - \the\numexpr#1.#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax + \the\numexpr#1.#2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint: \xint_c_vii\xint_c_vi\xint_c_v\xint_c_iv \xint_c_iii\xint_c_ii\xint_c_i\xint_c_\xint_bye.% }% @@ -337,10 +337,10 @@ \long\def\XINT_lengthupto_gt #1\xint_bye.{-0}% \long\def\XINT_lengthupto_loop #1.#2#3#4#5#6#7#8#9% {% - \xint_gob_til_xint_relax #9\XINT_lengthupto_finish_a\xint_relax + \xint_gob_til_xint: #9\XINT_lengthupto_finish_a\xint:% \expandafter\XINT_lengthupto_loop_a\the\numexpr #1-\xint_c_viii.% }% -\def\XINT_lengthupto_finish_a\xint_relax\expandafter\XINT_lengthupto_loop_a +\def\XINT_lengthupto_finish_a\xint:\expandafter\XINT_lengthupto_loop_a \the\numexpr #1-\xint_c_viii.#2#3#4#5#6#7#8#9% {% \expandafter\XINT_lengthupto_finish_b\the\numexpr #1-#9\xint_bye @@ -508,10 +508,18 @@ \expandafter\edef\csname XINT_g68\endcsname {\noexpand\csname XINT_g67\expandafter\noexpand\csname XINT_g61\endcsname}% \def\xintMessage #1#2#3{% - \immediate\write128{Package #1 #2: (on line \the\inputlineno)}% - \immediate\write128{\space\space\space\space#3}% + \immediate\write128{Package #1 #2: (on line \the\inputlineno)}% + \immediate\write128{\space\space\space\space#3}% }% \newif\ifxintverbose +\def\XINT_expandableerror #1#2{% + \def\XINT_expandableerror ##1{% + \expandafter\expandafter\expandafter + \XINT_expandableerror_continue\xint_firstofone{#2#1##1#1}}% + \def\XINT_expandableerror_continue ##1#1##2#1{##1}% +}% +\begingroup\lccode`$ 32 \catcode`/ 11 \catcode`! 11 \catcode32 11 % +\lowercase{\endgroup\XINT_expandableerror$\ ! /}% \XINT_restorecatcodes_endinput% \endinput %% |