Debian Codegraph @

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

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 33 Numerical/String Comparisons
3 % Label: "ex:DTLif"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[12pt]{article}
7 \pagestyle{empty}
8 \usepackage[math=l3fp]{datatool-base}
9 \begin{document}
10 1 = 1.0? (numeric) \DTLifeq{1}{1.0}{true}{false}.
11
12 1p = 1.0p? (string) \DTLifeq{1p}{1.0p}{true}{false}.
13
14 2 lt 10? (numeric) \DTLiflt{2}{10}{true}{false}.
15
16 A2 lt A10? (string) \DTLiflt{A2}{A10}{true}{false}.
17
18 2.0 gt 10.0? (numeric) \DTLifgt{2}{10}{true}{false}.
19
20 A2.0 gt A10.0? (string) \DTLifgt{A2.0}{A10.0}{true}{false}.
21
22 10 between 1 and 20 (numeric, exclusive)?
23 \DTLifopenbetween{10}{1}{20}{true}{false}.
24
25 10p between 1p and 20p (string, exclusive)?
26 \DTLifopenbetween{10p}{1p}{20p}{true}{false}.
27
28 1 between 1.0 and 2 (numeric, inclusive)?
29 \DTLifclosedbetween{1}{1.0}{2}{true}{false}.
30
31 1 between 1.0 and 2A (string, inclusive)?
32 \DTLifclosedbetween{1}{1.0}{2A}{true}{false}.
33 \end{document}