3

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}
  • @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
4

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

  • Harold: I learned this trick from Joseph Wright! – Mico Aug 21 '11 at 23:22

Your Answer

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

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