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

! Extra }, or forgotten \endgroup error

5,352 views
Skip to first unread message

Ginu

unread,
May 17, 2009, 6:48:11 PM5/17/09
to
Hello,

I'm receiving an error "! Extra }, or forgotten \endgroup" with all of
my figures in my thesis. I recently upgraded to Vista 64. I am using
Miktex 2.7 and WinEdt 5.5. The pair were working fine when I was
running 32-bit Vista.

The full error output is:
"[1] [2] <figures/twotier.eps>
! Extra }, or forgotten \endgroup.
\color@endbox ->\egroup

l.17 \end{figure}"

regarding the code fragment:
"\begin{figure}
% Requires \usepackage{graphicx}
\caption[A Sample Two-Tier Sensor Network Architecture]{ A Sample
Two-Tier Sensor Network Architecture \cite{purelink} }
\label{fig:twotier}
\centering
\includegraphics[width=2.5in]{twotier.eps}
\end{figure}"

Does anybody know what the problem is? It seems from a Google search
that the problem is quite common, yet none of the solutions are
working for me.

Any help would be appreciated. Cheers.

Kevin Godby

unread,
May 17, 2009, 6:52:47 PM5/17/09
to
Hello.

There's a typo in your \includegraphics line. You have a } after the
width=2.5in instead of a ].

--Kevin

Ginu

unread,
May 17, 2009, 7:01:43 PM5/17/09
to

Are you sure? I don't see that??? "\includegraphics[width=2.5in]
{twotier.eps}"

Kevin Godby

unread,
May 17, 2009, 7:55:22 PM5/17/09
to

On May 17, 6:01 pm, Ginu <osheik...@gmail.com> wrote:
> Are you sure? I don't see that??? "\includegraphics[width=2.5in]
> {twotier.eps}"

Ah, you're right. I misread it. Sorry. The figure code you provided
compiles okay on my end. You might check for extra braces above that
point, though. Sometimes LaTeX's errors fall out on the wrong line.

--Kevin

Ulrike Fischer

unread,
May 18, 2009, 2:48:47 AM5/18/09
to
Am Sun, 17 May 2009 15:48:11 -0700 (PDT) schrieb Ginu:

> Hello,
>
> I'm receiving an error "! Extra }, or forgotten \endgroup" with all of
> my figures in my thesis. I recently upgraded to Vista 64. I am using
> Miktex 2.7 and WinEdt 5.5. The pair were working fine when I was
> running 32-bit Vista.
>
> The full error output is:
> "[1] [2] <figures/twotier.eps>
> ! Extra }, or forgotten \endgroup.
> \color@endbox ->\egroup
>
> l.17 \end{figure}"
>
> regarding the code fragment:

Don't sent code fragments. Make a complete (starting with
\documentclass and ending with \end{document}) but small (minimal)
example that demonstrates the error.

--
Ulrike Fischer

Holger Bruenner

unread,
May 18, 2009, 2:51:01 AM5/18/09
to
On 18 Mai, 01:01, Ginu <osheik...@gmail.com> wrote:


> > > regarding the code fragment:
> > > "\begin{figure}
> > >   % Requires \usepackage{graphicx}
> > >   \caption[A Sample Two-Tier Sensor Network Architecture]{ A Sample
> > > Two-Tier Sensor Network Architecture \cite{purelink} }
> > >   \label{fig:twotier}
> > >   \centering
> > >   \includegraphics[width=2.5in]{twotier.eps}
> > > \end{figure}"

Please provide a complete working minimal example - your code fragment
indeed compiles ok in a first run (after adding some minor guesses,
like \documentclass and the like - and providing a target for the
citation!) - but my crystal ball says, that this is not all of your
document:
- you may have a List of Figures
- you may have a bibliography and -style
Although you are obviously aware of the fragility of the \cite command
(providing an optional arg w/o \cite for the LOF), I suppose the
problem is still with (some aspect of) the citation, eg some special
citation style and so forth.


Regards, Holger

Ginu

unread,
May 18, 2009, 2:50:13 PM5/18/09
to

Here is a short thesis.tex file:

"\documentclass[12pt,letterpaper]{report}
%
% Review cuthesis.sty for more documentation on available options
% for this package.
\usepackage[1committee,phd,nonsequential]{cuthesis}
\usepackage{array}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{subfigure}
\usepackage{amsmath}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{relsize}
\usepackage{multirow}

% Defines relative path to folder containing your figures
\graphicspath{{figures/}}

\begin{document}

% Include the chapters.
\newchapter{chapter1}

% Include any appendices.
\newappendix{appendixA}

\end{document}"

My abridged chapter1.tex file is:

``\chapter{Introduction}

Next-generation networks ...

...Figure \ref{fig:twotier}, although it is ...

\begin{figure}
% Requires \usepackage{graphicx}
\caption[A Sample Two-Tier Sensor Network Architecture]{ A Sample
Two-Tier Sensor Network Architecture \cite{purelink} }
\label{fig:twotier}
\centering
\includegraphics[width=2.5in]{twotier.eps}
\end{figure}

\section{Problem Statement}

This study designs a reliable, high-performance...

\section{What is a Wireless Mesh Network?}

A wireless mesh network is a type...

\subsection{What is a Wireless Sensor Network?}

WSNs...

\begin{figure}[htp]
% Requires \usepackage{graphicx}
\centering
\includegraphics[width=2.5in]{1237146176751.eps}\\
\caption{A Sensor Network with Multi-Hop Paths}\label
{fig:sensornetwork}
\end{figure}

\section{State-of-the-Art in Mesh Networks}

state...

