Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Dernière révision Les deux révisions suivantes
3_composition:texte:paragraphes:ajuster_la_taille_d_une_minipage [2018/06/03 16:22]
joseph.wright
3_composition:texte:paragraphes:ajuster_la_taille_d_une_minipage [2018/12/04 00:51]
jejust
Ligne 1: Ligne 1:
---- +====== ​Automatic sizing of `minipage` ​======
-title: ​Automatic sizing of `minipage` +
-category: misc +
-permalink: /​FAQ-varwidth +
----+
  
-The `minipageenvironment requires you to specify the+ 
 +The ''​minipage'' ​environment requires you to specify the
 width of the "​page"​ you're going to create. ​ This is sometimes width of the "​page"​ you're going to create. ​ This is sometimes
 inconvenient:​ you would like to occupy less space, if possible, but inconvenient:​ you would like to occupy less space, if possible, but
-`minipagesets a box that is exactly the width you+''​minipage'' ​sets a box that is exactly the width you
 specified. specified.
  
-The [`pbox`](https://​ctan.org/​pkg/​pboxpackage defines a `\pboxwhose width is exactly+The [[ctanpkg>​pbox|pbox]] package defines a ''​\pbox'' ​whose width is exactly
 that of the longest enclosed line, subject to a maximum width that you that of the longest enclosed line, subject to a maximum width that you
-give it.  So while `\parbox{2cm}{Hello world!}produces a +give it.  So while ''​\parbox{2cm}{Hello world!}'' ​produces a 
-box of width exactly ​`2cm`+box of width exactly ​''​2cm''​
-`\pbox{2cm}{Hello world!}produces one whose width is +''​\pbox{2cm}{Hello world!}'' ​produces one whose width is 
-`1.79cm(if one's using the default ​`cmrfont for the+''​1.79cm'' ​(if one's using the default ​''​cmr'' ​font for the
 text, at least). ​ The package also provides a text, at least). ​ The package also provides a
-`\settominwidth[min]{length}{text}(which looks (almost) +''​\settominwidth[min]{length}{text}'' ​(which looks (almost) 
-like the standard ​`\settowidthcommand), and a `\widthofpbox` +like the standard ​''​\settowidth'' ​command), and a ''​\widthofpbox''​ 
-function analogous to the `\widthofcommand for use with the +function analogous to the ''​\widthof'' ​command for use with the 
-[`calc`](https://​ctan.org/​pkg/​calcpackage.+[[ctanpkg>​calc|calc]] package.
  
-The [`eqparbox`](https://​ctan.org/​pkg/​eqparboxpackage extends [`pbox`](https://​ctan.org/​pkg/​pbox)'s idea, by+The [[ctanpkg>​eqparbox|eqparbox]] package extends [[ctanpkg>​pbox|pbox]]'s idea, by
 allowing you to set a series of boxes, all with the same (minimised) allowing you to set a series of boxes, all with the same (minimised)
 width. ​ (Note that it doesn'​t accept a limiting maximum width width. ​ (Note that it doesn'​t accept a limiting maximum width
 parameter.) ​ The package documentation shows the following example parameter.) ​ The package documentation shows the following example
-drawn from a joke _curriculum vitae_+drawn from a joke //​curriculum vitae//
-```latex+ 
 +<​code ​latex>
 \noindent% \noindent%
 \eqparbox{place}{\textbf{Widgets,​ Inc.}} \hfill \eqparbox{place}{\textbf{Widgets,​ Inc.}} \hfill
Ligne 40: Ligne 38:
 \eqparbox{title}{\textbf{Lead Engineer}} \hfill \eqparbox{title}{\textbf{Lead Engineer}} \hfill
 \eqparbox{dates}{\textbf{9/​92--12/​94}} \eqparbox{dates}{\textbf{9/​92--12/​94}}
-```+</​code>​
 The code makes the three items on each of the heading lines have The code makes the three items on each of the heading lines have
 exactly the same width, so that the lines as a whole produce a regular exactly the same width, so that the lines as a whole produce a regular
-pattern down the page.  A command ​`\eqboxwidthallows you to use+pattern down the page.  A command ​''​\eqboxwidth'' ​allows you to use
 the measured width of a group: the documentation shows how the command the measured width of a group: the documentation shows how the command
-may be used to produce sensible-looking columns that mix `c`-, +may be used to produce sensible-looking columns that mix ''​c''​-, 
-`r`- or `l`-rows, with the equivalent of a `p{...}` +''​r''​- or ''​l''​-rows, with the equivalent of a ''​p{...}''​ 
-entry, by making the fixed-width rows an [`eqparbox`](https://​ctan.org/​pkg/​eqparboxgroup, and +entry, by making the fixed-width rows an [[ctanpkg>​eqparbox|eqparbox]] group, and 
-making the last from a `\parboxusing the width that's been+making the last from a ''​\parbox'' ​using the width that's been
 measured for the group. measured for the group.
  
-The [`varwidth`](https://​ctan.org/​pkg/​varwidthpackage defines a `varwidth`+The [[ctanpkg>​varwidth|varwidth]] package defines a ''​varwidth''​
 environment which sets the content of the box to match a "​narrower environment which sets the content of the box to match a "​narrower
 natural width" if it finds one.  (You give it the same parameters as natural width" if it finds one.  (You give it the same parameters as
-you would give `minipage`: in effect, it is a "​drop-in"​ +you would give ''​minipage''​: in effect, it is a "​drop-in"​ 
-replacement.) ​ [`Varwidth`](https://​ctan.org/​pkg/​Varwidth) ​provides its own ragged text command: +replacement.) ​ [[ctanpkg>​Varwidth|Varwidth]provides its own ragged text command: 
-`\narrowragged`, which aims to make narrower lines and to put more+''​\narrowragged''​, which aims to make narrower lines and to put more
 text in the last line of the paragraph (thus producing lines with more text in the last line of the paragraph (thus producing lines with more
-nearly equal lengths than typically happens with `\raggedright`+nearly equal lengths than typically happens with ''​\raggedright''​
 itself). itself).
  
Ligne 65: Ligne 63:
 a variety of jobs. a variety of jobs.
  
 +
 +-----
 +
 +//Source:// [[faquk>​FAQ-varwidth|Automatic sizing of `minipage`]]
 +
 +{{htmlmetatags>​metatag-keywords=(LaTeX,​misc)
 +metatag-og:​title=(Automatic sizing of `minipage`)
 +metatag-og:​site_name=(FAQ LaTeX francophone)
 +}}
  
3_composition/texte/paragraphes/ajuster_la_taille_d_une_minipage.txt · Dernière modification: 2021/01/31 11:58 par yannick.tanguy
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0