[OS X TeX] \makebox{} Ignorance

Manfred Braun manfred.braun at uni-due.de
Fri Feb 10 12:41:40 CET 2012


Hi Don,

I wasn't at the keys yesterday, so my answer comes only now.

On 09.02.2012, at 4:28, Don Green Dragon wrote:
> ---------
> b. Find a possible formula for f(x)
> %\begin{minipage}[t]{6cm}
> \includegraphics[scale=0.4]{SpiralModel}
> %\end{minipage}
> More text to follow the graphic element
> ---------
> typeset nicely. The following text fitted in nicely with the graphic, since the graphic was treated as if a character. But on uncommenting the two lines, about the same configuration for the graphic, but the following text intruded into the graphic on the right edge.

If you comment out the minipage environment, everything will depend on the size of your included graph. Maybe it is so wide that there is no space for any text to follow on the same line. Otherwise it will be be typeset on the same line. With the minipage environment activated, the whole minipage is also treated as a single character which, however, is exactly 6cm wide, independently of the size of the included picture. If this is 8cm wide, say, it will be drawn in full size, but LaTeX assumes that it was only 6cm and goes on with the text correspondingly. So this text will protrude into the figure from the right edge.

To typeset the text after the graphic element on a new line, start a new paragraph, i.e., insert a blank line after the \end{minipage}, or insert some vertical space explicitly.  

> In addition, Manfred's example led me to solve something I've been thinking about for a long time. How do you get two figures to fit side-by-side? I was able to do this with source text of the form:
> 
> \includegraphics[scale=0.25]{SpiralModel}\hfill
> \includegraphics[scale=0.25]{LinearModel}
> 
> and the \hfill guy placed the graphic elements nicely. But I could not get the same effect if I used the \begin{figure} ... \end{figure} environment. The graphics are always stacked one above the other. Is there some way to place the figures side-by-side while still using \begin{figure} ... \end{figure}? I would like to have them with captions and numbered!!

I suppose that it is again related to the size of your included graphics material. To set them side by side their total width must be less than \textwidth.  As you have noted you cannot include \begin{figure} ... \end{figure} into a minipage. But the other way round it works, and you can give each of the figures a separate caption, see the attached example.

Hope that this is useful.

Manfred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: application/octet-stream
Size: 765 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20120210/50e41e89/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: first.eps
Type: image/eps
Size: 7980 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20120210/50e41e89/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: second.eps
Type: image/eps
Size: 8437 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20120210/50e41e89/attachment-0001.bin>


More information about the macostex-archives mailing list