summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-textflow.html
blob: 6c750c2c146924967c03f58a3c62f121ec024e53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<head>
<title>UK TeX FAQ -- question label textflow</title>
</head><body>
<h3>Flowing text around figures</h3>
<p/>There are several LaTeX packages that purport to do this, but they
all have their limitations because the TeX machine isn&#8217;t really
designed to solve this sort of problem.  Piet van Oostrum has
conducted a survey of the available packages; he recommends:
<dl>
<dt><code>floatflt</code><dd> <i>floatflt</i> is an improved version
  (for LaTeX2e) of <i>floatfig.sty</i>, and its syntax is:
<blockquote>
<pre>
\begin{floatingfigure}[options]{width of figure}
  figure contents
\end{floatingfigure}
</pre>
</blockquote><p>

There is a (more or less similar) <code>floatingtable</code>
environment.
<p/>The tables or figures can be set left or right, or alternating on
even/odd pages in a double-sided document.
<p/>The package works with the <code>multicol</code> package, but doesn&#8217;t work well
in the neighbourhood of list environments (unless you change your
LaTeX document).
<dt><code>wrapfig</code><dd> <i>wrapfig</i> has syntax:
<blockquote>
<pre>
\begin{wrapfigure}[height of figure in lines]{l,r,...}[overhang]{width}
  figure, caption, etc.
\end{wrapfigure}
</pre>
</blockquote><p>
    
    The syntax of the <code>wraptable</code> environment is similar.
<p/>    Height can be omitted, in which case it will be calculated by the
    package; the package will use the greater of the specified and the
    actual width.  The <code>{l,r,<em>etc</em>.}</code> parameter may
    also be specified as <code>i</code><em>(nside)</em> or
    <code>o</code><em>(utside)</em> for two-sided documents, and uppercase
    may be used to indicate that the picture should float.  The
    overhang allows the figure to be
    moved into the margin.  The figure or table will entered into the
    list of figures or tables if you use the <code>\</code><code>caption</code> command.
<p/>    The environments do not work within list environments that end
    before the figure or table has finished, but can be used in a
    parbox or minipage, and in twocolumn format.
  <dt><code>picins</code><dd> <i>Picins</i> is part of a large bundle
    that allows inclusion of pictures (e.g., with shadow boxes,
    various MSDOS formats, etc.).  The command for inserting a
    picture at the start of a paragraph is:
  <blockquote>
    <code>\</code><code>parpic</code><code>(width,height)(x-off,y-off)[Options][Position]{Picture}</code><br>
    <em>Paragraph text</em>
  </blockquote><p>
  
  All parameters except the <em>Picture</em> are optional.  The picture
  can be positioned left or right, boxed with a rectangle, oval,
  shadowbox, dashed box, and a caption can be given which will be
  included in the list of figures.
<p/>  Unfortunately (for those of us whose understanding of German is not
  good), the documentation is in German.  Piet van Oostrum has written
  a summary in English.
</dl>
All of the above deal insertions at one or other margin; they are able
to take advantage of the TeX <code>\</code><code>parshape</code> primitive that allows
you to adjust the margins of the text of a paragraph, by line (Knuth
provides an example of such use, with text typeset in a circle,
half-overlapping the margin, in chapter 14 of the TeXbook).  To
place insertions in the middle of a paragraph requires effort of an
entirely different sort; the <i>cutwin</i> package does this for
you.  It requires a set of &#8220;part line widths&#8221; (two per line), and
typesets the &#8220;cutout&#8221; section of the paragraph line by line.  The
examples in the package documentation look enticing.
<p/>Plain TeX users only have one option: <i>figflow</i> (which
doesn&#8217;t work in LaTeX).  <i>Figflow</i> only offers flowed
figures at the start of the paragraph, but it seems perfectly
functional. Syntax is
<blockquote>
  <code>\</code><code>figflow{</code><em>&lt;<i>width</i>&gt;</em><code>}{</code><em>&lt;<i>height</i>&gt;</em><code>}{</code><em>&lt;<i>figure</i>&gt;</em><code>}</code>
</blockquote><p>
(the user is responsible for having the dimensions correct, and for
ensuring the figure fits on the page).
<dl>
<dt><tt><i>cutwin.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/cutwin.zip">macros/latex/contrib/cutwin</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/cutwin/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/cutwin.html">catalogue entry</a>
<dt><tt><i>figflow.tex</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/contrib/figflow.zip">macros/plain/contrib/figflow</a> (or <a href="http://mirror.ctan.org/macros/plain/contrib/figflow/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/figflow.html">catalogue entry</a>
<dt><tt><i>floatflt.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/floatflt.zip">macros/latex/contrib/floatflt</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/floatflt/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/floatflt.html">catalogue entry</a>
<dt><tt><i>picins.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex209/contrib/picins.zip">macros/latex209/contrib/picins</a> (or <a href="http://mirror.ctan.org/macros/latex209/contrib/picins/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/picins.html">catalogue entry</a>
<dt><tt><i>picins documentation summary</i></tt><dd><a href="http://mirror.ctan.org/macros/latex209/contrib/picins/picins.txt">macros/latex209/contrib/picins/picins.txt</a>
<dt><tt><i>wrapfig.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/wrapfig.zip">macros/latex/contrib/wrapfig</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/wrapfig/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/wrapfig.html">catalogue entry</a>
</dl>
<p><em>This answer last edited: 2009-06-11</em></p>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow</a>
</body>