I accidentally stumbled upon the following
Problem:
If I use the \num command of the siunitx package and leave the argument empty like \num{}, I get a value in my pdf output and it seems to correspond to the value of the option table-format
Example:
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[round-mode=places, round-integer-to-decimal, round-precision=2,
table-format = 1.4,
table-number-alignment=center,
round-integer-to-decimal,
output-decimal-marker={,},
abbreviations=false
]{siunitx}
\begin{document}
empty num: \num{}
or $\num[round-mode=figures, round-precision=4]{}$
$\num[round-mode=figures, round-precision=4]{1.5}$
\end{document}
Result in pdflatex:

Is this a bug?
In the manual I only read that the argument _ number_ of the \num command is mandatory, but it seems that there is no error or warning, if it is used like that and this leads to faulty output (which might be easily overlooked, as there is a prettily formatted number although there is no input).
- Did I do something wrong (except forgetting the mandatory argument)?
- Could this error be somehow "caught" by LaTeX or the package?
for a pragmatic solution
The problem occurred in this macro \ABeschr{}{}{}{}:
\newcommand{\Variable}[1]{{\normalsize{#1}}}
\newcommand{\Einheit}[1]{{\footnotesize #1}}
\newcommand{\ABeschr}[4]{\begin{minipage}{2cm}\Variable{#1}\newline \Einheit{#2} \newline \tiny $\beta_{0}\!=\!\num[round-mode=figures, round-precision=4]{#3}$ \newline $\kappa=\!\pm\num[round-mode=figures, round-precision=3]{#4}$ %\rule{\linewidth}{1pt}
\end{minipage}}
- Could anyone suggest how to avoid this error by letting the macro check if the arguments #3 or #4 are empty and then giving no output there?
Remark: here is the solution that currently works or me: https://tex.stackexchange.com/a/234434/4009
ab \num{} cdwill end up with additional whitespace.) – Joseph Wright Mar 21 '15 at 16:51