summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-15 21:29:29 +0000
committerKarl Berry <karl@freefriends.org>2014-04-15 21:29:29 +0000
commitc12f1a81ed7c1f6315906e59c84f49890cb0838f (patch)
tree43761087d37e568d1ae1954e034106af63227b57 /Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty
parentcb2b12a269ec694bc13a04ed7ae28f1708580cce (diff)
ionumbers (15apr14)
git-svn-id: svn://tug.org/texlive/trunk@33457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty92
1 files changed, 55 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty b/Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty
index 90242c8c834..ab45e6ecd89 100644
--- a/Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty
+++ b/Master/texmf-dist/tex/latex/ionumbers/ionumbers.sty
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ionumbers}
- [2011/06/15 v0.3.1-alpha restyle numbers in math mode]
+ [2014/04/06 v0.3.3 restyle numbers in math mode]
\RequirePackage{keyval}
\newif\ifion@autothousands
\newif\ifion@autothousandths
@@ -153,21 +153,24 @@
\newcommand*\renewionumbersexponent@@[2]{\expandafter\renewcommand%
\expandafter*\csname ion@exponent@#1\endcsname{\ionumbersoff{#2}%
\ion@currnum@exponent\ion@exponent@superscripttrue}}
-\mathchardef\ion@point@original="013A
-\mathchardef\ion@comma@original="613B
-\mathchardef\ion@plus@original="202B
-\mathchardef\ion@minus@original="2200
-\mathchardef\ion@zero@original="7030
-\mathchardef\ion@one@original="7031
-\mathchardef\ion@two@original="7032
-\mathchardef\ion@three@original="7033
-\mathchardef\ion@four@original="7034
-\mathchardef\ion@five@original="7035
-\mathchardef\ion@six@original="7036
-\mathchardef\ion@seven@original="7037
-\mathchardef\ion@eight@original="7038
-\mathchardef\ion@nine@original="7039
-\mathchardef\ion@e@original="7165
+\AtBeginDocument{
+ \mathchardef\ion@point@original=\the\mathcode`.
+ \mathchardef\ion@comma@original=\the\mathcode`,
+ \mathchardef\ion@plus@original=\the\mathcode`+
+ \mathchardef\ion@minus@original=\the\mathcode`-
+ \mathchardef\ion@zero@original=\the\mathcode`0
+ \mathchardef\ion@one@original=\the\mathcode`1
+ \mathchardef\ion@two@original=\the\mathcode`2
+ \mathchardef\ion@three@original=\the\mathcode`3
+ \mathchardef\ion@four@original=\the\mathcode`4
+ \mathchardef\ion@five@original=\the\mathcode`5
+ \mathchardef\ion@six@original=\the\mathcode`6
+ \mathchardef\ion@seven@original=\the\mathcode`7
+ \mathchardef\ion@eight@original=\the\mathcode`8
+ \mathchardef\ion@nine@original=\the\mathcode`9
+ \mathchardef\ion@e@original=\the\mathcode`e
+ \mathchardef\ion@E@original=\the\mathcode`E
+}
\def\ion@comma@ignore{}
\def\ion@comma@decimal{\ion@decimal@curr}
\def\ion@comma@thousands{\ion@thousands@curr}
@@ -184,35 +187,35 @@
\def\ion@afterpoint@decimal{\ion@beforedecimalfalse}
\def\ion@afterpoint@thousands{\ion@noexplicitthousandsfalse}
\def\ion@afterpoint@default{\ion@afterpoint@decimal}
-\mathchardef\ion@decimal@point="013A
-\mathchardef\ion@decimal@comma="013B
-\mathchardef\ion@decimal@punctpoint="613A
-\mathchardef\ion@decimal@punctcomma="613B
+\def\ion@decimal@point{\mathord{\ion@point@original}}
+\def\ion@decimal@comma{\mathord{\ion@comma@original}}
+\def\ion@decimal@punctpoint{\mathpunct{\ion@decimal@point}}
+\def\ion@decimal@punctcomma{\mathpunct{\ion@decimal@comma}}
\def\ion@decimal@default{\ion@decimal@point}
\def\ion@thousands@none{}
-\mathchardef\ion@thousands@comma="013B
-\mathchardef\ion@thousands@point="013A
-\mathchardef\ion@thousands@punctcomma="613B
-\mathchardef\ion@thousands@punctpoint="613A
+\def\ion@thousands@point{\mathord{\ion@point@original}}
+\def\ion@thousands@comma{\mathord{\ion@comma@original}}
+\def\ion@thousands@punctpoint{\mathpunct{\ion@decimal@point}}
+\def\ion@thousands@punctcomma{\mathpunct{\ion@decimal@comma}}
\def\ion@thousands@apostrophe{^\prime}
\def\ion@thousands@phantom{\phantom{\ion@point@original}}
\def\ion@thousands@space{\,}
\def\ion@thousands@default{\ion@thousands@punctcomma}
\def\ion@thousandths@none{}
-\mathchardef\ion@thousandths@comma="013B
-\mathchardef\ion@thousandths@point="013A
-\mathchardef\ion@thousandths@punctcomma="613B
-\mathchardef\ion@thousandths@punctpoint="613A
+\def\ion@thousandths@point{\mathord{\ion@point@original}}
+\def\ion@thousandths@comma{\mathord{\ion@comma@original}}
+\def\ion@thousandths@punctpoint{\mathpunct{\ion@decimal@point}}
+\def\ion@thousandths@punctcomma{\mathpunct{\ion@decimal@comma}}
\def\ion@thousandths@apostrophe{^\prime}
\def\ion@thousandths@phantom{\phantom{\ion@point@original}}
\def\ion@thousandths@space{\,}
\def\ion@thousandths@default{\ion@thousandths@space}
\def\ion@exponent@none{}
\def\ion@exponent@original{\ion@e@original}
-\def\ion@exponent@ite{\mathchar"7165\ion@currnum@exponenttrue}
-\def\ion@exponent@itE{\mathchar"7145\ion@currnum@exponenttrue}
-\def\ion@exponent@rme{\mathchar"7065\ion@currnum@exponenttrue}
-\def\ion@exponent@rmE{\mathchar"7045\ion@currnum@exponenttrue}
+\def\ion@exponent@ite{\mathit{\ion@e@original}\ion@currnum@exponenttrue}
+\def\ion@exponent@itE{\mathit{\ion@E@original}\ion@currnum@exponenttrue}
+\def\ion@exponent@rme{\mathrm{\ion@e@original}\ion@currnum@exponenttrue}
+\def\ion@exponent@rmE{\mathrm{\ion@E@original}\ion@currnum@exponenttrue}
\def\ion@exponent@timestento{\times10\,\ion@currnum@exponenttrue%
\ion@exponent@superscripttrue}
\def\ion@exponent@cdottento{\cdot10\,\ion@currnum@exponenttrue%
@@ -227,15 +230,30 @@
\catcode`\6=\active\catcode`\7=\active\catcode`\8=\active%
\catcode`\9=\active\relax}
\def\ion@separators@math@active{\mathcode`,="8000\mathcode`.="8000\relax}
-\def\ion@separators@math@inactive{\mathcode`,="613B\mathcode`.="013A\relax}
\def\ion@signs@math@active{\mathcode`+="8000\mathcode`-="8000\relax}
-\def\ion@signs@math@inactive{\mathcode`+="202B\mathcode`-="2200\relax}
\def\ion@digits@math@active{\mathcode`0="8000\mathcode`1="8000\mathcode`2="8000%
\mathcode`3="8000\mathcode`4="8000\mathcode`5="8000\mathcode`6="8000%
\mathcode`7="8000\mathcode`8="8000\mathcode`9="8000\relax}
-\def\ion@digits@math@inactive{\mathcode`0="7030\mathcode`1="7031%
- \mathcode`2="7032\mathcode`3="7033\mathcode`4="7034\mathcode`5="7035%
- \mathcode`6="7036\mathcode`7="7037\mathcode`8="7038\mathcode`9="7039\relax}
+\def\ion@separators@math@inactive{%
+ \mathcode`,=\the\ion@comma@original%
+ \mathcode`.=\the\ion@point@original%
+ \relax}
+\def\ion@signs@math@inactive{%
+ \mathcode`+=\the\ion@plus@original%
+ \mathcode`-=\the\ion@minus@original%
+ \relax}
+\def\ion@digits@math@inactive{%
+ \mathcode`0=\the\ion@zero@original%
+ \mathcode`1=\the\ion@one@original%
+ \mathcode`2=\the\ion@two@original%
+ \mathcode`3=\the\ion@three@original%
+ \mathcode`4=\the\ion@four@original%
+ \mathcode`5=\the\ion@five@original%
+ \mathcode`6=\the\ion@six@original%
+ \mathcode`7=\the\ion@seven@original%
+ \mathcode`8=\the\ion@eight@original%
+ \mathcode`9=\the\ion@nine@original%
+ \relax}
\def\ionumbers{\ion@separators@math@active\ion@signs@math@active%
\ion@digits@math@active}
\def\endionumbers{\ion@separators@math@inactive\ion@signs@math@inactive%