# [OS X TeX] How to Insert Graphics Using TeXShop?

Gary L. Gray gray at engr.psu.edu
Tue Mar 12 00:13:49 EST 2002


On 3/11/02 8:19 PM, "Zachary Davis" <zsd3711 at gamma2.uta.edu> wrote:

> Thanks, for the advice you provided.  A lot of what you offered isn't
> something you can find in books, but greatly aids in typesetting a
> document.  I still seem to be getting some floats where I would rather
> they not be.  I have some figures that are placed at the end of the
> document even after new sections have been declared.  All of the figures
> in my document have been declared as suggested:
>
> \begin{figure}[h]
> \centering
> \includegraphics{filename.eps}
> \caption{figure caption here}
> \label{fig-label}
> \end{figure}

I still think that the \label should be placed inside the caption. :-)

> Unfortunately, the [h] label didn't seem to place the floats where they
> were declared in the source file, and kept skipping over segments of
> text (complete sections) until they were placed in the next free page.
> I've tried adjusting the spacing between floats on a page, the
> textwidth, textheight, etc. to see what I could control by altering
> each.  However, the placement of figures is still less than would be
> desired.

First of all, I recommend Kopka and Daly's "A Guide to LaTeX," 3rd Edition,

You can do a couple of things to help with figure placement:

[1] Allow figures to appear the top or bottom of a page using the t and b
options, respectively. In addition, the ! used in combination with one of
the letter options (i.e., h, t, b, and/or p) essentially tells LaTeX that
you insist that it put the figure where you want. :-)

[2] Alter some of the style parameters for floats. For example:

\renewcommand{\floatpagefraction}{0.85}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}

should help.

Good luck,

-- Gary

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------