Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| composition:langues:utiliser_la_virgule_comme_separateur_decimal [2018/06/03 13:13] – samcarter | 3_composition:langues:utiliser_la_virgule_comme_separateur_decimal [2021/12/16 08:35] (Version actuelle) – Correction de la mise en forme. yannick.tanguy | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | --- | + | ====== Comment faire de la virgule le séparateur décimal? ====== |
| - | title: The comma as a decimal separator | + | |
| - | category: usage | + | |
| - | permalink: / | + | |
| - | date: 2014-06-10 | + | |
| - | --- | + | |
| - | TeX embodies the British/American cultural | + | < |
| - | period as the separator between the whole number and the decimal | + | |
| - | fraction part of a decimal number. Other cultures use a comma as | + | |
| - | separator, but if you use a comma in maths mode you get a small space | + | |
| - | after it; this space makes a comma that is used as a decimal separator | + | |
| - | look untidy. | + | |
| - | A simple solution to this problem, in maths mode, is to type | + | ===== Sans extension ===== |
| - | `3`{,}`14` in place of `3, | + | |
| - | 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 | + | Une solution simple à ce problème, en mode mathématique, consiste à taper '' |
| - | probably welcome macro support. There are two packages that | + | |
| - | can help relieve the tedium: [`icomma`](https:// | + | |
| - | [`Icomma`](https:// | + | <WRAP column 45ex> |
| - | comma, unless you type a space after it (as in `f(x, y)`& | + | <code latex> |
| - | the absence of the package, you don't need that space), in which case | + | \documentclass{report} |
| - | the usual small space after the comma appears. | + | \begin{document} |
| - | specifically targeted at the needs of those typesetting German, but | + | Avant : |
| - | covers the present need, as well as providing the double-minus sign | + | \[ 123,45 \] |
| - | used in German (and other languages) for the empty ' | + | |
| - | amount of currency. | + | |
| - | The [`numprint`](https:// | + | Après : |
| - | `\numprint{number}` that prints its argument according to | + | \[ 123{,}45 \] |
| - | settings you give it, or according to settings chosen to match the | + | \end{document} |
| - | language you have selected in [`babel`](https: | + | </code> |
| - | equally well in text or maths. | + | </WRAP> |
| - | group the digits of very ' | + | |
| - | convenient than [`icomma`](https: | + | |
| - | lot of numbers. | + | |
| + | <WRAP column 45ex> | ||
| + | < | ||
| + | \documentclass{report} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | Avant : | ||
| + | \[ 123,45 \] | ||
| + | Après : | ||
| + | \[ 123{,}45 \] | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Avec l' | ||
| + | |||
| + | L' | ||
| + | |||
| + | ===== Avec l' | ||
| + | |||
| + | L' | ||
| + | |||
| + | ===== Avec l' | ||
| + | |||
| + | L' | ||
| + | |||
| + | <WRAP column 45ex> | ||
| + | <code latex> | ||
| + | \documentclass{report} | ||
| + | \usepackage{numprint} | ||
| + | \begin{document} | ||
| + | \numprint{123456.78} | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP column 45ex> | ||
| + | < | ||
| + | \documentclass{report} | ||
| + | \usepackage{numprint} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | \numprint{123456.78} | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | |||
| + | ===== Avec l' | ||
| + | |||
| + | L' | ||
| + | |||
| + | <WRAP column 45ex> | ||
| + | <code latex> | ||
| + | \documentclass{report} | ||
| + | \usepackage{siunitx} | ||
| + | \sisetup{output-decimal-marker={, | ||
| + | \begin{document} | ||
| + | \num{123456.78} | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP column 45ex> | ||
| + | < | ||
| + | \documentclass{report} | ||
| + | \usepackage{numprint} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | \numprint{123456.78} | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | |||
| + | ----- | ||
| + | //Source:// [[faquk> | ||
| + | |||
| + | {{htmlmetatags> | ||
| + | metatag-og: | ||
| + | metatag-og: | ||
| + | }} | ||

