Graphics, Figures & TablesCaption formatting continues the entire page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
smittyg1
Posts: 4
Joined: Tue Sep 21, 2010 8:23 am

Caption formatting continues the entire page

Post by smittyg1 »

Hello All,

I was wondering if somebody could tell me if they have experienced this problem or know how to fix it. I am working in amsbook class and whenever I insert a figure into the text, the text on the entire page after the caption takes on the formatting of the caption (font size, type, justification, etc.). I want to eliminate this. I am using the typical \begin{figure} with \caption[stuff]{more stuff} with a centering command thrown in for good measure. Any help would be greatly appreciated.

Thanks,
SmittyG1

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Caption formatting continues the entire page

Post by frabjous »

Telling us that you're using "the typical" commands doesn't cut it in a situation like this. We are not mind-readers or psychics. Provide a minimal working example as suggested in the Board Rules.
smittyg1
Posts: 4
Joined: Tue Sep 21, 2010 8:23 am

Re: Caption formatting continues the entire page

Post by smittyg1 »

First and foremost, I do not appreciate being addressed so condescendingly and if you are not interested in helping, then don't. Secondly, if this is what I needed to provide the latex community, I was unaware and I was on another computer when I posted, for which I apologize. Here is an example of the figure coding I am using:

\begin{figure}[ht]
\begin{center}
\epsfig{file=sns1.eps,width=400pt,height=500pt}
\caption[A 220 MHz Portion of a 2 GHz Spectrum of SnS]{A 220 MHz portion of a 2 GHz spectrum recorded using our laser ablation-equipped, chirped pulse Fourier transform microwave spectrometer. The spectrum shows the $J$ = 1 $\leftarrow$ 0 transitions for SnS. Not all spectral features are labelled.}
\end{center}
\end{figure}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Caption formatting continues the entire page

Post by localghost »

smittyg1 wrote:First and foremost, I do not appreciate being addressed so condescendingly and if you are not interested in helping, then don't. […]
First and foremost you have to act according to the guidelines of this community. Inherent is reading the Board Rules and other important posts among the forum announcements. You just have been referred to the essentials and asked for a minimal example. Instead you obviously didn't neither read the rules nor the link about how to build this minimal working example (MWE). That's very impolite and in principal violates the rules.
smittyg1 wrote:[…] Secondly, if this is what I needed to provide the latex community, I was unaware and I was on another computer when I posted, for which I apologize. […]
The rules and many other important topics are placed among the announcements on top of every sub-forum. Thus they can't be overlooked. The missing code due to working at another machine is another story and can happen. For the future you know that providing code is one of the keys for instant help (and I assume that you expected that).

Regarding your problem and what I assume from your code snippet, your image is simply too big to fit on a page together with its caption. But if I try to comprehend the problem only with the information you provided, I fail.

Code: Select all

\documentclass{article}
\usepackage[demo]{graphicx}

\begin{document}
  \begin{figure}[!ht]
    \centering
    \includegraphics[width=400pt,height=500pt]{sns1}
    \caption[A 220 MHz Portion of a 2 GHz Spectrum of SnS]{A 220 MHz portion of a 2 GHz spectrum recorded using our laser ablation-equipped, chirped pulse Fourier transform microwave spectrometer. The spectrum shows the $J$ = 1 $\leftarrow$ 0 transitions for SnS. Not all spectral features are labelled.}
  \end{figure}
\end{document}
As you can see, this sample runs into another problem. The image is too wide but fits with its height. So you just have to decrease the size.

And finally a tip regarding graphics inclusion. With epsfig you are using a package that's obsolete [1]. With graphicx there is a more sophisticated package available.

[1] View topic: Obsolete packages and document classes — Avoid usage!


Thorsten
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Caption formatting continues the entire page

Post by frabjous »

I have 1100 posts here at LaTeX Community. I spend hours a day on this forum and similar ones helping people. I do this completely as a volunteer. No one pays me. The same goes for Thorsten and the other regulars here.

I was not aiming to condescend. But when someone asks for help, but does not provide the means which allow us to help, and clearly has not read the board rules, what are we supposed to do, but be blunt about it?

But what is particularly worrisome is this. Even with my prodding, you clearly STILL have not read the board rules, because your sample code does not follow the advice linked to about what a minimal working example should look like. In particular, a minimal working example must be compiliable on its own. Please read the Post on Avoidable Mistakes. If you want help here, you must follow the same rules as everyone else.

If you are going to ask someone for free help, you could at least try to make it easy for them to help you. Sheesh.

I strongly urge you to read this: How to Ask Questions the Smart Way.
Post Reply