TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use siunitx to decimal align the contents of tables that I create with Stata's estout, as shown in the MWE below. I think the output is perfect, with the numbers being aligned on the decimal point and "pseudo"-centered under the "ß / SE" and "Margin" columns.

The problem is that I get an overfull hbox warning for every single cell. I've played around with table-space-text-post to include the asterisk, but without any luck. Does anyone have a solution for this problem?




        tight-spacing               = true,
        group-digits                = false ,
        input-signs             = ,
        input-symbols               = ( ) - + *,
        input-open-uncertainty  = ,
        input-close-uncertainty = ,
        table-align-text-post   = false,
        % table-space-text-pre  = -,
        % table-space-text-post = *


&\multicolumn{2}{c}{(1)}                    &\multicolumn{2}{c}{(2)}                    &\multicolumn{2}{c}{(3)}                    \\
&\multicolumn{2}{c}{Column One}              &\multicolumn{2}{c}{Column Two X}&\multicolumn{2}{c}{Column Three XX}\\
&\multicolumn{1}{c}{$\beta$ / SE}         &\multicolumn{1}{c}{Margin}         &\multicolumn{1}{c}{$\beta$ / SE}         &\multicolumn{1}{c}{Margin}         &\multicolumn{1}{c}{$\beta$ / SE}         &\multicolumn{1}{c}{Margin}         \\
\hspace{0.1cm} 18--24&      -0.176         &      -0.044         &      -0.256         &      -0.047         &      -0.820\sym{***}&      -0.101\sym{***}\\
                    &     (0.152)         &                     &     (0.188)         &                     &     (0.310)         &                     \\
\hspace{0.1cm} 25--34&       0.067         &       0.017         &       0.047         &       0.009         &      -0.046         &      -0.006         \\
share|improve this question
up vote 6 down vote accepted

If you want to have space reserved for something after the number part in an S column, you will need to reserve appropriate space using table-space-text-post. A slight awkwardness arises as the array package treats * as 'special', so you need braces here:



\begin{tabular}{S[ table-format = -1.3, table-space-text-post = {***}]}


If you are using a custom command (here \sym) in an S column, it really needs to be engine-protected. For that, the \NewDocumentCommand command from xparse is recommended:




\begin{tabular}{S[table-format = -1.3, table-space-text-post = \sym{***}]}

share|improve this answer
Thanks, but if I use that on my MWE I still get 3 overfull hboxes because of the parentheses. If I remove them, the warning disappear. input-symbols = ( ) should be correct command to include parentheses, right? – Jörg May 31 '12 at 10:21
@Jörg I was trying to focus the answer of the point in hand (dealing with * as a suffix), so my demo does not cover the other parts of your MWE. As you say, you will need to add the appropriate input-symbols for parentheses: these also need to be allowed for in the table-format (each one requires space for an additional 'digit'). That might make a good, focussed, follow-up question. – Joseph Wright May 31 '12 at 10:24
Okay, that answers my problem then. My initial question was not focussed solely on the *, but on avoiding the hbox warnings. I did not know that one needs to include extra space for the parentheses, so thank you for the clarification. – Jörg May 31 '12 at 10:29
@JosephWright If I understand this correctly this will align the ** below each other even if a number has less decimals than specified with table-format. Is there a way to get the stars left-aligned to the numbers in any case? – clemens Jul 16 '14 at 18:05
@cgnieder Set table-align-text-post = false – Joseph Wright Jul 16 '14 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.