| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 28 Numerical Comparisons (Parsed) |
| 3 |
% Label: "ex:DTLifnum" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage[math=l3fp]{datatool-base} |
| 9 |
\begin{document} |
| 10 |
$1,234.0 = 1234$? \DTLifnumeq{1,234.0}{1234}{true}{false}. |
| 11 |
|
| 12 |
$\$12.00 = \pounds12$? \DTLifnumeq{\$12.00}{\pounds12}{true}{false}. |
| 13 |
|
| 14 |
$\$10.50 < \pounds10$? \DTLifnumlt{\$10.50}{\pounds10}{true}{false}. |
| 15 |
|
| 16 |
$1,000.0 > 1,000$? \DTLifnumgt{1,000.0}{1,000}{true}{false}. |
| 17 |
|
| 18 |
$1000 < \$1,000.00 < 2000$? \DTLifnumopenbetween{\$1,000.00}{1000}{2000}{true}{false}. |
| 19 |
|
| 20 |
$1000 \leq \$1,000.00 \leq 2000$? \DTLifnumclosedbetween{\$1,000.00}{1000}{2000}{true}{false}. |
| 21 |
\end{document} |