How to debug latex?

276 views
Skip to first unread message

Andrey

unread,
Mar 20, 2006, 3:59:36 PM3/20/06
to LaTeX Users Group
I have a dissertation template provided by my university. This didn't
happen before, but right now I can't insert figures, because I have
this error:

! Extra }, or forgotten \endgroup.
\color@endbox ->\color@endgroup \egroup

l.403 \end{figure}

The template is not supported officially, so I can't ask for help. I
know many things could have gone wrong, so I don't expect you can
answer how to fix this. But does anybody have an idea how to find out
what is going wrong?
thanks
--
Andrey F

Jörg

unread,
Mar 21, 2006, 4:16:21 AM3/21/06
to LaTeX Users Group
Hello Andrey,

if you are using Winedt as editor (www.winedt.com), there is a feature
which checks the "}".
I guess in other editors there will be similar faeatures.

However if you do not have such an editor, just comment out all between

\begin{figure}
%\includegraphics[...}
%\caption{ }
%\label{ }
\end{figure}

If it is running activate line by line until you get the line with the
error.
In most of the cases you will find the extra "}" quite fast

Cheers

Jörg

Andrey

unread,
Mar 21, 2006, 9:03:04 AM3/21/06
to LaTeX Users Group
The problem is not in the document, but somewhere else. Even when I
have
\begin{figure}
\end{figure}
it doesn't work, this is the whole problem...

Jörg

unread,
Mar 22, 2006, 5:30:47 AM3/22/06
to LaTeX Users Group
Hi andrey,

Did you try to open the file with winedt?
There is a 30 days trial version, so you can download it and use the
feature finding the missing "{"

How to
1. Open it in winedt
2. select all (ctrl + a)
3. Search/Delimiter/Delimiter check (or Ctrl + F12)

Then Winedt goes through the document and checks whether all delimiters
are set, or if there is one to much.

If this does not work, or winedt is not available
just insert \end{document} within your text.
If it is running just move \end{document} a little down.
Repeat this until the error appears. Therefor the "}" to much mnust be
within the range of the previous place of \end{document} and the
current place of it.

If this does not work, I have 2 questions:
1. Does your document compiles if all figures are commented out?
2. Could you post the lines with the problems?

Have you ever remove all auxiliary files?
For this I would copy all tex-files in a new folder and compile it.
Maybe you have used a special charakter like ä,ö,ü in a label.

Cheers Jörg

Ugur Madran

unread,
Mar 22, 2006, 5:46:47 AM3/22/06
to latex...@googlegroups.com
The problem might be package specific. Did you include
\usepackage{graphicx}
after the
\documentclass{whatever}
line at the very beginning? Though it may not be necessary, it should help. If you could not solve the problem, please cut all the unnecessary parts from your document and paste the resulting code including the figure part in full here.

Cheers.

Andrey

unread,
Mar 22, 2006, 3:01:44 PM3/22/06
to LaTeX Users Group
> 1. Does your document compiles if all figures are commented out?

yes

> 2. Could you post the lines with the problems?
>

I already did in my previous posts

> Have you ever remove all auxiliary files?

yes

> Maybe you have used a special charakter like ä,ö,ü in a label.

no

I think I got rid of the error by excluding doublespace.sty, as it was
suggested outdated on a different forum. The problem I think is deep
inside the custom document class I am using, and I don't have time to
track down the problem.

Andrey

Reply all
Reply to author
Forward
0 new messages