Debian Codegraph @

texmf-dist/doc/latex/datatool/datatool-user-examples/datatool-user-example015.tex

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 15 Test for Currency
3 % Label: "ex:ifcurr"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[12pt]{article}
7 \pagestyle{empty}
8 \usepackage{datatool-base}
9 \begin{document}
10 \$5.99: \DTLifcurrency{\$5.99}{currency}{not currency}.
11
12 \DTLcurrency{5.99}: \DTLifcurrency{\DTLcurrency{5.99}}{currency}{not currency}.
13
14 \pounds5.99: \DTLifcurrency{\pounds5.99}{currency}{not currency}.
15
16 \textsterling5.99: \DTLifcurrency{\textsterling5.99}{currency}{not currency}.
17
18 \$6.99: \DTLifcurrencyunit{\$6.99}{\$}{dollars}{not dollars}.
19
20 \newcommand{\cost}{\pounds10.50}%
21 \cost: \DTLifcurrencyunit{\cost}{\pounds}{pounds}{not pounds}.
22
23 US\$5.99: \DTLifcurrency{US\$}{currency}{not currency}.
24
25 \DTLnewcurrencysymbol{US\$}%
26 US\$5.99: \DTLifcurrency{US\$}{currency}{not currency}.
27 \end{document}