Ceci est une ancienne révision du document !

Comment faire de la virgule le séparateur décimal ?

\TeX utilise par défaut la convention culturelle des pays de langue anglaise : le point sert de séparateur entre le nombre entier et la fraction décimale d'un nombre décimal. Aussi, si vous utilisez avec \TeX une autre convention, à savoir celle de la virgule, vous noterez un petit espace placé à sa suite de cette dernière, ce qui ne donne pas une présentation propre.

FIXME A simple solution to this problem, in maths mode, is to type 3{,}14 in place of 3,14. While such a technique may produce the right results, it is plainly not a comfortable way to undertake any but the most trivial amounts of typing numbers.

Therefore, if you need to use commas as decimal separator, you will probably welcome macro support. There are two packages that can help relieve the tedium: icomma and ziffer.

Avec l'extention icomma

Icomma ensures that there will be no extra space after a comma, unless you type a space after it (as in f(x, y) — in the absence of the package, you don't need that space), in which case the usual small space after the comma appears.

Avec l'extention ziffer

Ziffer is specifically targeted at the needs of those typesetting German, but covers the present need, as well as providing the double-minus sign used in German (and other languages) for the empty 'cents' part of an amount of currency.

Avec l'extention numprint

The numprint package provides a command \numprint{number} that prints its argument according to settings you give it, or according to settings chosen to match the language you have selected in babel. The formatting works equally well in text or maths. The command is very flexible (it can also group the digits of very 'long' numbers), but is inevitably less convenient than icomma or ziffer if you are typing a lot of numbers.

Source: The comma as a decimal separator

2_composition/langues/utiliser_la_virgule_comme_separateur_decimal.1607281274.txt.gz · Dernière modification: 2020/12/06 20:01 par yannick.tanguy
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0