summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintkernel.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintkernel.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintkernel.sty80
1 files changed, 60 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
index 3fdf7040f4e..9d1680fdd7b 100644
--- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3f 2019/09/10
-%% Copyright (C) 2013-2019 by Jean-Francois Burnol
+%% The xint bundle 1.4 2020/01/31
+%% Copyright (C) 2013-2020 by Jean-Francois Burnol
%% xintkernel: Paraphernalia for the xint packages
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -136,6 +136,7 @@
\catcode126=3 % ~ MATH
\catcode59=12 % ;
\catcode0=12 % for \romannumeral`&&@ trick
+ \catcode1=3 % for ultra-safe s^^c3^^a9parateur &&A
}%
\XINT_setcatcodes
}%
@@ -156,7 +157,7 @@
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2019/09/10 v1.3f Paraphernalia for the xint packages (JFB)]%
+ [2020/01/31 v1.4 Paraphernalia for the xint packages (JFB)]%
\chardef\xint_c_ 0
\chardef\xint_c_i 1
\chardef\xint_c_ii 2
@@ -172,6 +173,7 @@
\chardef\xint_c_xiv 14
\chardef\xint_c_xvi 16
\chardef\xint_c_xviii 18
+\chardef\xint_c_xx 20
\chardef\xint_c_xxii 22
\chardef\xint_c_ii^v 32
\chardef\xint_c_ii^vi 64
@@ -190,23 +192,26 @@
\fi
\def\XINT_tmpa { }%
\ifx\XINT_tmpa\space\else
- \immediate\write-1{Package xintkernel Warning: ATTENTION!}%
+ \immediate\write-1{Package xintkernel Warning:}%
\immediate\write-1{\string\space\XINT_tmpa macro does not have its normal
- meaning.}%
- \immediate\write-1{\XINT_tmpa\XINT_tmpa\XINT_tmpa\XINT_tmpa
- All kinds of catastrophes will ensue!!!!}%
+ meaning from Plain or LaTeX, but:}%
+ \immediate\write-1{\meaning\space}%
+ \let\space\XINT_tmpa
+ \immediate\write-1{\space\space\space\space
+ % an exclam might let Emacs/AUCTeX think it is an error message, afair
+ Forcing \string\space\space to be the usual one.}%
\fi
-\def\XINT_tmpb {}%
-\ifx\XINT_tmpb\empty\else
- \immediate\write-1{Package xintkernel Warning: ATTENTION!}%
- \immediate\write-1{\string\empty\XINT_tmpa macro does not have its normal
- meaning.}%
- \immediate\write-1{\XINT_tmpa\XINT_tmpa\XINT_tmpa\XINT_tmpa
- All kinds of catastrophes will ensue!!!!}%
+\def\XINT_tmpa {}%
+\ifx\XINT_tmpa\empty\else
+ \immediate\write-1{Package xintkernel Warning:}%
+ \immediate\write-1{\string\empty\space macro does not have its normal
+ meaning from Plain or LaTeX, but:}%
+ \immediate\write-1{\meaning\empty}%
+ \let\empty\XINT_tmpa
+ \immediate\write-1{\space\space\space\space
+ Forcing \string\empty\space to be the usual one.}%
\fi
-\let\XINT_tmpa\relax \let\XINT_tmpb\relax
-\ifdefined\space\else\def\space { }\fi
-\ifdefined\empty\else\def\empty {}\fi
+\let\XINT_tmpa\relax
\let\xint_gobble_\empty
\long\def\xint_gobble_i #1{}%
\long\def\xint_gobble_ii #1#2{}%
@@ -254,6 +259,7 @@
\long\def\xint_UDsignsfork #1--#2#3\krof {#2}%
\let\xint:\char
\long\def\xint_gob_til_xint:#1\xint:{}%
+\long\def\xint_gob_til_^#1^{}%
\def\xint_bracedstopper{\xint:}%
\long\def\xint_gob_til_exclam #1!{}%
\long\def\xint_gob_til_sc #1;{}%
@@ -296,7 +302,8 @@
\expandafter#1\xint_gob_til_xint: ##1%
}}\XINT_rord_cleanup { }%
\def\xintLength {\romannumeral0\xintlength }%
-\def\xintlength #1{\long\def\xintlength ##1%
+\def\xintlength #1{%
+\long\def\xintlength ##1%
{%
\expandafter#1\the\numexpr\XINT_length_loop
##1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
@@ -337,6 +344,37 @@
\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\xintFirstItem {\romannumeral0\xintfirstitem }%
+\long\def\xintfirstitem #1{\XINT_firstitem #1{\xint:\XINT_firstitem_end}\xint_bye}%
+\long\def\XINT_firstitem #1#2\xint_bye{\xint_gob_til_xint: #1\xint:\space #1}%
+\def\XINT_firstitem_end\xint:{ }%
+\def\xintLastOne {\romannumeral0\xintlastone }%
+\long\def\xintlastone #1%
+{%
+ \XINT_lastone_loop {}.#1%
+ {\xint:\XINT_lastone_loop_enda}{\xint:\XINT_lastone_loop_endb}%
+ {\xint:\XINT_lastone_loop_endc}{\xint:\XINT_lastone_loop_endd}%
+ {\xint:\XINT_lastone_loop_ende}{\xint:\XINT_lastone_loop_endf}%
+ {\xint:\XINT_lastone_loop_endg}{\xint:\XINT_lastone_loop_endh}\xint_bye
+}%
+\long\def\XINT_lastone_loop #1.#2#3#4#5#6#7#8#9%
+{%
+ \xint_gob_til_xint: #9%
+ {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint:
+ \XINT_lastone_loop {{#9}}.%
+}%
+\long\def\XINT_lastone_loop_enda #1#2\xint_bye{{#1}}%
+\long\def\XINT_lastone_loop_endb #1#2#3\xint_bye{{#2}}%
+\long\def\XINT_lastone_loop_endc #1#2#3#4\xint_bye{{#3}}%
+\long\def\XINT_lastone_loop_endd #1#2#3#4#5\xint_bye{{#4}}%
+\long\def\XINT_lastone_loop_ende #1#2#3#4#5#6\xint_bye{{#5}}%
+\long\def\XINT_lastone_loop_endf #1#2#3#4#5#6#7\xint_bye{{#6}}%
+\long\def\XINT_lastone_loop_endg #1#2#3#4#5#6#7#8\xint_bye{{#7}}%
+\long\def\XINT_lastone_loop_endh #1#2#3#4#5#6#7#8#9\xint_bye{ #8}%
+\def\xintFirstOne {\romannumeral0\xintfirstone }%
+\long\def\xintfirstone #1{\XINT_firstone #1{\xint:\XINT_firstone_empty}\xint:}%
+\long\def\XINT_firstone #1#2\xint:{\xint_gob_til_xint: #1\xint:{#1}}%
+\def\XINT_firstone_empty\xint:#1{ }%
\def\xintLengthUpTo {\romannumeral0\xintlengthupto}%
\long\def\xintlengthupto #1#2%
{%
@@ -370,6 +408,7 @@
-{ #1#2}%
\krof
}%
+\def\xintReplicate{\romannumeral\xintreplicate}%
\def\xintreplicate#1%
{\expandafter\XINT_replicate\the\numexpr#1\endcsname}%
\def\XINT_replicate #1{\xint_UDsignfork
@@ -420,6 +459,7 @@
{\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{\romannumeral\xintgobble}%
\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}%
@@ -579,8 +619,8 @@
\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$\ ! /\let\ ! /\xint_undefined}% $
+\begingroup\lccode`$ 32 \catcode`/ 11 % $
+\lowercase{\endgroup\XINT_expandableerror$\xint/\let\xint/\xint_undefined}% $
\XINT_restorecatcodes_endinput%
\endinput
%%