Tag Info

New answers tagged

6

The braces are needed so that the parser can treat some group as a single element and avoid parsing inside. Consider the following: \cmd[key=val=1,bla=0] What should the parser understand? There are many possible meanings: \cmd[key={val=1,bla=0}] \cmd[key={val=1},bla=0] \cmd[{key=val}=1,bla=0] etc. In some situations the particular interpretation the ...


3

For the case of aligning numbers when not using a normal column situation, siunitx provides the \tablenum command. \documentclass{article} \usepackage{siunitx,collcell} \begin{document} \sisetup{table-format = 4.0} \begin{tabular}{>{\collectcell\tablenum}c<{\endcollectcell}} \multicolumn{1}{c}{Header} \\ 1234 \\ 234 \\ 34 \\ 4 \end{tabular} ...


1

Not an answer, but just playing around. If you don't need zeroes inside the number, then it's an answer; because it “replaces” every zero, doesn't matter if it's on the left or on the middle. \documentclass{article} \usepackage{siunitx,calc} \sisetup{minimum-integer-digits=4} \begin{document} \begingroup\mathcode`\0="8000 ...


1

OTOH, If you aren't married to \num, you could use something like \documentclass{article} \begin{document} \begin{tabular}{@{}r@{}} 1234\\ 234\\ 34\\ 4 \end{tabular} \end{document} or \documentclass{article} \newcommand{\mynum}[1]{\phantom{0000}\llap{#1}} \begin{document} \mynum{1234}\par \mynum{234}\par \mynum{34}\par \mynum{4} \end{document}



Top 50 recent answers are included