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:renvois:changer_le_format_des_labels [2018/12/03 23:55] – jejust | 3_composition:texte:renvois:changer_le_format_des_labels [2022/07/14 17:12] (Version actuelle) – Usage de ⟨...⟩ dbitouze | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== |
+ | Par défaut, lorsqu' | ||
- | By default, when a label is created, it takes on the appearance of the | + | ===== Avec les commandes de bases ===== |
- | counter labelled, so the label appears as | + | |
- | '' | + | Ceci est bien sûr possible en étiquetant explicitement chaque niveau de liste puis en faisant un appel comme : |
- | asked to typeset the counter in your text. This isn't always what you | + | |
- | need: for example, if you have nested enumerated lists with the outer | + | |
- | numbered and the inner labelled with letters, one might expect to want | + | |
- | to refer to items in the inner list as " | + | |
- | [[FAQ-enumerate|change the structure of list items]].) | + | |
- | The change is of course | + | |
- | possible by explicit labelling of the parent and using that label to | + | |
- | construct the typeset result --- something like | + | |
<code latex> | <code latex> | ||
- | \ref{parent-item}(\ref{child-item}) | + | \ref{⟨itemNiveauUn⟩}(\ref{⟨itemNiveauDeux⟩}) |
</ | </ | ||
- | which would be both tedious and error-prone. | ||
- | undesirable, | ||
- | which is inflexible (you couldn' | ||
- | of a list at one fell swoop). | ||
- | LaTeX in fact has a label-formatting command built into every label | + | Mais ce serait à la fois fastidieux et sujet à erreur. De plus, vous construiriez une structure délicate à modifier : vous ne pourriez pas changer toutes les références aux éléments d'une liste d'un seul coup. |
- | definition; by default it's null, but it's available for the user to | + | |
- | program. For any label <// | + | |
- | command '' | + | |
- | on an inner list item is supposedly done using the command | + | |
- | '' | + | |
- | workings of this aren't quite right, and you need to patch the | + | |
- | '' | + | |
+ | < | ||
<code latex> | <code latex> | ||
Ligne 41: | Ligne 24: | ||
</ | </ | ||
- | With the patch in place you can now, for example, change the labels on | + | Avec ce correctif, vous pouvez maintenant, par exemple, changer les étiquettes sur toutes les listes de niveau 2 en ajoutant le code suivant dans votre préambule |
- | all inner lists by adding the following | + | |
<code latex> | <code latex> | ||
Ligne 49: | Ligne 31: | ||
\makeatother | \makeatother | ||
</ | </ | ||
- | This would make the labels for second-level enumerated lists appear as | ||
- | " | ||
- | gets used in a '' | ||
- | In fact, the [[ctanpkg> | + | Cela ferait apparaître les étiquettes des listes énumérées de niveau 2 sous la forme « 1(a) » (et ainsi de suite). Un changement analogue fonctionne pour tout compteur utilisé dans une commande '' |
- | the patch to LaTeX itself). With the package, the code above is | + | |
- | (actually quite efficiently) rendered by the command: | + | ===== Avec l' |
+ | |||
+ | L' | ||
<code latex> | <code latex> | ||
\labelformat{enumii}{\theenumi(# | \labelformat{enumii}{\theenumi(# | ||
</ | </ | ||
- | In fact, the above example, which we can do in several different ways, | ||
- | has been rendered obsolete by the appearance of the [[ctanpkg> | ||
- | package, which is discussed in the answer about | ||
- | [[FAQ-enumerate|decorating enumeration lists]]. | ||
+ | ===== Avec l' | ||
- | ----- | + | Pour finir, l' |
+ | ----- | ||
//Source:// [[faquk> | //Source:// [[faquk> | ||
- | {{htmlmetatags> | + | {{htmlmetatags> |
- | metatag-og: | + | metatag-og: |
metatag-og: | metatag-og: | ||
}} | }} | ||
- |