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:texte:symboles:changer_la_casse [2018/06/03 14:22] – joseph.wright | 2_composition:texte:symboles:changer_la_casse [2021/01/03 19:46] (Version actuelle) – Renommage des sections de base: correction des liens internes. yannick.tanguy | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | --- | + | ====== Comment convertir des majuscules en minuscules et inversement? |
| - | title: Case-changing oddities | + | |
| - | category: usage | + | |
| - | permalink: / | + | |
| - | --- | + | |
| - | TeX provides two primitive commands `\uppercase` and | + | ===== Avec les commandes |
| - | `\lowercase` to change the case of text; they' | + | |
| - | are capable creating confusion. | + | |
| - | The two commands do not expand the text that is their parameter& | + | < |
| - | the result of `\uppercase{abc}` is `ABC`, but | + | * '' |
| - | `\uppercase{\abc}` is always `\abc`, whatever the | + | * '' |
| - | meaning of `\abc`. The commands are simply interpreting a table of | + | |
| - | equivalences between upper- and lowercase | + | |
| - | They have (for example) no mathematical sense, and | + | |
| - | ```latex | + | |
| - | \uppercase{About $y=f(x)$} | + | |
| - | ``` | + | |
| - | will produce | + | |
| - | ```latex | + | |
| - | ABOUT $Y=F(X)$ | + | |
| - | ``` | + | |
| - | which is probably not what is wanted. | + | |
| - | In addition, `\uppercase` and `\lowercase` do not deal very well | + | Elles ne sont pas très utilisées car sources de confusion : |
| - | with non-American characters, for example | + | * elles ne développent pas les commandes du texte donné en paramètre. Ainsi, le résultat de '' |
| - | `\uppercase{\ae}` is the same as `\ae`. | + | * elles appliquent un simple tableau d' |
| + | * et elles ne traitent pas très bien les caractères non américains, | ||
| - | LaTeX provides commands `\MakeUppercase` and `\MakeLowercase` | + | ===== Avec les commandes |
| - | which fixes the latter problem. | + | |
| - | standard classes to produce upper case running heads for chapters | + | |
| - | and sections. | + | |
| - | Unfortunately `\MakeUppercase` and `\MakeLowercase` do not solve | + | < |
| - | the other problems with `\uppercase`, | + | |
| - | title containing `\begin{tabular}` & | + | |
| - | `\end{tabular}` will produce a running head containing | + | |
| - | `\begin{TABULAR}`. The simplest solution to this problem is | + | |
| - | using a user-defined command, for example: | + | |
| - | ```latex | + | |
| - | \newcommand{\mytable}{\begin{tabular}... | + | |
| - | \end{tabular}} | + | |
| - | \section{A section title \protect\mytable{} | + | |
| - | with a table} | + | |
| - | ``` | + | |
| - | Note that `\mytable` has to be protected, otherwise it will be | + | |
| - | expanded and made upper case; you can achieve the same result by | + | |
| - | declaring it with `\DeclareRobustCommand`, | + | |
| - | `\protect` won't be necessary. | + | |
| - | David Carlisle's [`textcase`](https:// | + | Malheureusement, |
| - | addresses many of these problems in a transparent way. It defines | + | |
| - | commands `\MakeTextUppercase` and `\MakeTextLowercase` which do | + | <code latex> |
| - | upper- or lowercase, with the fancier features of the LaTeX | + | \newcommand{\matable}{% |
| - | standard `\Make*`-commands but without the problems | + | \begin{tabular} |
| - | mentioned above. | + | ... |
| - | `\usepackage[overload]{textcase}`, and it will redefine the LaTeX | + | \end{tabular}% |
| - | commands | + | } |
| - | `\lowercase`), so that section headings and the like don't produce | + | \section{Un titre avec un tableau \protect\matable{}} |
| - | broken page headings. | + | </ |
| + | |||
| + | Notez que la commande '' | ||
| + | |||
| + | ===== Avec l' | ||
| + | |||
| + | L' | ||
| + | |||
| + | ----- | ||
| + | |||
| + | //Source:// [[faquk> | ||
| + | |||
| + | {{htmlmetatags> | ||
| + | metatag-og: | ||
| + | metatag-og: | ||
| + | }} | ||

