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 am trying to use the S option of siunitx for table alignment alongside with threeparttables for table footnotes, but it looks like that the footnote mark is flushed left everytime \tnote{} is used.

Is it possible to use both packages together?

\documentclass{article}

\usepackage{booktabs}
\usepackage{multirow}
\usepackage{threeparttable}
\usepackage{siunitx}

\usepackage{xltxtra}
\usepackage{amsmath}

\setmainfont[Kerning=On,Mapping=tex-text]{Linux Libertine O}

\newcommand{\tabnote}[3]{\multicolumn{1}{#1}{#2\tnote{#3}}}
\begin{document}

\begin{table}[tpb]
    \centering
    \begin{threeparttable}[b]
        \begin{tabular}{lcSSSSl}
            \toprule
            &&\multicolumn{4}{c}{Pull--out}\\
            \cmidrule{3-6}
            &&\multicolumn{2}{c}{Good Conditions} & \multicolumn{2}{c}{Other Conditions}\\
            \cmidrule(r){3-4} \cmidrule(r){5-6}
            && \multicolumn{1}{c}{\emph{MC 1990}} &  \multicolumn{1}{c}{\emph{MC 2010}} &  \multicolumn{1}{c}{\emph{MC 1990}} & \multicolumn{1}{c}{\emph{MC 2010}}\\
            \cmidrule(r){3-3} \cmidrule(r){4-4} \cmidrule(r){5-5} \cmidrule(r){6-6}
            $t_{max}$ & [\si{MPa}] & 2.50          & 2.50          & 1.25          & 1.25          & $\times \sqrt{f_{ck}}$\\
            $t_f$     & [\si{MPa}] & 0.40\tnote{1} & 0.40\tnote{1} & 0.40\tnote{1} & 0.40\tnote{1} & $\times t_{max}$\\
            $s_1$     & [\si{mm}]  & 1.0           & 1.0           & 1.0           & 1.8           & \\
            $s_2$     & [\si{mm}]  & 3.0           & 2.0           & 3.0           & 3.6           & \\
            $a$       & [-]        & 0.40          & 0.40          & 0.40          & 0.40          & \\
            \bottomrule
        \end{tabular}
        \begin{tablenotes}\footnotesize
            \item [1] From data analysis.
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\end{document}

enter image description here

share|improve this question
1  
It's always best to cut down to a minimal example. The use of XeTeX and system fonts is not vital here, so could usefully have been omitted. –  Joseph Wright Jun 2 '11 at 11:31
    
@Joseph You are right, but then I am a XeLaTeX-only user, and you can never be sure if it is totally irrelevant (at least I can't...). Thanx anyway! –  pmav99 Jun 2 '11 at 12:02
add comment

1 Answer

up vote 5 down vote accepted

You need a couple of things here. First, you need to set up siunitx appropriately:

\sisetup{table-align-text-post = false,table-format = 1.2}

(Of course, you may need to adjust the table-format). Secondly, at least at the moment, you also need to make \tnote robust:

\usepackage{etoolbox}
\robustify\tnote
share|improve this answer
    
Thank you very much Joseph! –  pmav99 Jun 2 '11 at 12:02
add comment

Your Answer

 
discard

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.