| 1 |
%% |
| 2 |
%% This is file `euro.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% euro.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% IMPORTANT NOTICE: |
| 10 |
%% |
| 11 |
%% For the copyright see the source file. |
| 12 |
%% |
| 13 |
%% Any modified versions of this file must be renamed |
| 14 |
%% with new filenames distinct from euro.sty. |
| 15 |
%% |
| 16 |
%% For distribution of the original source see the terms |
| 17 |
%% for copying and modification in the file euro.dtx. |
| 18 |
%% |
| 19 |
%% This generated file may be distributed as long as the |
| 20 |
%% original source files, as listed above, are part of the |
| 21 |
%% same distribution. (The sources need not necessarily be |
| 22 |
%% in the same archive or directory.) |
| 23 |
%% File: euro.dtx Copyright (C) 1999--2005 Melchior FRANZ |
| 24 |
%% $Id: euro.dtx,v 1.14 2005/03/07 14:22:19 m Exp $ |
| 25 |
%% $Version: 1.1 $ |
| 26 |
\NeedsTeXFormat{LaTeX2e} |
| 27 |
\ProvidesPackage{euro}[2003/02/19 v1.1 euro (mf)] |
| 28 |
\RequirePackage{fp-basic} |
| 29 |
\RequirePackage{fp-snap} |
| 30 |
\FPmessagesfalse |
| 31 |
\newcommand*\EURO@zero{0} |
| 32 |
\newcommand*\EURO@lzero{0} |
| 33 |
\newcommand*\EURO@rzero{} |
| 34 |
\newcommand*\EURO@lminus{\(-\)} |
| 35 |
\newcommand*\EURO@rminus{} |
| 36 |
\newcommand*\EURO@lplus{} |
| 37 |
\newcommand*\EURO@rplus{} |
| 38 |
\newcommand*\EURO@align{} |
| 39 |
\newcommand*\EURO@lsep{\,} |
| 40 |
\newcommand*\EURO@rsep{\,} |
| 41 |
\newcommand*\EURO@point{,} |
| 42 |
\newcommand*\EURO@round{-2} |
| 43 |
\newcommand*\EURO[1]{\bgroup\def\EURO@icurr{#1}\EURO@@} |
| 44 |
\newcommand*\EURO@@[2][EUR]{\FPset\EURO@ival{#2}% |
| 45 |
\def\EURO@set##1##2##3##4##5{\FPset##5{##1}}% |
| 46 |
\csname EURO@@\EURO@icurr\endcsname\EURO@ifac |
| 47 |
\csname EURO@@#1\endcsname\EURO@ofac |
| 48 |
\FPdiv\EURO@oval\EURO@ival\EURO@ifac |
| 49 |
\FPmul\EURO@oval\EURO@oval\EURO@ofac |
| 50 |
\def\EURO@set##1##2##3##4##5{\def##5{##4}}% |
| 51 |
\EURO@@main\EURO@ |
| 52 |
\EURO@@all\EURO@dflt |
| 53 |
\let\EURO@set\EURO@scan |
| 54 |
\def\in{{\csname EURO@@\EURO@icurr\endcsname\EURO@ival |
| 55 |
\def\EURO@set####1####2####3{}\EURO@@in}}% |
| 56 |
\def\out{{\csname EURO@@#1\endcsname\EURO@oval |
| 57 |
\def\EURO@set####1####2####3{}\EURO@@out}}% |
| 58 |
\def\align{\def\EURO@align####1{\rlap{####1}\let\EURO@align\relax}}% |
| 59 |
\let\table\EURO@table |
| 60 |
\def\form##1##2##3{\def\EURO@lsep{##1}\def\EURO@rsep{##3}% |
| 61 |
\def\EURO@point{##2}}% |
| 62 |
\def\round##1{\def\EURO@round{##1}}% |
| 63 |
\let\zero\EURO@setzero |
| 64 |
\def\minus##1##2{\def\EURO@lminus{##1}\def\EURO@rminus{##2}}% |
| 65 |
\def\plus##1##2{\def\EURO@lplus{##1}\def\EURO@rplus{##2}}% |
| 66 |
\EURO@\egroup} |
| 67 |
\newcommand*\EURO@scan[5]{% |
| 68 |
\def\val{\FPifzero#5\EURO@zero\else\EURO@num#5\fi}% |
| 69 |
\def\iso{#2}\def\sym{#3}\def\EURO@form{\EURO@dflt#4}% |
| 70 |
\ifx\EURO@form\empty\let\EURO@form\EURO@dflt\fi |
| 71 |
\EURO@form}% |
| 72 |
\newcommand*\EURO@setzero[3]{\def\EURO@zero{#1}% |
| 73 |
\def\EURO@lzero{#2}\def\EURO@rzero{#3}}% |
| 74 |
\newcommand*\EUROSYM[2]{% |
| 75 |
\def\EURO@set##1##2##3##4{\toks@={\EURO@set{##1}{##2}{#2}{##4}}% |
| 76 |
\expandafter\edef\csname EURO@@#1\endcsname{\the\toks@}}% |
| 77 |
\csname EURO@@#1\endcsname} |
| 78 |
\newcommand*\EUROFORMAT[2]{% |
| 79 |
\def\EURO@set##1##2##3##4{\toks@={\EURO@set{##1}{##2}{##3}{#2}}% |
| 80 |
\expandafter\edef\csname EURO@@#1\endcsname{\the\toks@}}% |
| 81 |
\csname EURO@@#1\endcsname} |
| 82 |
\newcommand*\EUROADD[3]{% |
| 83 |
\expandafter\def\csname EURO@@#1\endcsname{\EURO@set{#3}{#1}{#2}{}}} |
| 84 |
\newcommand*\EURO@num[1]{{% |
| 85 |
\FPifneg#1% |
| 86 |
\EURO@lminus\let\EURO@post\EURO@rminus\FPneg#1#1% |
| 87 |
\else |
| 88 |
\EURO@lplus\let\EURO@post\EURO@rplus |
| 89 |
\fi |
| 90 |
\EURO@rround#1% |
| 91 |
\let\EURO@aux#1% |
| 92 |
\FPtrunc#1#10% |
| 93 |
\FPifzero#1\EURO@lzero\else\EURO@grp#1\fi |
| 94 |
\EURO@align{% |
| 95 |
\FPsub\EURO@aux\EURO@aux#1% |
| 96 |
\FPifzero\EURO@aux |
| 97 |
\ifnum\EURO@round<0 \EURO@rzero\fi |
| 98 |
\else |
| 99 |
\ifnum\EURO@round<0 |
| 100 |
\ifnum\EURO@round<-9 |
| 101 |
\FPclip\EURO@aux\EURO@aux |
| 102 |
\else |
| 103 |
\FPtrunc\EURO@aux\EURO@aux{-\EURO@round}% |
| 104 |
\fi |
| 105 |
\EURO@point |
| 106 |
\expandafter\EURO@split\EURO@aux\relax\relax\relax\EURO@ |
| 107 |
\fi |
| 108 |
\fi |
| 109 |
\EURO@post}}% |
| 110 |
\let\EURO@align\relax} |
| 111 |
\newcommand*\EURO@split{} |
| 112 |
\def\EURO@split0.#1#2#3#4\EURO@{#1#2#3% |
| 113 |
\EURO@threedig#4\relax\relax\relax\EURO@} |
| 114 |
\newcommand*\EURO@threedig[3]{% |
| 115 |
\if#1\relax |
| 116 |
\let\EURO@\relax |
| 117 |
\else |
| 118 |
\EURO@rsep#1#2#3\let\EURO@\EURO@threedig |
| 119 |
\fi\EURO@} |
| 120 |
\newcommand*\EURO@rround[1]{% |
| 121 |
\count@=\EURO@round\relax |
| 122 |
\ifnum\count@<1% |
| 123 |
\count@-\count@ |
| 124 |
\FPround#1#1\count@ |
| 125 |
\else |
| 126 |
\FPset\EURO@aux1% |
| 127 |
\EURO@rfac\EURO@aux\count@ |
| 128 |
\FPdiv#1#1\EURO@aux |
| 129 |
\FPround#1#10% |
| 130 |
\FPmul#1#1\EURO@aux |
| 131 |
\fi} |
| 132 |
\newcommand*\EURO@rfac[2]{% |
| 133 |
\ifnum#2>0 \advance#2-1 \EURO@rfac#1#2\FPmul#1#1{10}\fi} |
| 134 |
\newcommand*\EURO@grp[1]{\bgroup% |
| 135 |
\FPtrunc#1#10% |
| 136 |
\FPiflt#1{1000}% |
| 137 |
#1% |
| 138 |
\else |
| 139 |
\let\EURO@aux=#1% |
| 140 |
\FPdiv#1#1{1000}% |
| 141 |
\FPtrunc#1#10% |
| 142 |
\EURO@grp#1% |
| 143 |
\FPmul#1#1{1000}% |
| 144 |
\FPsub\EURO@aux\EURO@aux#1% |
| 145 |
\FPtrunc\EURO@aux\EURO@aux0% |
| 146 |
\count0=\EURO@aux\relax |
| 147 |
\EURO@lsep |
| 148 |
\ifnum\count0<100 0\ifnum\count0<10 0\fi\fi\EURO@aux |
| 149 |
\fi\egroup} |
| 150 |
\newcommand*\EURO@@ATS{\EURO@set{13.7603}{ATS}{\"oS}{}} |
| 151 |
\newcommand*\EURO@@BEF{\EURO@set{40.3399}{BEF}{BEF}{}} |
| 152 |
\newcommand*\EURO@@DEM{\EURO@set{1.95583}{DEM}{DM}{}} |
| 153 |
\newcommand*\EURO@@ESP{\EURO@set{166.386}{ESP}{Pt.}{}} |
| 154 |
\newcommand*\EURO@@FIM{\EURO@set{5.94573}{FIM}{FIM}{}} |
| 155 |
\newcommand*\EURO@@FRF{\EURO@set{6.55957}{FRF}{FRF}{}} |
| 156 |
\newcommand*\EURO@@GRD{\EURO@set{340.750}{GRD}{GRD}{}} |
| 157 |
\newcommand*\EURO@@IEP{\EURO@set{.787564}{IEP}{IEP}{}} |
| 158 |
\newcommand*\EURO@@ITL{\EURO@set{1936.27}{ITL}{Lit.}{}} |
| 159 |
\newcommand*\EURO@@LUF{\EURO@set{40.3399}{LUF}{LUF}{}} |
| 160 |
\newcommand*\EURO@@NLG{\EURO@set{2.20371}{NLG}{NLG}{}} |
| 161 |
\newcommand*\EURO@@PTE{\EURO@set{200.482}{PTE}{PTE}{}} |
| 162 |
\newcommand*\EURO@@EUR{\EURO@set{1.00000}{EUR}{Euro}{}} |
| 163 |
\newcommand*\EURO@@main{\EURO@set0{}{}{}} |
| 164 |
\newcommand*\EURO@@in{\EURO@set0{}{}{}} |
| 165 |
\newcommand*\EURO@@out{\EURO@set0{}{}{}} |
| 166 |
\newcommand*\EURO@@all{\EURO@set0{}{}{}} |
| 167 |
\EUROFORMAT{main}{\in\ (\out)} |
| 168 |
\EUROFORMAT{in}{\val~\sym} |
| 169 |
\EUROFORMAT{out}{\val~\sym} |
| 170 |
\EUROFORMAT{ITL}{\round0} |
| 171 |
\DeclareOption{eco}% |
| 172 |
{\EUROFORMAT{in}{\iso~\val}% |
| 173 |
\EUROFORMAT{out}{\iso~\val}} |
| 174 |
\newcommand*\EURO@emdash{\EURO@setzero |
| 175 |
{0}{---}{\EURO@point---}} |
| 176 |
\newcommand*\EURO@endash{\EURO@setzero |
| 177 |
{0}{--\kern.1em}{\EURO@point\kern.1em--}} |
| 178 |
\newcommand*\EURO@zeros{\EURO@setzero |
| 179 |
{0\EURO@align{\EURO@point00}}{0}{\EURO@point00}} |
| 180 |
\DeclareOption{emdash}{\let\EURO@table\EURO@emdash} |
| 181 |
\DeclareOption{endash}{\let\EURO@table\EURO@endash} |
| 182 |
\DeclareOption{zeros}{\let\EURO@table\EURO@zeros} |
| 183 |
\DeclareOption{table}{\EURO@table} |
| 184 |
\DeclareOption{dots}{\let\EURO@lsep.\let\EURO@rsep.} |
| 185 |
\ExecuteOptions{emdash} |
| 186 |
\InputIfFileExists{euro.cfg}% |
| 187 |
{\PackageInfo{euro}{Local config file euro.cfg used}}{} |
| 188 |
\ProcessOptions |
| 189 |
\endinput |
| 190 |
%% |
| 191 |
%% End of file `euro.sty'. |