Debian Codegraph @

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

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 13 Test for Integer Value
3 % Label: "ex:ifint"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[12pt]{article}
7 \pagestyle{empty}
8 \usepackage{datatool-base}
9 \begin{document}
10 2536: \DTLifint{2536}{integer}{not an integer}.
11
12 2536.0: \DTLifint{2536.0}{integer}{not an integer}.
13
14 2,536: \DTLifint{2,536}{integer}{not an integer}.
15
16 2,5,3,6: \DTLifint{2,5,3,6}{integer}{not an integer}.
17
18 \DTLparse{\numA}{2,536}
19 \numA: \DTLifint{\numA}{integer}{not an integer}.
20
21 \DTLsetnumberchars{.}{,}%
22 2,536: \DTLifint{2,536}{integer}{not an integer}.
23
24 2.536: \DTLifint{2.536}{integer}{not an integer}.
25
26 \numA: \DTLifint{\numA}{integer}{not an integer}.
27 \end{document}