Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How centering polish numbers in tabular

 \begin{tabular}{ | c | c | }
  \hline numer & błąd \\
  \hline 11,1 &  11\\
  \hline 299,05  &  10,1\\
  \hline 3000,5 &  9,3\\ 
  \hline
 \end{tabular}

In my country using , not . as separator. I cant use ‘S’ in tabular header. How centering to comma in tabular enviroments?

I need table with centering by the comma in numbers. I can use r@{\,} but header is not centered.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The siunitx has an option to use , as decimal marker (if you compile with lualatex or xelatex, you don’t need this \fontencoding{T1}\selectfont hack…):

\documentclass{article}

\usepackage[output-decimal-marker={,}]{siunitx}

\begin{document}


 \begin{tabular}{ | S[table-format=4.2] | S[table-format=2.1] | }
  \hline {numer} & {\fontencoding{T1}\selectfont błąd}\\
  \hline 11,1 &  11\\
  \hline 299,05  &  10,1\\
  \hline 3000,5 &  9,3\\ 
  \hline
 \end{tabular}


\end{document}

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading