summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-28 23:21:36 +0000
committerKarl Berry <karl@freefriends.org>2013-11-28 23:21:36 +0000
commit6107abc859b998f72e77750454e95a1c076d22b7 (patch)
tree67151befe44cbd2232f894ef49ddf5d526fb06b0 /Master/texmf-dist/tex/generic/xint
parent868273a311e482b0f2d4f227e52b51841c08253f (diff)
xint (28nov13)
git-svn-id: svn://tug.org/texlive/trunk@32271 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xint.sty44
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintbinhex.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcfrac.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty29
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintfrac.sty42
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintgcd.sty63
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintseries.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xinttools.sty300
8 files changed, 234 insertions, 256 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty
index da74f7916af..a2f9a610e2d 100644
--- a/Master/texmf-dist/tex/generic/xint/xint.sty
+++ b/Master/texmf-dist/tex/generic/xint/xint.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xint: Expandable operations on long numbers
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,10 +105,10 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xint}%
- [2013/11/22 v1.09g Expandable operations on long numbers (jfB)]%
-\def\xint_firstofthree #1#2#3{#1}%
-\def\xint_secondofthree #1#2#3{#2}%
-\def\xint_thirdofthree #1#2#3{#3}%
+ [2013/11/28 v1.09h Expandable operations on long numbers (jfB)]%
+\long\def\xint_firstofthree #1#2#3{#1}%
+\long\def\xint_secondofthree #1#2#3{#2}%
+\long\def\xint_thirdofthree #1#2#3{#3}%
\def\xint_gob_til_zero #10{}%
\def\xint_gob_til_zeros_iii #1000{}%
\def\xint_gob_til_zeros_iv #10000{}%
@@ -1530,12 +1530,12 @@
{\expandafter\XINT_iminof_b\romannumeral0\xintimin {#1}}%
\def\XINT_iminof_e #1\Z #2\Z { #2}%
\let\xintMinof\xintiMinof \let\xintminof\xintiminof
-\def\xintiSum {\romannumeral0\xintisum }%
-\def\xintisum #1{\xintisumexpr #1\relax }%
-\def\xintiSumExpr {\romannumeral0\xintisumexpr }%
-\def\xintisumexpr {\expandafter\XINT_sumexpr\romannumeral-`0}%
-\let\xintSum\xintiSum \let\xintsum\xintisum
-\let\xintSumExpr\xintiSumExpr \let\xintsumexpr\xintisumexpr
+\def\xintiiSum {\romannumeral0\xintiisum }%
+\def\xintiisum #1{\xintiisumexpr #1\relax }%
+\def\xintiiSumExpr {\romannumeral0\xintiisumexpr }%
+\def\xintiisumexpr {\expandafter\XINT_sumexpr\romannumeral-`0}%
+\let\xintSum\xintiiSum \let\xintsum\xintiisum
+\let\xintSumExpr\xintiiSumExpr \let\xintsumexpr\xintiisumexpr
\def\XINT_sumexpr {\XINT_sum_loop {0000}{0000}}%
\def\XINT_sum_loop #1#2#3%
{%
@@ -1968,14 +1968,14 @@
\XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z
\Z\Z\Z\Z #1\W\W\W\W
}%
-\def\xintiPrd {\romannumeral0\xintiprd }%
-\def\xintiprd #1{\xintiprdexpr #1\relax }%
-\let\xintPrd\xintiPrd
-\let\xintprd\xintiprd
-\def\xintiPrdExpr {\romannumeral0\xintiprdexpr }%
-\def\xintiprdexpr {\expandafter\XINT_prdexpr\romannumeral-`0}%
-\let\xintPrdExpr\xintiPrdExpr
-\let\xintprdexpr\xintiprdexpr
+\def\xintiiPrd {\romannumeral0\xintiiprd }%
+\def\xintiiprd #1{\xintiiprdexpr #1\relax }%
+\let\xintPrd\xintiiPrd
+\let\xintprd\xintiiprd
+\def\xintiiPrdExpr {\romannumeral0\xintiiprdexpr }%
+\def\xintiiprdexpr {\expandafter\XINT_prdexpr\romannumeral-`0}%
+\let\xintPrdExpr\xintiiPrdExpr
+\let\xintprdexpr\xintiiprdexpr
\def\XINT_prdexpr {\XINT_prod_loop_a 1\Z }%
\def\XINT_prod_loop_a #1\Z #2%
{%
@@ -1996,11 +1996,7 @@
{%
\expandafter\XINT_fac_fork\expandafter{\the\numexpr #1}%
}%
-\def\xintFac {\romannumeral0\xintfac }%
-\def\xintfac #1%
-{%
- \expandafter\XINT_fac_fork\expandafter{\romannumeral0\xintnum{#1}}%
-}%
+\let\xintFac\xintiFac \let\xintfac\xintifac
\def\XINT_fac_fork #1%
{%
\ifcase\XINT_Sgn {#1}
diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
index 398a240f692..c6f5f4c3ec0 100644
--- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xintbinhex: Expandable binary and hexadecimal conversions
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,7 +105,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2013/11/22 v1.09g Expandable binary and hexadecimal conversions (jfB)]%
+ [2013/11/28 v1.09h Expandable binary and hexadecimal conversions (jfB)]%
\chardef\xint_c_xvi 16
\chardef\xint_c_ii^v 32
\chardef\xint_c_ii^vi 64
diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
index 23fcc93cdc4..ec890d28333 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xintcfrac: Expandable continued fractions with xint package
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,7 +105,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2013/11/22 v1.09g Expandable continued fractions with xint package (jfB)]%
+ [2013/11/28 v1.09h Expandable continued fractions with xint package (jfB)]%
\def\xintCFrac {\romannumeral0\xintcfrac }%
\def\xintcfrac #1%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index b8ec31f6495..73cd012e331 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xintexpr: Expandable expression parser
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,7 +105,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2013/11/22 v1.09g Expandable expression parser (jfB)]%
+ [2013/11/28 v1.09h Expandable expression parser (jfB)]%
\def\xint_gob_til_dot #1.{}%
\def\xint_gob_til_dot_andstop #1.{ }%
\def\xint_gob_til_! #1!{}% nota bene: ! is of catcode 11
@@ -726,7 +726,7 @@
\def\XINT_flexpr_func_max #1#2#3%
{%
\expandafter #1\expandafter #2\csname
- .\xintFloatMaxof:csv{\XINT_expr_unlock #3}\endcsname
+ .\XINTinFloatMaxof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_min #1#2#3%
{%
@@ -736,7 +736,7 @@
\def\XINT_flexpr_func_min #1#2#3%
{%
\expandafter #1\expandafter #2\csname
- .\xintFloatMinof:csv{\XINT_expr_unlock #3}\endcsname
+ .\XINTinFloatMinof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_sum #1#2#3%
{%
@@ -746,7 +746,7 @@
\def\XINT_flexpr_func_sum #1#2#3%
{%
\expandafter #1\expandafter #2\csname
- .\xintFloatSum:csv{\XINT_expr_unlock #3}\endcsname
+ .\XINTinFloatSum:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_prd #1#2#3%
{%
@@ -756,7 +756,7 @@
\def\XINT_flexpr_func_prd #1#2#3%
{%
\expandafter #1\expandafter #2\csname
- .\xintFloatPrd:csv{\XINT_expr_unlock #3}\endcsname
+ .\XINTinFloatPrd:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_expr_func_add\XINT_expr_func_sum
\let\XINT_expr_func_mul\XINT_expr_func_prd
@@ -820,7 +820,7 @@
\expandafter\xint_secondoftwo
\fi
{_xintListWithSep,{#1}}{\xint_firstofone#1}}%
-\xintForpair #1#2 in {(fl,Float),(num,iRound0),(bool,IsTrue)} \do {%
+\xintForpair #1#2 in {(fl,Float),(num,iRound0),(bool,IsTrue)}\do {%
\expandafter\def\csname XINT_new#1expr_print\endcsname
##1{\ifnum\xintNthElt{0}{##1}>1
\expandafter\xint_firstoftwo
@@ -832,18 +832,21 @@
\toks0 {}%
\xintFor #1 in {Bool,Toggle,Floor,Ceil,iRound,Round,iTrunc,Trunc,%
Lt,Gt,Eq,AND,OR,IsNotZero,IsZero,ifNotZero,ifSgn,%
- Irr,Num,Abs,Sgn,Opp,Quo,Rem,Add,Sub,Mul,Sqr,Div,Pow,Fac,fE} \do
+ Irr,Num,Abs,Sgn,Opp,Quo,Rem,Add,Sub,Mul,Sqr,Div,Pow,Fac,fE}\do
{\toks0
\expandafter{\the\toks0\expandafter\def\csname xint#1\endcsname {_xint#1}}}%
-\xintFor #1 in {GCDof,LCMof,Maxof,Minof,ANDof,ORof,XORof,%
- FloatMaxof,FloatMinof,Sum,Prd,FloatSum,FloatPrd} \do
+\xintFor #1 in {GCDof,LCMof,Maxof,Minof,ANDof,ORof,XORof,Sum,Prd}\do
{\toks0
\expandafter{\the\toks0\expandafter\def\csname xint#1:csv\endcsname
- ####1{_xint#1 {\xintCSVtoListNonStripped {####1}}}}}%
-\xintFor #1 in {,Sqrt,Add,Sub,Mul,Div,Power,fE} \do
+ ####1{_xint#1{\xintCSVtoListNonStripped {####1}}}}}%
+\xintFor #1 in {Maxof,Minof,Sum,Prd}\do
+ {\toks0
+ \expandafter{\the\toks0\expandafter\def\csname XINTinFloat#1:csv\endcsname
+ ####1{_XINTinFloat#1{\xintCSVtoListNonStripped {####1}}}}}%
+\xintFor #1 in {,Sqrt,Add,Sub,Mul,Div,Power,fE}\do
{\toks0
\expandafter{\the\toks0\expandafter\def\csname XINTinFloat#1\endcsname
- {_XINTinFloat#1}}}%
+ {_XINTinFloat#1}}}%
\expandafter\def\expandafter\XINT_expr_protect\expandafter{\the\toks0
\def\XINTdigits {_XINTdigits}%
\def\XINT_expr_print ##1{\expandafter\XINT_newexpr_print\expandafter
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index 0dbbf609461..627ea69c50f 100644
--- a/Master/texmf-dist/tex/generic/xint/xintfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xintfrac: Expandable operations on fractions
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,7 +105,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2013/11/22 v1.09g Expandable operations on fractions (jfB)]%
+ [2013/11/28 v1.09h Expandable operations on fractions (jfB)]%
\chardef\xint_c_vi 6
\chardef\xint_c_vii 7
\chardef\xint_c_xviii 18
@@ -1541,8 +1541,8 @@
\else\expandafter\XINT_maxof:_d\fi #1}%
\def\XINT_maxof:_d #1,{\expandafter\XINT_maxof:_b\romannumeral0\xintmax {#1}}%
\def\XINT_maxof:_e ,#1,{#1}%
-\def\xintFloatMaxof {\romannumeral0\xintflmaxof }%
-\def\xintflmaxof #1{\expandafter\XINT_flmaxof_a\romannumeral-`0#1\relax }%
+\def\XINTinFloatMaxof {\romannumeral0\XINTinfloatmaxof }%
+\def\XINTinfloatmaxof #1{\expandafter\XINT_flmaxof_a\romannumeral-`0#1\relax }%
\def\XINT_flmaxof_a #1{\expandafter\XINT_flmaxof_b
\romannumeral0\XINT_inFloat [\XINTdigits]{#1}\Z }%
\def\XINT_flmaxof_b #1\Z #2%
@@ -1553,7 +1553,7 @@
{\expandafter\XINT_flmaxof_b\romannumeral0\xintmax
{\XINTinFloat [\XINTdigits]{#1}}}%
\def\XINT_flmaxof_e #1\Z #2\Z { #2}%
-\def\xintFloatMaxof:csv #1{\expandafter\XINT_flmaxof:_a\romannumeral-`0#1,,}%
+\def\XINTinFloatMaxof:csv #1{\expandafter\XINT_flmaxof:_a\romannumeral-`0#1,,}%
\def\XINT_flmaxof:_a #1,{\expandafter\XINT_flmaxof:_b
\romannumeral0\XINT_inFloat [\XINTdigits]{#1},}%
\def\XINT_flmaxof:_b #1,#2,%
@@ -1614,8 +1614,8 @@
\else\expandafter\XINT_minof:_d\fi #1}%
\def\XINT_minof:_d #1,{\expandafter\XINT_minof:_b\romannumeral0\xintmin {#1}}%
\def\XINT_minof:_e ,#1,{#1}%
-\def\xintFloatMinof {\romannumeral0\xintflminof }%
-\def\xintflminof #1{\expandafter\XINT_flminof_a\romannumeral-`0#1\relax }%
+\def\XINTinFloatMinof {\romannumeral0\XINTinfloatminof }%
+\def\XINTinfloatminof #1{\expandafter\XINT_flminof_a\romannumeral-`0#1\relax }%
\def\XINT_flminof_a #1{\expandafter\XINT_flminof_b
\romannumeral0\XINT_inFloat [\XINTdigits]{#1}\Z }%
\def\XINT_flminof_b #1\Z #2%
@@ -1626,7 +1626,7 @@
{\expandafter\XINT_flminof_b\romannumeral0\xintmin
{\XINTinFloat [\XINTdigits]{#1}}}%
\def\XINT_flminof_e #1\Z #2\Z { #2}%
-\def\xintFloatMinof:csv #1{\expandafter\XINT_flminof:_a\romannumeral-`0#1,,}%
+\def\XINTinFloatMinof:csv #1{\expandafter\XINT_flminof:_a\romannumeral-`0#1,,}%
\def\XINT_flminof:_a #1,{\expandafter\XINT_flminof:_b
\romannumeral0\XINT_inFloat [\XINTdigits]{#1},}%
\def\XINT_flminof:_b #1,#2,%
@@ -1742,8 +1742,8 @@
\def\xint_fsgn #1#2#3{\xintiisgn {#2}}%
\def\xintFloatAdd {\romannumeral0\xintfloatadd }%
\def\xintfloatadd #1{\XINT_fladd_chkopt \xintfloat #1\Z }%
-\def\XINTinFloatAdd {\romannumeral0\XINTinfloatadd }%
-\def\XINTinfloatadd #1{\XINT_fladd_chkopt \XINT_inFloat #1\Z }%
+\def\XINTinFloatAdd {\romannumeral0\XINTinfloatadd }%
+\def\XINTinfloatadd #1{\XINT_fladd_chkopt \XINT_inFloat #1\Z }%
\def\XINT_fladd_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_fladd_opt
@@ -1861,19 +1861,19 @@
\expandafter\XINT_FL_Div_b\romannumeral0\XINT_inFloat [#1]{#3}#2%
}%
\def\XINT_FL_Div_b #1[#2]#3[#4]{\xintE{#3/#1}{#4-#2}}%
-\def\xintFloatSum {\romannumeral0\xintfloatsum }%
-\def\xintfloatsum #1{\expandafter\XINT_floatsum_a\romannumeral-`0#1\relax }%
+\def\XINTinFloatSum {\romannumeral0\XINTinfloatsum }%
+\def\XINTinfloatsum #1{\expandafter\XINT_floatsum_a\romannumeral-`0#1\relax }%
\def\XINT_floatsum_a #1{\expandafter\XINT_floatsum_b
- \romannumeral0\xintraw{#1}\Z }% normalizes if only 1
-\def\XINT_floatsum_b #1\Z #2% but a bit wasteful
+ \romannumeral0\XINT_inFloat[\XINTdigits]{#1}\Z }%
+\def\XINT_floatsum_b #1\Z #2%
{\expandafter\XINT_floatsum_c\romannumeral-`0#2\Z {#1}\Z}%
\def\XINT_floatsum_c #1%
{\xint_gob_til_relax #1\XINT_floatsum_e\relax\XINT_floatsum_d #1}%
\def\XINT_floatsum_d #1\Z
{\expandafter\XINT_floatsum_b\romannumeral0\XINTinfloatadd {#1}}%
\def\XINT_floatsum_e #1\Z #2\Z { #2}%
-\def\xintFloatSum:csv #1{\expandafter\XINT_floatsum:_a\romannumeral-`0#1,,^}%
-\def\XINT_floatsum:_a {\XINT_floatsum:_b {0/1[0]}}%
+\def\XINTinFloatSum:csv #1{\expandafter\XINT_floatsum:_a\romannumeral-`0#1,,^}%
+\def\XINT_floatsum:_a {\XINT_floatsum:_b {0[0]}}% was 0/1[0] prior to 1.09h
\def\XINT_floatsum:_b #1#2,%
{\expandafter\XINT_floatsum:_c\romannumeral-`0#2,{#1}}%
\def\XINT_floatsum:_c #1{\if #1,\expandafter\XINT_floatsum:_e
@@ -1881,10 +1881,10 @@
\def\XINT_floatsum:_d #1,#2{\expandafter\XINT_floatsum:_b\expandafter
{\romannumeral0\XINTinfloatadd {#2}{#1}}}%
\def\XINT_floatsum:_e ,#1#2^{#1}% allows empty list
-\def\xintFloatPrd {\romannumeral0\xintfloatprd }%
-\def\xintfloatprd #1{\expandafter\XINT_floatprd_a\romannumeral-`0#1\relax }%
+\def\XINTinFloatPrd {\romannumeral0\XINTinfloatprd }%
+\def\XINTinfloatprd #1{\expandafter\XINT_floatprd_a\romannumeral-`0#1\relax }%
\def\XINT_floatprd_a #1{\expandafter\XINT_floatprd_b
- \romannumeral0\xintraw{#1}\Z }%
+ \romannumeral0\XINT_inFloat[\XINTdigits]{#1}\Z }%
\def\XINT_floatprd_b #1\Z #2%
{\expandafter\XINT_floatprd_c\romannumeral-`0#2\Z {#1}\Z}%
\def\XINT_floatprd_c #1%
@@ -1892,8 +1892,8 @@
\def\XINT_floatprd_d #1\Z
{\expandafter\XINT_floatprd_b\romannumeral0\XINTinfloatmul {#1}}%
\def\XINT_floatprd_e #1\Z #2\Z { #2}%
-\def\xintFloatPrd:csv #1{\expandafter\XINT_floatprd:_a\romannumeral-`0#1,,^}%
-\def\XINT_floatprd:_a {\XINT_floatprd:_b {1/1[0]}}%
+\def\XINTinFloatPred:csv #1{\expandafter\XINT_floatprd:_a\romannumeral-`0#1,,^}%
+\def\XINT_floatprd:_a {\XINT_floatprd:_b {1[0]}}% was 1/1[0] prior to 1.09h
\def\XINT_floatprd:_b #1#2,%
{\expandafter\XINT_floatprd:_c\romannumeral-`0#2,{#1}}%
\def\XINT_floatprd:_c #1{\if #1,\expandafter\XINT_floatprd:_e
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index a6e141b3084..7e0b39b038a 100644
--- a/Master/texmf-dist/tex/generic/xint/xintgcd.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xintgcd: Euclidean algorithm with xint package
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,7 +105,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2013/11/22 v1.09g Euclide algorithm with xint package (jfB)]%
+ [2013/11/28 v1.09h Euclide algorithm with xint package (jfB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1%
{%
@@ -446,48 +446,43 @@
\xintAssignArray\xintEuclideAlgorithm {#1}{#2}\to\U
\edef\A{\U2}\edef\B{\U4}\edef\N{\U1}%
\setbox 0 \vbox{\halign {$##$\cr \A\cr \B \cr}}%
- \noindent
- \XINT_count 1
- \loop
- \hbox to \wd 0 {\hfil$\U{\numexpr 2*\XINT_count\relax}$}%
- ${} = \U{\numexpr 2*\XINT_count + 3\relax}
- \times \U{\numexpr 2*\XINT_count + 2\relax}
- + \U{\numexpr 2*\XINT_count + 4\relax}$%
- \ifnum \XINT_count < \N
- \hfill\break
- \advance \XINT_count 1
+ \count 255 1
+ \xintloop
+ \indent\hbox to \wd 0 {\hfil$\U{\numexpr 2*\count255\relax}$}%
+ ${} = \U{\numexpr 2*\count255 + 3\relax}
+ \times \U{\numexpr 2*\count255 + 2\relax}
+ + \U{\numexpr 2*\count255 + 4\relax}$%
+ \ifnum \count255 < \N
+ \par
+ \advance \count255 1
\repeat
- \par
\endgroup
}%
\def\xintTypesetBezoutAlgorithm #1#2%
{%
\par
\begingroup
- \parindent0pt
\xintAssignArray\xintBezoutAlgorithm {#1}{#2}\to\BEZ
\edef\A{\BEZ2}\edef\B{\BEZ6}\edef\N{\BEZ1}% A = |#1|, B = |#2|
\setbox 0 \vbox{\halign {$##$\cr \A\cr \B \cr}}%
- \XINT_count 1
- \loop
- \noindent
- \hbox to \wd 0 {\hfil$\BEZ{4*\XINT_count - 2}$}%
- ${} = \BEZ{4*\XINT_count + 5}
- \times \BEZ{4*\XINT_count + 2}
- + \BEZ{4*\XINT_count + 6}$\hfill\break
- \hbox to \wd 0 {\hfil$\BEZ{4*\XINT_count +7}$}%
- ${} = \BEZ{4*\XINT_count + 5}
- \times \BEZ{4*\XINT_count + 3}
- + \BEZ{4*\XINT_count - 1}$\hfill\break
- \hbox to \wd 0 {\hfil$\BEZ{4*\XINT_count +8}$}%
- ${} = \BEZ{4*\XINT_count + 5}
- \times \BEZ{4*\XINT_count + 4}
- + \BEZ{4*\XINT_count }$
- \endgraf
- \ifnum \XINT_count < \N
- \advance \XINT_count 1
+ \count255 1
+ \xintloop
+ \indent\hbox to \wd 0 {\hfil$\BEZ{4*\count255 - 2}$}%
+ ${} = \BEZ{4*\count255 + 5}
+ \times \BEZ{4*\count255 + 2}
+ + \BEZ{4*\count255 + 6}$\hfill\break
+ \hbox to \wd 0 {\hfil$\BEZ{4*\count255 +7}$}%
+ ${} = \BEZ{4*\count255 + 5}
+ \times \BEZ{4*\count255 + 3}
+ + \BEZ{4*\count255 - 1}$\hfill\break
+ \hbox to \wd 0 {\hfil$\BEZ{4*\count255 +8}$}%
+ ${} = \BEZ{4*\count255 + 5}
+ \times \BEZ{4*\count255 + 4}
+ + \BEZ{4*\count255 }$
+ \par
+ \ifnum \count255 < \N
+ \advance \count255 1
\repeat
- \par
\edef\U{\BEZ{4*\N + 4}}%
\edef\V{\BEZ{4*\N + 3}}%
\edef\D{\BEZ5}%
@@ -496,7 +491,7 @@
\else
$\U\times\A - \V\times\B = \D$%
\fi
- \par
+ \par
\endgroup
}%
\XINT_restorecatcodes_endinput%
diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty
index 0cd0f52fa8a..df153fe9ca3 100644
--- a/Master/texmf-dist/tex/generic/xint/xintseries.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintseries.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xintseries: Expandable partial sums with xint package
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -105,7 +105,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2013/11/22 v1.09g Expandable partial sums with xint package (jfB)]%
+ [2013/11/28 v1.09h Expandable partial sums with xint package (jfB)]%
\def\xintSeries {\romannumeral0\xintseries }%
\def\xintseries #1#2%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xinttools.sty b/Master/texmf-dist/tex/generic/xint/xinttools.sty
index 9e2fad8b5d6..17150430247 100644
--- a/Master/texmf-dist/tex/generic/xint/xinttools.sty
+++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.09g of November 22, 2013)
+%% The xint bundle (version 1.09h of November 28, 2013)
%% xinttools: Expandable and non-expandable utilities
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -152,37 +152,36 @@
\fi
\XINT_providespackage
\ProvidesPackage {xinttools}%
- [2013/11/22 v1.09g Expandable and non-expandable utilities (jfB)]%
-\def\xint_gobble_ {}%
-\def\xint_gobble_i #1{}%
-\def\xint_gobble_ii #1#2{}%
-\def\xint_gobble_iii #1#2#3{}%
-\def\xint_gobble_iv #1#2#3#4{}%
-\def\xint_gobble_v #1#2#3#4#5{}%
-\def\xint_gobble_vi #1#2#3#4#5#6{}%
-\def\xint_gobble_vii #1#2#3#4#5#6#7{}%
-\def\xint_gobble_viii #1#2#3#4#5#6#7#8{}%
-\long\def\xint_firstofone #1{#1}% long since 1.09f, 2013/11/01
-\xint_firstofone{\let\XINT_sptoken= } % 1.09d, 2013/10/22
-\long\def\xint_firstoftwo #1#2{#1}% long since 1.09e, 2013/10/28
-\long\def\xint_secondoftwo #1#2{#2}% idem
-\def\xint_firstoftwo_andstop #1#2{ #1}%
-\def\xint_secondoftwo_andstop #1#2{ #2}%
+ [2013/11/28 v1.09h Expandable and non-expandable utilities (jfB)]%
+\long\def\xint_gobble_ {}%
+\long\def\xint_gobble_i #1{}%
+\long\def\xint_gobble_ii #1#2{}%
+\long\def\xint_gobble_iii #1#2#3{}%
+\long\def\xint_gobble_iv #1#2#3#4{}%
+\long\def\xint_gobble_v #1#2#3#4#5{}%
+\long\def\xint_gobble_vi #1#2#3#4#5#6{}%
+\long\def\xint_gobble_vii #1#2#3#4#5#6#7{}%
+\long\def\xint_gobble_viii #1#2#3#4#5#6#7#8{}%
+\long\def\xint_firstofone #1{#1}%
+\xint_firstofone{\let\XINT_sptoken= } %<- space here!
+\long\def\xint_firstoftwo #1#2{#1}%
+\long\def\xint_secondoftwo #1#2{#2}%
+\long\def\xint_firstoftwo_andstop #1#2{ #1}%
+\long\def\xint_secondoftwo_andstop #1#2{ #2}%
\def\xint_minus_andstop { -}%
-\def\xint_gob_til_R #1\R {}%
-\def\xint_gob_til_W #1\W {}%
-\def\xint_gob_til_Z #1\Z {}%
-\long\def\xint_bye #1\xint_bye {}% long since 1.09f
+\long\def\xint_gob_til_R #1\R {}%
+\long\def\xint_gob_til_W #1\W {}%
+\long\def\xint_gob_til_Z #1\Z {}%
+\long\def\xint_bye #1\xint_bye {}%
\let\xint_relax\relax
\def\xint_brelax {\xint_relax }%
-\long\def\xint_gob_til_xint_relax #1\xint_relax {}% long since 1.09f
-\def\xint_afterfi #1#2\fi {\fi #1}%
+\long\def\xint_gob_til_xint_relax #1\xint_relax {}%
+\long\def\xint_afterfi #1#2\fi {\fi #1}%
\chardef\xint_c_ 0
\chardef\xint_c_viii 8
\newtoks\XINT_toks
-\newcount\XINT_count % 1.09g: \xintFor from 1.09f modified \count 255 :-(
\def\xintReverseOrder {\romannumeral0\xintreverseorder }%
-\def\xintreverseorder #1%
+\long\def\xintreverseorder #1%
{%
\XINT_rord_main {}#1%
\xint_relax
@@ -190,35 +189,35 @@
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_relax
}%
-\def\XINT_rord_main #1#2#3#4#5#6#7#8#9%
+\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}%
}%
-\def\XINT_rord_cleanup\xint_bye\XINT_rord_main #1#2\xint_relax
+\long\def\XINT_rord_cleanup\xint_bye\XINT_rord_main #1#2\xint_relax
{%
\expandafter\space\xint_gob_til_xint_relax #1%
}%
\def\xintRevWithBraces {\romannumeral0\xintrevwithbraces }%
\def\xintRevWithBracesNoExpand {\romannumeral0\xintrevwithbracesnoexpand }%
-\def\xintrevwithbraces #1%
+\long\def\xintrevwithbraces #1%
{%
\expandafter\XINT_revwbr_loop\expandafter{\expandafter}%
\romannumeral-`0#1\xint_relax\xint_relax\xint_relax\xint_relax
\xint_relax\xint_relax\xint_relax\xint_relax\xint_bye
}%
-\def\xintrevwithbracesnoexpand #1%
+\long\def\xintrevwithbracesnoexpand #1%
{%
\XINT_revwbr_loop {}%
#1\xint_relax\xint_relax\xint_relax\xint_relax
\xint_relax\xint_relax\xint_relax\xint_relax\xint_bye
}%
-\def\XINT_revwbr_loop #1#2#3#4#5#6#7#8#9%
+\long\def\XINT_revwbr_loop #1#2#3#4#5#6#7#8#9%
{%
\xint_gob_til_xint_relax #9\XINT_revwbr_finish_a\xint_relax
\XINT_revwbr_loop {{#9}{#8}{#7}{#6}{#5}{#4}{#3}{#2}#1}%
}%
-\def\XINT_revwbr_finish_a\xint_relax\XINT_revwbr_loop #1#2\xint_bye
+\long\def\XINT_revwbr_finish_a\xint_relax\XINT_revwbr_loop #1#2\xint_bye
{%
\XINT_revwbr_finish_b #2\R\R\R\R\R\R\R\Z #1%
}%
@@ -241,13 +240,13 @@
\csname xint_gobble_\romannumeral #1\endcsname
}%
\def\xintLength {\romannumeral0\xintlength }%
-\def\xintlength #1%
+\long\def\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
}%
-\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\expandafter {\the\numexpr #1+8\relax}%
@@ -271,81 +270,83 @@
}%
\def\XINT_length_finish_c #1#2\Z #3{\expandafter\space\the\numexpr #3-#1\relax}%
\def\xintZapFirstSpaces {\romannumeral0\xintzapfirstspaces }%
-\edef\xintzapfirstspaces #1%
+\long\edef\xintzapfirstspaces #1%
{\noexpand\XINT_zapbsp_a \space #1\space\space\noexpand\xint_bye\xint_relax }%
-\xint_firstofone {\def\XINT_zapbsp_a #1 } %<- space token here
+\xint_firstofone {\long\def\XINT_zapbsp_a #1 } %<- space token here
{%
\XINT_zapbsp_again? #1\xint_bye\XINT_zapbsp_b {#1}%
}%
-\def\XINT_zapbsp_again? #1{\xint_bye #1\XINT_zapbsp_again }%
+\long\def\XINT_zapbsp_again? #1{\xint_bye #1\XINT_zapbsp_again }%
\edef\XINT_zapbsp_again\XINT_zapbsp_b #1{\noexpand\XINT_zapbsp_a\space }%
-\def\XINT_zapbsp_b #1#2\xint_relax
+\long\def\XINT_zapbsp_b #1#2\xint_relax
{\XINT_zapbsp_end? #2\XINT_zapbsp_e\empty #2{#1}}%
-\def\XINT_zapbsp_end? #1{\xint_bye #1\XINT_zapbsp_end }%
-\def\XINT_zapbsp_end\XINT_zapbsp_e\empty #1\xint_bye #2{#2#1}%
-\xint_firstofone{\def\XINT_zapbsp_e #1 } \xint_bye
+\long\def\XINT_zapbsp_end? #1{\xint_bye #1\XINT_zapbsp_end }%
+\long\def\XINT_zapbsp_end\XINT_zapbsp_e\empty #1\xint_bye #2{#2#1}%
+\xint_firstofone{\long\def\XINT_zapbsp_e #1 } \xint_bye
{\expandafter\XINT_zapbsp_f \expandafter{#1}}%
-\edef\XINT_zapbsp_f #1#2{#2\space\space #1}%
+\long\edef\XINT_zapbsp_f #1#2{#2\space\space #1}%
\def\xintZapLastSpaces {\romannumeral0\xintzaplastspaces }%
-\edef\xintzaplastspaces #1{\noexpand\XINT_zapesp_a {\space}\noexpand\empty
+\long\edef\xintzaplastspaces #1{\noexpand\XINT_zapesp_a {\space}\noexpand\empty
#1\space\space\noexpand\xint_bye \xint_relax}%
-\xint_firstofone {\def\XINT_zapesp_a #1#2 } %<- second space here
+\xint_firstofone {\long\def\XINT_zapesp_a #1#2 } %<- second space here
{\expandafter\XINT_zapesp_b\expandafter{#2}{#1}}%
-\def\XINT_zapesp_b #1#2#3\xint_relax
+\long\def\XINT_zapesp_b #1#2#3\xint_relax
{\XINT_zapesp_end? #3\XINT_zapesp_e {#2#1}\empty #3\xint_relax }%
-\def\XINT_zapesp_end? #1{\xint_bye #1\XINT_zapesp_end }%
-\def\XINT_zapesp_end\XINT_zapesp_e #1#2\xint_relax {#1}%
-\edef\XINT_zapesp_e #1{\noexpand \XINT_zapesp_a {#1\space\space}}%
+\long\def\XINT_zapesp_end? #1{\xint_bye #1\XINT_zapesp_end }%
+\long\def\XINT_zapesp_end\XINT_zapesp_e #1#2\xint_relax {#1}%
+\long\edef\XINT_zapesp_e #1{\noexpand \XINT_zapesp_a {#1\space\space}}%
\def\xintZapSpaces {\romannumeral0\xintzapspaces }%
-\edef\xintzapspaces #1%
+\long\edef\xintzapspaces #1%
{\noexpand\XINT_zapsp_a \space #1\space\space\noexpand\xint_bye\xint_relax}%
-\xint_firstofone {\def\XINT_zapsp_a #1 } %<- space token here
+\xint_firstofone {\long\def\XINT_zapsp_a #1 } %<- space token here
{%
\XINT_zapsp_again? #1\xint_bye\XINT_zapesp_b {#1}{}%
}%
-\def\XINT_zapsp_again? #1{\xint_bye #1\XINT_zapsp_again }%
-\edef\XINT_zapsp_again\XINT_zapesp_b #1#2{\noexpand\XINT_zapsp_a\space }%
+\long\def\XINT_zapsp_again? #1{\xint_bye #1\XINT_zapsp_again }%
+\long\edef\XINT_zapsp_again\XINT_zapesp_b #1#2{\noexpand\XINT_zapsp_a\space }%
\def\xintZapSpacesB {\romannumeral0\xintzapspacesb }%
-\def\xintzapspacesb #1{\XINT_zapspb_one? #1\xint_relax\xint_relax
+\long\def\xintzapspacesb #1{\XINT_zapspb_one? #1\xint_relax\xint_relax
\xint_bye\xintzapspaces {#1}}%
-\def\XINT_zapspb_one? #1#2%
+\long\def\XINT_zapspb_one? #1#2%
{\xint_gob_til_xint_relax #1\XINT_zapspb_onlyspaces\xint_relax
\xint_gob_til_xint_relax #2\XINT_zapspb_bracedorone\xint_relax
\xint_bye {#1}}%
\def\XINT_zapspb_onlyspaces\xint_relax
\xint_gob_til_xint_relax\xint_relax\XINT_zapspb_bracedorone\xint_relax
\xint_bye #1\xint_bye\xintzapspaces #2{ }%
-\def\XINT_zapspb_bracedorone\xint_relax
+\long\def\XINT_zapspb_bracedorone\xint_relax
\xint_bye #1\xint_relax\xint_bye\xintzapspaces #2{ #1}%
\def\xintCSVtoList {\romannumeral0\xintcsvtolist }%
-\def\xintcsvtolist #1{\expandafter\xintApply\expandafter\xintzapspacesb
+\long\def\xintcsvtolist #1{\expandafter\xintApply
+ \expandafter\xintzapspacesb
\expandafter{\romannumeral0\xintcsvtolistnonstripped{#1}}}%
\def\xintCSVtoListNoExpand {\romannumeral0\xintcsvtolistnoexpand }%
-\def\xintcsvtolistnoexpand #1{\expandafter\xintApply\expandafter\xintzapspacesb
+\long\def\xintcsvtolistnoexpand #1{\expandafter\xintApply
+ \expandafter\xintzapspacesb
\expandafter{\romannumeral0\xintcsvtolistnonstrippednoexpand{#1}}}%
\def\xintCSVtoListNonStripped {\romannumeral0\xintcsvtolistnonstripped }%
\def\xintCSVtoListNonStrippedNoExpand
{\romannumeral0\xintcsvtolistnonstrippednoexpand }%
-\def\xintcsvtolistnonstripped #1%
+\long\def\xintcsvtolistnonstripped #1%
{%
\expandafter\XINT_csvtol_loop_a\expandafter
{\expandafter}\romannumeral-`0#1%
,\xint_bye,\xint_bye,\xint_bye,\xint_bye
,\xint_bye,\xint_bye,\xint_bye,\xint_bye,\Z
}%
-\def\xintcsvtolistnonstrippednoexpand #1%
+\long\def\xintcsvtolistnonstrippednoexpand #1%
{%
\XINT_csvtol_loop_a
{}#1,\xint_bye,\xint_bye,\xint_bye,\xint_bye
,\xint_bye,\xint_bye,\xint_bye,\xint_bye,\Z
}%
-\def\XINT_csvtol_loop_a #1#2,#3,#4,#5,#6,#7,#8,#9,%
+\long\def\XINT_csvtol_loop_a #1#2,#3,#4,#5,#6,#7,#8,#9,%
{%
\xint_bye #9\XINT_csvtol_finish_a\xint_bye
\XINT_csvtol_loop_b {#1}{{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}%
}%
-\def\XINT_csvtol_loop_b #1#2{\XINT_csvtol_loop_a {#1#2}}%
-\def\XINT_csvtol_finish_a\xint_bye\XINT_csvtol_loop_b #1#2#3\Z
+\long\def\XINT_csvtol_loop_b #1#2{\XINT_csvtol_loop_a {#1#2}}%
+\long\def\XINT_csvtol_finish_a\xint_bye\XINT_csvtol_loop_b #1#2#3\Z
{%
\XINT_csvtol_finish_b #3\R,\R,\R,\R,\R,\R,\R,\Z #2{#1}%
}%
@@ -365,14 +366,15 @@
{%
\csname XINT_csvtol_finish_d\romannumeral #1\endcsname
}%
-\def\XINT_csvtol_finish_dviii #1#2#3#4#5#6#7#8#9{ #9}%
-\def\XINT_csvtol_finish_dvii #1#2#3#4#5#6#7#8#9{ #9{#1}}%
-\def\XINT_csvtol_finish_dvi #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}}%
-\def\XINT_csvtol_finish_dv #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}}%
-\def\XINT_csvtol_finish_div #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}{#4}}%
-\def\XINT_csvtol_finish_diii #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}{#4}{#5}}%
-\def\XINT_csvtol_finish_dii #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}{#4}{#5}{#6}}%
-\def\XINT_csvtol_finish_di #1#2#3#4#5#6#7#8#9%
+\long\def\XINT_csvtol_finish_dviii #1#2#3#4#5#6#7#8#9{ #9}%
+\long\def\XINT_csvtol_finish_dvii #1#2#3#4#5#6#7#8#9{ #9{#1}}%
+\long\def\XINT_csvtol_finish_dvi #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}}%
+\long\def\XINT_csvtol_finish_dv #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}}%
+\long\def\XINT_csvtol_finish_div #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}{#4}}%
+\long\def\XINT_csvtol_finish_diii #1#2#3#4#5#6#7#8#9{ #9{#1}{#2}{#3}{#4}{#5}}%
+\long\def\XINT_csvtol_finish_dii #1#2#3#4#5#6#7#8#9%
+ { #9{#1}{#2}{#3}{#4}{#5}{#6}}%
+\long\def\XINT_csvtol_finish_di #1#2#3#4#5#6#7#8#9%
{ #9{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
\def\xintListWithSep {\romannumeral0\xintlistwithsep }%
\def\xintListWithSepNoExpand {\romannumeral0\xintlistwithsepnoexpand }%
@@ -403,7 +405,7 @@
{%
\expandafter\XINT_ntheltnoexpand_a\expandafter {\the\numexpr #1}%
}%
-\def\XINT_nthelt_a #1#2%
+\long\def\XINT_nthelt_a #1#2%
{%
\ifnum #1<0
\xint_afterfi{\expandafter\XINT_nthelt_c\expandafter
@@ -413,7 +415,7 @@
{\romannumeral-`0#2}{#1}}%
\fi
}%
-\def\XINT_ntheltnoexpand_a #1#2%
+\long\def\XINT_ntheltnoexpand_a #1#2%
{%
\ifnum #1<0
\xint_afterfi{\expandafter\XINT_nthelt_c\expandafter
@@ -423,7 +425,7 @@
{#2}{#1}}%
\fi
}%
-\def\XINT_nthelt_c #1#2%
+\long\def\XINT_nthelt_c #1#2%
{%
\ifnum #2>\xint_c_
\expandafter\XINT_nthelt_loop_a
@@ -441,7 +443,7 @@
\fi
{#1}%
}%
-\def\XINT_nthelt_loop_b #1#2#3#4#5#6#7#8#9%
+\long\def\XINT_nthelt_loop_b #1#2#3#4#5#6#7#8#9%
{%
\xint_gob_til_xint_relax #9\XINT_nthelt_silentend\xint_relax
\expandafter\XINT_nthelt_loop_a\expandafter{\the\numexpr #1-8}%
@@ -452,46 +454,46 @@
\expandafter\expandafter\expandafter\XINT_nthelt_finish
\csname xint_gobble_\romannumeral\numexpr#1-1\endcsname
}%
-\def\XINT_nthelt_finish #1#2\xint_bye
+\long\def\XINT_nthelt_finish #1#2\xint_bye
{\xint_gob_til_xint_relax #1\expandafter\space
\xint_gobble_iii\xint_relax\space #1}%
\def\xintApply {\romannumeral0\xintapply }%
\def\xintApplyNoExpand {\romannumeral0\xintapplynoexpand }%
-\def\xintapply #1#2%
+\long\def\xintapply #1#2%
{%
\expandafter\XINT_apply\expandafter {\romannumeral-`0#2}%
{#1}%
}%
-\def\XINT_apply #1#2{\XINT_apply_loop_a {}{#2}#1\xint_bye }%
-\def\xintapplynoexpand #1#2{\XINT_apply_loop_a {}{#1}#2\xint_bye }%
-\def\XINT_apply_loop_a #1#2#3%
+\long\def\XINT_apply #1#2{\XINT_apply_loop_a {}{#2}#1\xint_bye }%
+\long\def\xintapplynoexpand #1#2{\XINT_apply_loop_a {}{#1}#2\xint_bye }%
+\long\def\XINT_apply_loop_a #1#2#3%
{%
\xint_bye #3\XINT_apply_end\xint_bye
\expandafter
\XINT_apply_loop_b
\expandafter {\romannumeral-`0#2{#3}}{#1}{#2}%
}%
-\def\XINT_apply_loop_b #1#2{\XINT_apply_loop_a {#2{#1}}}%
-\def\XINT_apply_end\xint_bye\expandafter\XINT_apply_loop_b
+\long\def\XINT_apply_loop_b #1#2{\XINT_apply_loop_a {#2{#1}}}%
+\long\def\XINT_apply_end\xint_bye\expandafter\XINT_apply_loop_b
\expandafter #1#2#3{ #2}%
\def\xintApplyUnbraced {\romannumeral0\xintapplyunbraced }%
\def\xintApplyUnbracedNoExpand {\romannumeral0\xintapplyunbracednoexpand }%
-\def\xintapplyunbraced #1#2%
+\long\def\xintapplyunbraced #1#2%
{%
\expandafter\XINT_applyunbr\expandafter {\romannumeral-`0#2}%
{#1}%
}%
-\def\XINT_applyunbr #1#2{\XINT_applyunbr_loop_a {}{#2}#1\xint_bye }%
-\def\xintapplyunbracednoexpand #1#2%
+\long\def\XINT_applyunbr #1#2{\XINT_applyunbr_loop_a {}{#2}#1\xint_bye }%
+\long\def\xintapplyunbracednoexpand #1#2%
{\XINT_applyunbr_loop_a {}{#1}#2\xint_bye }%
-\def\XINT_applyunbr_loop_a #1#2#3%
+\long\def\XINT_applyunbr_loop_a #1#2#3%
{%
\xint_bye #3\XINT_applyunbr_end\xint_bye
\expandafter\XINT_applyunbr_loop_b
\expandafter {\romannumeral-`0#2{#3}}{#1}{#2}%
}%
-\def\XINT_applyunbr_loop_b #1#2{\XINT_applyunbr_loop_a {#2#1}}%
-\def\XINT_applyunbr_end\xint_bye\expandafter\XINT_applyunbr_loop_b
+\long\def\XINT_applyunbr_loop_b #1#2{\XINT_applyunbr_loop_a {#2#1}}%
+\long\def\XINT_applyunbr_end\xint_bye\expandafter\XINT_applyunbr_loop_b
\expandafter #1#2#3{ #2}%
\def\xintSeq {\romannumeral0\xintseq }%
\def\xintseq #1{\XINT_seq_chkopt #1\xint_bye }%
@@ -508,7 +510,7 @@
}%
\def\XINT_seq #1#2%
{%
- \ifcase\xintiiSgn{\the\numexpr #2-#1\relax}
+ \ifcase\ifnum #1=#2 0\else\ifnum #2>#1 1\else -1\fi\fi\space
\expandafter\xint_firstoftwo_andstop
\or
\expandafter\XINT_seq_p
@@ -545,7 +547,7 @@
}%
\def\XINT_seqo #1#2%
{%
- \ifcase\xintiiSgn{\the\numexpr #2-#1\relax}
+ \ifcase\ifnum #1=#2 0\else\ifnum #2>#1 1\else -1\fi\fi\space
\expandafter\XINT_seqo_a
\or
\expandafter\XINT_seqo_pa
@@ -558,12 +560,12 @@
\def\XINT_seqo_o #1#2#3#4{ #4}%
\def\XINT_seqo_pa #1#2#3%
{%
- \ifcase\XINT_Sgn {#3}
- \expandafter\XINT_seqo_o
+ \ifcase\ifnum #3=\xint_c_ 0\else\ifnum #3>\xint_c_ 1\else -1\fi\fi\space
+ \expandafter\XINT_seqo_o
\or
- \expandafter\XINT_seqo_pb
+ \expandafter\XINT_seqo_pb
\else
- \xint_afterfi{\expandafter\space\xint_gobble_iv}%
+ \xint_afterfi{\expandafter\space\xint_gobble_iv}%
\fi
{#1}{#2}{#3}{{#1}}%
}%
@@ -573,7 +575,7 @@
}%
\def\XINT_seqo_pc #1#2%
{%
- \ifnum#1>#2
+ \ifnum #1>#2
\expandafter\XINT_seqo_o
\else
\expandafter\XINT_seqo_pd
@@ -583,7 +585,7 @@
\def\XINT_seqo_pd #1#2#3#4{\XINT_seqo_pb {#1}{#2}{#3}{#4{#1}}}%
\def\XINT_seqo_na #1#2#3%
{%
- \ifcase\XINT_Sgn {#3}
+ \ifcase\ifnum #3=\xint_c_ 0\else\ifnum #3>\xint_c_ 1\else -1\fi\fi\space
\expandafter\XINT_seqo_o
\or
\xint_afterfi{\expandafter\space\xint_gobble_iv}%
@@ -598,7 +600,7 @@
}%
\def\XINT_seqo_nc #1#2%
{%
- \ifnum#1<#2
+ \ifnum #1<#2
\expandafter\XINT_seqo_o
\else
\expandafter\XINT_seqo_nd
@@ -606,31 +608,32 @@
{#1}{#2}%
}%
\def\XINT_seqo_nd #1#2#3#4{\XINT_seqo_nb {#1}{#2}{#3}{#4{#1}}}%
-\def\xintloop #1#2\repeat {#1#2\xintloop_again\fi\xint_gobble_i {#1#2}}%
-\def\xintloop_again\fi\xint_gobble_i #1{\fi
+\long\def\xintloop #1#2\repeat {#1#2\xintloop_again\fi\xint_gobble_i {#1#2}}%
+\long\def\xintloop_again\fi\xint_gobble_i #1{\fi
#1\xintloop_again\fi\xint_gobble_i {#1}}%
-\def\xintbreakloop #1\xintloop_again\fi\xint_gobble_i #2{}%
-\def\xintbreakloopanddo #1#2\xintloop_again\fi\xint_gobble_i #3{#1}%
-\def\xintloopskiptonext #1\xintloop_again\fi\xint_gobble_i #2{%
+\long\def\xintbreakloop #1\xintloop_again\fi\xint_gobble_i #2{}%
+\long\def\xintbreakloopanddo #1#2\xintloop_again\fi\xint_gobble_i #3{#1}%
+\long\def\xintloopskiptonext #1\xintloop_again\fi\xint_gobble_i #2{%
#2\xintloop_again\fi\xint_gobble_i {#2}}%
\def\xintiloop [#1+#2]{%
\expandafter\xintiloop_a\the\numexpr #1\expandafter.\the\numexpr #2.}%
-\def\xintiloop_a #1.#2.#3#4\repeat{%
+\long\def\xintiloop_a #1.#2.#3#4\repeat{%
#3#4\xintiloop_again\fi\xint_gobble_iii {#1}{#2}{#3#4}}%
\def\xintiloop_again\fi\xint_gobble_iii #1#2{%
\fi\expandafter\xintiloop_again_b\the\numexpr#1+#2.#2.}%
-\def\xintiloop_again_b #1.#2.#3{%
+\long\def\xintiloop_again_b #1.#2.#3{%
#3\xintiloop_again\fi\xint_gobble_iii {#1}{#2}{#3}}%
-\def\xintbreakiloop #1\xintiloop_again\fi\xint_gobble_iii #2#3#4{}%
-\def\xintbreakiloopanddo #1.#2\xintiloop_again\fi\xint_gobble_iii #3#4#5{#1}%
-\def\xintiloopindex #1\xintiloop_again\fi\xint_gobble_iii #2%
+\long\def\xintbreakiloop #1\xintiloop_again\fi\xint_gobble_iii #2#3#4{}%
+\long\def\xintbreakiloopanddo
+ #1.#2\xintiloop_again\fi\xint_gobble_iii #3#4#5{#1}%
+\long\def\xintiloopindex #1\xintiloop_again\fi\xint_gobble_iii #2%
{#2#1\xintiloop_again\fi\xint_gobble_iii {#2}}%
-\def\xintouteriloopindex #1\xintiloop_again
+\long\def\xintouteriloopindex #1\xintiloop_again
#2\xintiloop_again\fi\xint_gobble_iii #3%
{#3#1\xintiloop_again #2\xintiloop_again\fi\xint_gobble_iii {#3}}%
-\def\xintiloopskiptonext #1\xintiloop_again\fi\xint_gobble_iii #2#3{%
+\long\def\xintiloopskiptonext #1\xintiloop_again\fi\xint_gobble_iii #2#3{%
\expandafter\xintiloop_again_b \the\numexpr#2+#3.#3.}%
-\def\xintiloopskipandredo #1\xintiloop_again\fi\xint_gobble_iii #2#3#4{%
+\long\def\xintiloopskipandredo #1\xintiloop_again\fi\xint_gobble_iii #2#3#4{%
#4\xintiloop_again\fi\xint_gobble_iii {#2}{#3}{#4}}%
\def\XINT_xflet #1%
{%
@@ -733,9 +736,8 @@
}%
\long\def\XINT_for #1#2in#3#4#5%
{%
- \XINT_count #2\relax
\expandafter\XINT_toks\expandafter
- {\expandafter\XINT_for_d\the\XINT_count{#5}}%
+ {\expandafter\XINT_for_d\the\numexpr #2\relax {#5}}%
\def\XINT_flet_macro {\expandafter\XINT_for_forever?\space}%
\expandafter\XINT_flet_zapsp #3Z%
}%
@@ -749,9 +751,8 @@
\def\XINT_to_forever\fi #1\xintcsvtolist #2{\fi \XINT_forever #2}%
\long\def\XINT_forx *#1#2in#3#4#5%
{%
- \XINT_count #2\relax
\expandafter\XINT_toks\expandafter
- {\expandafter\XINT_forx_d\the\XINT_count{#5}}%
+ {\expandafter\XINT_forx_d\the\numexpr #2\relax {#5}}%
\XINT_xflet\XINT_forx_forever? #3Z%
}%
\def\XINT_forx_forever?
@@ -936,11 +937,11 @@
}%
\catcode`Z 11
\catcode`j 11
-\def\xintAssign #1\to
+\long\def\xintAssign #1\to
{%
\expandafter\XINT_assign_a\romannumeral-`0#1{}\to
}%
-\def\XINT_assign_a #1% attention to the # at the beginning of next line
+\long\def\XINT_assign_a #1% attention to the # at the beginning of next line
#{%
\def\xint_temp {#1}%
\ifx\empty\xint_temp
@@ -949,13 +950,10 @@
\expandafter\XINT_assign_B
\fi
}%
-\def\XINT_assign_b #1#2\to #3%
+\long\def\XINT_assign_b #1#2\to #3%
{%
\edef #3{#1}\def\xint_temp {#2}%
- \ifx\empty\xint_temp
- \else
- \xint_afterfi{\XINT_assign_a #2\to }%
- \fi
+ \unless\ifx\empty\xint_temp\xint_afterfi{\XINT_assign_a #2\to }\fi
}%
\def\XINT_assign_B #1\to #2%
{%
@@ -965,56 +963,44 @@
{%
\edef\XINT_restoreescapechar {\escapechar\the\escapechar\relax}%
\escapechar -1
- \edef\xint_arrayname {\string #1}%
+ \expandafter\def\expandafter\xint_arrayname\expandafter {\string #1}%
\XINT_restoreescapechar
- \expandafter\let\expandafter\xint_temp
- \csname\xint_arrayname 0\endcsname
- \XINT_count 0
- \loop
- \global\expandafter\let
- \csname\xint_arrayname\the\XINT_count\endcsname\relax
- \ifnum \XINT_count < \xint_temp
- \advance\XINT_count 1
+ \xintiloop [\csname\xint_arrayname 0\endcsname+-1]
+ \global
+ \expandafter\let\csname\xint_arrayname\xintiloopindex\endcsname\relax
+ \ifnum \xintiloopindex > \xint_c_
\repeat
\global\expandafter\let\csname\xint_arrayname 00\endcsname\relax
\global\let #1\relax
}%
-\def\xintAssignArray #1\to #2% 1.06b: #1 may now be empty
+\long\def\xintAssignArray #1\to #2%
{%
\edef\XINT_restoreescapechar {\escapechar\the\escapechar\relax }%
\escapechar -1
- \edef\xint_arrayname {\string #2}%
+ \expandafter\def\expandafter\xint_arrayname\expandafter {\string #2}%
\XINT_restoreescapechar
- \XINT_count 0
+ \def\xint_itemcount {0}%
\expandafter\XINT_assignarray_loop \romannumeral-`0#1\xint_relax
- \csname\xint_arrayname 00\endcsname
- \csname\xint_arrayname 0\endcsname
- {\xint_arrayname}%
- #2%
+ \csname\xint_arrayname 00\expandafter\endcsname
+ \csname\xint_arrayname 0\expandafter\endcsname
+ \expandafter {\xint_arrayname}#2%
}%
-\def\XINT_assignarray_loop #1%
+\long\def\XINT_assignarray_loop #1%
{%
\def\xint_temp {#1}%
\ifx\xint_brelax\xint_temp
- \expandafter\edef\csname\xint_arrayname 0\endcsname{\the\XINT_count }%
- \expandafter\expandafter\expandafter\XINT_assignarray_end_a
+ \expandafter\def\csname\xint_arrayname 0\expandafter\endcsname
+ \expandafter{\the\numexpr\xint_itemcount}%
+ \expandafter\expandafter\expandafter\XINT_assignarray_end
\else
- \advance\XINT_count 1
+ \expandafter\def\expandafter\xint_itemcount\expandafter
+ {\the\numexpr\xint_itemcount+\xint_c_i}%
\expandafter\edef
- \csname\xint_arrayname\the\XINT_count\endcsname{\xint_temp }%
+ \csname\xint_arrayname\xint_itemcount\endcsname {\xint_temp }%
\expandafter\XINT_assignarray_loop
\fi
}%
-\def\XINT_assignarray_end_a #1%
-{%
- \expandafter\XINT_assignarray_end_b\expandafter #1%
-}%
-\def\XINT_assignarray_end_b #1#2#3%
-{%
- \expandafter\XINT_assignarray_end_c
- \expandafter #1\expandafter #2\expandafter {#3}%
-}%
-\def\XINT_assignarray_end_c #1#2#3#4%
+\def\XINT_assignarray_end #1#2#3#4%
{%
\def #4##1%
{%
@@ -1022,16 +1008,14 @@
}%
\def #1##1%
{%
- \ifnum ##1< 0
- \xint_afterfi {\xintError:ArrayIndexIsNegative\space 0}%
+ \ifnum ##1<\xint_c_
+ \xint_afterfi {\xintError:ArrayIndexIsNegative\space }%
\else
- \xint_afterfi {%
+ \xint_afterfi {%
\ifnum ##1>#2
- \xint_afterfi {\xintError:ArrayIndexBeyondLimit\space 0}%
- \else
- \xint_afterfi
- {\expandafter\expandafter\expandafter
- \space\csname #3##1\endcsname}%
+ \xint_afterfi {\xintError:ArrayIndexBeyondLimit\space }%
+ \else\xint_afterfi
+ {\expandafter\expandafter\expandafter\space\csname #3##1\endcsname}%
\fi}%
\fi
}%