% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % test file for ionumbers package % % Copyright 2008,2011 Christian Schneider % % This file is part of ionumbers. % % ionumbers is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License version 3 as % published by the Free Software Foundation, not any later version. % % ionumbers is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with ionumbers. If not, see . % % WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS! % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[12pt]{article} %% a bit more space (this is only a test file, not a typographically perfect %% book ;-)) \setlength{\textwidth}{0.75\paperwidth} \setlength{\marginparsep}{0pt} \setlength{\marginparwidth}{0pt} \setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt} \setlength{\hoffset}{0.125\paperwidth} \addtolength{\hoffset}{-1in} \setlength{\topmargin}{0pt} \setlength{\headheight}{0pt} \setlength{\headsep}{0pt} \setlength{\footskip}{0.1\paperheight} \setlength{\textheight}{0.8\paperheight} \usepackage{ionumbers} \newcommand*{\header}[1]{% \hline \multicolumn{4}{c}{#1}\\ \hline} \def\textsqrt{\def\sqrt##1{\textbackslash sqrt ##1}} \newcommand*{\abc}[2]% {\texttt{{\textsqrt\$#1\$}} & % \ionumbersoff{$#1$} & $#1$ & \ionumbersoff{$#2$} \\} \newcommand{\fileinfo}{% This is test output of the \textsf{ionumbers} \LaTeX{} package. The default \LaTeX{} output, the output with \textsf{ionumbers} package and the expected output with \textsf{ionumbers} package is given for different inputs. If the package \textsf{ionumbers} works correctly, the contents in the `\textsf{ionumbers}' columns and the respective contents in the `expected' columns must be identical. Note that a lot of input is nonsense and serves for testing purposes only. \vspace{2ex}\noindent } \frenchspacing \begin{document} \section*{Default options} \fileinfo \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{123} \abc{1234}{1234} \abc{12345}{12345} \abc{123456}{123456} \abc{1234567}{1234567} \header{point} \abc{.1}{.1} \abc{1.}{1.} \abc{1.1}{1.1} \abc{1. 2}{1. 2} \abc{1 .2}{1 .2} \abc{1.23456}{1.23456} \abc{12345.6}{12345.6} \abc{1.23.456}{1.23.456} \abc{a.b}{a.b} \abc{a.1}{a.1} \abc{1.a}{1.a} \header{comma} \abc{,1}{,1} \abc{1,}{1,} \abc{1,1}{1,1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 ,2} \abc{1,23456}{1,23456} \abc{12345,6}{12345,6} \abc{1,23,456}{1,23,456} \abc{a,b}{a,b} \abc{a,1}{a,1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1e1234} \abc{1e+1234}{1e+1234} \abc{1e.}{1e.} \abc{1e,}{1e,} \abc{1e.1234}{1e.1234} \abc{1e,1234}{1e,1234} \abc{1e++1234}{1e++1234} \abc{1e 1234}{1e 1234} \abc{1e +1234}{1e +1234} \abc{1 e1234}{1 e1234} \header{mixed numbers} \abc{1.234,890}{1.234,890} \abc{1,234.890}{1,234.890} \abc{1234e5678}{1234e5678} \abc{+1234e5678}{+1234e5678} \abc{1234e+5678}{1234e+5678} \abc{1.234e5.678}{1.234e5.678} \abc{1,234e5,678}{1,234e5,678} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 1234} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +1234} \abc{1e\sqrt +1234}{1e\sqrt +1234} \abc{1\sqrt +1234e0}{1\sqrt +1234e0} \hline\hline \end{tabular} \end{center} \clearpage \section*{Options \texttt{autothousands=true,autothousandths=true}} \fileinfo \ionumbersresetstyle \ionumbersstyle{autothousands,autothousandths} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{123} \abc{1234}{1,234} \abc{12345}{12,345} \abc{123456}{123,456} \abc{1234567}{1,234,567} \header{point} \abc{.1}{.1} \abc{1.}{1.} \abc{1.1}{1.1} \abc{1. 2}{1. 2} \abc{1 .2}{1 .2} \abc{1.23456}{1.234\,56} \abc{12345.6}{12,345.6} \abc{1.23.456}{1.23.4\,56} \abc{a.b}{a.b} \abc{a.1}{a.1} \abc{1.a}{1.a} \header{comma} \abc{,1}{,1} \abc{1,}{1,} \abc{1,1}{1,1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 ,2} \abc{1,23456}{1,23456} \abc{12345,6}{12345,6} \abc{1,23,456}{1,23,456} \abc{a,b}{a,b} \abc{a,1}{a,1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1e1,234} \abc{1e+1234}{1e+1,234} \abc{1e.}{1e.} \abc{1e,}{1e,} \abc{1e.1234}{1e.123\,4} \abc{1e,1234}{1e,1234} \abc{1e++1234}{1e++1,234} \abc{1e 1,234}{1e 1,234} \abc{1e +1234}{1e +1,234} \abc{1 e1,234}{1 e1,234} \header{mixed numbers} \abc{1.234,890}{1.234, {}\,890} \abc{1,234.890}{1,234.890} \abc{1234e5678}{1,234e5,678} \abc{+1234e5678}{+1,234e5,678} \abc{1234e+5678}{1,234e+5,678} \abc{1.234e5.678}{1.234e5.678} \abc{1,234e5,678}{1,234e5,678} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 1,234} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +1,234} \abc{1e\sqrt +1234}{1e\sqrt +1,234} \abc{1\sqrt +1234e0}{1\sqrt +1,234e0} \hline\hline \end{tabular} \end{center} \clearpage \section*{Options \texttt{autothousands=true,autothousandths=true,}\\ \texttt{grplenthousands=2,grplenthousandths=4}} \enlargethispage{3ex} \fileinfo \ionumbersresetstyle \ionumbersstyle{autothousands,autothousandths,grplenthousands=2,% grplenthousandths=4} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{1,23} \abc{1234}{12,34} \abc{12345}{1,23,45} \abc{123456}{12,34,56} \abc{1234567}{1,23,45,67} \header{point} \abc{.1}{.1} \abc{1.}{1.} \abc{1.1}{1.1} \abc{1. 2}{1. 2} \abc{1 .2}{1 .2} \abc{1.23456}{1.2345\,6} \abc{12345.6}{1,23,45.6} \abc{1.23.456}{1.23.45\,6} \abc{a.b}{a.b} \abc{a.1}{a.1} \abc{1.a}{1.a} \header{comma} \abc{,1}{,1} \abc{1,}{1,} \abc{1,1}{1,1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 ,2} \abc{1,23456}{1,23456} \abc{12345,6}{12345,6} \abc{1,23,456}{1,23,456} \abc{a,b}{a,b} \abc{a,1}{a,1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1e12,34} \abc{1e+1234}{1e+12,34} \abc{1e.}{1e.} \abc{1e,}{1e,} \abc{1e.1234}{1e.1234} \abc{1e,1234}{1e,1234} \abc{1e++1234}{1e++12,34} \abc{1e 1,234}{1e 1,234} \abc{1e +1234}{1e +12,34} \abc{1 e1,234}{1 e1,234} \header{mixed numbers} \abc{1.234,890}{1.234,8\,90} \abc{1,234.890}{1,234.890} \abc{1234e5678}{12,34e56,78} \abc{+1234e5678}{+12,34e56,78} \abc{1234e+5678}{12,34e+56,78} \abc{1.234e5.678}{1.234e5.678} \abc{1,234e5,678}{1,234e5,678} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 12,34} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +12,34} \abc{1e\sqrt +1234}{1e\sqrt +12,34} \abc{1\sqrt +1234e0}{1\sqrt +12,34e0} \hline\hline \end{tabular} \end{center} \clearpage \section*{Options \texttt{exponent=rmE}} \fileinfo \ionumbersresetstyle \ionumbersstyle{exponent=rmE} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{123} \abc{1234}{1234} \abc{12345}{12345} \abc{123456}{123456} \abc{1234567}{1234567} \header{point} \abc{.1}{.1} \abc{1.}{1.} \abc{1.1}{1.1} \abc{1. 2}{1. 2} \abc{1 .2}{1 .2} \abc{1.23456}{1.23456} \abc{12345.6}{12345.6} \abc{1.23.456}{1.23.456} \abc{a.b}{a.b} \abc{a.1}{a.1} \abc{1.a}{1.a} \header{comma} \abc{,1}{,1} \abc{1,}{1,} \abc{1,1}{1,1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 ,2} \abc{1,23456}{1,23456} \abc{12345,6}{12345,6} \abc{1,23,456}{1,23,456} \abc{a,b}{a,b} \abc{a,1}{a,1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1\mathrm{E}{1234}} \abc{1e+1234}{1\mathrm{E}{+1234}} \abc{1e.}{1\mathrm{E}.} \abc{1e,}{1\mathrm{E},} \abc{1e.1234}{1\mathrm{E}{.1234}} \abc{1e,1234}{1\mathrm{E}{,1234}} \abc{1e++1234}{1\mathrm{E}{++1234}} \abc{1e 1234}{1\mathrm{E} {1234}} \abc{1e +1234}{1\mathrm{E} {+1234}} \abc{1 e1234}{1 e1234} \header{mixed numbers} \abc{1.234,890}{1.234,890} \abc{1,234.890}{1,234.890} \abc{1234e5678}{1234\mathrm{E}{5678}} \abc{+1234e5678}{+1234\mathrm{E}{5678}} \abc{1234e+5678}{1234\mathrm{E}{+5678}} \abc{1.234e5.678}{1.234\mathrm{E}{5.678}} \abc{1,234e5,678}{1,234\mathrm{E}{5,678}} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 1234} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +1234} \abc{\mbox{fails}}{\mbox{fails}} \abc{1\sqrt +1234e0}{1\sqrt +1234\mathrm{E}{0}} \hline\hline \end{tabular} \end{center} \clearpage \section*{Options \texttt{exponent=timestento}} \fileinfo \ionumbersresetstyle \ionumbersstyle{exponent=timestento} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{123} \abc{1234}{1234} \abc{12345}{12345} \abc{123456}{123456} \abc{1234567}{1234567} \header{point} \abc{.1}{.1} \abc{1.}{1.} \abc{1.1}{1.1} \abc{1. 2}{1. 2} \abc{1 .2}{1 .2} \abc{1.23456}{1.23456} \abc{12345.6}{12345.6} \abc{1.23.456}{1.23.456} \abc{a.b}{a.b} \abc{a.1}{a.1} \abc{1.a}{1.a} \header{comma} \abc{,1}{,1} \abc{1,}{1,} \abc{1,1}{1,1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 ,2} \abc{1,23456}{1,23456} \abc{12345,6}{12345,6} \abc{1,23,456}{1,23,456} \abc{a,b}{a,b} \abc{a,1}{a,1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1\times 10\,^{1234}} \abc{1e+1234}{1\times 10\,^{+1234}} \abc{1e.}{1\times 10\,.} \abc{1e,}{1\times 10\,,} \abc{1e.1234}{1\times 10\,^{.1234}} \abc{1e,1234}{1\times 10\,^{,1234}} \abc{1e++1234}{1\times 10\,^{++1234}} \abc{1e 1234}{1\times 10\,^ {1234}} \abc{1e +1234}{1\times 10\,^ {+1234}} \abc{1 e1234}{1 e1234} \header{mixed numbers} \abc{1.234,890}{1.234,890} \abc{1,234.890}{1,234.890} \abc{1234e5678}{1234\times 10\,^{5678}} \abc{+1234e5678}{+1234\times 10\,^{5678}} \abc{1234e+5678}{1234\times 10\,^{+5678}} \abc{1.234e5.678}{1.234\times 10\,^{5.678}} \abc{1,234e5,678}{1,234\times 10\,^{5,678}} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 1234} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +1234} \abc{\mbox{fails}}{\mbox{fails}} \abc{1\sqrt +1234e0}{1\sqrt +1234\times 10\,^{0}} \hline\hline \end{tabular} \end{center} \clearpage \section*{Options \texttt{comma=decimal,point=thousands}} \fileinfo \ionumbersresetstyle \ionumbersstyle{comma=decimal,point=thousands} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{123} \abc{1234}{1234} \abc{12345}{12345} \abc{123456}{123456} \abc{1234567}{1234567} \header{point} \abc{.1}{,1} \abc{1.}{1.} \abc{1.1}{1,1} \abc{1. 2}{1. 2} \abc{1 .2}{1 ,2} \abc{1.23456}{1,23456} \abc{12345.6}{12345,6} \abc{1.23.456}{1,23,456} \abc{a.b}{a.b} \abc{a.1}{a,1} \abc{1.a}{1.a} \header{comma} \abc{,1}{.1} \abc{1,}{1,} \abc{1,1}{1.1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 .2} \abc{1,23456}{1.23456} \abc{12345,6}{12345.6} \abc{1,23,456}{1.23.456} \abc{a,b}{a,b} \abc{a,1}{a.1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1e1234} \abc{1e+1234}{1e+1234} \abc{1e.}{1e.} \abc{1e,}{1e,} \abc{1e.1234}{1e,1234} \abc{1e,1234}{1e.1234} \abc{1e++1234}{1e++1234} \abc{1e 1234}{1e 1234} \abc{1e +1234}{1e +1234} \abc{1 e1234}{1 e1234} \header{mixed numbers} \abc{1.234,890}{1,234.890} \abc{1,234.890}{1.234,890} \abc{1234e5678}{1234e5678} \abc{+1234e5678}{+1234e5678} \abc{1234e+5678}{1234e+5678} \abc{1.234e5.678}{1,234e5,678} \abc{1,234e5,678}{1.234e5.678} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 1234} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +1234} \abc{1e\sqrt +1234}{1e\sqrt +1234} \abc{1\sqrt +1234e0}{1\sqrt +1234e0} \hline\hline \end{tabular} \end{center} \clearpage \section*{Options \texttt{comma=decimal,point=thousands,}\\ \texttt{autothousands,autothousandths,thousands=apostrophe}\\ \texttt{thousandths=phantom}} \enlargethispage{6ex} \fileinfo \ionumbersresetstyle \ionumbersstyle{comma=decimal,point=thousands,autothousands,autothousandths,% thousands=apostrophe,thousandths=phantom} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{simple digits} \abc{1}{1} \abc{12}{12} \abc{123}{123} \abc{1234}{1'234} \abc{12345}{12'345} \abc{123456}{123'456} \abc{1234567}{1'234'567} \header{point} \abc{.1}{'1} \abc{1.}{1.} \abc{1.1}{1'1} \abc{1. 2}{1. 2} \abc{1 .2}{1 '2} \abc{1.23456}{1'23456} \abc{12345.6}{12345'6} \abc{1.23.456}{1'23'456} \abc{a.b}{a.b} \abc{a.1}{a'1} \abc{1.a}{1.a} \header{comma} \abc{,1}{.1} \abc{1,}{1,} \abc{1,1}{1.1} \abc{1, 2}{1, 2} \abc{1 ,2}{1 .2} \abc{1,23456}{1.234\phantom{.}56} \abc{12345,6}{12'345.6} \abc{1,23,456}{1.23.4\phantom{.}56} \abc{a,b}{a,b} \abc{a,1}{a.1} \abc{1,a}{1,a} \hline\hline \end{tabular} \end{center} \begin{center} \begin{tabular}% {r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r@{\hspace{1em}}r} \hline\hline input & \LaTeX{} & \textsf{ionumbers} & expected\\ \hline\hline\\[-1ex] \header{plus and minus} \abc{+1}{+1} \abc{-1}{-1} \abc{++1}{++1} \abc{+ +1}{+ +1} \abc{+ + 1}{+ + 1} \abc{1+2}{1+2} \abc{1+ 2}{1+ 2} \abc{1 +2}{1 +2} \abc{1 + 2}{1 + 2} \abc{1++2}{1++2} \abc{x+1}{x+1} \abc{1+x}{1+x} \abc{x+y}{x+y} \header{letter `e'} \abc{1e1234}{1e1'234} \abc{1e+1234}{1e+1'234} \abc{1e.}{1e.} \abc{1e,}{1e,} \abc{1e.1234}{1e'1234} \abc{1e,1234}{1e.123\phantom{.}4} \abc{1e++1234}{1e++1'234} \abc{1e 1234}{1e 1'234} \abc{1e +1234}{1e +1'234} \abc{1 e1234}{1 e1'234} \header{mixed numbers} \abc{1.234,890}{1'234.890} \abc{1,234.890}{1.234'\phantom{.}890} \abc{1234e5678}{1'234e5'678} \abc{+1234e5678}{+1'234e5'678} \abc{1234e+5678}{1'234e+5'678} \abc{1.234e5.678}{1'234e5'678} \abc{1,234e5,678}{1.234e5.678} \header{single characters} \abc{\sqrt 1}{\sqrt 1} \abc{\sqrt 1234}{\sqrt 1'234} \abc{\sqrt +}{\sqrt +} \abc{\sqrt ++}{\sqrt ++} \abc{\sqrt +1234}{\sqrt +1'234} \abc{1e\sqrt +1234}{1e\sqrt +1'234} \abc{1\sqrt +1234e0}{1\sqrt +1'234e0} \hline\hline \end{tabular} \end{center} \end{document}