diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/currency/currency_doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/currency/currency_doc.tex | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/currency/currency_doc.tex b/Master/texmf-dist/doc/latex/currency/currency_doc.tex index 17c54ead9ff..a6cc83efcdd 100644 --- a/Master/texmf-dist/doc/latex/currency/currency_doc.tex +++ b/Master/texmf-dist/doc/latex/currency/currency_doc.tex @@ -8,7 +8,7 @@ \usepackage{filecontents} \usepackage[ backend=biber, -style=cnltx, +%style=cnltx, % incompatible with biblatex 3.3 sortlocale=en_EN, indexing=cite, useprefix]{biblatex} @@ -16,6 +16,9 @@ useprefix]{biblatex} \addbibresource{\jobname.bib} +\newnote*\doccorrectedsinceversion[1]{Documentation corrected in version~#1} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{filecontents*}{\jobname.bib} @online{iso, @@ -222,10 +225,15 @@ Currencies are used with or without amounts. They could also be changed locally. The style is stored in \verbcode|/currency/currency/.style|. \command{CurrencySetupAppend}[\marg{maps}] Similar to \cs{CurrencySetup} but append the style. - \command{dXXX}[\oarg{maps}] Print only the monetary unit with currency code \texttt{XXX}. - \command{cXXX}[\oarg{maps}\marg{value}] Print the value with the monetary unit with currency code \texttt{XXX}. + \doccorrectedsinceversion{0.2} + \command{cXXX}[\oarg{maps}] Print only the monetary unit with currency code \texttt{XXX} + (mnemonic \textit{c} stands for \textit{currency}). + \command{dXXX}[\oarg{maps}\marg{value}] Print the value with the monetary unit with currency code \texttt{XXX} (mnemonic \textit{d} stands for \textit{display}). + \command{vXXX}[\oarg{maps}\marg{value}]\sinceversion{0.2} + alias for \verbcode|\dXXX| (mnemonic \textit{v} stands for \textit{value}). \end{commands} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{How currencies are composed?} The commands \cs{cXXX} and \cs{dXXX} are expanded inside a group. @@ -287,14 +295,14 @@ so that there is no need to use \verbcode|\| after a command. The total gross salary is \dEUR{2000}. A part of \dEUR{1500} forms the net salary. \end{example} -\paragraph*{Using a prefix} +\subsection*{Using a prefix} \begin{example} The total cost of the project is \dEUR[prefix=M,kind=symbol]{0.5}. \end{example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\paragraph*{Changing the base} +\subsubsection{Changing the base} Most of the currencies have \emph{cents}, that is a monetary unit equal to $\nicefrac{1}{100}$ of the monetary unit. It is however possible to use another number of digits, either @@ -307,7 +315,7 @@ which is decomposed in \num{1000} fils. \end{example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\paragraph*{Changing the font} +\subsubsection{Changing the font} Using the \key{font}{tokens} key, it is possible to change the font which is used for the monetary units (remember that everything is enclosed into a group). @@ -335,7 +343,7 @@ However, they should be passed as boolean keys. \end{example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\paragraph*{Using \option{before} and \option{after}} +\subsubsection{Using options before and after} The use of \key{before}{tokens} is similar to the one of \key{font}{tokens}. It is possible to append or to prepend the value to existing ones @@ -362,7 +370,27 @@ For example, localization may change the unit separator (comma, ...). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsubsection{Using raw formula} + +A raw formula could be typeseted using the number option \verbcode|number=false|. +Beware, this propagate \verbcode|parse-numbers=false| to \verbcode|\num| +so that any inner call to the latter command should specify +\verbcode|parse-numbers=true| if needed. + +A style (see Section~\ref{sec:styles}) \verbcode|no-parse| is equivalent +to \verbcode|number=false|. + +\begin{example} + We get a total of \dEUR[number=false]{2\times \num[parse-numbers=true]{10000}}=\dEUR{20000}. + + We get a total of \dEUR[number=false]{2\times \num{10000}}=\dEUR{20000}. +\end{example} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Using styles} +\label{sec:styles} Some styles are aldeary defined to shorten the typesetting. For example, \verbcode|@iso| expands to \verbcode|kind=iso|. @@ -376,6 +404,9 @@ acts similarly for \verbcode|@sy| (or \verbcode|@symb|), \verbcode|@na| (or \ver \dGBP{10} ; \dGBP[@symb]{10} ; \dGBP[@pl]{10} ; \dGBP{5} \end{example} +A style \verbcode|no-parse| is also equivalent to \verbcode|number=false|. +\sinceversion{0.2} + |