| 1 |
# currency — Formatting currencies |
| 2 |
|
| 3 |
|
| 4 |
## Overview |
| 5 |
|
| 6 |
`currency` is a LaTeX package that facilitates the formatting |
| 7 |
of currencies (amounts and units). It is based on the `siunitx` package |
| 8 |
for printing numbers. |
| 9 |
|
| 10 |
For instance, this code in the preamble defines a EUR monetary unit |
| 11 |
|
| 12 |
``` latex |
| 13 |
\DefineCurrency{EUR}{name={euro},plural={euros},symbol={\euro},iso={EUR},kind=iso,base=2} |
| 14 |
``` |
| 15 |
|
| 16 |
that will be used later by |
| 17 |
|
| 18 |
``` latex |
| 19 |
\dEUR{123} or \dEUR[kind=plural]{123} |
| 20 |
``` |
| 21 |
to print `123 EUR or 123 euros`. There are many ways to change to output |
| 22 |
(the symbol could be put in front of the amount as required by some |
| 23 |
typographical conventions, ...). |
| 24 |
|
| 25 |
|
| 26 |
See the [documentation](https://github.com/antoinelejay/currency/blob/master/currency_doc.pdf) |
| 27 |
for examples and installation instructions. |
| 28 |
|
| 29 |
## License |
| 30 |
|
| 31 |
This work may be distributed and/or modified under the conditions of the |
| 32 |
[LaTeX Project Public License](http://www.latex-project.org/lppl.txt) (LPPL), |
| 33 |
version 1.3 or later. |
| 34 |
|
| 35 |
Please use the project's GitHub site at <https://github.com/antoinelejay/currency> |
| 36 |
for suggestions, feature requests, and bug reports. |
| 37 |
|
| 38 |
## Installation |
| 39 |
|
| 40 |
``` |
| 41 |
pdflatex currency.ins |
| 42 |
pdflatex currency.dtx |
| 43 |
makeindex -s gind.ist currency.idx |
| 44 |
makeindex -s gglo.ist -o currency.gls currency.glo |
| 45 |
pdflatex currency.dtx |
| 46 |
|
| 47 |
pdflatex currency_doc.tex |
| 48 |
biber currency_doc |
| 49 |
pdflatex currency_doc.tex |
| 50 |
``` |
| 51 |
|
| 52 |
## Availability |
| 53 |
|
| 54 |
This package is available on [github](https://github.com/antoinelejay/currency) and on |
| 55 |
[CTAN](http://www.ctan.org/tex-archive/macros/latex/contrib/currency) |
| 56 |
|