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:positionnement:forcer_la_position_d_un_flottant2 [2018/06/03 13:16] – joseph.wright | 3_composition:flottants:positionnement:forcer_la_position_d_un_flottant2 [2021/11/28 15:46] (Version actuelle) – Correction d'une coquille. yannick.tanguy | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | --- | + | ====== Comment imposer un emplacement à un flottant? ====== |
- | title: Figure (or table) _exactly_ where I want it | + | |
- | category: floats | + | |
- | tags: | + | |
- | - tables | + | |
- | - figures | + | |
- | permalink: / | + | |
- | --- | + | |
- | This is of course a contradiction: `figure` and | + | La demande est contradictoire |
- | `table` are _designed_ to float, and will always have | + | |
- | the potential to appear away from where you asked for them. | + | |
- | you need something that behaves like a `figure` or | + | |
- | `table` environment, except that it doesn't allow the | + | |
- | figure | + | |
- | The most straightforward way is to use of the [`float`](https:// | + | ===== Avec l' |
- | it gives you a `[H]` float placement | + | |
- | floating: | + | Le moyen le plus simple est d' |
- | ```latex | + | |
+ | < | ||
\begin{figure}[H] | \begin{figure}[H] | ||
- | \centering | + | \centering |
- | | + | |
- | \caption{caption text} | + | \caption{Beaucoup de bruit pour rien} |
- | \label{fig:nonfloat} | + | \label{fig:aaaaah} |
\end{figure} | \end{figure} | ||
- | ``` | + | </code> |
- | As the example suggests, such a `[H]` figure (or | + | |
- | corresponding table) offers all you need to cross-reference as well | + | |
- | as typeset. | + | |
- | but is no longer recommended.) | + | |
- | However, you don't actually _have_ to use [`float`](https://ctan.org/pkg/float) (or | + | Il existe une extension |
- | [`here`](https:// | + | |
- | You can place your figure as you please, with a sequence like | + | ===== Avec l' |
- | ```latex | + | |
+ | En fait, vous n'avez pas //besoin// d' | ||
+ | |||
+ | < | ||
\begin{center} | \begin{center} | ||
- | | + | |
- | \captionof{figure}{caption text} | + | \captionof{figure}{Beaucoup de bruit pour rien} |
- | \label{fig:nonfloat} | + | \label{fig:aaaaah} |
\end{center} | \end{center} | ||
- | ``` | + | </ |
- | which relies on the `\captionof` command to place a caption without | + | |
- | benefit of an enclosing float. That command may be had from the extremely | + | Ce code s' |
- | simple-minded package | + | |
- | sophisticated [`caption`](https://ctan.org/pkg/caption) package. | + | ===== Les limites de ces méthodes ===== |
+ | |||
+ | ==== Gestion de l' | ||
+ | |||
+ | Quelle que soit la méthode utilisée, vous devrez gérer le cas où une figure ou un tableau soit trop grand pour la page (sous peine d' | ||
+ | |||
+ | ==== Gestion de la numérotation des flottants ==== | ||
- | Using either method, you have to deal with the possibility of the | + | Un autre problème vient de la possibilité que de tels « flottants fixes » s' |
- | figure | + | |
- | float away in this circumstance; | + | |
- | take upon yourself the responsibility for avoiding | + | |
- | " | + | |
- | A further problem is the possibility that such "fixed floats" | + | Si vous ne pouvez suivre ce conseil, vous pouvez utiliser la commande |
- | overtake "real floats" | + | |
- | of order: figure 6 could be on page 12, while figure 5 had floated to | + | |
- | page 13. It's best, therefore, either to stay with floating figures | + | |
- | throughout a document, or to use fixed figures throughout. | + | |
- | If it's really impossible to follow that counsel of perfection, you | + | < |
- | can use the [`perpage`](https:// | + | |
- | command: | + | |
- | ```latex | + | |
- | ... | + | |
\usepackage{float} | \usepackage{float} | ||
\usepackage{perpage} | \usepackage{perpage} | ||
\MakeSorted{figure} | \MakeSorted{figure} | ||
\MakeSorted{table} | \MakeSorted{table} | ||
- | ... | + | </ |
- | ``` | + | |
- | and the sequence of float numbers is all correct. | + | |
+ | ----- | ||
+ | //Source:// [[faquk> | ||
+ | {{htmlmetatags> | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} |