[OS X TeX] Text floating around a figure

Herbert Schulz herbs at wideopenwest.com
Fri Jun 6 10:13:09 CEST 2014


On Jun 5, 2014, at 8:32 PM, Don Green Dragon <fergdc at shaw.ca> wrote:

> Hi Herb,
> 
> Sorry to be so slow in answering. Thanks to your examples, I found out what was wrong in my example, plus a couple of other facts that I found surprising.
> 
> By good luck, my preamble contained the four lines
> 
> \documentclass{book}
> \usepackage{amsmath}
> \usepackage{picinpar}
> \usepackage{tikz}
> 
> and in the order above. Only difference is that I’m using {book} for the document class whereas you used {article}. The form of the command that I used was
> 
> \begin{figwindow}
> [2, l, \tikz \draw (0,0) circle (3 pt); , {Run around Circle} ]
> 
> which contains two errors:
> 
> 1) You cannot have whitespace immediately after \begin{figwindow} Not even a single space.
> 
> 2) In the case of using a \tikz command, you must enclose the command with { and }.
> 
> In other words, once I changed the format to 
> 
> \begin{figwindow}[2, l, {\tikz \draw (0,0) circle (3 pt); } , {Run around Circle} ]
> 
> then I no longer obtained the error message
> 
>>>>> ================
>>>>> ./LaTeXbookShort.tex:662: Use of \figwindow doesn't match its definition.
>>>>> l.662 \begin{figwindow}
>>>>> 
>>>>> ? 
>>>>> ==================
> 
> but the PDF was a mess because I had not specified a sufficient `width’ for the graphic. Changing (3 pt) to (30 pt) made a big improvement.
> 
> However, the error described as 1) results in the graphic appearing but in a totally unsatisfactory location if you continue to ignore the error messages until the PDF appears.
> 
> In the examples in The LaTeX Companion, they supplied sufficient width for the graphic either by using \fbox{…} in the first example and in the second they specified a width within the \includegraphics command.
> 
> A last point is that the caption — «Run around Circle» in my example — does not have to be enclosed with { and } as I had guessed. However, unless you don’t mind the caption barging into the «run-around-text» then you must allow sufficient width  for the caption as well as the graphic. For example
> 
> \begin{figwindow}[2, l, {\tikz \draw (0,0) -- (2,1); } , Slanting Segment]
> . . . text for run around . . .
> \end{figwindow}
> 
> results in an ugly while
> 
> \begin{figwindow}[2, l, {\tikz \draw (0,0) — (3,1);} , Slanting Segment]
> . . . text for run around . . .
> \end{figwindow}
> 
> is much better. I found that when specifying the graphic via \includegraphics it was not necessary to surround with { and }, but no objection if used.
> 
> Well, thanks for those examples, they sure helped me,  and being able to use \begin{window} and \begin{figwindow} will be wonderful.
> 
> However, in testing, I cannot get the graphic centred or shifted to the right margin using the characters `l’ or `r’. The graphic remains at the left margin for both {window} and {figwindow}. 
> 
> Can you centre and right align them in your setup?
> 

Howdy,

I can't get it to work with your example but the one given in The LaTeX Companion, 2nd Edition, works. The book states that there must be ``sufficient room'' on either side but it also says 1in and you certainly have that.

Please note that this package is VERY old going back to latex2.09 days. I'm not sure if there is a more modern package available.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list