Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I asked a previous question about underlining data in a table when using the siunitx S column definition (see Use of underline and siunitx in a table). The advice given was perfect until I added \sisetup{table-format=2.1} to reduce the amount of space being used up the numbers. I have managed to get my table spaced out perfectly now, so I don't really want to remove the \sisetup, but this line means that any underlined values in the table are now not aligned by decimal point.

Is there any way to combine underlining with this \sisetup?

MWE:

\documentclass{article}
\usepackage{etoolbox,siunitx,booktabs,threeparttable,multirow,array,graphicx}
\usepackage[normalem]{ulem}
\robustify\bfseries
\robustify\uline
\sisetup{detect-weight        = true,
         detect-inline-weight = math,
         tight-spacing        = true,
         table-format         = 2.1,
         }

\begin{document}
    \begin{table}
    \caption{Insert caption here}
    \centering
    \begin{threeparttable}[b]
        \begin{tabular}{SS}
        \toprule
            {Column 1} & {Column 2}\\
        \midrule
            7.1 & 4.2\\
            \uline{8.7} & 6.5\\
            9.3 & \uline{1.0}\\
        \bottomrule
        \end{tabular}
    \end{threeparttable}
    \end{table}
\end{document} 
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.