Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LaTeX Error - Not in outer par mode

11,759 views
Skip to first unread message

Matt

unread,
Nov 30, 2006, 3:22:12 PM11/30/06
to
I am getting a bunch of "not in outer par mode" errors. From what I've
read, this typically happens when you try to, for example, but a
\begin{figure} inside another float (like a table). However, I'm not
doing that in my paper.

I'm writing my thesis - and up until yesterday, everything compiled
with no problems at all. However, yesterday, I added some photos
(figures) to some of the text sections. That's all I did ... inserted
\begin{figure} ... \end{figure} into the text, and added some comments
about the figures in the text itself. Basic stuff.

Is it possible that I would get the "Not in outer par mode" as a result
of LaTeX not being able to place all the floats for a section?
Admittedly, this section does have a lot of floats when compared to the
number of overall pages (but, there aren't more pages than floats).
When I comment-out one of the figures that's getting an error, the
error message just goes to the next figure that appears in the text.
As far as I can tell, there

So, in trying to figure out what was going on, i commented out all the
new figures - leaving only the stuff that compiled perfectly fine the
day before yesterday. However, LaTeX now gives me the "No in outer par
mode" error on a table that already existed in the text! Specifically,
in this table:

\begin{table}
\begin{center}
\caption{Performance specifications for the MAPX electromagnet.}
\label{tbl:electromagnet}
\begin{tabular}{@{}lc@{}}
\toprule
\rule[-1pt]{0pt}{14pt}Characteristic & Value\\
\midrule
\rule[-1pt]{0pt}{14pt}Field Strength ($\unit{tesla}$)&2.0\\
\rule[-1pt]{0pt}{14pt}Air Gap ($\unit{inches}$, $\unit{cm}$)&4.0,
10.16\\
\rule[-1pt]{0pt}{14pt}Pole Cap ($\unit{inches}$, $\unit{cm}$)&36.0,
91.44\\
\rule[-1pt]{0pt}{14pt}Voltage ($\unit{volts}$)&65.0\\
\rule[-1pt]{0pt}{14pt}Maximum Current ($\unit{A}$)&2400\\
\rule[-1pt]{0pt}{14pt}Cooling Water ($\unit{gpm}$ at $\unit[70]{psig}$,
$\unit{L/min}$ at $\unit[482.6]{kPa}$)&50.0, 189.3\\
\bottomrule
\end{tabular}
\end{center}
\end{table}

it marks the \begin{center} with the error. However, i make all my
tables the same way - I have 5 other tables that are made just like
this, and they didn't generate errors.

Now, back to the figures ... here's the code for the figures (again,
this occurs between paragraphs of text - not anywhere that it shouldnt'
be):

\begin{figure}
\cfig{2}{mapx_channel_photo.eps}{5.5}
\caption{Photograph of the MAPX accelerator: (a) top view, showing
the
power taps and the channel divergence, (b) a perspective view,
showing
the electrode links entrance adapter, and (c) a side view, showing
the
electrode links and the secondary nozzle at the exit.}
\label{fig:mapxchannelphoto}
\end{figure}

where I have previously defined:

