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 would like siunitx to detect the document font family and use it for numbers in an S tabular cell, so I am using the detect-all option, which however does not seem to affect the output decimal marker (which I have set to a comma to spot the difference more easily). Using parentheses as in the first row obviously negatively affects the alignment and is counterproductive. Enlighten me as usually, please. :-)

Minimal working example:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tgpagella}
\usepackage{longtable}
\usepackage{siunitx}

\sisetup{
detect-all,
output-decimal-marker = {,}
}

\begin{document}
\Huge
\begin{longtable}{| S[table-text-alignment = center, table-format = 2.2] |}
\hline
{Foo} \\ \hline
1,23 \\
45,67 \\ \hline
\end{longtable}
\end{document}
share|improve this question
    
@Joseph Wright Could you please tell me whether this is a feature? If yes, what practical use does it have? –  Harold Cavendish Aug 19 '11 at 8:20
add comment

1 Answer

up vote 4 down vote accepted

Harold: Instead of output-decimal-marker = {,}, try setting output-decimal-marker = \text{.} -- or ... = \text{,} if you want it to be a comma.

share|improve this answer
    
Excellent, thank you. –  Harold Cavendish Aug 19 '11 at 8:09
    
Harold: I learned this trick from Joseph Wright! –  Mico Aug 21 '11 at 23:22
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.