| 1 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
% |
| 3 |
% test file for ionumbers package |
| 4 |
% |
| 5 |
% Copyright 2008,2011 Christian Schneider <software(at)chschneider(dot)eu> |
| 6 |
% |
| 7 |
% This file is part of ionumbers. |
| 8 |
% |
| 9 |
% ionumbers is free software: you can redistribute it and/or modify |
| 10 |
% it under the terms of the GNU General Public License version 3 as |
| 11 |
% published by the Free Software Foundation, not any later version. |
| 12 |
% |
| 13 |
% ionumbers is distributed in the hope that it will be useful, |
| 14 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
% GNU General Public License for more details. |
| 17 |
% |
| 18 |
% You should have received a copy of the GNU General Public License |
| 19 |
% along with ionumbers. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
% |
| 21 |
% WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS! |
| 22 |
% |
| 23 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 24 |
|
| 25 |
\documentclass[12pt]{article} |
| 26 |
|
| 27 |
%% a bit more space (this is only a test file, not a typographically perfect |
| 28 |
%% book ;-)) |
| 29 |
\setlength{\textwidth}{0.75\paperwidth} |
| 30 |
\setlength{\marginparsep}{0pt} |
| 31 |
\setlength{\marginparwidth}{0pt} |
| 32 |
\setlength{\oddsidemargin}{0pt} |
| 33 |
\setlength{\evensidemargin}{0pt} |
| 34 |
\setlength{\hoffset}{0.125\paperwidth} |
| 35 |
\addtolength{\hoffset}{-1in} |
| 36 |
\setlength{\topmargin}{0pt} |
| 37 |
\setlength{\headheight}{0pt} |
| 38 |
\setlength{\headsep}{0pt} |
| 39 |
\setlength{\footskip}{0.1\paperheight} |
| 40 |
\setlength{\textheight}{0.8\paperheight} |
| 41 |
|
| 42 |
\usepackage{ionumbers} |
| 43 |
|
| 44 |
\newcommand*{\header}[1]{% |
| 45 |
\hline |
| 46 |
\multicolumn{4}{c}{#1}\\ |
| 47 |
\hline} |
| 48 |
\def\textsqrt{\def\sqrt##1{\textbackslash sqrt ##1}} |
| 49 |
\newcommand*{\abc}[2]% |
| 50 |
{\texttt{{\textsqrt\$#1\$}} & % |
| 51 |
\ionumbersoff{$#1$} & $#1$ & \ionumbersoff{$#2$} \\} |
| 52 |
\newcommand{\fileinfo}{% |
| 53 |
This is test output of the \textsf{ionumbers} \LaTeX{} package. The default |
| 54 |
\LaTeX{} output, the output with \textsf{ionumbers} package and the expected |
| 55 |
output with \textsf{ionumbers} package is given for different inputs. |
| 56 |
If the package \textsf{ionumbers} works correctly, the contents in the |
| 57 |
`\textsf{ionumbers}' columns and the respective contents in the `expected' |
| 58 |
columns must be identical. |
| 59 |
Note that a lot of input is nonsense and serves for testing purposes only. |
| 60 |
|
| 61 |
\vspace{2ex}\noindent |
| 62 |
} |
| 63 |
|
| 64 |
\frenchspacing |
| 65 |
|
| 66 |
\begin{document} |
| 67 |
|
| 68 |
\section*{Default options} |
| 69 |
\fileinfo |
| 70 |
|
| 71 |
\begin{center} |
| 72 |
\begin{tabular}% |
| 73 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 74 |
\hline\hline |
| 75 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 76 |
\hline\hline\\[-1ex] |
| 77 |
\header{simple digits} |
| 78 |
\abc{1}{1} |
| 79 |
\abc{12}{12} |
| 80 |
\abc{123}{123} |
| 81 |
\abc{1234}{1234} |
| 82 |
\abc{12345}{12345} |
| 83 |
\abc{123456}{123456} |
| 84 |
\abc{1234567}{1234567} |
| 85 |
\header{point} |
| 86 |
\abc{.1}{.1} |
| 87 |
\abc{1.}{1.} |
| 88 |
\abc{1.1}{1.1} |
| 89 |
\abc{1. 2}{1. 2} |
| 90 |
\abc{1 .2}{1 .2} |
| 91 |
\abc{1.23456}{1.23456} |
| 92 |
\abc{12345.6}{12345.6} |
| 93 |
\abc{1.23.456}{1.23.456} |
| 94 |
\abc{a.b}{a.b} |
| 95 |
\abc{a.1}{a.1} |
| 96 |
\abc{1.a}{1.a} |
| 97 |
\header{comma} |
| 98 |
\abc{,1}{,1} |
| 99 |
\abc{1,}{1,} |
| 100 |
\abc{1,1}{1,1} |
| 101 |
\abc{1, 2}{1, 2} |
| 102 |
\abc{1 ,2}{1 ,2} |
| 103 |
\abc{1,23456}{1,23456} |
| 104 |
\abc{12345,6}{12345,6} |
| 105 |
\abc{1,23,456}{1,23,456} |
| 106 |
\abc{a,b}{a,b} |
| 107 |
\abc{a,1}{a,1} |
| 108 |
\abc{1,a}{1,a} |
| 109 |
\hline\hline |
| 110 |
\end{tabular} |
| 111 |
\end{center} |
| 112 |
|
| 113 |
\begin{center} |
| 114 |
\begin{tabular}% |
| 115 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 116 |
\hline\hline |
| 117 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 118 |
\hline\hline\\[-1ex] |
| 119 |
\header{plus and minus} |
| 120 |
\abc{+1}{+1} |
| 121 |
\abc{-1}{-1} |
| 122 |
\abc{++1}{++1} |
| 123 |
\abc{+ +1}{+ +1} |
| 124 |
\abc{+ + 1}{+ + 1} |
| 125 |
\abc{1+2}{1+2} |
| 126 |
\abc{1+ 2}{1+ 2} |
| 127 |
\abc{1 +2}{1 +2} |
| 128 |
\abc{1 + 2}{1 + 2} |
| 129 |
\abc{1++2}{1++2} |
| 130 |
\abc{x+1}{x+1} |
| 131 |
\abc{1+x}{1+x} |
| 132 |
\abc{x+y}{x+y} |
| 133 |
\header{letter `e'} |
| 134 |
\abc{1e1234}{1e1234} |
| 135 |
\abc{1e+1234}{1e+1234} |
| 136 |
\abc{1e.}{1e.} |
| 137 |
\abc{1e,}{1e,} |
| 138 |
\abc{1e.1234}{1e.1234} |
| 139 |
\abc{1e,1234}{1e,1234} |
| 140 |
\abc{1e++1234}{1e++1234} |
| 141 |
\abc{1e 1234}{1e 1234} |
| 142 |
\abc{1e +1234}{1e +1234} |
| 143 |
\abc{1 e1234}{1 e1234} |
| 144 |
\header{mixed numbers} |
| 145 |
\abc{1.234,890}{1.234,890} |
| 146 |
\abc{1,234.890}{1,234.890} |
| 147 |
\abc{1234e5678}{1234e5678} |
| 148 |
\abc{+1234e5678}{+1234e5678} |
| 149 |
\abc{1234e+5678}{1234e+5678} |
| 150 |
\abc{1.234e5.678}{1.234e5.678} |
| 151 |
\abc{1,234e5,678}{1,234e5,678} |
| 152 |
\header{single characters} |
| 153 |
\abc{\sqrt 1}{\sqrt 1} |
| 154 |
\abc{\sqrt 1234}{\sqrt 1234} |
| 155 |
\abc{\sqrt +}{\sqrt +} |
| 156 |
\abc{\sqrt ++}{\sqrt ++} |
| 157 |
\abc{\sqrt +1234}{\sqrt +1234} |
| 158 |
\abc{1e\sqrt +1234}{1e\sqrt +1234} |
| 159 |
\abc{1\sqrt +1234e0}{1\sqrt +1234e0} |
| 160 |
\hline\hline |
| 161 |
\end{tabular} |
| 162 |
\end{center} |
| 163 |
|
| 164 |
\clearpage |
| 165 |
\section*{Options \texttt{autothousands=true,autothousandths=true}} |
| 166 |
\fileinfo |
| 167 |
\ionumbersresetstyle |
| 168 |
\ionumbersstyle{autothousands,autothousandths} |
| 169 |
|
| 170 |
\begin{center} |
| 171 |
\begin{tabular}% |
| 172 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 173 |
\hline\hline |
| 174 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 175 |
\hline\hline\\[-1ex] |
| 176 |
\header{simple digits} |
| 177 |
\abc{1}{1} |
| 178 |
\abc{12}{12} |
| 179 |
\abc{123}{123} |
| 180 |
\abc{1234}{1,234} |
| 181 |
\abc{12345}{12,345} |
| 182 |
\abc{123456}{123,456} |
| 183 |
\abc{1234567}{1,234,567} |
| 184 |
\header{point} |
| 185 |
\abc{.1}{.1} |
| 186 |
\abc{1.}{1.} |
| 187 |
\abc{1.1}{1.1} |
| 188 |
\abc{1. 2}{1. 2} |
| 189 |
\abc{1 .2}{1 .2} |
| 190 |
\abc{1.23456}{1.234\,56} |
| 191 |
\abc{12345.6}{12,345.6} |
| 192 |
\abc{1.23.456}{1.23.4\,56} |
| 193 |
\abc{a.b}{a.b} |
| 194 |
\abc{a.1}{a.1} |
| 195 |
\abc{1.a}{1.a} |
| 196 |
\header{comma} |
| 197 |
\abc{,1}{,1} |
| 198 |
\abc{1,}{1,} |
| 199 |
\abc{1,1}{1,1} |
| 200 |
\abc{1, 2}{1, 2} |
| 201 |
\abc{1 ,2}{1 ,2} |
| 202 |
\abc{1,23456}{1,23456} |
| 203 |
\abc{12345,6}{12345,6} |
| 204 |
\abc{1,23,456}{1,23,456} |
| 205 |
\abc{a,b}{a,b} |
| 206 |
\abc{a,1}{a,1} |
| 207 |
\abc{1,a}{1,a} |
| 208 |
\hline\hline |
| 209 |
\end{tabular} |
| 210 |
\end{center} |
| 211 |
|
| 212 |
\begin{center} |
| 213 |
\begin{tabular}% |
| 214 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 215 |
\hline\hline |
| 216 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 217 |
\hline\hline\\[-1ex] |
| 218 |
\header{plus and minus} |
| 219 |
\abc{+1}{+1} |
| 220 |
\abc{-1}{-1} |
| 221 |
\abc{++1}{++1} |
| 222 |
\abc{+ +1}{+ +1} |
| 223 |
\abc{+ + 1}{+ + 1} |
| 224 |
\abc{1+2}{1+2} |
| 225 |
\abc{1+ 2}{1+ 2} |
| 226 |
\abc{1 +2}{1 +2} |
| 227 |
\abc{1 + 2}{1 + 2} |
| 228 |
\abc{1++2}{1++2} |
| 229 |
\abc{x+1}{x+1} |
| 230 |
\abc{1+x}{1+x} |
| 231 |
\abc{x+y}{x+y} |
| 232 |
\header{letter `e'} |
| 233 |
\abc{1e1234}{1e1,234} |
| 234 |
\abc{1e+1234}{1e+1,234} |
| 235 |
\abc{1e.}{1e.} |
| 236 |
\abc{1e,}{1e,} |
| 237 |
\abc{1e.1234}{1e.123\,4} |
| 238 |
\abc{1e,1234}{1e,1234} |
| 239 |
\abc{1e++1234}{1e++1,234} |
| 240 |
\abc{1e 1,234}{1e 1,234} |
| 241 |
\abc{1e +1234}{1e +1,234} |
| 242 |
\abc{1 e1,234}{1 e1,234} |
| 243 |
\header{mixed numbers} |
| 244 |
\abc{1.234,890}{1.234, {}\,890} |
| 245 |
\abc{1,234.890}{1,234.890} |
| 246 |
\abc{1234e5678}{1,234e5,678} |
| 247 |
\abc{+1234e5678}{+1,234e5,678} |
| 248 |
\abc{1234e+5678}{1,234e+5,678} |
| 249 |
\abc{1.234e5.678}{1.234e5.678} |
| 250 |
\abc{1,234e5,678}{1,234e5,678} |
| 251 |
\header{single characters} |
| 252 |
\abc{\sqrt 1}{\sqrt 1} |
| 253 |
\abc{\sqrt 1234}{\sqrt 1,234} |
| 254 |
\abc{\sqrt +}{\sqrt +} |
| 255 |
\abc{\sqrt ++}{\sqrt ++} |
| 256 |
\abc{\sqrt +1234}{\sqrt +1,234} |
| 257 |
\abc{1e\sqrt +1234}{1e\sqrt +1,234} |
| 258 |
\abc{1\sqrt +1234e0}{1\sqrt +1,234e0} |
| 259 |
\hline\hline |
| 260 |
\end{tabular} |
| 261 |
\end{center} |
| 262 |
|
| 263 |
\clearpage |
| 264 |
\section*{Options \texttt{autothousands=true,autothousandths=true,}\\ |
| 265 |
\texttt{grplenthousands=2,grplenthousandths=4}} |
| 266 |
\enlargethispage{3ex} |
| 267 |
\fileinfo |
| 268 |
\ionumbersresetstyle |
| 269 |
\ionumbersstyle{autothousands,autothousandths,grplenthousands=2,% |
| 270 |
grplenthousandths=4} |
| 271 |
|
| 272 |
\begin{center} |
| 273 |
\begin{tabular}% |
| 274 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 275 |
\hline\hline |
| 276 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 277 |
\hline\hline\\[-1ex] |
| 278 |
\header{simple digits} |
| 279 |
\abc{1}{1} |
| 280 |
\abc{12}{12} |
| 281 |
\abc{123}{1,23} |
| 282 |
\abc{1234}{12,34} |
| 283 |
\abc{12345}{1,23,45} |
| 284 |
\abc{123456}{12,34,56} |
| 285 |
\abc{1234567}{1,23,45,67} |
| 286 |
\header{point} |
| 287 |
\abc{.1}{.1} |
| 288 |
\abc{1.}{1.} |
| 289 |
\abc{1.1}{1.1} |
| 290 |
\abc{1. 2}{1. 2} |
| 291 |
\abc{1 .2}{1 .2} |
| 292 |
\abc{1.23456}{1.2345\,6} |
| 293 |
\abc{12345.6}{1,23,45.6} |
| 294 |
\abc{1.23.456}{1.23.45\,6} |
| 295 |
\abc{a.b}{a.b} |
| 296 |
\abc{a.1}{a.1} |
| 297 |
\abc{1.a}{1.a} |
| 298 |
\header{comma} |
| 299 |
\abc{,1}{,1} |
| 300 |
\abc{1,}{1,} |
| 301 |
\abc{1,1}{1,1} |
| 302 |
\abc{1, 2}{1, 2} |
| 303 |
\abc{1 ,2}{1 ,2} |
| 304 |
\abc{1,23456}{1,23456} |
| 305 |
\abc{12345,6}{12345,6} |
| 306 |
\abc{1,23,456}{1,23,456} |
| 307 |
\abc{a,b}{a,b} |
| 308 |
\abc{a,1}{a,1} |
| 309 |
\abc{1,a}{1,a} |
| 310 |
\hline\hline |
| 311 |
\end{tabular} |
| 312 |
\end{center} |
| 313 |
|
| 314 |
\begin{center} |
| 315 |
\begin{tabular}% |
| 316 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 317 |
\hline\hline |
| 318 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 319 |
\hline\hline\\[-1ex] |
| 320 |
\header{plus and minus} |
| 321 |
\abc{+1}{+1} |
| 322 |
\abc{-1}{-1} |
| 323 |
\abc{++1}{++1} |
| 324 |
\abc{+ +1}{+ +1} |
| 325 |
\abc{+ + 1}{+ + 1} |
| 326 |
\abc{1+2}{1+2} |
| 327 |
\abc{1+ 2}{1+ 2} |
| 328 |
\abc{1 +2}{1 +2} |
| 329 |
\abc{1 + 2}{1 + 2} |
| 330 |
\abc{1++2}{1++2} |
| 331 |
\abc{x+1}{x+1} |
| 332 |
\abc{1+x}{1+x} |
| 333 |
\abc{x+y}{x+y} |
| 334 |
\header{letter `e'} |
| 335 |
\abc{1e1234}{1e12,34} |
| 336 |
\abc{1e+1234}{1e+12,34} |
| 337 |
\abc{1e.}{1e.} |
| 338 |
\abc{1e,}{1e,} |
| 339 |
\abc{1e.1234}{1e.1234} |
| 340 |
\abc{1e,1234}{1e,1234} |
| 341 |
\abc{1e++1234}{1e++12,34} |
| 342 |
\abc{1e 1,234}{1e 1,234} |
| 343 |
\abc{1e +1234}{1e +12,34} |
| 344 |
\abc{1 e1,234}{1 e1,234} |
| 345 |
\header{mixed numbers} |
| 346 |
\abc{1.234,890}{1.234,8\,90} |
| 347 |
\abc{1,234.890}{1,234.890} |
| 348 |
\abc{1234e5678}{12,34e56,78} |
| 349 |
\abc{+1234e5678}{+12,34e56,78} |
| 350 |
\abc{1234e+5678}{12,34e+56,78} |
| 351 |
\abc{1.234e5.678}{1.234e5.678} |
| 352 |
\abc{1,234e5,678}{1,234e5,678} |
| 353 |
\header{single characters} |
| 354 |
\abc{\sqrt 1}{\sqrt 1} |
| 355 |
\abc{\sqrt 1234}{\sqrt 12,34} |
| 356 |
\abc{\sqrt +}{\sqrt +} |
| 357 |
\abc{\sqrt ++}{\sqrt ++} |
| 358 |
\abc{\sqrt +1234}{\sqrt +12,34} |
| 359 |
\abc{1e\sqrt +1234}{1e\sqrt +12,34} |
| 360 |
\abc{1\sqrt +1234e0}{1\sqrt +12,34e0} |
| 361 |
\hline\hline |
| 362 |
\end{tabular} |
| 363 |
\end{center} |
| 364 |
|
| 365 |
\clearpage |
| 366 |
\section*{Options \texttt{exponent=rmE}} |
| 367 |
\fileinfo |
| 368 |
\ionumbersresetstyle |
| 369 |
\ionumbersstyle{exponent=rmE} |
| 370 |
|
| 371 |
\begin{center} |
| 372 |
\begin{tabular}% |
| 373 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 374 |
\hline\hline |
| 375 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 376 |
\hline\hline\\[-1ex] |
| 377 |
\header{simple digits} |
| 378 |
\abc{1}{1} |
| 379 |
\abc{12}{12} |
| 380 |
\abc{123}{123} |
| 381 |
\abc{1234}{1234} |
| 382 |
\abc{12345}{12345} |
| 383 |
\abc{123456}{123456} |
| 384 |
\abc{1234567}{1234567} |
| 385 |
\header{point} |
| 386 |
\abc{.1}{.1} |
| 387 |
\abc{1.}{1.} |
| 388 |
\abc{1.1}{1.1} |
| 389 |
\abc{1. 2}{1. 2} |
| 390 |
\abc{1 .2}{1 .2} |
| 391 |
\abc{1.23456}{1.23456} |
| 392 |
\abc{12345.6}{12345.6} |
| 393 |
\abc{1.23.456}{1.23.456} |
| 394 |
\abc{a.b}{a.b} |
| 395 |
\abc{a.1}{a.1} |
| 396 |
\abc{1.a}{1.a} |
| 397 |
\header{comma} |
| 398 |
\abc{,1}{,1} |
| 399 |
\abc{1,}{1,} |
| 400 |
\abc{1,1}{1,1} |
| 401 |
\abc{1, 2}{1, 2} |
| 402 |
\abc{1 ,2}{1 ,2} |
| 403 |
\abc{1,23456}{1,23456} |
| 404 |
\abc{12345,6}{12345,6} |
| 405 |
\abc{1,23,456}{1,23,456} |
| 406 |
\abc{a,b}{a,b} |
| 407 |
\abc{a,1}{a,1} |
| 408 |
\abc{1,a}{1,a} |
| 409 |
\hline\hline |
| 410 |
\end{tabular} |
| 411 |
\end{center} |
| 412 |
|
| 413 |
\begin{center} |
| 414 |
\begin{tabular}% |
| 415 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 416 |
\hline\hline |
| 417 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 418 |
\hline\hline\\[-1ex] |
| 419 |
\header{plus and minus} |
| 420 |
\abc{+1}{+1} |
| 421 |
\abc{-1}{-1} |
| 422 |
\abc{++1}{++1} |
| 423 |
\abc{+ +1}{+ +1} |
| 424 |
\abc{+ + 1}{+ + 1} |
| 425 |
\abc{1+2}{1+2} |
| 426 |
\abc{1+ 2}{1+ 2} |
| 427 |
\abc{1 +2}{1 +2} |
| 428 |
\abc{1 + 2}{1 + 2} |
| 429 |
\abc{1++2}{1++2} |
| 430 |
\abc{x+1}{x+1} |
| 431 |
\abc{1+x}{1+x} |
| 432 |
\abc{x+y}{x+y} |
| 433 |
\header{letter `e'} |
| 434 |
\abc{1e1234}{1\mathrm{E}{1234}} |
| 435 |
\abc{1e+1234}{1\mathrm{E}{+1234}} |
| 436 |
\abc{1e.}{1\mathrm{E}.} |
| 437 |
\abc{1e,}{1\mathrm{E},} |
| 438 |
\abc{1e.1234}{1\mathrm{E}{.1234}} |
| 439 |
\abc{1e,1234}{1\mathrm{E}{,1234}} |
| 440 |
\abc{1e++1234}{1\mathrm{E}{++1234}} |
| 441 |
\abc{1e 1234}{1\mathrm{E} {1234}} |
| 442 |
\abc{1e +1234}{1\mathrm{E} {+1234}} |
| 443 |
\abc{1 e1234}{1 e1234} |
| 444 |
\header{mixed numbers} |
| 445 |
\abc{1.234,890}{1.234,890} |
| 446 |
\abc{1,234.890}{1,234.890} |
| 447 |
\abc{1234e5678}{1234\mathrm{E}{5678}} |
| 448 |
\abc{+1234e5678}{+1234\mathrm{E}{5678}} |
| 449 |
\abc{1234e+5678}{1234\mathrm{E}{+5678}} |
| 450 |
\abc{1.234e5.678}{1.234\mathrm{E}{5.678}} |
| 451 |
\abc{1,234e5,678}{1,234\mathrm{E}{5,678}} |
| 452 |
\header{single characters} |
| 453 |
\abc{\sqrt 1}{\sqrt 1} |
| 454 |
\abc{\sqrt 1234}{\sqrt 1234} |
| 455 |
\abc{\sqrt +}{\sqrt +} |
| 456 |
\abc{\sqrt ++}{\sqrt ++} |
| 457 |
\abc{\sqrt +1234}{\sqrt +1234} |
| 458 |
\abc{\mbox{fails}}{\mbox{fails}} |
| 459 |
\abc{1\sqrt +1234e0}{1\sqrt +1234\mathrm{E}{0}} |
| 460 |
\hline\hline |
| 461 |
\end{tabular} |
| 462 |
\end{center} |
| 463 |
|
| 464 |
\clearpage |
| 465 |
\section*{Options \texttt{exponent=timestento}} |
| 466 |
\fileinfo |
| 467 |
\ionumbersresetstyle |
| 468 |
\ionumbersstyle{exponent=timestento} |
| 469 |
|
| 470 |
\begin{center} |
| 471 |
\begin{tabular}% |
| 472 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 473 |
\hline\hline |
| 474 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 475 |
\hline\hline\\[-1ex] |
| 476 |
\header{simple digits} |
| 477 |
\abc{1}{1} |
| 478 |
\abc{12}{12} |
| 479 |
\abc{123}{123} |
| 480 |
\abc{1234}{1234} |
| 481 |
\abc{12345}{12345} |
| 482 |
\abc{123456}{123456} |
| 483 |
\abc{1234567}{1234567} |
| 484 |
\header{point} |
| 485 |
\abc{.1}{.1} |
| 486 |
\abc{1.}{1.} |
| 487 |
\abc{1.1}{1.1} |
| 488 |
\abc{1. 2}{1. 2} |
| 489 |
\abc{1 .2}{1 .2} |
| 490 |
\abc{1.23456}{1.23456} |
| 491 |
\abc{12345.6}{12345.6} |
| 492 |
\abc{1.23.456}{1.23.456} |
| 493 |
\abc{a.b}{a.b} |
| 494 |
\abc{a.1}{a.1} |
| 495 |
\abc{1.a}{1.a} |
| 496 |
\header{comma} |
| 497 |
\abc{,1}{,1} |
| 498 |
\abc{1,}{1,} |
| 499 |
\abc{1,1}{1,1} |
| 500 |
\abc{1, 2}{1, 2} |
| 501 |
\abc{1 ,2}{1 ,2} |
| 502 |
\abc{1,23456}{1,23456} |
| 503 |
\abc{12345,6}{12345,6} |
| 504 |
\abc{1,23,456}{1,23,456} |
| 505 |
\abc{a,b}{a,b} |
| 506 |
\abc{a,1}{a,1} |
| 507 |
\abc{1,a}{1,a} |
| 508 |
\hline\hline |
| 509 |
\end{tabular} |
| 510 |
\end{center} |
| 511 |
|
| 512 |
\begin{center} |
| 513 |
\begin{tabular}% |
| 514 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 515 |
\hline\hline |
| 516 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 517 |
\hline\hline\\[-1ex] |
| 518 |
\header{plus and minus} |
| 519 |
\abc{+1}{+1} |
| 520 |
\abc{-1}{-1} |
| 521 |
\abc{++1}{++1} |
| 522 |
\abc{+ +1}{+ +1} |
| 523 |
\abc{+ + 1}{+ + 1} |
| 524 |
\abc{1+2}{1+2} |
| 525 |
\abc{1+ 2}{1+ 2} |
| 526 |
\abc{1 +2}{1 +2} |
| 527 |
\abc{1 + 2}{1 + 2} |
| 528 |
\abc{1++2}{1++2} |
| 529 |
\abc{x+1}{x+1} |
| 530 |
\abc{1+x}{1+x} |
| 531 |
\abc{x+y}{x+y} |
| 532 |
\header{letter `e'} |
| 533 |
\abc{1e1234}{1\times 10\,^{1234}} |
| 534 |
\abc{1e+1234}{1\times 10\,^{+1234}} |
| 535 |
\abc{1e.}{1\times 10\,.} |
| 536 |
\abc{1e,}{1\times 10\,,} |
| 537 |
\abc{1e.1234}{1\times 10\,^{.1234}} |
| 538 |
\abc{1e,1234}{1\times 10\,^{,1234}} |
| 539 |
\abc{1e++1234}{1\times 10\,^{++1234}} |
| 540 |
\abc{1e 1234}{1\times 10\,^ {1234}} |
| 541 |
\abc{1e +1234}{1\times 10\,^ {+1234}} |
| 542 |
\abc{1 e1234}{1 e1234} |
| 543 |
\header{mixed numbers} |
| 544 |
\abc{1.234,890}{1.234,890} |
| 545 |
\abc{1,234.890}{1,234.890} |
| 546 |
\abc{1234e5678}{1234\times 10\,^{5678}} |
| 547 |
\abc{+1234e5678}{+1234\times 10\,^{5678}} |
| 548 |
\abc{1234e+5678}{1234\times 10\,^{+5678}} |
| 549 |
\abc{1.234e5.678}{1.234\times 10\,^{5.678}} |
| 550 |
\abc{1,234e5,678}{1,234\times 10\,^{5,678}} |
| 551 |
\header{single characters} |
| 552 |
\abc{\sqrt 1}{\sqrt 1} |
| 553 |
\abc{\sqrt 1234}{\sqrt 1234} |
| 554 |
\abc{\sqrt +}{\sqrt +} |
| 555 |
\abc{\sqrt ++}{\sqrt ++} |
| 556 |
\abc{\sqrt +1234}{\sqrt +1234} |
| 557 |
\abc{\mbox{fails}}{\mbox{fails}} |
| 558 |
\abc{1\sqrt +1234e0}{1\sqrt +1234\times 10\,^{0}} |
| 559 |
\hline\hline |
| 560 |
\end{tabular} |
| 561 |
\end{center} |
| 562 |
|
| 563 |
\clearpage |
| 564 |
\section*{Options \texttt{comma=decimal,point=thousands}} |
| 565 |
\fileinfo |
| 566 |
\ionumbersresetstyle |
| 567 |
\ionumbersstyle{comma=decimal,point=thousands} |
| 568 |
|
| 569 |
\begin{center} |
| 570 |
\begin{tabular}% |
| 571 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 572 |
\hline\hline |
| 573 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 574 |
\hline\hline\\[-1ex] |
| 575 |
\header{simple digits} |
| 576 |
\abc{1}{1} |
| 577 |
\abc{12}{12} |
| 578 |
\abc{123}{123} |
| 579 |
\abc{1234}{1234} |
| 580 |
\abc{12345}{12345} |
| 581 |
\abc{123456}{123456} |
| 582 |
\abc{1234567}{1234567} |
| 583 |
\header{point} |
| 584 |
\abc{.1}{,1} |
| 585 |
\abc{1.}{1.} |
| 586 |
\abc{1.1}{1,1} |
| 587 |
\abc{1. 2}{1. 2} |
| 588 |
\abc{1 .2}{1 ,2} |
| 589 |
\abc{1.23456}{1,23456} |
| 590 |
\abc{12345.6}{12345,6} |
| 591 |
\abc{1.23.456}{1,23,456} |
| 592 |
\abc{a.b}{a.b} |
| 593 |
\abc{a.1}{a,1} |
| 594 |
\abc{1.a}{1.a} |
| 595 |
\header{comma} |
| 596 |
\abc{,1}{.1} |
| 597 |
\abc{1,}{1,} |
| 598 |
\abc{1,1}{1.1} |
| 599 |
\abc{1, 2}{1, 2} |
| 600 |
\abc{1 ,2}{1 .2} |
| 601 |
\abc{1,23456}{1.23456} |
| 602 |
\abc{12345,6}{12345.6} |
| 603 |
\abc{1,23,456}{1.23.456} |
| 604 |
\abc{a,b}{a,b} |
| 605 |
\abc{a,1}{a.1} |
| 606 |
\abc{1,a}{1,a} |
| 607 |
\hline\hline |
| 608 |
\end{tabular} |
| 609 |
\end{center} |
| 610 |
|
| 611 |
\begin{center} |
| 612 |
\begin{tabular}% |
| 613 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 614 |
\hline\hline |
| 615 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 616 |
\hline\hline\\[-1ex] |
| 617 |
\header{plus and minus} |
| 618 |
\abc{+1}{+1} |
| 619 |
\abc{-1}{-1} |
| 620 |
\abc{++1}{++1} |
| 621 |
\abc{+ +1}{+ +1} |
| 622 |
\abc{+ + 1}{+ + 1} |
| 623 |
\abc{1+2}{1+2} |
| 624 |
\abc{1+ 2}{1+ 2} |
| 625 |
\abc{1 +2}{1 +2} |
| 626 |
\abc{1 + 2}{1 + 2} |
| 627 |
\abc{1++2}{1++2} |
| 628 |
\abc{x+1}{x+1} |
| 629 |
\abc{1+x}{1+x} |
| 630 |
\abc{x+y}{x+y} |
| 631 |
\header{letter `e'} |
| 632 |
\abc{1e1234}{1e1234} |
| 633 |
\abc{1e+1234}{1e+1234} |
| 634 |
\abc{1e.}{1e.} |
| 635 |
\abc{1e,}{1e,} |
| 636 |
\abc{1e.1234}{1e,1234} |
| 637 |
\abc{1e,1234}{1e.1234} |
| 638 |
\abc{1e++1234}{1e++1234} |
| 639 |
\abc{1e 1234}{1e 1234} |
| 640 |
\abc{1e +1234}{1e +1234} |
| 641 |
\abc{1 e1234}{1 e1234} |
| 642 |
\header{mixed numbers} |
| 643 |
\abc{1.234,890}{1,234.890} |
| 644 |
\abc{1,234.890}{1.234,890} |
| 645 |
\abc{1234e5678}{1234e5678} |
| 646 |
\abc{+1234e5678}{+1234e5678} |
| 647 |
\abc{1234e+5678}{1234e+5678} |
| 648 |
\abc{1.234e5.678}{1,234e5,678} |
| 649 |
\abc{1,234e5,678}{1.234e5.678} |
| 650 |
\header{single characters} |
| 651 |
\abc{\sqrt 1}{\sqrt 1} |
| 652 |
\abc{\sqrt 1234}{\sqrt 1234} |
| 653 |
\abc{\sqrt +}{\sqrt +} |
| 654 |
\abc{\sqrt ++}{\sqrt ++} |
| 655 |
\abc{\sqrt +1234}{\sqrt +1234} |
| 656 |
\abc{1e\sqrt +1234}{1e\sqrt +1234} |
| 657 |
\abc{1\sqrt +1234e0}{1\sqrt +1234e0} |
| 658 |
\hline\hline |
| 659 |
\end{tabular} |
| 660 |
\end{center} |
| 661 |
|
| 662 |
\clearpage |
| 663 |
\section*{Options \texttt{comma=decimal,point=thousands,}\\ |
| 664 |
\texttt{autothousands,autothousandths,thousands=apostrophe}\\ |
| 665 |
\texttt{thousandths=phantom}} |
| 666 |
\enlargethispage{6ex} |
| 667 |
\fileinfo |
| 668 |
\ionumbersresetstyle |
| 669 |
\ionumbersstyle{comma=decimal,point=thousands,autothousands,autothousandths,% |
| 670 |
thousands=apostrophe,thousandths=phantom} |
| 671 |
|
| 672 |
\begin{center} |
| 673 |
\begin{tabular}% |
| 674 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 675 |
\hline\hline |
| 676 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 677 |
\hline\hline\\[-1ex] |
| 678 |
\header{simple digits} |
| 679 |
\abc{1}{1} |
| 680 |
\abc{12}{12} |
| 681 |
\abc{123}{123} |
| 682 |
\abc{1234}{1'234} |
| 683 |
\abc{12345}{12'345} |
| 684 |
\abc{123456}{123'456} |
| 685 |
\abc{1234567}{1'234'567} |
| 686 |
\header{point} |
| 687 |
\abc{.1}{'1} |
| 688 |
\abc{1.}{1.} |
| 689 |
\abc{1.1}{1'1} |
| 690 |
\abc{1. 2}{1. 2} |
| 691 |
\abc{1 .2}{1 '2} |
| 692 |
\abc{1.23456}{1'23456} |
| 693 |
\abc{12345.6}{12345'6} |
| 694 |
\abc{1.23.456}{1'23'456} |
| 695 |
\abc{a.b}{a.b} |
| 696 |
\abc{a.1}{a'1} |
| 697 |
\abc{1.a}{1.a} |
| 698 |
\header{comma} |
| 699 |
\abc{,1}{.1} |
| 700 |
\abc{1,}{1,} |
| 701 |
\abc{1,1}{1.1} |
| 702 |
\abc{1, 2}{1, 2} |
| 703 |
\abc{1 ,2}{1 .2} |
| 704 |
\abc{1,23456}{1.234\phantom{.}56} |
| 705 |
\abc{12345,6}{12'345.6} |
| 706 |
\abc{1,23,456}{1.23.4\phantom{.}56} |
| 707 |
\abc{a,b}{a,b} |
| 708 |
\abc{a,1}{a.1} |
| 709 |
\abc{1,a}{1,a} |
| 710 |
\hline\hline |
| 711 |
\end{tabular} |
| 712 |
\end{center} |
| 713 |
|
| 714 |
\begin{center} |
| 715 |
\begin{tabular}% |
| 716 |
{r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} |
| 717 |
\hline\hline |
| 718 |
input & \LaTeX{} & \textsf{ionumbers} & expected\\ |
| 719 |
\hline\hline\\[-1ex] |
| 720 |
\header{plus and minus} |
| 721 |
\abc{+1}{+1} |
| 722 |
\abc{-1}{-1} |
| 723 |
\abc{++1}{++1} |
| 724 |
\abc{+ +1}{+ +1} |
| 725 |
\abc{+ + 1}{+ + 1} |
| 726 |
\abc{1+2}{1+2} |
| 727 |
\abc{1+ 2}{1+ 2} |
| 728 |
\abc{1 +2}{1 +2} |
| 729 |
\abc{1 + 2}{1 + 2} |
| 730 |
\abc{1++2}{1++2} |
| 731 |
\abc{x+1}{x+1} |
| 732 |
\abc{1+x}{1+x} |
| 733 |
\abc{x+y}{x+y} |
| 734 |
\header{letter `e'} |
| 735 |
\abc{1e1234}{1e1'234} |
| 736 |
\abc{1e+1234}{1e+1'234} |
| 737 |
\abc{1e.}{1e.} |
| 738 |
\abc{1e,}{1e,} |
| 739 |
\abc{1e.1234}{1e'1234} |
| 740 |
\abc{1e,1234}{1e.123\phantom{.}4} |
| 741 |
\abc{1e++1234}{1e++1'234} |
| 742 |
\abc{1e 1234}{1e 1'234} |
| 743 |
\abc{1e +1234}{1e +1'234} |
| 744 |
\abc{1 e1234}{1 e1'234} |
| 745 |
\header{mixed numbers} |
| 746 |
\abc{1.234,890}{1'234.890} |
| 747 |
\abc{1,234.890}{1.234'\phantom{.}890} |
| 748 |
\abc{1234e5678}{1'234e5'678} |
| 749 |
\abc{+1234e5678}{+1'234e5'678} |
| 750 |
\abc{1234e+5678}{1'234e+5'678} |
| 751 |
\abc{1.234e5.678}{1'234e5'678} |
| 752 |
\abc{1,234e5,678}{1.234e5.678} |
| 753 |
\header{single characters} |
| 754 |
\abc{\sqrt 1}{\sqrt 1} |
| 755 |
\abc{\sqrt 1234}{\sqrt 1'234} |
| 756 |
\abc{\sqrt +}{\sqrt +} |
| 757 |
\abc{\sqrt ++}{\sqrt ++} |
| 758 |
\abc{\sqrt +1234}{\sqrt +1'234} |
| 759 |
\abc{1e\sqrt +1234}{1e\sqrt +1'234} |
| 760 |
\abc{1\sqrt +1234e0}{1\sqrt +1'234e0} |
| 761 |
\hline\hline |
| 762 |
\end{tabular} |
| 763 |
\end{center} |
| 764 |
|
| 765 |
\end{document} |