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:tableaux:colonnes:faire_varier_la_largeur_de_colonnes [2018/12/03 23:34] – jejust | 3_composition:tableaux:colonnes:faire_varier_la_largeur_de_colonnes [2021/05/24 19:24] (Version actuelle) – Traduction en français. Compilation des exemples. jejust | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== |
- | This is a slightly different take on the problem addressed in | + | Il s'agit d'une version légèrement différente du problème abordé dans |
- | "[[FAQ-fixwidtab|fixed-width tables]]" --- here we have | + | « [[3_composition/ |
- | a column whose size we can't absolutely predict when we design the | + | Ici, nous avons une colonne dont nous ne pouvons pas prévoir la taille |
- | document. | + | au moment de l' |
- | While the basic techniques | + | Si les techniques |
- | and [[ctanpkg> | + | avec les extensions |
- | fixed-width //table// problem, there' | + | il existe un outil supplémentaire que nous pouvons appeler à notre secours et est préférable |
- | call to our aid, which may be preferable in some situations. | + | dans certaines |
- | Suppose we have data in one column which we read from an external | + | Supposons que le contenu d'une colonne soit lu à partir d' |
- | source, | + | et que la source |
- | the column may end up pretty narrow in every row of the table, or it | + | est parfois étroit, mais d' |
- | may be wide enough that the table would run over the edge of the page; | + | cependant, nous ne voulons pas rendre la colonne aussi large que possible |
- | however, we don't want to make the column as wide as possible | + | en donnant une taille fixe au tableau. Nous aimerions que la colonne soit aussi petite que possible, |
- | in case", by defining a fixed size for the table. | + | mais qu' |
- | column to be as small as possible, | + | en question est dépassée, de se transformer en une colonne de style '' |
- | to a maximum width and (if even that width is exceeded) turn into a | + | se répartisse sur plusieurs lignes. |
- | '' | + | |
- | The [[ctanpkg> | + | L' |
- | "[[FAQ-varwidth|automatic sizing of minipages]]", provides | + | « [[3_composition: |
- | a solution. | + | offre une solution. |
- | [[ctanpkg> | + | elle définira un nouveau type de colonne, '' |
+ | <WRAP column 50ex> | ||
<code latex> | <code latex> | ||
- | \usepackage{array} | + | \documentclass{article} |
- | \usepackage{varwidth} | + | |
- | </ | + | \usepackage{varwidth} |
- | [[ctanpkg> | + | |
- | can use as follows: | + | |
- | <code latex> | + | \begin{document} |
\begin{tabular}{l V{3.5cm} r} | \begin{tabular}{l V{3.5cm} r} | ||
foo & blah & bar \\ | foo & blah & bar \\ | ||
foo & blah blah & bar \\ | foo & blah blah & bar \\ | ||
\end{tabular} | \end{tabular} | ||
+ | \end{document} | ||
</ | </ | ||
- | when the second | + | </ |
- | or you can use it as follows: | + | < |
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage{array} | ||
+ | \usepackage{varwidth} | ||
+ | | ||
+ | \begin{document} | ||
+ | \begin{tabular}{l V{3.5cm} r} | ||
+ | foo & blah & bar \\ | ||
+ | foo & blah blah & bar \\ | ||
+ | \end{tabular} | ||
+ | \end{document} | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear/> | ||
+ | |||
+ | Dans l' | ||
+ | Voyons ce qui se passe quand son contenu s' | ||
+ | |||
+ | <WRAP column 50ex> | ||
<code latex> | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{array} | ||
+ | \usepackage{varwidth} | ||
+ | |||
+ | \begin{document} | ||
\begin{tabular}{l V{3.5cm} r} | \begin{tabular}{l V{3.5cm} r} | ||
foo & blah & bar \\ | foo & blah & bar \\ | ||
Ligne 50: | Ligne 73: | ||
& bar \\ | & bar \\ | ||
\end{tabular} | \end{tabular} | ||
+ | \end{document} | ||
</ | </ | ||
- | where the second | + | </ |
- | a second line in the third row. | + | < |
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage{array} | ||
+ | \usepackage{varwidth} | ||
+ | | ||
+ | \begin{document} | ||
+ | \begin{tabular}{l V{3.5cm} r} | ||
+ | foo & blah & bar \\ | ||
+ | foo & blah blah & bar \\ | ||
+ | foo & blah blah blah blah blah blah | ||
+ | & bar \\ | ||
+ | \end{tabular} | ||
+ | \end{document} | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear/> | ||
- | ----- | + | Ici, le contenu de la colonne centrale « s' |
+ | d' | ||
+ | |||
+ | ----- | ||
//Source:// [[faquk> | //Source:// [[faquk> | ||
- | {{htmlmetatags> | + | {{htmlmetatags> |
- | metatag-og: | + | metatag-og: |
metatag-og: | metatag-og: | ||
}} | }} | ||