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:flottants:pourquoi_faire_flotter_ses_figures_et_tableaux [2018/06/03 14:20] – samcarter | 3_composition:flottants:pourquoi_faire_flotter_ses_figures_et_tableaux [2021/06/13 21:21] (Version actuelle) – Correction de coquilles. jejust | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | --- | + | ====== Comment gérer proprement les flottants dans LaTeX? ====== |
| - | title: Moving tables and figures in LaTeX | + | |
| - | category: errors | + | |
| - | tags: layout | + | |
| - | permalink: / | + | |
| - | date: 2014-06-10 | + | |
| - | --- | + | |
| - | Tables and figures | + | Les tables et les figures |
| - | away from where they were specified to appear. This is in fact | + | Il s'agit là d'un principe parfaitement ordinaire dans une conception de document |
| - | perfectly ordinary | + | les figures |
| - | package will float figures | + | le spécificateur de placement |
| - | violating the certain typographic rules. Even if you use the | + | si ces règles ne sont pas respectées. Ces règles elles-mêmes sont assez simples et sont listées à la page 198, section C.9 |
| - | placement | + | du manuel < |
| - | will not be | + | peuvent entraîner l' |
| - | printed " | + | « [[2_programmation: |
| - | are pretty simple, and are given on page 198, section C.9 of the | + | |
| - | LaTeX manual. In the worst case, LaTeX's rules can cause the | + | |
| - | floating items to pile up to the extent that you get an error message | + | |
| - | saying "[Too many unprocessed floats](FAQ-tmupfl)" | + | |
| - | What follows is a simple checklist of things to do to solve these | + | |
| - | problems (the checklist talks throughout about figures, but applies | + | |
| - | equally well to tables, or to " | + | |
| - | [`float`](https:// | + | |
| - | | + | |
| - | - Do your figures need to float at all? If not, look at the | + | Ce qui suit est une simple liste de points à étudier pour résoudre ces problèmes. |
| - | | + | |
| - | - Are the placement parameters on your figures right? The | + | ===== Éviter les flottants |
| - | default (`tbp`) is usually satisfactory, but you can | + | |
| - | reasonably change it (for example, to add an `h`). | + | La question « [[3_composition: |
| - | | + | |
| - | omit the `p`: doing so could cause LaTeX to believe that if you | + | ===== Utiliser les bons spécificateurs de placement ===== |
| - | | + | |
| - | _anywhere_. | + | La séquence de spécificateurs par défaut, « '' |
| - | this way& | + | |
| - | - LaTeX's own float placement parameters could be preventing | + | ===== Changer les paramètres de gestion des flottants ===== |
| - | placements that seem entirely " | + | |
| - | notoriously rather conservative. | + | Les paramètres de < |
| - | your figure, you may need to loosen its demands. | + | |
| - | ones are the ratio of text to float on a given page, but it's | + | |
| - | sensible to have a fixed set that changes the whole lot, to meet | + | |
| - | every eventuality.) | + | |
| - | ```latex | + | |
| - | \renewcommand{\topfraction}{.85} | + | |
| - | \renewcommand{\bottomfraction}{.7} | + | |
| - | \renewcommand{\textfraction}{.15} | + | |
| - | \renewcommand{\floatpagefraction}{.66} | + | |
| - | \renewcommand{\dbltopfraction}{.66} | + | |
| - | \renewcommand{\dblfloatpagefraction}{.66} | + | |
| - | \setcounter{topnumber}{9} | + | |
| - | \setcounter{bottomnumber}{9} | + | |
| - | \setcounter{totalnumber}{20} | + | |
| - | \setcounter{dbltopnumber}{9} | + | |
| - | ``` | + | |
| - | The meanings of these | + | |
| - | parameters are described on pages& | + | |
| - | LaTeX manual. | + | |
| - | - Are there places in your document where you could " | + | |
| - | put a `\clearpage` command? | + | |
| - | cleared after a `\clearpage`. | + | |
| - | command in the standard [`book`](https: | + | |
| - | implicitly executes `\clearpage`, | + | |
| - | the end of a chapter.) | + | |
| - | - Try the [`placeins`](https:// | + | |
| - | `\FloatBarrier` command beyond which floats may not pass. A | + | |
| - | package option allows you to declare that floats may not pass a | + | |
| - | `\section` command, but you can place `\FloatBarrier`s wherever | + | |
| - | you choose. | + | |
| - | - If you are bothered by floats appearing at the top of the page | + | |
| - | (before they are specified in your text), try the [`flafter`](https: | + | |
| - | package, which avoids this problem by insisting that floats should | + | |
| - | always appear after their definition. | + | |
| - | - Have a look at the LaTeX2e [`afterpage`](https: | + | |
| - | Its documentation gives as an example the idea | + | |
| - | of putting `\clearpage` _after_ the current page (where it | + | |
| - | will clear the backlog, but not cause an ugly gap in your text), but | + | |
| - | also admits that the package is somewhat fragile. | + | |
| - | resort if the other possibilities below don't help. | + | |
| - | - If you would actually _like_ great blocks of floats at the | + | |
| - | end of each of your chapters, try the `\extrafloats` command, | + | |
| - | or in older LaTeX releases, the [`morefloats`](https://ctan.org/pkg/ | + | |
| - | this allows you to increase the number of floating inserts that LaTeX | + | |
| - | can handle at one time (from its original value of 18 or, now, 52, in | + | |
| - | LaTeX2e). | + | |
| | | ||
| + | <code latex> | ||
| + | \renewcommand{\topfraction}{.85} | ||
| + | \renewcommand{\bottomfraction}{.7} | ||
| + | \renewcommand{\textfraction}{.15} | ||
| + | \renewcommand{\floatpagefraction}{.66} | ||
| + | \renewcommand{\dbltopfraction}{.66} | ||
| + | \renewcommand{\dblfloatpagefraction}{.66} | ||
| + | \setcounter{topnumber}{9} | ||
| + | \setcounter{bottomnumber}{9} | ||
| + | \setcounter{totalnumber}{20} | ||
| + | \setcounter{dbltopnumber}{9} | ||
| + | </ | ||
| + | |||
| + | La signification de ces paramètres est donnée en pages 199 à 200, section C.9 du manuel < | ||
| + | |||
| + | ===== Utiliser la commande “\clearpage” ===== | ||
| + | |||
| + | Votre document dispose d' | ||
| + | |||
| + | ===== Utiliser l' | ||
| + | |||
| + | L' | ||
| + | |||
| + | ===== Utiliser l' | ||
| + | |||
| + | Si vous êtes gêné par les flottants apparaissant en haut de la page (avant qu'ils ne soient spécifiés dans votre texte), essayez l' | ||
| + | |||
| + | ===== Utiliser l' | ||
| + | |||
| + | La documentation de l' | ||
| + | |||
| + | ===== Utiliser l' | ||
| + | |||
| + | Si vous souhaitez réellement avoir de larges blocs de flottants à la fin de chacun de vos chapitres, essayez la commande '' | ||
| + | |||
| + | Dans le cas particulier où vous utiliseriez l' | ||
| + | |||
| + | <code latex> | ||
| + | \usepackage{etex} | ||
| + | \reserveinserts{18} | ||
| + | \usepackage{morefloats} | ||
| + | </ | ||
| + | |||
| + | ===== Utiliser l' | ||
| + | |||
| + | Si vous souhaitez avoir tous vos flottants en fin de document (par exemple pour soumettre une version provisoire d'un article), ne comptez pas sur les mécanismes usuels de < | ||
| - | Caveat: if you are using [`etex`](https:// | + | ----- |
| - | | + | //Source:// [[faquk> |
| - | [`morefloats`](https: | + | |
| - | ```latex | + | |
| - | \usepackage{etex} | + | |
| - | \reserveinserts{18} | + | |
| - | \usepackage{morefloats} | + | |
| - | ``` | + | |
| - | - If you actually _wanted_ all your figures | + | |
| - | end (_e.g_., for submitting a draft copy of a paper), don' | + | |
| - | rely on LaTeX's mechanism: get the [`endfloat`](https:// | + | |
| - | the job for you. | + | |
| + | {{htmlmetatags> | ||
| + | metatag-og: | ||
| + | metatag-og: | ||
| + | }} | ||

