diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:53:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:53:00 +0000 |
commit | 5f5d2edc14d06b5b8f59b98d4bcd749fedf3e6be (patch) | |
tree | 33aaaf6f4b40b5a0264593876bcf81f446bff207 | |
parent | e5de56e3d616c3077ee1e10243691d579b576d2f (diff) |
trunk/Master/texmf-dist/source/latex/euro
git-svn-id: svn://tug.org/texlive/trunk@264 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/source/latex/euro/Makefile | 65 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/euro/euro.dtx | 1459 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/euro/euro.ins | 10 |
3 files changed, 1534 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/euro/Makefile b/Master/texmf-dist/source/latex/euro/Makefile new file mode 100644 index 00000000000..1c09c38e583 --- /dev/null +++ b/Master/texmf-dist/source/latex/euro/Makefile @@ -0,0 +1,65 @@ +# $Id: Makefile,v 1.6 2005/03/07 14:22:19 m Exp $ + +NAME=euro +ARCHIVE_NAME=$(NAME).tar.gz +ARCHIVE_CONTENTS=$(NAME).dtx Makefile $(NAME).txt $(NAME).ins $(NAME).pdf +MAKEIDXOPT= +DVIPSOPT= #-Pcmz -Pamz +DEP=$(NAME).sty + +all: $(NAME).ps + +print: $(NAME).ps + psbook $(NAME).ps|psnup -2|psselect -e|lpr + @ echo -n revert paper stack and hit return + @ read key + psbook $(NAME).ps|psnup -2|psselect -o -r|lpr + +ps: $(NAME).ps + +%.ps: %.dvi + dvips $(DVIPSOPT) $< -o $@ + +hyper: $(NAME).dtx $(NAME).sty + pdflatex "\relax\let\makehyperref\active\input $(NAME).dtx" + +pdf: $(NAME).pdf + +%.pdf: %.dtx + pdflatex $< + +arc: archive + +archive: $(NAME).ins $(NAME).pdf + @ tar -czf $(ARCHIVE_NAME) $(ARCHIVE_CONTENTS) + @ echo $(ARCHIVE_NAME): + @ echo ==================== + @ tar -tzf $(ARCHIVE_NAME) + +clean: + rm -f $(NAME).{log,toc,lot,lof,idx,ilg,ind,aux,blg,bbl,dvi,ins} + +distclean: clean + rm -f $(NAME).{ps,pdf,sty} $(ARCHIVE_NAME) + + +REFWARN = 'Rerun to get cross-references' +LATEXMAX = 5 + +%.dvi: %.dtx $(DEP) + latex $< + RUNS=$(LATEXMAX); \ + while [ $$RUNS -gt 0 ] ; do \ + if grep $(REFWARN) $*.log > /dev/null; \ + then latex $< ; else break; fi; \ + RUNS=`expr $$RUNS - 1`; \ + done + +$(NAME).sty: $(NAME).ins FORCE + tex $(NAME).ins + +$(NAME).ins: + latex $(NAME).dtx + +FORCE: + diff --git a/Master/texmf-dist/source/latex/euro/euro.dtx b/Master/texmf-dist/source/latex/euro/euro.dtx new file mode 100644 index 00000000000..e65b69c8348 --- /dev/null +++ b/Master/texmf-dist/source/latex/euro/euro.dtx @@ -0,0 +1,1459 @@ +% \iffalse +%% File: euro.dtx Copyright (C) 1999--2005 Melchior FRANZ +%% $Id: euro.dtx,v 1.14 2005/03/07 14:22:19 m Exp $ +%% $Version: 1.1 $ +%<*preamble> +% +% +% +% on Unix/Linux just run "make" to get the style file and the documentation; +% else generate the driver euro.ins (if you don't already have it): +% +% $ latex euro.dtx +% +% Now generate the style file: +% +% $ tex euro.ins +% +% And finally to produce the documentation run LaTeX three times: +% +% $ latex euro.dtx +% +% +% +% +% This package needs the fp-package! +% +% fp -- CTAN//macros/latex/contrib/other/fp/ -- (by Michael MEHLICH) +% +%$ +%% ==================================================================== +%% @LaTeX-package-file{ +%% author = "Melchior FRANZ", +%% version = "1.1", +%% date = "7 March 2005", +%% filename = "euro.dtx", +%% address = "Melchior FRANZ +%% Rieder Hauptstrasse 52 +%% A-5212 SCHNEEGATTERN +%% AUSTRIA", +%% telephone = "++43 7746 3109", +%% URL = "http://members.aon.at/mfranz/TeX/", +%% email = "mfranz \# aon : at", +%% codetable = "ISO/ASCII", +%% keywords = "euro", +%% supported = "yes", +%% docstring = "This document describes the euro package, which +%% converts arbitrary national currency amounts +%% using the Euro as base unit, and typesets monetary amounts +%% in almost any desired way. Write e.g. \ATS{17.6} to get +%% something like `17,60 \"oS (1,28 Euro)' automatically. +%% Conversion rates for the so-called Euro-zone countries +%% are already built-in. Further rates can be added easily." +%% } +%% ==================================================================== +% +% COPYRIGHT NOTICE: +% This package is free software that can be redistributed and/or modified +% under the terms of the LaTeX Project Public License as specified +% in the file macros/latex/base/lppl.txt on any CTAN archive server. +% +% Note that you may freely distribute modified versions of this documentation, with one +% exception: If you modify or remove section "The European Union & Software Patents", +% you agree that your and/or your company's/institution's name may be listed in said +% section in any official distribution. +%</preamble> +% +% +% +%<*batchfile> +\begin{filecontents}{euro.ins} +\def\batchfile{euro.ins} +\input docstrip.tex +\askforoverwritefalse +\keepsilent +\generate{\file{euro.sty}{\from{euro.dtx}{package}}} +\endbatchfile +\end{filecontents} +%</batchfile> +% +% +%<*driver> +\def\fileversion{1.1} +\def\filedate{2005/03/07} +\documentclass{ltxdoc} +% +% +% +\ifx\makehyperref\EUROundefined + \newcommand*\texorpdfstring[2]{#1} + \newcommand*\color[1]{} +\else ^^A for "make hyper" + \usepackage{hyperref} + \hypersetup{ + bookmarksopen, + colorlinks, + pdftitle={The euro package}, + pdfauthor={Melchior FRANZ}, + pdfsubject={${}$Id: euro.dtx,v 1.14 2005/03/07 14:22:19 m Exp ${}$}, + pdfkeywords={currency, euro, monetary, conversion} + } + \usepackage[pdftex]{graphicx,color} +\fi +% +% +% +\IfFileExists{euro.sty} + {\usepackage{euro}[1999/05/15]\let\EUROSTYfound\active} + {\GenericWarning{euro.dtx} + {Package file `euro.sty' not found. All the instructive^^J^^A + examples will be replaced by boldfaced question marks.^^J^^A + (Generate `euro.sty' by (La)TeXing `euro.ins' and process^^J^^A + `euro.dtx' three times to get the documentation right.)^^J} + \newcommand*\EURO[1]{\EUROii} + \newcommand*\EUROii[2][]{\textbf{??}} + \newcommand*\EUROFORMAT[2]{} + \newcommand*\EUROADD[3]{} + \newcommand*\EUROSYM[2]{}} +% +\usepackage{multicol} +\setcounter{tocdepth}{2} +\begin{document} +\DocInput{euro.dtx} +\end{document} +%</driver> +% \fi +% +% +% \CheckSum{452} +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \newcommand*\opt{\textsf} +% \newcommand*\DescribeOption[1]{\leavevmode +% \marginpar{\raggedleft\opt{\strut#1\strut}}\ignorespaces} +% +% \newcommand*\ATS{\EURO{ATS}} +% \newcommand*\EUR{\EURO{EUR}} +% \newcommand*\DEM{\EURO{DEM}} +% \newcommand*\ESP{\EURO{ESP}} +% \newcommand*\ITL{\EURO{ITL}} +% \newcommand*\USD[1]{{% +% \EUROFORMAT{main}{\in}% +% \EUROFORMAT{in}{\val\,\$}% +% \EUROFORMAT{EUR}{\form,.,\round{-2}}% +% \EURO{EUR}{#1}}} +% \newcommand*\NUM[1]{{% +% \EUROFORMAT{main}{\in}% +% \EUROFORMAT{in}{\val}% +% \EUROFORMAT{EUR}{\form,.,\round{-10}}% +% \EURO{EUR}{#1}}} +% +% +% \makeatletter +% ^^A Don't use this! It's really ugly! :-( +% \newcommand*\euro{\unitlength.7em +% \begin{picture}(1.2,1)(-.2,.1) +% \linethickness{.05em} +% \qbezier(.8,.9)(.5,1.2)(.1,.87) +% \qbezier(.1,.87)(-.0,.78)(0,.5) +% \qbezier(.0,.5)(-.0,.22)(.35,.1) +% \qbezier(.35,.1)(.54,.02)(.77,.22) +% \put(-.12,.65){\line(1,0){.9}} +% \put(-.12,.46){\line(1,0){.8}} +% \end{picture}} +% +% \newenvironment{example}[1][.45\textwidth] +% {\par\medskip\begin{tabular}{p{#1}l}} +% {\end{tabular}\noindentafter\medbreak} +% +% \newenvironment{syntax} +% {\par\medskip\def\<##1>{$\langle$\textit{##1}$\rangle$}% +% \indent\begin{tabular}{l}} +% {\end{tabular}\noindentafter\medbreak} +% +% \newcommand*\noindentafter{\@nobreaktrue\everypar{{\setbox\z@\lastbox}}} +% +% \newenvironment{labeling}[1] +% {\list{}{\settowidth{\labelwidth}{\textbf{#1}} +% \leftmargin\labelwidth\advance\leftmargin\labelsep +% \def\makelabel##1{\textbf{##1}\hfil}}}{\endlist} +% +% \makeatother +% +% \changes{v0.1}{1999/02/01}{initial version}% +% \changes{v0.2}{1999/05/15}{interface completely new; integer rounding implemented}% +% \changes{v1.0}{2001/10/12}{greek currency added}% +% \changes{v1.1}{2003/02/19}{specific currency formats inherit generic settings}% +% +% +% +% +% \title{The \texttt{euro} package} +% \author{Melchior \textsc{FRANZ}} +% \date{March 7, 2005} +% \maketitle +% +% +% +% \begin{abstract} +% \EUROSYM{EUR}{\euro}^^A introduce the Euro symbol for within the abstract only +% +% This article describes the |euro| package^^A +% \footnote{This package has version number \fileversion, last revised \filedate.}, +% which converts arbitrary currency units into each other using the \emph{Euro} +% (official symbol \euro +% \footnote{The \euro\ symbol in this documentation is +% `handmade'---it is really ugly and not to be used in real documents. Take the well designed symbol +% defined e.\,g.~in the |eurosym| package by \textsc{Henrik Theiling} eventually using +% the |eurofont| package by \textsc{Rowland McDonnell} to select the proper fo(u)nt/shape.}^^A +% ) as base unit, and formats monetary amounts in almost any desired way. +% The respective conversion rates are predefined for the national +% currency units of the \emph{Euro-zone} countries, every other +% currency unit can easily be added. +% The package allows to type e.\,g.\ |\ATS{17.6}| to get something +% like \ATS{17.6}. All necessary calculations are with high precision done +% by the great |fp| package^^A +% \footnote{\(\langle\)|CTAN//macros/latex/contrib/other/fp/|\(\rangle\)} +% by \textsc{Michael Mehlich}, +% which you have to install to get this package working. +% The package complies with the concerned rules and orders of the European +% Council. +% \end{abstract} +% +% +% +% {\setlength{\parskip}{0pt}\tableofcontents} +% \addtocontents{toc}{\protect\begin{multicols}{2}} +% +% +% \section{Introduction} +% +% Twelve of the fifteen members of the European Union have agreed +% to replace their national currencies by a common currency, the +% \emph{Euro}. Before the 1\textsuperscript{st} of January 2001 the Euro was only a +% unit for calculations, with fixed conversion rates for +% each of the old currencies. Since then the Euro is actual money with +% coins and bank notes. The Francs, the D-Mark, the Schilling, +% they are history. +% Several further countries will join the European Union over +% the next years, and sooner or later also the so-called \emph{Euro-zone}. +% It's still common practice in Europe to write monetary amounts both in the national +% currency and in the new \euro~currency, +% thus helping to become familiar with the \emph{Euro}. +% +% But it's a nuisance to convert every value by hand or even with +% a calculator. Let our computers do all the hard work. +% Although \TeX\ is unable to do such calculations with +% its basic arithmetic functions, there's a way out: The |fp| package +% allows to deal with numbers ranging from +% \(-999999999999999999{,}999999999999999999\) to +% \(+999999999999999999{,}999999999999999999\) with high precision. +% +% Since there are so many currencies and different possible formats, +% this package provides only a customizable interface. All parameters are +% predefined in a common way, though, so that no further definitions will be +% necessary in most cases. The package tries to load an optional file +% `|euro.cfg|' where such local customizing commands may be placed in +% (see section~\ref{sec:config} for further explanation). +% +% +% +% +% +% \section{How to use the package} +% +% \subsection{The main macro} +% +% The \DescribeMacro{\EURO}|\EURO| command does the main work. +% It takes the \textit{source currency unit,} an optional \textit{destination currency unit,} +% both as three-digits \textsc{ISO} currency codes (see table \ref{tab:iso}), and +% the respective \emph{money amount}. +% +% \begin{syntax} +% |\EURO{|\<source currency unit>|}[|\<destination currency unit>|]{|\<amount>|}| +% \end{syntax} +% +% +% \begin{table} +% \begin{quote} +% \begin{center} +% \begin{tabular}{ll@{\hspace{2cm}}ll} +% \texttt{EUR}& Europe& \texttt{GRD}& Greece\\ +% \texttt{ATS}& Austria& \texttt{IEP}& Ireland\\ +% \texttt{BEF}& Belgium& \texttt{ITL}& Italy\\ +% \texttt{DEM}& Germany& \texttt{LUF}& Luxembourg\\ +% \texttt{ESP}& Spain& \texttt{NLG}& The Netherlands\\ +% \texttt{FIM}& Finland& \texttt{PTE}& Portugal\\ +% \texttt{FRF}& France +% \end{tabular} +% +% \caption{ISO currency codes of the \emph{Euro} and of the twelve \emph{Euro-zone} countries.} +% \label{tab:iso} +% \end{center} +% \end{quote} +% \end{table} +% +% A dot is to be used as \emph{decimal `point'} separating a number's integer and +% fractional part. Numbers may of course be negative. +% If the optional destination currency unit is omitted, the \emph{Euro} is taken. +% +% \begin{example} +% |\EURO{BEF}[FIM]{70}|& \EURO{BEF}[FIM]{70}\\ +% |\EURO{FIM}[BEF]{70}|& \EURO{FIM}[BEF]{70}\\ +% |\EURO{BEF}[BEF]{70}|& \EURO{BEF}[BEF]{70}\rlap{\hspace{3.5em}[surprised?]}\\ +% |\EURO{FIM}{17.8}|& \EURO{FIM}{17.8} +% \end{example} +% \null +% +% +% +% +% \subsection{How to change the local style} +% +% The ISO currency codes don't really look good in running text. You +% can replace them by some other currency symbol or tag using the +% \DescribeMacro{\EUROSYM}|\EUROSYM| command. +% +% \begin{syntax} +% |\EUROSYM{|\<currency unit>|}{|\<symbol>|}| +% \end{syntax} +% +% We Austrians, for example, prefer to write `\"oS' instead of `ATS'. +% We don't have to write |\EUROSYM{ATS}{\"oS}| though, because this national +% style (like those of some other countries) is already predefined. If your +% national style is still missing, please drop me a line, and I will insert it. +% Meanwhile the \textsc{ISO} currency codes are used in such cases. +% +% \begin{example} +% |\EURO{FRF}{16.3}|& \EURO{FRF}{16.3}\\ +% |\EUROSYM{FRF}{Francs}|&\\ +% |\EURO{FRF}{16.3}|& \EUROSYM{FRF}{Francs}\EURO{FRF}{16.3} +% \end{example} +% +% The official Euro symbol is not provided by default, since there are a lot of +% different fonts and methods to produce an \euro\ sign. Type +% |\EUROSYM{EUR}{|\(\langle\)\textit{euro symbol}\(\rangle\)|}| to +% replace the word `Euro' with your local \euro\ sign. +% (I'm still hoping that some day the text companion fonts will contain the official in +% addition or instead of the phantasy \emph{Euro} symbols.) +% This documentation, for example, says |\EUROSYM{EUR}{\euro}| +% because it has its own |\euro| symbol built-in. (Isn't it beautiful?) +% +% \begin{example} +% |\EURO{LUF}{137.8}|& \EURO{LUF}{137.8}\\ +% |\EUROSYM{EUR}{\euro}|&\\ +% |\EURO{LUF}{137.8}|& \EUROSYM{EUR}{\euro}\EURO{LUF}{137.8} +% \end{example} +% +% \EUROSYM{EUR}{\euro} ^^A define this globally now +% +% +% Writing e.\,g.~|\EURO{ATS}{...}| again and again is cumbersome, so it's recommended to +% define macros for the most often used currency units. You may put such definitions +% into your local configuration file (see section~\ref{sec:config}). +% +% \begin{example} +% |\newcommand*\ATS{\EURO{ATS}}|\\ +% |\ATS{9.90}|& \ATS{9.90}\\ +% |\ATS[ITL]{19.90}|& \ATS[ITL]{19.90} +% \end{example} +% \null +% +% +% +% +% \subsection{The package options} +% \label{sec:options} +% +% The |euro| package provides six package options. See table~\ref{tab:options} for +% a short demonstration. +% +% \begin{labeling}{\opt{emdash}~~} +% \item[\textbf{\opt{eco}}] +% The \opt{eco} option typesets monetary amounts as, I think, +% economists prefer it, with \textsc{ISO} codes preceding the values. +% \item[\textbf{\opt{dots}}] +% The \opt{dots} option inserts dots as three-digits group +% separators. (Default is a little space like \rule{.4pt}{.75em}\,\rule{.4pt}{.75em}.) +% \item[\textbf{\opt{table}}] +% Turns the \emph{table mode} globally on. +% While integers are normally printed without decimal point and fractional part (sic!), +% it may especially in tables be desirable to typeset a decimal point followed by a dash. +% See section \ref{sec:align} for how to keep this behavior local to a particular table. +% \item[\textbf{\opt{emdash}}] +% Lets the \opt{table} dashes be `---'. Doesn't turn on \emph{table mode}. +% (This option is selected by default, so it doesn't make much sense at +% the moment. But this might change some day.) +% \item[\textbf{\opt{endash}}] +% Lets the \opt{table} dashes be `--'. Doesn't turn on \emph{table mode}. +% \item[\textbf{\opt{zeros}}] +% Lets zeros be printed instead of dashes. Doesn't turn on \emph{table mode}. +% \end{labeling} +% +% +% \begin{table} +% \begin{center} +%^^A the options are only faked here ;-) +% \makeatletter +% \begin{tabular}{lr}% +% |\EURO{ATS}{1000}| with&\\[.5ex] +% \hline\\[-1.5ex] +% (default settings)& +% \EURO{ATS}{1000}\\ +% \opt{dots}&\let\EURO@lsep.\let\EURO@rsep.^^A +% \EURO{ATS}{1000}\\ +% \opt{endash}&\let\EURO@table\EURO@endash +% \EUROFORMAT{main}{\table\in\ (\out)}^^A +% \EURO{ATS}{1000}\\ +% \opt{emdash}&\let\EURO@table\EURO@emdash +% \EUROFORMAT{main}{\table\in\ (\out)}^^A +% \EURO{ATS}{1000}\\ +% \opt{zeros}&\let\EURO@table\EURO@zeros +% \EUROFORMAT{main}{\table\in\ (\out)}^^A +% \EURO{ATS}{1000}\\ +% \opt{eco}& +% \EUROFORMAT{in}{\iso~\val}^^A +% \EUROFORMAT{out}{\iso~\val}^^A +% \EURO{ATS}{1000}\\ +% \opt{eco,endash}&\let\EURO@table\EURO@endash +% \EUROFORMAT{main}{\table\in\ (\out)}^^A +% \EUROFORMAT{in}{\iso~\val}^^A +% \EUROFORMAT{out}{\iso~\val}^^A +% \EURO{ATS}{1000}\\ +% \opt{eco,emdash}&\let\EURO@table\EURO@emdash +% \EUROFORMAT{main}{\table\in\ (\out)}^^A +% \EUROFORMAT{in}{\iso~\val}^^A +% \EUROFORMAT{out}{\iso~\val}^^A +% \EURO{ATS}{1000}\\ +% \end{tabular} +% \end{center} +% \caption{Package options} +% \label{tab:options} +% \end{table} +% +% +% +% +% \subsection{Adding currency units} +% +% If some day further countries will join the \emph{Euro-zone,} you can easily +% add their currency units to your document files or, better, to +% your local `|euro.cfg|' configuration file. +% The |euro| package will then, of course, be updated as soon as possible. +% +% \begin{syntax} +% |\EUROADD{|\<ISO code>|}{|\<national style/symbol>|}{|\<conversion rate>|}| +% \end{syntax} +% +% The conversion rate describes, how many units of the new currency +% equal 1~\euro. You can also add currencies, that will +% probably never become member of the \emph{Euro-zone,} like the US-\$. But be aware that such +% conversion rates may change daily/hourly! See \(\langle\)|http://europa.eu.int/|\(\rangle\) for the +% actual rates. The used \textsc{ISO} code serves as identifier for the +% respective currency unit. +% +% \EUROADD{GBP}{\textit{\char`\$}}{0.6694} +% \begin{example} +% |% 1 Euro = 0.6694 Pound Sterling (March 11, 1999)|\hspace*{-4.5cm}\\ +% |%|\\ +% |\EUROADD{GBP}{\textsterling}{0.6694}|\hspace*{-3cm}\\ +% |\newcommand*\GBP{\EURO{GBP}}|\\ +% \\ +% |\GBP{47.11}|& \EURO{GBP}{47.11}\\ +% |\GBP[FRF]{47.11}|& \EURO{GBP}[FRF]{47.11}\\ +% |\EURO{EUR}[GBP]{1}|& \EURO{EUR}[GBP]{1} +% \end{example} +% +% The pound symbol in this example looks a bit too slanted. You'd better take +% |\textsterling| from the |textcomp| package, which I didn't. +% +% +% +% +% +% +% \section{Further customization} +% \label{sec:format} +% +% The desirable format for monetary amounts may differ from country to country and from purpose to purpose. +% The |euro| package uses three kinds of format strings to customize the format, each of which may +% consist of some \emph{reserved keywords} and any other \TeX\ commands. It's a good idea +% to put such commands in your local configuration file (see section~\ref{sec:config}). +% +% +% +% \subsection{The main format} +% +% The main format defines how source and destination currency shall be arranged. +% +% \begin{syntax} +% |\EUROFORMAT{main}{|\<main format string>|}| +% \end{syntax} +% +% The \emph{reserved keywords} |\in| and |\out| stand for the source and the destination currency. +% The following table shows some possible formats with the first line showing the +% default definition. +% +% \begin{example}[.58\hsize] +% & |\EURO{ATS}{30}| yields\\[.5ex] +% \hline\\[-1.5ex] +% |\EUROFORMAT{main}{\in\ (\out)}|& \EURO{ATS}{30}\\ +% |\EUROFORMAT{main}{\in\slash\out}|& \EUROFORMAT{main}{\in\slash\out}\EURO{ATS}{30}\\ +% |\EUROFORMAT{main}{\in\ ($=$\,\out)}|& \EUROFORMAT{main}{\in\ ($=$\,\out)}\EURO{ATS}{30}\\ +% |\EUROFORMAT{main}{\in\ (that is \out)}|& \EUROFORMAT{main}{\in\ (that is \out)}\EURO{ATS}{30}\\ +% |\EUROFORMAT{main}{\out}|& \EUROFORMAT{main}{\out}\EURO{ATS}{30} +% \end{example} +% \null +% +% +% +% +% \subsection{The currency format} +% +% +% The currency format defines how the source and the destination currency +% shall be formatted. +% +% \begin{syntax} +% |\EUROFORMAT{in}{|\<currency format string>|}|\\ +% |\EUROFORMAT{out}{|\<currency format string>|}| +% \end{syntax} +% +% The \emph{reserved keywords} |\val|, |\iso| and |\sym| have a special meaning, but +% almost every other \TeX\ command may be used as well. +% +% \medskip\indent +% \begin{tabular}{@{\texttt\bgroup}l@{\egroup\quad}p{.8\hsize}} +% \string\val& monetary amount\\ +% \string\iso& \textsc{ISO} currency code\\ +% \string\sym& national currency style\slash tag (if defined; \textsc{ISO} code else)\\ +% \end{tabular} +% +% \medskip\noindent +% For some currency units +% the |\sym| command produces only the \textsc{ISO} code instead of the national style, +% which I didn't know. This will (with your help!) be changed in future releases. +% The following table shows the most obvious arrangements. All said about the |in| format +% string is also true for the |out| format. +% +% {\EUROFORMAT{main}{\in}\newcommand\EUROaux{\hspace{1.2cm}} +% \begin{example}[.58\textwidth] +% with |\EUROFORMAT{main}{\in}| & |\EURO{ATS}{30}| yields\\ +% \hspace{2cm}and&\\[.5ex] +% \hline\\[-1.5ex] +% |\EUROFORMAT{in}{\val~\sym}|& \EUROaux\EURO{ATS}{30}\\ +% |\EUROFORMAT{in}{\val~\iso}|& \EUROaux\EUROFORMAT{in}{\val~\iso}\EURO{ATS}{30}\\ +% |\EUROFORMAT{in}{\sym~\val}|& \EUROaux\EUROFORMAT{in}{\sym~\val}\EURO{ATS}{30}\\ +% |\EUROFORMAT{in}{\iso~\val}|& \EUROaux\EUROFORMAT{in}{\iso~\val}\EURO{ATS}{30} +% \end{example}} +% \null +% +% +% +% +% +% +% +% \subsection{The number format} +% +% The number format, finally, defines how the numbers themselves should be +% typeset considering positive\slash negative numbers, rounding and so on. +% +% \begin{syntax} +% |\EUROFORMAT{all}{|\<number format>|}|\\ +% |\EUROFORMAT{|\<ISO currency code>|}{|\<number format>|}| +% \end{syntax} +% +% The definitions labeled with |all| will be used for all currency units. +% By using |\EUROFORMAT| with one of the three-digits \textsc{ISO} codes +% as the first argument, these general settings can be overridden for this +% currency. +% Only the \emph{Italian Lira} is defined this way by default, because it +% wouldn't make sense to write \emph{Lira} amounts with two fractional digits +% like the other European currencies.^^A +% \footnote{The package, for example, says something like +% \texttt{\string\EUROFORMAT\char`\{ITL\char`\}\char`\{\string\round\char`\{0\char`\}\char`\}}.} ^^A 8-P +% +% The \textit{number format string} may contain the commands |\form|, +% |\round|, |\zero|, |\plus|, and |\minus|, each of which takes one or +% more arguments. You have only to mention the points that shall differ +% from the default behavior. +% Such a number format might look horrible like this +% +% \begin{example} +% |\EUROFORMAT{all}{%|\\ +% | \form{\,}{,}{\,}%|\\ +% | \round{-2}%|\\ +% | \zero{0}{0}{}%|\\ +% | \plus{}{}%|\\ +% | \minus{\(-\)}{}}| +% \end{example} +% +% which, by fortune, is the predefined default format\footnote{Well, that is a lie: In fact, +% it is only the equivalent of the default definition, which is defined in another way.}, +% but it might as well be empty or contain only one of the commands and its arguments. +% Here again all arguments are predefined quite reasonably, so you won't have +% to bother with these verbose definitions. +% +% To make further explanations easier, figure~\ref{fig:nomencl} describes the elements +% that a number may consist of (using my own nomenclature). +% +% \begin{center} +% \begin{figure} +% {\setlength{\unitlength}{1mm} +% \begin{picture}(80,60)(-15,10) +% \put(50,55){\makebox(0,0)[l]{preamble}} +% \put(48,55){\line(-1,0){46.5}} +% \put(1.5,55){\line(0,-1){27}} +% \put(50,50){\makebox(0,0)[l]{integer part}} +% \put(3,24){\makebox(8,10){\downbracefill}} +% \put(48,50){\line(-1,0){41}} +% \put(7,50){\line(0,-1){19}} +% \put(50,45){\makebox(0,0)[l]{decimal point}} +% \put(48,45){\line(-1,0){36.5}} +% \put(11.5,45){\line(0,-1){17}} +% \put(50,40){\makebox(0,0)[l]{fractional part}} +% \put(12.5,24){\makebox(11,10){\downbracefill}} +% \put(48,40){\line(-1,0){30}} +% \put(18,40){\line(0,-1){9}} +% \put(50,35){\makebox(0,0)[l]{postamble (none in this example)}} +% \put(48,35){\line(-1,0){23}} +% \put(25,35){\line(0,-1){7}} +% \put(0,25){\makebox(0,0)[l]{\(-\)1 000,234 567}} +% \put(50,15){\makebox(0,0)[l]{fractional group separator}} +% \put(48,15){\line(-1,0){30}} +% \put(18,15){\line(0,1){8}} +% \put(50,10){\makebox(0,0)[l]{integer group separator}} +% \put(48,10){\line(-1,0){43}} +% \put(5,10){\line(0,1){13}} +% \end{picture}} +% \caption{Elements that a number may consist of.} +% \label{fig:nomencl} +% \end{figure} +% \end{center} +% +% +% +% +% +% \subsubsection{The \texttt{\char`\\form} command} +% +% The \DescribeMacro{\form}|\form| command takes three arguments: the \emph{integer group separator}, +% the \emph{decimal point} and the \emph{fractional group separator}. +% +% \begin{syntax} +% |\form|\\ +% | {|\<integer group separator>|}|\\ +% | {|\<decimal point>|}|\\ +% | {|\<fractional group separator>|}| +% \end{syntax} +% +% +% \begin{description} +% \item[group separators:] +% separate groups of three decimal digits to improve legibility of bigger numbers. +% It's a small space by default, but taking a space, a dot or just nothing might be +% desirable in some cases. +% \item[decimal point:] +% separates a number's integer part from the fractional part. It's a comma by default. +% +% {\EUROFORMAT{main}{\in} +% \EUROFORMAT{in}{\align\val\hspace*{1cm}} +% \newcommand*\test[3]{\EUROFORMAT{EUR}{\form{#1}{#2}{#3}}\EURO{EUR}{1000.12345}} +% \medskip\noindent +% \begin{center} +% \begin{tabular}{lr} +% |\form{.}{,}{.}|& \test{.}{,}{.}\\ +% |\form{\,}{,}{\,}|& \test{\,}{,}{\,}\\ +% |\form{~}{,}{~}|& \test{~}{,}{~}\\ +% |\form{}{,}{}|& \test{}{,}{}\\ +% |\form{,}{.}{,}|& \test{,}{.}{,}\\ +% |\form{,}{$\cdot$}{,}|& \test{,}{$\cdot$}{,} +% \end{tabular} +% \end{center}} +% \end{description} +% +% +% +% +% \subsubsection{The \texttt{\char`\\round} command} +% +% The \DescribeMacro{\round}|\round| command takes the \emph{rounding number} as argument. +% +% \begin{syntax} +% |\round{|\<rounding number>|}| +% \end{syntax} +% +% It describes where to round the given money amount. Positive values round to integer digits, +% negative numbers round to fractional digits. Numbers lower than \(-9\) suppress rounding. +% +% {\EUROFORMAT{main}{\align\in} +% \EUROFORMAT{in}{\val} +% \newcommand*\test[1]{\EUROFORMAT{EUR}{\round{#1}}\EURO{EUR}{12345.67898765}} +% \medskip\noindent +% \begin{center} +% \begin{tabular}{r@{\hspace{1cm}}r@{\hspace{1.8cm}}}% +% \textit{rounding}& \textit{result}\\[.5ex] +% \hline\\[-1.5ex] +% |-10|& \test{-10}\\ +% |-4|& \test{-4}\\ +% |-3|& \test{-3}\\ +% |-2|& \test{-2}\\ +% |-1|& \test{-1}\\ +% |0|& \test{0}\\ +% |1|& \test{1}\\ +% |2|& \test{2}\\ +% |3|& \test{3}\\ +% |4|& \test{4}\\ +% |5|& \test{5} +% \end{tabular} +% \end{center}} +% +% +% +% +% \subsubsection{The \texttt{\char`\\zero} command} +% +% The \DescribeMacro{\zero}|\zero| command describes how to deal with zeros. It takes +% three arguments: the \emph{overall zero} part, the \emph{integer zero} part and the +% \emph{fractional zero} part. +% +% \begin{syntax} +% |\zero{|\<overall zero>|}{|\<integer zero>|}{|\<fractional zero>|}| +% \end{syntax} +% +% \noindent +% The following table shows some of the possible settings. The first entry is +% the predefined one, which should be used for running text. +% The last line shows the number format that is obtained in table mode with +% the default style \DescribeOption{emdash}\opt{emdash} selected. +% +% {\makeatletter +% \EUROFORMAT{main}{\align\in} +% \EUROFORMAT{in}{\val} +% \newcommand*\test[4]{\EUROFORMAT{EUR}{\zero{#1}{#2}{#3}}\EURO{EUR}{#4}} +% \def\|{\hspace{.1em}} +% \medskip\noindent +% \begin{center} +% \begin{tabular}{rr@{\hspace{1cm}}r@{\hspace{1cm}}r@{\hspace{1cm}}}% +% & \texttt{0\rlap{.0}} & \texttt{0\rlap{.3}} & \texttt{3\rlap{.0}}\\[.5ex] +% \hline\\[-1.5ex] +% |\zero{0}{0}{}|& \test{0}{0}{}{0}& \test{0}{0}{}{0.3}& \test{0}{0}{}{3.0}\\ +% |\zero{0}{0}{,00}|& \test{0}{0}{,00}{0}& \test{0}{0}{,00}{0.3}& \test{0}{0}{,00}{3.0}\\ +% |\zero{0}{}{}|& \test{0}{}{}{0}& \test{0}{}{}{0.3}& \test{0}{}{}{3.0}\\ +% |\zero{---\EURO@align{,---}}{---}{,---}|& +% \quad\test{---\EURO@align{,---}}{---}{,---}{0}& +% \test{---\EURO@align{,---}}{---}{,---}{0.3}& +% \test{---\EURO@align{,---}}{---}{,---}{3.0}\\ +% |\zero{0}{---}{,---}|& +% \test{0}{---}{,---}{0}& +% \test{0}{---}{,---}{0.3}& +% \test{0}{---}{,---}{3.0}\\ +% \end{tabular} +% \end{center}} +% +% \bigskip\noindent +% The |\EURO@align| command will get replaced by |\rlap| if alignment was requested. +% You only have to state it in the first argument, if you want to align zero +% amounts in tables. +% +% +% +% +% \subsubsection{The \texttt{\char`\\plus} and \texttt{\char`\\minus} commands} +% +% The \DescribeMacro{\plus}|\plus| and |\minus| commands allow to +% define a preamble\slash postamble for positive and negative numbers, respectively. +% \DescribeMacro{\minus}^^A +% +% \begin{syntax} +% |\plus{|\<positive preamble>|}{|\<positive postamble>|}|\\ +% |\minus{|\<negative preamble>|}{|\<negative postamble>|}| +% \end{syntax} +% +% While |\plus| isn't used by default, |\minus| is defined to provide a preceding +% minus sign for negative numbers. +% +% {\EUROFORMAT{main}{\align\in\hspace*{10mm}} +% \EUROFORMAT{in}{\val} +% \newcommand*\test[3]{\EUROFORMAT{EUR}{\minus{#1}{#2}}\EURO{EUR}{#3}} +% \medskip\noindent +% \begin{center} +% \begin{tabular}{rrr}% +% & positive numbers & negative numbers\\[.5ex] +% \hline\\[-1.5ex] +% |\minus{\(-\)}{}|& \test{\(-\)}{}{12000}& \test{\(-\)}{}{-12000}\\ +% |\minus{(}{)}|& \test{(}{)}{.79}& \test{(}{)}{-.79}\\ +% |\minus{\color{red}(}{)}|&^^A +% \test{\color{red}(}{)}{123.456}&^^A +% \test{\color{red}(}{)}{-123.456}\\^^A +% |\minus{\color{red}\(-\)}{}|\qquad&^^A +% \test{\color{red}\(-\)}{}{10}&^^A +% \test{\color{red}\(-\)}{}{-10}^^A +% \end{tabular} +% \end{center}} +% +% +% +% +% +% \subsection{Tables and alignment} +% \label{sec:align} +% +% To achieve proper alignment in tables there's an |\align| command that +% can be used in any of the different format strings no matter if it's a +% \emph{main}, an \emph{in}, \emph{out}, or one of the \emph{number} formats. +% This command is to be stated before the +% concerned |\in|, |\out|, or |\val| command, respectively. +% It lets a number's fractional part have +% no width, thus allowing to align such numbers properly in a flush-right +% table column (|r| column). The example below also shows how to use +% the \DescribeMacro{\table}|\table| keyword. It turns the \opt{table} +% mode on for the current table. To turn it on for the whole document, +% use the \opt{table} package option. If you find the `---' dashes +% too long, you can load the package with the \DescribeOption{endash}\opt{endash} +% option. +% +% +% \medskip +% \newcommand*\ALNUM{\EUROFORMAT{main}{\table\in}\EUROFORMAT{in}{\align\val}\EURO{EUR}} +% \begin{tabular}{lr} +% |\newcommand*\ALNUM{%|\\ +% | \EUROFORMAT{main}{\table\in}% % no \out currency|\hspace*{-2cm}\\ +% | \EUROFORMAT{in}{\align\val}% % no symbol/ISO code|\hspace*{-10cm}\\ +% | \EURO{EUR}}%|\\[2ex] +% |\begin{tabular}{r}|&\\ +% |\textbf{costs}\\|& \textbf{costs}\\ +% |\ALNUM{123456}\\|& \ALNUM{123456}\\ +% |\ALNUM{1234.56}\\|& \ALNUM{1234.56}\\ +% |\ALNUM{12.3456}\\|& \ALNUM{12.3456}\\ +% |\ALNUM{0.123456}|& \ALNUM{0.123456}\\ +% |\end{tabular}| +% \end{tabular} +% +% \medskip\noindent +% It may be necessary to put a |\hspace| after such an aligned number, +% especially when it is applied more than once. The second column would +% have to be |\llap|ped in this case. +% +% \medskip +% \newcommand*\IEP{^^A +% \EUROFORMAT{main}{\align\in\hspace{1.8cm}\llap{\align\out}}^^A +% \EUROFORMAT{in}{\val}^^A +% \EUROFORMAT{out}{\val}^^A +% \EURO{IEP}} +% \begin{example}[.9\textwidth] +% |\newcommand*\IEP{%|\\ +% | \EUROFORMAT{main}{\align\in\hspace{1.8cm}\llap{\align\out}}%|\hspace*{-1cm}\\ +% | \EUROFORMAT{in}{\val}%|\\ +% | \EUROFORMAT{out}{\val}%|\\ +% | \EURO{IEP}}| +% \end{example} +% \null +% +% \begin{tabular}{llr} +% |\begin{tabular}{lr}|&\\ +% |\bf Month& \bf Irish Pound/Euro\\|& \bf Month& \bf Irish Pound/Euro\\ +% |January& \IEP{6070.83}\\|& January& \IEP{6070.83}\\ +% |February& \IEP{1200}\\|& February& \IEP{1200}\\ +% |March& \IEP{0.123}\\|& March& \IEP{0.123}\\ +% |April& \IEP{441.0358}|& April& \IEP{441.0358}\\ +% |\end{tabular}| +% \end{tabular} +% +% \medskip\noindent +% It would have been much simpler, though, not to combine two +% columns in one |\EURO| command, but to use two separate entries. +% \medskip +% +% +% +% +% \subsection{Dirty tricks} +% +% +% Of course, the format doesn't have to deal with the \euro, nor with monetary amounts +% at all. (The |EUR| currency in the following examples has no meaning, +% we could also have used any other currency, provided that no |\out| command +% is used within the \emph{format string.}) +% +% \begin{example}[.6\textwidth] +% |\newcommand*\USD[1]{{%|\\ +% | \EUROFORMAT{main}{\in}%|\\ +% | \EUROFORMAT{in}{\val\,\$}%|\\ +% | \EUROFORMAT{EUR}{\form{,}{.}{,}\round{-2}}%|\hspace*{-1cm}\\ +% | \EURO{EUR}{#1}}}|\\[1.5ex] +% |\USD{-123450.6789}|& \USD{-123450.6789}\\[1ex] +% \end{example} +% +% These examples are probably too complicated for the simple things they do. +% But they may serve as examples of how to use some of the customization +% commands. +% +% \begin{example}[.6\textwidth] +% |\newcommand*\NUM[1]{{%|\\ +% | \EUROFORMAT{main}{\in}%|\\ +% | \EUROFORMAT{in}{\val}%|\\ +% | \EUROFORMAT{EUR}{\form{,}{.}{,}\round{-10}}%|\hspace*{-1cm}\\ +% | \EURO{EUR}{#1}}}|\\[1.5ex] +% |\NUM{1000} red ants|& \NUM{1000} red ants +% \end{example} +% \null +% +% +% +% \subsection{The default settings} +% +% The following lines show how the |\EURO| command's default behavior +% could have been defined. The real settings, however, were defined on +% a lower programming level. +% +% \begin{example}[.6\textwidth] +% |\EUROFORMAT{main}{\in\ (\out)}|\\ +% |\EUROFORMAT{in}{\val~\sym}|\\ +% |\EUROFORMAT{out}{\val~\sym}|\\ +% |\EUROFORMAT{all}{%|\\ +% | \form{\,}{,}{\,}%|\\ +% | \round{-2}%|\\ +% | \zero{0}{0}{}%|\\ +% | \plus{}{}%|\\ +% | \minus{\(-\)}{}}|\\ +% |\EUROFORMAT{ITL}{%|\\ +% | \round{0}}| +% \end{example} +% \null +% +% +% +% \subsection{The configuration file} +% \label{sec:config} +% +% If you want to change the predefined settings, create a +% file named `|euro.cfg|' and put it in a directory, where \TeX\ +% can find it. This configuration file will then be loaded +% at the end of the |euro.sty| file, so you may redefine +% any settings or commands, select package options and even +% introduce new package options. But if you intend to give +% your documents to others, don't forget to give them the +% required configuration files, too! That's how such a file +% could look like: +% +% \begin{example}[.92\textwidth] +% |% introduce the US-Dollar and the British Pound Sterling|\\ +% |\EUROADD{USD}{\$}{1.0891}|\\ +% |\EUROADD{GBP}{\textsterling}{0.6694}| +% \end{example} +% +% \indent +% \begin{example}[.85\textwidth] +% |% let Italian Lire be rounded to 10s|\\ +% |\EUROFORMAT{ITL}{\round{1}}|\\ +% |% and let their symbol be only `L.'|\\ +% |\EUROSYM{ITL}{L.}| +% \end{example} +% +% \indent +% \begin{example}[.92\textwidth] +% |% declare a new package option `bold',|\\ +% |% which typesets the source currency in boldface type|\\ +% |\DeclareOption{bold}{%|\\ +% | \EUROFORMAT{main}{\textbf{\in} (\out)}}| +% \end{example} +% +% \indent +% \begin{example}[.85\textwidth] +% |% always select the `endash' option|\\ +% |\ExecuteOptions{endash}|\\ +% |\endinput| +% \end{example} +% \null +% +% +% +% +% \section*{The European Union \&\ Patents on Software} +% +%^^A^^ NOTE TO DISTRIBUTORS: If you feel like distributing the euro package documentation with +%^^A^^ this section removed or modified, note the special copyright clause that applies in this case! +% +% Because this package is dedicated to the European Union's official currency, +% I feel the obligation --~in the name of freedom and democracy, and as a citizen +% of the EU~-- to comment on today's decision on the ``Computer Implemented +% Inventions Directive'': +% +% Today, 2005/03/07, unelected bureaucrats --~the European Council of ministers~-- decided +% to ignore the objections and clear will of the elected European Parliament, those of the +% Committee on Legal Affairs~(JURI), the presidency of the European Parliament, of several +% national parliaments, and nothing less than the interests of the citizens of the European Union. +% Instead, they chose to fulfill the wishes of software industry giants (some of which have +% been convicted of abusing their monopoly power in several countries), and the wishes of +% bureaucrats from the European Patent Office, which has illegally granted 30.000~software +% patents already. +% +% This is an incredible offense and disgusting abuse of power. It has yet to be +% investigated, which r\^ole corruption played in this plot, for which there +% seem to be strong signs. We are facing nothing less than an oligarchy of +% unelected bureaucrats who feel more obliged to maintaining the wealth of the richest +% man on earth, than the interests of the European citizens and the European +% economy. There is still hope that the European Parliament will reject the +% directive in the second reading. This appeal will remain in the documentation, though, +% as long as the European Parliament is treated as a fig leaf for undemocratic decisions. +% And should this directive become effective, and should I ever encounter conflicts +% with software patent claims in \emph{any} of my software packages, the |euro|~package +% will be the first that I will withdraw. +% +% This is a sad day. Shame on the European~Council! Shame on the European~Commission! +% +% +% +% +% +% \begin{thebibliography}{0} +% \bibitem{Duden}{Duden, Volume 1: \textit{Die Rechtschreibung.} Bibliographisches Institut, +% Mann\-heim--Wien--Z\"urich, 1986, 19th~edition.} +% +% \bibitem{EUrates}{European Council: \textit{Council Regulation (EC) No.~2866/98 of 31~December~1998 +% on the conversion rates between the euro and the currencies of the Member States adopting +% the euro.} Official Journal L~359. 31~December~1998.} +% +% \bibitem{EUratesGRD}{European Council: \textit{Council Regulation (EC) No.~1478/2000 of 19~June 2000 +% amending Regulation (EC) No.~2866/98 on the conversion rates between the euro and the currencies +% of the Member States adopting the euro.} Official Journal L~167. 7~July~2000.} +% +% \bibitem{EUround}{European Council: \textit{Certain provisions related to the introduction of the +% Euro.} Council Regulation 1103/97, 17~June~1997.} +% +% \bibitem{DEK}{\textsc{Knuth, Donald Ervin:} \textit{The \TeX book.} +% Addison--Wesley Publishing Company, Reading/Massachusetts, 1989, 16th~edition.} +% +% \bibitem{Tschichold}{\textsc{Tschichold, Jan:} \textit{Ausgew\"ahlte Aufs\"atze +% \"uber Fragen der Gestalt des Buches und der Typographie.} +% Birkh\"auser, Basel, 1987, 2nd~edition.} +% \end{thebibliography} +% +% +% +% \StopEventually{\addtocontents{toc}{\protect\end{multicols}}} +% +% +% +% +% +% +% +% +%^^A max 72 columns +%^^A-------------------------------------------------------------------- +% +% +% +% +% \section{The implementation} +% \begin{macrocode} +%<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{euro}[2003/02/19 v1.1 euro (mf)] +\RequirePackage{fp-basic} +\RequirePackage{fp-snap} +\FPmessagesfalse +% \end{macrocode} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \subsection{The engine} +% +% \begin{macro}{\EURO@zero} +% \begin{macro}{\EURO@lzero} +% \begin{macro}{\EURO@rzero} +% \begin{macro}{\EURO@lminus} +% \begin{macro}{\EURO@rminus} +% \begin{macro}{\EURO@lplus} +% \begin{macro}{\EURO@rplus} +% \begin{macro}{\EURO@align} +% \begin{macro}{\EURO@lsep} +% \begin{macro}{\EURO@lsep} +% \begin{macro}{\EURO@point} +% \begin{macro}{\EURO@round} +% These macros are for internal use only. They partly predefine the +% format strings. Never change them here, but create a `|euro.cfg|' +% file, where you can redefine them without causing undesirable +% side effects. +% +% \begin{macrocode} +\newcommand*\EURO@zero{0} +\newcommand*\EURO@lzero{0} +\newcommand*\EURO@rzero{} +\newcommand*\EURO@lminus{\(-\)} +\newcommand*\EURO@rminus{} +\newcommand*\EURO@lplus{} +\newcommand*\EURO@rplus{} +\newcommand*\EURO@align{} +\newcommand*\EURO@lsep{\,} +\newcommand*\EURO@rsep{\,} +\newcommand*\EURO@point{,} +\newcommand*\EURO@round{-2} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \begin{macro}{\EURO} +% \begin{macro}{\EURO@@} +% \begin{macro}{\EURO@scan} +% These macros manage the whole package. All the \emph{format string} +% macros (also called \emph{keywords}) are defined here locally. +% Note the beautiful |####|s! \texttt{;-)} +% +% \begin{macrocode} +\newcommand*\EURO[1]{\bgroup\def\EURO@icurr{#1}\EURO@@} +\newcommand*\EURO@@[2][EUR]{\FPset\EURO@ival{#2}% + \def\EURO@set##1##2##3##4##5{\FPset##5{##1}}% + \csname EURO@@\EURO@icurr\endcsname\EURO@ifac + \csname EURO@@#1\endcsname\EURO@ofac + \FPdiv\EURO@oval\EURO@ival\EURO@ifac + \FPmul\EURO@oval\EURO@oval\EURO@ofac + \def\EURO@set##1##2##3##4##5{\def##5{##4}}% + \EURO@@main\EURO@ + \EURO@@all\EURO@dflt + \let\EURO@set\EURO@scan + \def\in{{\csname EURO@@\EURO@icurr\endcsname\EURO@ival + \def\EURO@set####1####2####3{}\EURO@@in}}% + \def\out{{\csname EURO@@#1\endcsname\EURO@oval + \def\EURO@set####1####2####3{}\EURO@@out}}% + \def\align{\def\EURO@align####1{\rlap{####1}\let\EURO@align\relax}}% + \let\table\EURO@table + \def\form##1##2##3{\def\EURO@lsep{##1}\def\EURO@rsep{##3}% + \def\EURO@point{##2}}% + \def\round##1{\def\EURO@round{##1}}% + \let\zero\EURO@setzero + \def\minus##1##2{\def\EURO@lminus{##1}\def\EURO@rminus{##2}}% + \def\plus##1##2{\def\EURO@lplus{##1}\def\EURO@rplus{##2}}% + \EURO@\egroup} +\newcommand*\EURO@scan[5]{% + \def\val{\FPifzero#5\EURO@zero\else\EURO@num#5\fi}% + \def\iso{#2}\def\sym{#3}\def\EURO@form{\EURO@dflt#4}% + \ifx\EURO@form\empty\let\EURO@form\EURO@dflt\fi + \EURO@form}% +\newcommand*\EURO@setzero[3]{\def\EURO@zero{#1}% + \def\EURO@lzero{#2}\def\EURO@rzero{#3}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \begin{macro}{\EUROSYM} +% \begin{macro}{\EUROFORMAT} +% \begin{macro}{\EUROADD} +% These macros replace the third\slash fourth parameter of the +% respective currency entry with another currency code\slash +% format string, or add a new currency entry. +% +% \begin{macrocode} +\newcommand*\EUROSYM[2]{% + \def\EURO@set##1##2##3##4{\toks@={\EURO@set{##1}{##2}{#2}{##4}}% + \expandafter\edef\csname EURO@@#1\endcsname{\the\toks@}}% + \csname EURO@@#1\endcsname} +\newcommand*\EUROFORMAT[2]{% + \def\EURO@set##1##2##3##4{\toks@={\EURO@set{##1}{##2}{##3}{#2}}% + \expandafter\edef\csname EURO@@#1\endcsname{\the\toks@}}% + \csname EURO@@#1\endcsname} +\newcommand*\EUROADD[3]{% + \expandafter\def\csname EURO@@#1\endcsname{\EURO@set{#3}{#1}{#2}{}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \begin{macro}{\EURO@num} +% \begin{macro}{\EURO@split} +% Takes a macro containing a number, passes the integer part to |\EURO@grp| and +% outputs everything else, cares about rounding and such\dots +% +% \begin{macrocode} +\newcommand*\EURO@num[1]{{% + \FPifneg#1% + \EURO@lminus\let\EURO@post\EURO@rminus\FPneg#1#1% + \else + \EURO@lplus\let\EURO@post\EURO@rplus + \fi + \EURO@rround#1% + \let\EURO@aux#1% + \FPtrunc#1#10% + \FPifzero#1\EURO@lzero\else\EURO@grp#1\fi + \EURO@align{% + \FPsub\EURO@aux\EURO@aux#1% + \FPifzero\EURO@aux + \ifnum\EURO@round<0 \EURO@rzero\fi + \else + \ifnum\EURO@round<0 + \ifnum\EURO@round<-9 + \FPclip\EURO@aux\EURO@aux + \else + \FPtrunc\EURO@aux\EURO@aux{-\EURO@round}% + \fi + \EURO@point + \expandafter\EURO@split\EURO@aux\relax\relax\relax\EURO@ + \fi + \fi + \EURO@post}}% + \let\EURO@align\relax} +\newcommand*\EURO@split{} +\def\EURO@split0.#1#2#3#4\EURO@{#1#2#3% + \EURO@threedig#4\relax\relax\relax\EURO@} +\newcommand*\EURO@threedig[3]{% + \if#1\relax + \let\EURO@\relax + \else + \EURO@rsep#1#2#3\let\EURO@\EURO@threedig + \fi\EURO@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \begin{macro}{\EURO@rround} +% \begin{macro}{\EURO@rfac} +% Takes a macro containing a number, returns it rounded. +% |\EURO@rfac| calculates the rounding factor \(10^r\) +% for positive \(r\) (\emph{rounding number}). +% +% \begin{macrocode} +\newcommand*\EURO@rround[1]{% + \count@=\EURO@round\relax + \ifnum\count@<1% + \count@-\count@ + \FPround#1#1\count@ + \else + \FPset\EURO@aux1% + \EURO@rfac\EURO@aux\count@ + \FPdiv#1#1\EURO@aux + \FPround#1#10% + \FPmul#1#1\EURO@aux + \fi} +\newcommand*\EURO@rfac[2]{% + \ifnum#2>0 \advance#2-1 \EURO@rfac#1#2\FPmul#1#1{10}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \begin{macro}{\EURO@grp} +% Let's do some recursion---it's fun! (This macro does the three-digit grouping.) +% +% \begin{macrocode} +\newcommand*\EURO@grp[1]{\bgroup% + \FPtrunc#1#10% + \FPiflt#1{1000}% + #1% + \else + \let\EURO@aux=#1% + \FPdiv#1#1{1000}% + \FPtrunc#1#10% + \EURO@grp#1% + \FPmul#1#1{1000}% + \FPsub\EURO@aux\EURO@aux#1% + \FPtrunc\EURO@aux\EURO@aux0% + \count0=\EURO@aux\relax + \EURO@lsep + \ifnum\count0<100 0\ifnum\count0<10 0\fi\fi\EURO@aux + \fi\egroup} +% \end{macrocode} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \subsection{The facts} +% +% \begin{macro}{\EURO@@ATS} +% \begin{macro}{\EURO@@BEF} +% \begin{macro}{\EURO@@DEM} +% \begin{macro}{\EURO@@ESP} +% \begin{macro}{\EURO@@FIM} +% \begin{macro}{\EURO@@FRF} +% \begin{macro}{\EURO@@GRD} +% \begin{macro}{\EURO@@IEP} +% \begin{macro}{\EURO@@ITL} +% \begin{macro}{\EURO@@LUF} +% \begin{macro}{\EURO@@NLG} +% \begin{macro}{\EURO@@PTE} +% \begin{macro}{\EURO@@EUR} +% These values have been irrevocably fixed by the European Council on suggestion +% by the European Commission and been published in the \emph{Council Regulation (EC) No.~2866/98} +% \cite{EUrates} and \emph{No.~1478/2000} \cite{EUratesGRD} +% (taken from |http://europa.eu.int/|). +% +% \begin{macrocode} +\newcommand*\EURO@@ATS{\EURO@set{13.7603}{ATS}{\"oS}{}} +\newcommand*\EURO@@BEF{\EURO@set{40.3399}{BEF}{BEF}{}} +\newcommand*\EURO@@DEM{\EURO@set{1.95583}{DEM}{DM}{}} +\newcommand*\EURO@@ESP{\EURO@set{166.386}{ESP}{Pt.}{}} +\newcommand*\EURO@@FIM{\EURO@set{5.94573}{FIM}{FIM}{}} +\newcommand*\EURO@@FRF{\EURO@set{6.55957}{FRF}{FRF}{}} +\newcommand*\EURO@@GRD{\EURO@set{340.750}{GRD}{GRD}{}} +\newcommand*\EURO@@IEP{\EURO@set{.787564}{IEP}{IEP}{}} +\newcommand*\EURO@@ITL{\EURO@set{1936.27}{ITL}{Lit.}{}} +\newcommand*\EURO@@LUF{\EURO@set{40.3399}{LUF}{LUF}{}} +\newcommand*\EURO@@NLG{\EURO@set{2.20371}{NLG}{NLG}{}} +\newcommand*\EURO@@PTE{\EURO@set{200.482}{PTE}{PTE}{}} +\newcommand*\EURO@@EUR{\EURO@set{1.00000}{EUR}{Euro}{}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \begin{macro}{\EURO@@main} +% \begin{macro}{\EURO@@in} +% \begin{macro}{\EURO@@out} +% \begin{macro}{\EURO@@all} +% Define the generic format macros and `fill' them with +% some default settings. Define the number format for +% the \emph{Italian Lira} and the package options, +% load the optional `|euro.cfg|' file and, finally: +% Exit. +% +% +% \begin{macrocode} +\newcommand*\EURO@@main{\EURO@set0{}{}{}} +\newcommand*\EURO@@in{\EURO@set0{}{}{}} +\newcommand*\EURO@@out{\EURO@set0{}{}{}} +\newcommand*\EURO@@all{\EURO@set0{}{}{}} +\EUROFORMAT{main}{\in\ (\out)} +\EUROFORMAT{in}{\val~\sym} +\EUROFORMAT{out}{\val~\sym} +\EUROFORMAT{ITL}{\round0} +\DeclareOption{eco}% + {\EUROFORMAT{in}{\iso~\val}% + \EUROFORMAT{out}{\iso~\val}} +\newcommand*\EURO@emdash{\EURO@setzero + {0}{---}{\EURO@point---}} +\newcommand*\EURO@endash{\EURO@setzero + {0}{--\kern.1em}{\EURO@point\kern.1em--}} +\newcommand*\EURO@zeros{\EURO@setzero + {0\EURO@align{\EURO@point00}}{0}{\EURO@point00}} +\DeclareOption{emdash}{\let\EURO@table\EURO@emdash} +\DeclareOption{endash}{\let\EURO@table\EURO@endash} +\DeclareOption{zeros}{\let\EURO@table\EURO@zeros} +\DeclareOption{table}{\EURO@table} +\DeclareOption{dots}{\let\EURO@lsep.\let\EURO@rsep.} +\ExecuteOptions{emdash} +\InputIfFileExists{euro.cfg}% + {\PackageInfo{euro}{Local config file euro.cfg used}}{} +\ProcessOptions +\endinput +%</package> +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% +%^^A-------------------------------------------------------------------- +% +% +% +% +% \vspace{2explus1fill} +%\begin{verbatim} +%$Id: euro.dtx,v 1.14 2005/03/07 14:22:19 m Exp $ +%\end{verbatim} +% \Finale +% +% +% +% ^^A.E.I.O.U.^^ +% ^^A vim:ts=4:sw=4:et:cindent diff --git a/Master/texmf-dist/source/latex/euro/euro.ins b/Master/texmf-dist/source/latex/euro/euro.ins new file mode 100644 index 00000000000..42a651cb745 --- /dev/null +++ b/Master/texmf-dist/source/latex/euro/euro.ins @@ -0,0 +1,10 @@ +%% LaTeX2e file `euro.ins' +%% generated by the `filecontents' environment +%% from source `euro' on 2005/03/07. +%% +\def\batchfile{euro.ins} +\input docstrip.tex +\askforoverwritefalse +\keepsilent +\generate{\file{euro.sty}{\from{euro.dtx}{package}}} +\endbatchfile |