\section{Contributions of this Research}

The work presented in this proposal has four main contributions:

The expected contributions of work to be performed after the proposal
to complete the study are:

\section{Outline Of Proposal}

This proposal... "

When I receive the error "! Extra }, or forgotten \endgroup", I still
see it in this chapter1.tex file. Also, when I press enter after
receiving the error it goes on to the next citation and gives the same
error again. You're correct, it's in the citation somewhere. I can't
determine what it is. Could it be with using MikTex 2.7 (a 32-bit
software) with Vista64? It's the only thing I can think of.

Heiko Oberdiek

unread,
May 18, 2009, 5:29:54 PM5/18/09
to
Ginu <oshe...@gmail.com> wrote:

> \usepackage[1committee,phd,nonsequential]{cuthesis}

Probably some very old package that predates LaTeX's color support.
Your problem occurs at \end{figure}, thus the package redefines
some part of the figure stuff that does not work with LaTeX anymore.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Ginu

unread,
May 18, 2009, 5:36:01 PM5/18/09
to
On May 18, 5:29 pm, Heiko Oberdiek <oberd...@uni-freiburg.de> wrote:
>   Heiko <oberd...@uni-freiburg.de>

It was working before I re-installed my operating system a couple days
ago.

Peter Flynn

unread,
May 18, 2009, 6:28:38 PM5/18/09
to

But you may have installed a new version of TeX as well.
If it was working with the version you had before, and that was older,
then you may be trying to make old code work with new versions. Do you
know if the version of the distribution was different?

///Peter

Peter Flynn

unread,
May 18, 2009, 6:30:20 PM5/18/09
to

Not so much the wrong line, but LaTeX can only report an error when it
occurs. If the actual mistake was still syntactically correct, it will
be several lines, pages, or more before LaTeX runs across something that
trips the error (like a missing closing brace).

///Peter

Ginu

unread,
May 18, 2009, 7:53:03 PM5/18/09
to

Yup. I re-installed both versions exactly: MikTex 2.7 and WinEdt 5.5.
I even just uninstalled everything and re-installed it. The output is
fine, I get this error during compiling. Can anybody verify that the
code I pasted works?

Ulrike Fischer

unread,
May 19, 2009, 3:13:28 AM5/19/09
to
Am Mon, 18 May 2009 11:50:13 -0700 (PDT) schrieb Ginu:

> Here is a short thesis.tex file:

That's not a short file. It contains tons of packages. Try to
identify the package which provokes the error. Shorten the document
as much as possible (probably the figure environment is enough),
then start to remove packages until you find the culprit.

(My current guess is that you should update rotating. But
\color@endbox errors can be anywhere.)



--
Ulrike Fischer

Ginu

unread,
May 19, 2009, 2:15:33 PM5/19/09
to

Okay, it compiled and outputted fine when i individually enabled
packages up to this point:

\usepackage[1committee,phd,nonsequential]{cuthesis}
%\usepackage{array}
\usepackage{graphics}
\usepackage{graphicx}
%\usepackage{cite}
\usepackage{subfigure}
\usepackage{amsmath}
%\usepackage{rotating}
\usepackage{setspace}
%\usepackage{longtable}
%\usepackage{relsize}
%\usepackage{multirow}

so packages array, cite, rotating, longtable, relsize and multirow are
disabled. Scrolling through the compiling, I see "underfull \hbox
(badness ...)" but they are not causing a failed compile. Do these
below to one of the packages above? Thanks so much.

Ulrike Fischer

unread,
May 19, 2009, 2:26:54 PM5/19/09
to
Am Tue, 19 May 2009 11:15:33 -0700 (PDT) schrieb Ginu:


>> That's not a short file. It contains tons of packages. Try to
>> identify the package which provokes the error. Shorten the document
>> as much as possible (probably the figure environment is enough),
>> then start to remove packages until you find the culprit.
>>
>> (My current guess is that you should update rotating. But
>> \color@endbox errors can be anywhere.)

> Okay, it compiled and outputted fine when i individually enabled


> packages up to this point:
>
> \usepackage[1committee,phd,nonsequential]{cuthesis}
> %\usepackage{array}
> \usepackage{graphics}
> \usepackage{graphicx}
> %\usepackage{cite}
> \usepackage{subfigure}
> \usepackage{amsmath}
> %\usepackage{rotating}
> \usepackage{setspace}
> %\usepackage{longtable}
> %\usepackage{relsize}
> %\usepackage{multirow}
>
> so packages array, cite, rotating, longtable, relsize and multirow are
> disabled. Scrolling through the compiling, I see "underfull \hbox
> (badness ...)" but they are not causing a failed compile. Do these
> below to one of the packages above? Thanks so much.

Ok. Now try to reenable the packages until the error pop-up. Then
you know which one is responsable. Start with rotating: if it is the
problem update to the newest version, or load the color or the
xcolor package.

--
Ulrike Fischer

buyoni...@bluebottle.com

unread,
May 19, 2009, 6:07:50 PM5/19/09
to

As previously suggested, I would first remove as much of the document
as possible and still preserve the error, cleaning underfull messages,
if any. Then, following Ulrike's suggestion, you should be able to
identify the exact culprit package. If updating the culprit package
doesn't work, and you post your example (hopefully < 30 lines),
comp.text.tex experts will probably analyze.

This approach reduces the time and effort others must spend to help.

Ginu

unread,
May 20, 2009, 3:14:06 PM5/20/09
to

Hello! I found the solution here: http://www.latex-community.org/forum/viewtopic.php?f=45&p=18575

Thanks a lot for your help.

0 new messages