# [OS X TeX] Making an Image Stay In Place

Michel Bovani michel.bovani at wanadoo.fr
Thu Nov 21 07:56:03 EST 2002


Le 21/11/02 13:25, « Bob Kerstetter » <bkerstetter at mac.com> a écrit :

> Have read how to do this in someplace, but cannot find it now.
>
> When placing an image in Latex it "floats" to the next page, centering
> itself on the page vertically with page breaks before and after.
>
> It really needs to just stay in line like any other paragraph. What do
> I need to do to keep it place when between paragraphs.
>
> Here is more or less what the source looks like:
>
>
> %start example source
>
> This is the paragraph before the image.
>
> \begin{figure}
> \begin{center}
> \centerline {
> \includegraphics[width=144pt]{FileName}
> }
> \end{center}
> \end{figure}

In fact if (like in your example) you *don't* need \caption and
\listoffigures, the best way to get your piscture to stay in place is to not
use the figure environment at all.

Just

\begin{center}
\includegraphics[width=144pt]{FileName}
\end{center}

If you need captions, you should use the ccaption package, which privides a
way to obtain a caption outside of the figure environment.

\usepackage{ccaption}
\newfixedcaption{\figcaption}{figure}%%% \figcaption or anything else

...

\begin{document}
\begin{center}
\includegraphics[width=144pt]{FileName}
\figcaption{blah, blah, blah}
\end{center}

--
Michel Bovani

-----------------------------------------------------
Mac TeX info, resources, and news can be found at:
<http://www.esm.psu.edu/mac-tex/>
-----------------------------------------------------
List archives can be found at:
<http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
-----------------------------------------------------
See message headers for list info.
-----------------------------------------------------