<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% This file is embedded in datatool-user.pdf version 3.3 2025-03-25
% Example 42 Currency Formats (GB Region)
% Label: "ex:regionGBcurrency"
% arara: xelatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[locales={en-GB}]{datatool-base}

\begin{document}
Currency code: \DTLCurrencyCode.
Currency symbol: \DTLCurrencySymbol. 

\DTLdecimaltocurrency{12345.678}{\formattedresult}
Formatted: \formattedresult.
(Numeric value: \DTLdatumvalue{\formattedresult}.) 

\DTLparse\parsed{Â£28,342.64}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}. 

\DTLparse\parsed{â‚¬19,234.56}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}. 

\DTLsetLocaleOptions{GB}{
 number-style=old,
 currency-symbol-prefix
}
(GB settings: number-style=old, currency-symbol-prefix=true.) 

\DTLdecimaltocurrency{12345.678}{\formattedresult}
Formatted: \formattedresult.
(Numeric value: \DTLdatumvalue{\formattedresult}.) 

\DTLparse\parsed{Â£28,342.648}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}. 

\DTLsetup{
 numeric={
  auto-reformat,
  region-currency-prefix=smallcaps
 }
}
(Numeric settings: auto-reformat, region-currency-prefix=smallcaps.) 

\DTLparse\parsed{Â£28,342.648}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}.
Currency symbol: \DTLdatumcurrency{\parsed}. 
\end{document}
</pre></body></html>