3

I want the "Yes" to be perfectly aligned below. As the table is now, if there's stars proceeding the "Yes", it'll push the text to the left. However, I want each column of "Yes"'s to be aligned such that each "Y" in yes is directly on top of the other "Y" in the other yes's in the column, irrespective of the number of stars that proceed.

I've tried \phantom-ing some stars but it doesn't work.

Minimal example:

 \documentclass{article}
 \usepackage{longtable}
 \usepackage{dcolumn}
 \usepackage{booktabs}
 \usepackage{lscape}

 \newcommand{\C}[1]{\multicolumn{1}{c}{#1}} 

 \newcommand*{\SuperScriptSameStyle}[1]{%
   \ensuremath{%
     \mathchoice
       {{}^{\displaystyle #1}}%
       {{}^{\textstyle #1}}%
       {{}^{\scriptstyle #1}}%
       {{}^{\scriptscriptstyle #1}}%
   }%
 }

 \newcommand*{\oneS}{\SuperScriptSameStyle{*}}
 \newcommand*{\twoS}{\SuperScriptSameStyle{**}}
 \newcommand*{\threeS}{\SuperScriptSameStyle{*{*}*}}

 \newcommand\Ya{\C{Yes}}
 \newcommand\Yb{\C{Yes\oneS}}
 \newcommand\Yc{\C{Yes\twoS}}
 \newcommand\Yd{\C{Yes\threeS}}

 \newcolumntype{d}[1]{D{.}{.}{#1}} % "decimal" column type

 \begin{document}

 \begin{landscape}
 \begin{longtable}{@{} l @{\extracolsep{\fill}} *{7}{d{6}} @{}}
 \cmidrule[\heavyrulewidth]{1-8}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa} \\
 \cmidrule{1-8}
 \endfirsthead
 \multicolumn{2}{@{}l}{\emph{(continued)}} \\
 \cmidrule[\heavyrulewidth]{1-8}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa}
 & \multicolumn{1}{c}{Column 1aa} \\
 \cmidrule{1-8}
 \endhead
 \cmidrule[\heavyrulewidth]{1-8}
 \multicolumn{8}{r@{}}{\emph{(continued)}}
 \endfoot
 \cmidrule[\heavyrulewidth]{1-8}
 \endlastfoot
 \multicolumn{5}{@{}l}{\emph{Estimates}} \\
 $\tau = 0.05$                                                    & -0.078 & -0.959 & -0.695 & -1.754\oneS & 0.339 & -2.925 & 2.553 \\
 $\tau = 0.10$                                                    & -0.046 & -0.868 & -0.649 & -1.066 & -0.272 & -4.288\twoS & -0.245 \\
 $\tau = 0.50$                                                    & -0.424 & -0.910 & -0.786 & -1.625\oneS & 1.569\twoS & -3.569\twoS & 0.086 \\
 $\tau = 0.90$                                                    & -1.008\twoS & 0.001 & -1.924\threeS & 0.906 & 0.284 & -2.444 & 1.552 \\
 $\tau = 0.95$                                                    & -0.911\twoS & 0.930 & -2.230\threeS & -0.321 & 1.363 & -2.903 & 0.479 \\
                                                                  &  &  &  &  &  &  &  \\
   $F:\tau \in \{0.05,0.50\}$                                     & 0.467 & 0.002 & 0.018 & 0.013 & 1.325 & 0.078 & 1.855 \\
   $F:\tau \in \{0.50,0.95\}$                                     & 0.842 & 2.808\oneS & 5.230\twoS & 1.447 & 0.031 & 0.022 & 0.028 \\
   $F:\tau \in \{0.05,0.95\}$                                     & 2.484 & 2.952\oneS & 3.918\twoS & 1.378 & 0.483 & 0.000 & 0.572 \\
                                                                  &  &  &  &  &  &  &  \\
 \multicolumn{5}{@{}l}{\emph{\underline{Sigs}}} \\
 $\tau = 0.05$                                           & \Yb & \Yd & \Ya & \Yd & \Ya & \Yd & \Yd \\ 
 $\tau = 0.10$                                           & \Ya & \Yd & \Ya & \Yd & \Ya & \Yd & \Ya \\ 
 $\tau = 0.50$                                           & \Yd & \Ya & \Ya & \Ya & \Ya & \Ya & \Ya \\ 
 $\tau = 0.90$                                           & \Yd & \Yb & \Yb & \Ya & \Ya & \Yc & \Ya \\ 
 $\tau = 0.95$                                           & \Yd & \Yc & \Yd & \Yc & \Yd & \Yd & \Yd \\ 
 \end{longtable}
 \end{landscape}



 \end{document} 
3

One way of doing this is to place the stars in a right overlap (or \rlap) so that they do not take up any space horizontally. In short, \rlap is equivalent to \makebox[0pt][l]:

\newcommand*{\oneS}{\rlap{\SuperScriptSameStyle{*}}}
\newcommand*{\twoS}{\rlap{\SuperScriptSameStyle{**}}}
\newcommand*{\threeS}{\rlap{\SuperScriptSameStyle{*{*}*}}}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy