diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-varwidth.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-varwidth.html | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-varwidth.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-varwidth.html deleted file mode 100644 index 76d3b68a4c7..00000000000 --- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-varwidth.html +++ /dev/null @@ -1,70 +0,0 @@ -<head> -<title>UK TeX FAQ -- question label varwidth</title> -</head><body> -<h3>Automatic sizing of <code>minipage</code></h3> -<p/>The <code>minipage</code> environment requires you to specify the -width of the “page” you’re going to create. This is sometimes -inconvenient: you would like to occupy less space, if possible, but -<code>minipage</code> sets a box that is exactly the width you -specified. -<p/>The <i>pbox</i> package defines a <code>\</code><code>pbox</code> whose width is exactly -that of the longest enclosed line, subject to a maximum width that you -give it. So while <code>\</code><code>parbox{2cm}{Hello\\world!}</code> produces a -box of width exactly <code>2cm</code>, -<code>\</code><code>pbox{2cm}{Hello\\world!}</code> produces one whose width is -<code>1.79cm</code> (if one’s using the default <i>cmr</i> font for the -text, at least). The package also provides a -<code>\</code><code>settominwidth[</code><em>min</em><code>]{</code><em>length</em><code>}{</code><em>text</em><code>}</code> (which looks (almost) -like the standard <code>\</code><code>settowidth</code> command), and a <code>\</code><code>widthofpbox</code> -function analogous to the <code>\</code><code>widthof</code> command for use with the -<i>calc</i> package. -<p/>The <i>eqparbox</i> package extends <i>pbox</i>’s idea, by -allowing you to set a series of boxes, all with the same (minimised) -width. (Note that it doesn’t accept a limiting maximum width -parameter.) The package documentation shows the following example -drawn from a joke <em>curriculum vitae</em>: -<blockquote> - -<pre> -\noindent% -\eqparbox{place}{\textbf{Widgets, Inc.}} \hfill -\eqparbox{title}{\textbf{Senior Widget Designer}} \hfill -\eqparbox{dates}{\textbf{1/95--present}} - -... - -\noindent% -\eqparbox{place}{\textbf{Thingamabobs, Ltd.}} \hfill -\eqparbox{title}{\textbf{Lead Engineer}} \hfill -\eqparbox{dates}{\textbf{9/92--12/94}} -</pre> -</blockquote><p> -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 -pattern down the page. A command <code>\</code><code>eqboxwidth</code> allows you to use -the measured width of a group: the documentation shows how the command -may be used to produce sensible-looking columns that mix <code>c</code>-, -<code>r</code>- or <code>l</code>-rows, with the equivalent of a <code>p{...}</code> -entry, by making the fixed-width rows an <i>eqparbox</i> group, and -making the last from a <code>\</code><code>parbox</code> using the width that’s been -measured for the group. -<p/>The <i>varwidth</i> package defines a <code>varwidth</code> -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 -you would give <code>minipage</code>: in effect, it is a ‘drop-in’ -replacement.) <i>Varwidth</i> provides its own ragged text command: -<code>\</code><code>narrowragged</code>, which aims to make narrower lines and to put more -text in the last line of the paragraph (thus producing lines with more -nearly equal lengths than typically happens with <code>\</code><code>raggedright</code> -itself). -<p/>The documentation (in the package file) lists various restrictions and -things still to be done, but the package is already proving useful for -a variety of jobs. -<dl> -<dt><tt><i>eqparbox.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/eqparbox.zip">macros/latex/contrib/eqparbox</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/eqparbox/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/eqparbox.html">catalogue entry</a> -<dt><tt><i>pbox.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/pbox.zip">macros/latex/contrib/pbox</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/pbox/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pbox.html">catalogue entry</a> -<dt><tt><i>varwidth.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/misc/varwidth.sty">macros/latex/contrib/misc/varwidth.sty</a>; <a href="http://mirror.ctan.org//help/Catalogue/entries/varwidth.html">catalogue entry</a> -</dl> -<p/> -<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=varwidth">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=varwidth</a> -</body> |