Hi!
I want to use thousands separator in the numbers. For example, write 10123456.789012, and show 10,123,456.789012
I tried to use numprint package, but it show thousand separator after decimal point. eg. 10,123,456.789,012
Do you know any package???
Thanks!
General ⇒ Thousands separator
NEW: TikZ book now 40% off at Amazon.com for a short time.

Thousands separator
You can do it with numprint. Load this package. With the settings
the command \numprint{1234567890.123456789}, for example, yields 1,234,567,890.123456789 as desired.
I've seen in other thread that you load the spanish language with babel. In this case, the above way of writing decimal numbers is not in accordance with Spanish typography. See the document ortomatem.pdf, by Javier Bezos, about ortotypography in mathematics. I quote two paragraphs from page 17 of this document:
Code: Select all
\npthousandsep{,}\npthousandthpartsep{}\npdecimalsign{.}
I've seen in other thread that you load the spanish language with babel. In this case, the above way of writing decimal numbers is not in accordance with Spanish typography. See the document ortomatem.pdf, by Javier Bezos, about ortotypography in mathematics. I quote two paragraphs from page 17 of this document:
So, when writing in spanish, I would suggest the following settings for numprint:h) El separador decimal es la coma: 3,142.
i) Antes y después de la coma, se pueden separar los dígitos en grupos de tres
con espacios finos: 2,718 281 8. Si se emplean estos espacios finos, se admite su
supresión si la parte entera o la decimal sólo tienen cuatro cifras: 1200, 3,1415.
Code: Select all
\npthousandsep{\,}\npdecimalsign{,}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
-
- Posts: 10
- Joined: Wed Mar 19, 2008 11:04 pm
Re: Thousands separator
Thank you so much... it worked perfectly