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:titres:changer_la_presentation_des_numeros_de_sections [2018/06/03 14:22] – joseph.wright | 2_composition:texte:titres:changer_la_presentation_des_numeros_de_sections [2020/12/28 19:26] (Version actuelle) – Renommage des sections de base: correction des liens internes. yannick.tanguy | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | --- | + | ====== Comment modifier la présentation de la numérotation des titres de sectionnement? |
| - | title: Adjusting the presentation of section numbers | + | |
| - | category: programming | + | |
| - | tags: | + | |
| - | - latex | + | |
| - | - macros | + | |
| - | permalink: / | + | |
| - | --- | + | |
| - | The general issues of adjusting the appearance of section headings are | + | Les problèmes généraux d' |
| - | pretty complex, and are covered in | + | |
| - | the question | + | |
| - | [the style of section headings](FAQ-secthead). | + | |
| - | However, people regularly want merely to change the way the section | + | Toutefois, si vous souhaitez simplement changer la façon dont la numérotation apparaît dans le titre de sectionnement et que vous n'avez pas peur d' |
| - | number appears in the heading, and some such people don't mind writing | + | |
| - | out a few macros. | + | |
| - | The section number is typeset using the | + | Le numéro d'un titre de sectionnement est composé par la commande |
| - | | + | |
| - | `\@seccntformat` command, which is given the " | + | <code latex> |
| - | subsection, & | + | |
| - | `\@seccntformat` | + | |
| - | merely outputs the section number, and then a `\quad` of space: | + | |
| - | <!-- {% raw %} --> | + | |
| - | ```latex | + | |
| \renewcommand*{\@seccntformat}[1]{% | \renewcommand*{\@seccntformat}[1]{% | ||
| \csname the# | \csname the# | ||
| } | } | ||
| - | ``` | + | </code> |
| - | <!-- {% endraw %} --> | + | |
| - | Suppose you want to put a stop after every section (subsection, | + | Supposons que vous vouliez mettre un point après chaque numéro de section (sous-section, sous-section, ...), un simple |
| - | subsubsection, & | + | |
| - | simple modification | + | <code latex> |
| - | <!-- {% raw %} --> | + | |
| - | ```latex | + | |
| \renewcommand*{\@seccntformat}[1]{% | \renewcommand*{\@seccntformat}[1]{% | ||
| \csname the# | \csname the# | ||
| } | } | ||
| - | ``` | + | </code> |
| - | <!-- {% endraw %} --> | + | |
| - | However, many people want to modify | + | Cependant, vous pourriez souhaiter modifier les numéros de section, |
| - | subsection numbers, or any of the others. To do this, one must make | + | |
| - | `\@seccntformat` switch according to its argument. | + | <code latex> |
| - | technique | + | |
| - | enough for a relatively | + | |
| - | <!-- {% raw %} --> | + | |
| - | ```latex | + | |
| \renewcommand*{\@seccntformat}[1]{% | \renewcommand*{\@seccntformat}[1]{% | ||
| \csname the# | \csname the# | ||
| \csname adddot@# | \csname adddot@# | ||
| } | } | ||
| - | ``` | + | </code> |
| - | <!-- {% endraw %} --> | + | |
| - | which uses a second-level command to provide the dot, if it has been | + | La commande modifiée utilise ici une commande de second |
| - | defined; otherwise it merely appends `\relax` (which does nothing | + | |
| - | in this context). The definition of the second-level command | + | < |
| - | version for the `section`, here) specifies what to put after a | + | |
| - | section number, but it could be used to put anything after it: | + | |
| - | ```latex | + | |
| \newcommand*{\adddot@section}{.} | \newcommand*{\adddot@section}{.} | ||
| - | ``` | + | </ |
| - | Note that all the command definitions above are dealing in | + | |
| - | [LaTeX internal commands](FAQ-atsigns), so the above | + | Notez que toutes les définitions vues ci-dessus modifient des [[2_programmation: |
| - | code should be in a package file, for preference. | + | |
| + | Les classes [[ctanpkg> | ||
| + | |||
| + | ----- | ||
| - | The [`Koma-script`](https: | + | //Source:// [[faquk> |
| - | changes to section number | + | |
| - | `\chapterformat` and `\othersectionlevelsformat`, | + | |
| - | their facilities are similar to those of " | + | |
| + | {{htmlmetatags> | ||
| + | metatag-og: | ||
| + | metatag-og: | ||
| + | }} | ||

