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'm using siunitx to input some big numbers and units in my document.

Is there a way to make the output of \num{3.14} be "3,13" instead of "3.13"? In Spanish, we use the first one.

share|improve this question
@Andrey: A tip: If you copy and paste the entire URL of a tex.sx question in your comment, it'll automatically get shortened and display the question when you mouseover the link, e.g. http:// tex.stackexchange .com /questions/18673/german-language-use-of-comma-in-numbers (w/o spaces) becomes tex.stackexchange.com/questions/18673/… –  doncherry Jun 16 '11 at 8:07
@Tomas: Wait ... did you actually want to get 3,1_3_ when you input 3.1_4_? –  doncherry Jun 16 '11 at 8:48
@Tomas: the ISO norm 80000-1, accepts both the period and the comma as decimal separator, and in the most recent version of the Ortografía de la lengua española, our Academia recommends the use of the period as decimal separator, although the comma is still accepted. More information here: La marca decimal –  Gonzalo Medina Jun 16 '11 at 12:55
@Tomas: \usepackage[spanish,es-nodecimaldot]{babel} should be enough. –  egreg Jun 16 '11 at 16:56

1 Answer 1

up vote 13 down vote accepted

At the most basic

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

will do the job.

The package includes some pre-defined 'locales' for different typographic traditions, for example

\sisetup{locale = FR}

To date, I've not had details on Spanish conventions, so do not have an ES locale (there is more than just the decimal marker to worry about). In particular, what do you use for the exponent, 1.23 \times 10^{3} or 1.23 \cdot 10^{3} (or ...).

share|improve this answer
Thanks. We use \cdot for exponents. \times is more used for operations like vector products. Oh, i almost forgot. We use period for thousand separation. –  Tomas Jun 16 '11 at 16:43
@Thomas: How do you write a 3D point (spherical coordinate system), for example, (21.3,30.5,10) in Spanish? –  Please don't touch May 14 '12 at 8:33
@Joseph I think a single locale for Spanish is not possible. Very likely we need ES_es, ES_mx, ES_ar, and so on. –  Javier Bezos Oct 17 '12 at 14:00
@JavierBezos No, that would be confusing locale and language. ES would be Spain, I guess MX is Mexico, and so on. (For example, FR does not mean the text is in French, it means that the typography follows the conventions in use in France.) –  Joseph Wright Oct 17 '12 at 15:42
You can also load the package with this option: \usepackage[locale=FR]{siunitx} –  moose Jan 13 at 10:55

Your Answer


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.