summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintfrac.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-04 22:24:03 +0000
committerKarl Berry <karl@freefriends.org>2013-10-04 22:24:03 +0000
commitbba0d5bf503da1006cde30ddc9cc8d114f477006 (patch)
tree4dee908e30c5ab1615b13685a9836411d2bd23cf /Master/texmf-dist/tex/generic/xint/xintfrac.sty
parent623c6a6357c19020fb9ad6214494be225512ed67 (diff)
xint (4oct13)
git-svn-id: svn://tug.org/texlive/trunk@31834 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintfrac.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintfrac.sty90
1 files changed, 26 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index dc3c8ad2f9a..c5ea336f8a8 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.09a of September 22, 2013)
+%% The xint bundle (version 1.09b of October 3, 2013)
%% xintfrac: Expandable operations on fractions
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -103,69 +103,10 @@
\aftergroup\endinput
\fi
\endgroup%
-\begingroup\catcode61\catcode48\catcode32=10\relax%
- \catcode13=5 % ^^M
- \endlinechar=13 %
- \catcode123=1 % {
- \catcode125=2 % }
- \catcode95=11 % _
- \def\x
- {%
- \endgroup
- \edef\XINT_frac_restorecatcodes_endinput
- {%
- \catcode93=\the\catcode93 % ]
- \catcode91=\the\catcode91 % [
- \catcode94=\the\catcode94 % ^
- \catcode96=\the\catcode96 % `
- \catcode47=\the\catcode47 % /
- \catcode41=\the\catcode41 % )
- \catcode40=\the\catcode40 % (
- \catcode42=\the\catcode42 % *
- \catcode43=\the\catcode43 % +
- \catcode62=\the\catcode62 % >
- \catcode60=\the\catcode60 % <
- \catcode58=\the\catcode58 % :
- \catcode46=\the\catcode46 % .
- \catcode45=\the\catcode45 % -
- \catcode44=\the\catcode44 % ,
- \catcode35=\the\catcode35 % #
- \catcode95=\the\catcode95 % _
- \catcode125=\the\catcode125 % }
- \catcode123=\the\catcode123 % {
- \endlinechar=\the\endlinechar
- \catcode13=\the\catcode13 % ^^M
- \catcode32=\the\catcode32 %
- \catcode61=\the\catcode61\relax % =
- \noexpand\endinput
- }%
- \XINT_setcatcodes % defined in xint.sty
- \catcode91=12 % [
- \catcode93=12 % ]
- }%
-\x
-\begingroup
- \catcode64=11 % @
- \catcode58=12 % :
- \expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \def\x#1#2#3[#4]{\endgroup
- \immediate\write-1{Package: #3 #4}%
- \xdef#1{#4}%
- }%
- \else
- \def\x#1#2[#3]{\endgroup
- #2[{#3}]%
- \ifx#1\@undefined
- \xdef#1{#3}%
- \fi
- \ifx#1\relax
- \xdef#1{#3}%
- \fi
- }%
- \fi
-\expandafter\x\csname ver@xintfrac.sty\endcsname
+\XINTsetupcatcodes%
+\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2013/09/24 v1.09a Expandable operations on fractions (jfB)]%
+ [2013/10/03 v1.09b Expandable operations on fractions (jfB)]%
\chardef\xint_c_vi 6
\chardef\xint_c_vii 7
\chardef\xint_c_xviii 18
@@ -460,6 +401,27 @@
\expandafter\XINT_raw\romannumeral0\XINT_infrac
}%
\def\XINT_raw #1#2#3{ #2/#3[#1]}%
+\def\xintPRaw {\romannumeral0\xintpraw }%
+\def\xintpraw
+{%
+ \expandafter\XINT_praw\romannumeral0\XINT_infrac
+}%
+\def\XINT_praw #1%
+{%
+ \ifnum #1=\xint_c_ \expandafter\XINT_praw_a\fi \XINT_praw_A {#1}%
+}%
+\def\XINT_praw_A #1#2#3%
+{%
+ \if\XINT_isOne{#3}1\expandafter\xint_firstoftwo
+ \else\expandafter\xint_secondoftwo
+ \fi { #2[#1]}{ #2/#3[#1]}%
+}%
+\def\XINT_praw_a\XINT_praw_A #1#2#3%
+{%
+ \if\XINT_isOne{#3}1\expandafter\xint_firstoftwo
+ \else\expandafter\xint_secondoftwo
+ \fi { #2}{ #2/#3}%
+}%
\def\xintRawWithZeros {\romannumeral0\xintrawwithzeros }%
\def\xintrawwithzeros
{%
@@ -2398,7 +2360,7 @@
{\xintHalf{\xintiQuo{\XINT_dsx_addzerosnofuss {#4}{#2}}{#3}}}}%
}%
\def\XINT_flsqrt_big_end_b #1#2{#2[#1]}%
-\XINT_frac_restorecatcodes_endinput%
+\XINT_restorecatcodes_endinput%
\endinput
%%
%% End of file `xintfrac.sty'.