\newcommand{\cfig}[3]{\centering\includegraphics[keepaspectratio=true,width=#3in]{./CH#1/EPSFDocs/#2}}


So ... does anyone have any comments/ideas? Do I just have "too many"
figures/floats? How does one "get around" that (I still want to
include them all in the text, and in those sections).

Thanks a ton for the help!

Enrico Gregorio

unread,
Nov 30, 2006, 4:18:08 PM11/30/06
to
Matt <matthew....@gmail.com> wrote:

You should give a minimal example, specifying clearly what packages
you are using. I guess booktabs and SIunits, but don't get the error
you mention.

Ciao
Enrico

Robin Fairbairns

unread,
Nov 30, 2006, 4:57:34 PM11/30/06
to
"Matt" <matthew....@gmail.com> writes:
>I am getting a bunch of "not in outer par mode" errors. From what I've
>read, this typically happens when you try to, for example, but a
>\begin{figure} inside another float (like a table). However, I'm not
>doing that in my paper.
>
>I'm writing my thesis - and up until yesterday, everything compiled
>with no problems at all. However, yesterday, I added some photos
>(figures) to some of the text sections. That's all I did ... inserted
>\begin{figure} ... \end{figure} into the text, and added some comments
>about the figures in the text itself. Basic stuff.
>
>Is it possible that I would get the "Not in outer par mode" as a result
>of LaTeX not being able to place all the floats for a section?

no.

>Admittedly, this section does have a lot of floats when compared to the
>number of overall pages (but, there aren't more pages than floats).
>When I comment-out one of the figures that's getting an error, the
>error message just goes to the next figure that appears in the text.
>As far as I can tell, there
>
>So, in trying to figure out what was going on, i commented out all the
>new figures - leaving only the stuff that compiled perfectly fine the
>day before yesterday. However, LaTeX now gives me the "No in outer par
>mode" error on a table that already existed in the text! Specifically,
>in this table:
>
>\begin{table}
>\begin{center}

bad policy, is center environment, inside a float.

>\caption{Performance specifications for the MAPX electromagnet.}
>\label{tbl:electromagnet}
>\begin{tabular}{@{}lc@{}}
>\toprule
>\rule[-1pt]{0pt}{14pt}Characteristic & Value\\
>\midrule
>\rule[-1pt]{0pt}{14pt}Field Strength ($\unit{tesla}$)&2.0\\
>\rule[-1pt]{0pt}{14pt}Air Gap ($\unit{inches}$, $\unit{cm}$)&4.0,
>10.16\\
>\rule[-1pt]{0pt}{14pt}Pole Cap ($\unit{inches}$, $\unit{cm}$)&36.0,
>91.44\\
>\rule[-1pt]{0pt}{14pt}Voltage ($\unit{volts}$)&65.0\\
>\rule[-1pt]{0pt}{14pt}Maximum Current ($\unit{A}$)&2400\\
>\rule[-1pt]{0pt}{14pt}Cooling Water ($\unit{gpm}$ at $\unit[70]{psig}$,
>$\unit{L/min}$ at $\unit[482.6]{kPa}$)&50.0, 189.3\\
>\bottomrule
>\end{tabular}
>\end{center}
>\end{table}
>
>it marks the \begin{center} with the error.

no it doesn't; it reads ahead after \begin{table} looking for an
optional argument. there's no optional argument, so it stops having
read \begin.

>However, i make all my
>tables the same way - I have 5 other tables that are made just like
>this, and they didn't generate errors.
>
>Now, back to the figures ... here's the code for the figures (again,
>this occurs between paragraphs of text - not anywhere that it shouldnt'
>be):
>
>\begin{figure}
> \cfig{2}{mapx_channel_photo.eps}{5.5}
> \caption{Photograph of the MAPX accelerator: (a) top view, showing
>the
> power taps and the channel divergence, (b) a perspective view,
>showing
> the electrode links entrance adapter, and (c) a side view, showing
>the
> electrode links and the secondary nozzle at the exit.}
> \label{fig:mapxchannelphoto}
>\end{figure}
>
>where I have previously defined:
>
>\newcommand{\cfig}[3]{\centering\includegraphics[keepaspectratio=true,width=#3in]{./CH#1/EPSFDocs/#2}}

what probably happened is you started one of those figures and then
thought better of it; you then deleted almost all of the figure, but
somehow the \begin{figure} stayed in place.

otherwise, you've gained an enclosing minipage or a \parbox or
something (pretty unlikely).

as enrico said, you need to create a minimal example. in this
circumstance there's a high-90s %-chance that you'll find your error
when creating the example. i suggest hacking things out from your
file, going backwards from the point the error is occurring. at some
stage you're going to find the error has gone: examine what was the
last thing you removed. if you still can't spot it, submit the
minimal failing version. this has got to be less than 100 lines long,
or you've not hacked enough...
--
Robin Fairbairns, Cambridge

Matt

unread,
Nov 30, 2006, 4:58:17 PM11/30/06
to
Apparently, I've opened some mode or environment and didn't close it -
for the life of me, I can't find the error ... I think I've tracked
down the general location, but I still don't see it. I'm now getting
errors in chapters that I haven't even written in yet.

So, I just replaced that entire chapter with a backup (from 2 days ago)
... it compiled fine.

I'm going to re-do my changes (additions), compiling more often as I
go, this time. (I just got too cocky ... tried to make too many
changes before compiling.)

Thanks ... lesson learned ... compile often.

Matt

unread,
Nov 30, 2006, 5:01:56 PM11/30/06
to
"bad policy, is center environment, inside a float. "


What do you suggest? Right now, all my tables are done this way. I'm
really not sure where I got it - I'm sure it was copied from an example
or from someone else.

Matt

unread,
Nov 30, 2006, 5:41:23 PM11/30/06
to
Would it matter that the .eps files that I'm compiling are large (in
MB)?

I'm trying to compile selected section - and most times, I get a
failure at a certain point in the text - at a figure ... let's call it
Figure 7.

However, when I narrow the selection - i.e., when I try to compile
Figures 6, 7, and 8 (with all the text between them), the selected
compile works. It doesn't get "hung" on Figure 7.

So, when I think I've found the problem, it suddenly works ... assuming
that there are no limitations on the DVI file-size or .eps file sizes.
If it's an "additive" problem (where I'm reaching some strange filesize
limit), then it would make sense for it to hang on Figure 7 when I try
to compile from Figures 1 through 10, for example.

Does any of this make sense? Any ideas?

Matt

unread,
Nov 30, 2006, 6:24:49 PM11/30/06
to
Wow ... I got it.

It turns out, when you put \figure{fig:blah} instead of
\figureref{fig:blah} in the text, you get a lot of errors. :-)

Thanks for helping me narrow it down!

hillev...@mdh.se

unread,
Dec 1, 2006, 4:06:02 AM12/1/06
to

\begin{table}
\centering

bla

\end{table}

The center environment adds some extra vertical space, and since table
also does this, you get too much.

Hillevi Gavel

Robin Fairbairns

unread,
Dec 1, 2006, 10:04:34 AM12/1/06
to
In article <1164923897.8...@80g2000cwy.googlegroups.com>,

a useful way of finding an unclosed environment is simply to chop the
document. that way you'll get a message like

! LaTeX Error: \begin{figure} on input line <n> ended by \end{document}.

using package checkend, you'll be allowed to plough through similar
errors for *all* environments open at end document, but mostly the
kernel support is enough, i find.
--
Robin Fairbairns, Cambridge

0 new messages