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:numeroter_les_equations_et_figures_en_continu [2018/10/24 18:41] – ↷ Page déplacée de page_composition:texte:renvois:numeroter_les_equations_et_figures_en_continu à composition:texte:renvois:numeroter_les_equations_et_figures_en_continu jejust | 3_composition:texte:renvois:numeroter_les_equations_et_figures_en_continu [2022/11/30 16:47] (Version actuelle) – Usage de ⟨...⟩ et traduction corrigée dbitouze | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | --- | + | ====== Comment obtenir une numérotation des équations, figures et tables indépendante des chapitres? ====== |
- | title: Running equation, figure and table numbering | + | |
- | category: usage | + | |
- | permalink: / | + | |
- | --- | + | |
- | Many LaTeX classes | + | De nombreuses classes < |
- | number things per chapter; so figures | + | |
- | 1.2, and so on. | + | |
- | needs. | + | |
- | Short of rewriting the whole class, one may use the [`chngcntr`](https:// | + | ===== Avec l' |
- | package, which provides commands `\counterwithin` (which | + | |
- | establishes this nested numbering relationship) and | + | |
- | `\counterwithout` (which undoes it). | + | |
- | So if you have figures | + | À moins de réécrire toute la classe, il est possible d' |
- | the command | + | |
- | ```latex | + | Supposons que vos figures |
+ | |||
+ | < | ||
\counterwithout{figure}{chapter} | \counterwithout{figure}{chapter} | ||
- | ``` | + | </ |
- | will convert them to figures 1, 2, 3, & | + | |
- | has also removed the chapter number from the counter' | + | Alors, vos figures |
+ | |||
+ | Voici un autre exemple permettant de changer les éléments numérotés par section (ici les équations) en éléments numérotés par chapitre : | ||
- | More elaborate use could change things numbered per section to things | + | < |
- | numbered per chapter: | + | |
- | ```latex | + | |
\counterwithout{equation}{section} | \counterwithout{equation}{section} | ||
\counterwithin{equation}{chapter} | \counterwithin{equation}{chapter} | ||
- | ``` | + | </ |
- | (assuming there was a class that did such a thing in the first place...) | + | |
- | The [`chngcntr`](https:// | + | ===== Avec la commande “\@removefromreset” ===== |
- | the enthusiastic LaTeX programmer might choose to try the technique | + | |
- | that we had to use before the advent of [`chngcntr`](https:// | + | L' |
- | the packages | + | |
- | `\@removefromreset` command, and having included the package one | + | < |
- | writes something like: | + | |
- | ```latex | + | |
\makeatletter | \makeatletter | ||
\@removefromreset{figure}{chapter} | \@removefromreset{figure}{chapter} | ||
\makeatother | \makeatother | ||
- | ``` | + | </ |
- | and the automatic renumbering stops. | + | |
- | way in which the figure | + | Vous pourrez alors avoir besoin de rédéfinir la manière dont le numéro de la figure (dans ce cas) est présenté |
- | ```latex | + | |
+ | < | ||
\makeatletter | \makeatletter | ||
\renewcommand{\thefigure}{\@arabic\c@figure} | \renewcommand{\thefigure}{\@arabic\c@figure} | ||
\makeatother | \makeatother | ||
- | ``` | + | </ |
- | (remember to do the whole job, for every counter you want to | + | |
- | manipulate, within `\makeatletter` & | + | |
- | This technique, too, may be used to change where in a multilevel | + | Cette technique |
- | structure a counter is reset. | + | |
- | & | + | < |
- | numbered per chapter, try: | + | |
- | ```latex | + | |
\makeatletter | \makeatletter | ||
\@removefromreset{figure}{section} | \@removefromreset{figure}{section} | ||
Ligne 62: | Ligne 48: | ||
\renewcommand{\thefigure}{\thechapter.\@arabic\c@figure} | \renewcommand{\thefigure}{\thechapter.\@arabic\c@figure} | ||
\makeatother | \makeatother | ||
- | ``` | + | </ |
- | (the command `\@addtoreset` is a part of LaTeX itself). | + | |
- | " | + | La commande '' |
- | | + | |
+ | ----- | ||
+ | //Source:// [[faquk> | ||
+ | {{htmlmetatags> | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} | ||