diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintkernel.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 299 |
1 files changed, 253 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty index 8a688ec26e1..b887988dcb5 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- @@ -156,7 +156,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2016/11/20 1.2h Paraphernalia for the xint packages (JFB)]% + [2016/12/13 1.2i Paraphernalia for the xint packages (JFB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -197,7 +197,7 @@ \let\XINT_tmpa\relax \let\XINT_tmpb\relax \ifdefined\space\else\def\space { }\fi \ifdefined\empty\else\def\empty {}\fi -\long\def\xint_gobble_ {}% +\let\xint_gobble_\empty \long\def\xint_gobble_i #1{}% \long\def\xint_gobble_ii #1#2{}% \long\def\xint_gobble_iii #1#2#3{}% @@ -213,45 +213,47 @@ \long\def\xint_firstofone_thenstop #1{ #1}% \long\def\xint_firstoftwo_thenstop #1#2{ #1}% \long\def\xint_secondoftwo_thenstop #1#2{ #2}% -\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}% +\long\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}% \long\def\xint_gob_til_R #1\R {}% \long\def\xint_gob_til_W #1\W {}% \long\def\xint_gob_til_Z #1\Z {}% -\def\xint_gob_til_zero #10{}% -\def\xint_gob_til_one #11{}% -\def\xint_gob_til_zeros_iii #1000{}% -\def\xint_gob_til_zeros_iv #10000{}% -\def\xint_gob_til_eightzeroes #100000000{}% -\def\xint_gob_til_exclam #1!{}% catcode 12 exclam -\def\xint_gob_til_dot #1.{}% -\def\xint_gob_til_G #1G{}% -\def\xint_gob_til_minus #1-{}% -\def\xint_gob_til_relax #1\relax {}% -\def\xint_UDzerominusfork #10-#2#3\krof {#2}% -\def\xint_UDzerofork #10#2#3\krof {#2}% -\def\xint_UDsignfork #1-#2#3\krof {#2}% -\def\xint_UDwfork #1\W#2#3\krof {#2}% -\def\xint_UDXINTWfork #1\XINT_W#2#3\krof {#2}% -\def\xint_UDzerosfork #100#2#3\krof {#2}% -\def\xint_UDonezerofork #110#2#3\krof {#2}% -\def\xint_UDsignsfork #1--#2#3\krof {#2}% +\long\def\xint_gob_til_zero #10{}% +\long\def\xint_gob_til_one #11{}% +\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}% +\long\def\xint_UDwfork #1\W#2#3\krof {#2}% +\long\def\xint_UDXINTWfork #1\XINT_W#2#3\krof {#2}% +\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 {}% \long\def\xint_afterfi #1#2\fi {\fi #1}% \long\def\xint_bye #1\xint_bye {}% +\long\def\xint_Bye #1\xint_bye {}% +\long\def\xint_bye_thenstop #1\xint_bye { }% \long\def\xint_dothis #1#2\xint_orthat #3{\fi #1}% 1.1 \let\xint_orthat \xint_firstofone \long\def\xintdothis #1#2\xintorthat #3{\fi #1}% \let\xintorthat \xint_firstofone -\def\xint_zapspaces #1 #2{#1#2\xint_zapspaces }% 1.1 -\def\xint_zapspaces_o #1{\expandafter\xint_zapspaces#1 \xint_gobble_i}% +\long\def\xint_zapspaces #1 #2{#1#2\xint_zapspaces }% 1.1 +\long\def\xint_zapspaces_o #1{\expandafter\xint_zapspaces#1 \xint_gobble_i}% \def\xintodef #1{\expandafter\def\expandafter#1\expandafter }% \def\xintoodef #1{\expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#1% \expandafter\expandafter\expandafter }% -\def\xintfdef #1#2{\expandafter\def\expandafter#1\expandafter - {\romannumeral`&&@#2}}% +\def\xintfdef #1#2% + {\expandafter\def\expandafter#1\expandafter{\romannumeral`&&@#2}}% \ifdefined\odef\else\let\odef\xintodef\fi \ifdefined\oodef\else\let\oodef\xintoodef\fi \ifdefined\fdef\else\let\fdef\xintfdef\fi @@ -274,36 +276,241 @@ \noexpand\expandafter\space\noexpand\xint_gob_til_xint_relax #1% }% \def\xintLength {\romannumeral0\xintlength }% -\long\def\xintlength #1% +\long\edef\xintlength #1% {% - \XINT_length_loop - 0.#1\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye + \noexpand\expandafter\space + \noexpand\the\numexpr\xint_c_ix\noexpand\XINT_length_loop + #1\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\noexpand\xint_bye + \relax }% -\long\def\XINT_length_loop #1.#2#3#4#5#6#7#8#9% +\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 - \expandafter\XINT_length_loop\the\numexpr #1+\xint_c_viii.% + +\xint_c_ix\XINT_length_loop +}% +\def\XINT_length_finish_a\xint_relax+\xint_c_ix\XINT_length_loop + #1#2#3#4#5#6#7#8#9% +{% + -#9\xint_bye +}% +\def\xintLastItem {\romannumeral0\xintlastitem }% +\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 +}% +\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_last_loop {#9}.% +}% +\long\def\XINT_last_loop_enda #1#2\xint_bye{ #1}% +\long\def\XINT_last_loop_endb #1#2#3\xint_bye{ #2}% +\long\def\XINT_last_loop_endc #1#2#3#4\xint_bye{ #3}% +\long\def\XINT_last_loop_endd #1#2#3#4#5\xint_bye{ #4}% +\long\def\XINT_last_loop_ende #1#2#3#4#5#6\xint_bye{ #5}% +\long\def\XINT_last_loop_endf #1#2#3#4#5#6#7\xint_bye{ #6}% +\long\def\XINT_last_loop_endg #1#2#3#4#5#6#7#8\xint_bye{ #7}% +\long\def\XINT_last_loop_endh #1#2#3#4#5#6#7#8#9\xint_bye{ #8}% +\def\xintLengthUpTo {\romannumeral0\xintlengthupto}% +\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\xint_bye +}% +\def\XINT_lengthupto_loop #1% +{% + \xint_UDsignfork #1\XINT_lengthupto_gt-{\XINT_lengthupto_loop_a#1}\krof +}% +\long\def\XINT_lengthupto_gt #1\xint_bye{-0}% +\long\def\XINT_lengthupto_loop_a #1.#2#3#4#5#6#7#8#9% +{% + \xint_gob_til_xint_relax #9\XINT_lengthupto_finish_a\xint_relax + \expandafter\XINT_lengthupto_loop\the\numexpr #1-\xint_c_viii.% }% -\def\XINT_length_finish_a\xint_relax\expandafter\XINT_length_loop - \the\numexpr #1+\xint_c_viii.#2\xint_bye +\def\XINT_lengthupto_finish_a\xint_relax\expandafter\XINT_lengthupto_loop + \the\numexpr #1-\xint_c_viii.#2\xint_bye {% - \XINT_length_finish_b #2\W\W\W\W\W\W\W\Z {#1}% + \XINT_lengthupto_finish_b #2\W\W\W\W\W\W\W\Z {#1}% }% -\def\XINT_length_finish_b #1#2#3#4#5#6#7#8\Z +\def\XINT_lengthupto_finish_b #1#2#3#4#5#6#7#8\Z {% \xint_gob_til_W - #1\XINT_length_finish_c \xint_c_ - #2\XINT_length_finish_c \xint_c_i - #3\XINT_length_finish_c \xint_c_ii - #4\XINT_length_finish_c \xint_c_iii - #5\XINT_length_finish_c \xint_c_iv - #6\XINT_length_finish_c \xint_c_v - #7\XINT_length_finish_c \xint_c_vi - \W\XINT_length_finish_c \xint_c_vii\Z + #1\XINT_lengthupto_finish_c \xint_c_ + #2\XINT_lengthupto_finish_c \xint_c_i + #3\XINT_lengthupto_finish_c \xint_c_ii + #4\XINT_lengthupto_finish_c \xint_c_iii + #5\XINT_lengthupto_finish_c \xint_c_iv + #6\XINT_lengthupto_finish_c \xint_c_v + #7\XINT_lengthupto_finish_c \xint_c_vi + \W\XINT_lengthupto_finish_c \xint_c_vii\Z }% -\edef\XINT_length_finish_c #1#2\Z #3% - {\noexpand\expandafter\space\noexpand\the\numexpr #3+#1\relax}% +\def\XINT_lengthupto_finish_c #1#2\Z #3% + {\ifnum #1>#3 \xint_dothis{-0}\fi + \xint_orthat{\expandafter\space\the\numexpr#3-#1\relax}}% +\def\xintreplicate#1% + {\expandafter\XINT_replicate\the\numexpr#1\endcsname}% +\def\XINT_replicate #1{\xint_UDsignfork + #1\XINT_rep_neg + -\XINT_rep + \krof #1}% +\long\def\XINT_rep_neg #1\endcsname #2{\xint_c_}% +\def\XINT_rep #1{\csname XINT_rep_f#1\XINT_rep_a}% +\def\XINT_rep_a #1{\csname XINT_rep_#1\XINT_rep_a}% +\def\XINT_rep_\XINT_rep_a{\endcsname}% +\long\expandafter\def\csname XINT_rep_0\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}}% +\long\expandafter\def\csname XINT_rep_1\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1}% +\long\expandafter\def\csname XINT_rep_2\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1}% +\long\expandafter\def\csname XINT_rep_3\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1}% +\long\expandafter\def\csname XINT_rep_4\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_5\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_6\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_7\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_8\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_9\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f0\endcsname #1% + {\xint_c_}% +\long\expandafter\def\csname XINT_rep_f1\endcsname #1% + {\xint_c_ #1}% +\long\expandafter\def\csname XINT_rep_f2\endcsname #1% + {\xint_c_ #1#1}% +\long\expandafter\def\csname XINT_rep_f3\endcsname #1% + {\xint_c_ #1#1#1}% +\long\expandafter\def\csname XINT_rep_f4\endcsname #1% + {\xint_c_ #1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f5\endcsname #1% + {\xint_c_ #1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f6\endcsname #1% + {\xint_c_ #1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f7\endcsname #1% + {\xint_c_ #1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f8\endcsname #1% + {\xint_c_ #1#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f9\endcsname #1% + {\xint_c_ #1#1#1#1#1#1#1#1#1}% +\def\xintgobble #1% + {\csname xint_c_\expandafter\XINT_gobble_a\the\numexpr#1.0}% +\def\XINT_gobble #1.{\csname xint_c_\XINT_gobble_a #1.0}% +\def\XINT_gobble_a #1{\xint_gob_til_zero#1\XINT_gobble_d0\XINT_gobble_b#1}% +\def\XINT_gobble_b #1.#2% + {\expandafter\XINT_gobble_c + \the\numexpr (#1+\xint_c_v)/\xint_c_ix-\xint_c_i\expandafter.% + \the\numexpr #2+\xint_c_i.#1.}% +\def\XINT_gobble_c #1.#2.#3.% + {\csname XINT_g#2\the\numexpr#3-\xint_c_ix*#1\relax\XINT_gobble_a #1.#2}% +\def\XINT_gobble_d0\XINT_gobble_b0.#1{\endcsname}% +\expandafter\let\csname XINT_g10\endcsname\endcsname +\long\expandafter\def\csname XINT_g11\endcsname#1{\endcsname}% +\long\expandafter\def\csname XINT_g12\endcsname#1#2{\endcsname}% +\long\expandafter\def\csname XINT_g13\endcsname#1#2#3{\endcsname}% +\long\expandafter\def\csname XINT_g14\endcsname#1#2#3#4{\endcsname}% +\long\expandafter\def\csname XINT_g15\endcsname#1#2#3#4#5{\endcsname}% +\long\expandafter\def\csname XINT_g16\endcsname#1#2#3#4#5#6{\endcsname}% +\long\expandafter\def\csname XINT_g17\endcsname#1#2#3#4#5#6#7{\endcsname}% +\long\expandafter\def\csname XINT_g18\endcsname#1#2#3#4#5#6#7#8{\endcsname}% +\expandafter\let\csname XINT_g20\endcsname\endcsname +\long\expandafter\def\csname XINT_g21\endcsname #1#2#3#4#5#6#7#8#9% + {\endcsname}% +\long\expandafter\edef\csname XINT_g22\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g21\endcsname}% +\long\expandafter\edef\csname XINT_g23\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g22\endcsname}% +\long\expandafter\edef\csname XINT_g24\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g23\endcsname}% +\long\expandafter\edef\csname XINT_g25\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g24\endcsname}% +\long\expandafter\edef\csname XINT_g26\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g25\endcsname}% +\long\expandafter\edef\csname XINT_g27\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g26\endcsname}% +\long\expandafter\edef\csname XINT_g28\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g27\endcsname}% +\expandafter\let\csname XINT_g30\endcsname\endcsname +\long\expandafter\edef\csname XINT_g31\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g32\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g31\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g33\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g32\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g34\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g33\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g35\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g34\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g36\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g35\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g37\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g36\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g38\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g37\expandafter\noexpand\csname XINT_g28\endcsname}% +\expandafter\let\csname XINT_g40\endcsname\endcsname +\expandafter\edef\csname XINT_g41\endcsname + {\noexpand\csname XINT_g38\expandafter\noexpand\csname XINT_g31\endcsname}% +\expandafter\edef\csname XINT_g42\endcsname + {\noexpand\csname XINT_g41\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g43\endcsname + {\noexpand\csname XINT_g42\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g44\endcsname + {\noexpand\csname XINT_g43\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g45\endcsname + {\noexpand\csname XINT_g44\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g46\endcsname + {\noexpand\csname XINT_g45\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g47\endcsname + {\noexpand\csname XINT_g46\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g48\endcsname + {\noexpand\csname XINT_g47\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\let\csname XINT_g50\endcsname\endcsname +\expandafter\edef\csname XINT_g51\endcsname + {\noexpand\csname XINT_g48\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g52\endcsname + {\noexpand\csname XINT_g51\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g53\endcsname + {\noexpand\csname XINT_g52\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g54\endcsname + {\noexpand\csname XINT_g53\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g55\endcsname + {\noexpand\csname XINT_g54\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g56\endcsname + {\noexpand\csname XINT_g55\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g57\endcsname + {\noexpand\csname XINT_g56\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g58\endcsname + {\noexpand\csname XINT_g57\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\let\csname XINT_g60\endcsname\endcsname +\expandafter\edef\csname XINT_g61\endcsname + {\noexpand\csname XINT_g58\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g62\endcsname + {\noexpand\csname XINT_g61\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g63\endcsname + {\noexpand\csname XINT_g62\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g64\endcsname + {\noexpand\csname XINT_g63\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g65\endcsname + {\noexpand\csname XINT_g64\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g66\endcsname + {\noexpand\csname XINT_g65\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g67\endcsname + {\noexpand\csname XINT_g66\expandafter\noexpand\csname XINT_g61\endcsname}% +\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}% |