### LaTeX users online

In total there are 17 users online :: 0 registered, 0 hidden and 17 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 17 guests

### LaTeX Friends

Sponsored by DANTE e.V.: The German speaking TeX Users Group

## color package incompatible with figures?

### LaTeX Forum: Graphics, Figures & Tables

colorsAdd tags Information and discussion about graphics, figures & tables in LaTeX documents.
I am writing a thesis. The compilation worked well but, recently after I added a line of \usepage{color} because I need to use color for some text, there is always a error of "Too many }'s" appearing at every place importing a graphic, as below:

======== quoted from TEX file ======<BEGIN>
Code: Select all  •  Open in online LaTeX editor
\begin{figure}[tb]\centering\includegraphics[width=0.8\linewidth]{fig/concepts}\caption{...}\label{fig:concepts}\end{figure}

======== quoted from TEX file ======<END>
======== quoted from log file ======<BEGIN>
Code: Select all  •  Open in online LaTeX editor
 <use fig/concepts.pdf>! Too many }'s.\color@endbox ->\color@endgroup \egroup                                         l.57 \end{figure}                 You've closed more groups than you opened.Such booboos are generally harmless, so keep going.! LaTeX Error: \begin{document} ended by \end{figure}.

======== quoted from log file ======<END>

I asked my friends and searched on Internet for several days but still cannot solve the problem. I would really appreciate if anybody can help me out. Thank you very much!

I've attached the TEX file and the LOG file for your reference.
Attachments
thesis.log
thesis.tex
Last edited by cgnieder on Sun Sep 15th, 2013, edited 1 time in total.
terry7788

Posts: 3
Joined: Mon May 11th, 2009

Hi Terry,

welcome to the board!
It would work if you remove the definition of \@xfloat. Check if you really need that.

Stefan

Stefan_K

Posts: 7474
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Try the xcolor package instead and see if its working.

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Hi Stefan, you suggestion works well. Thank you!

Stefan_K wrote:Hi Terry,

welcome to the board!
It would work if you remove the definition of \@xfloat. Check if you really need that.

Stefan
terry7788

Posts: 3
Joined: Mon May 11th, 2009

Hi Thorsten,

I've solved the problem with Stefan's suggestion. Thank you anyway for your kind help!

Terry

localghost wrote:Try the xcolor package instead and see if its working.

Best regards and welcome to the board
Thorsten
terry7788

Posts: 3
Joined: Mon May 11th, 2009

Dear Stefan,

Stefan_K wrote:Hi Terry,

It would work if you remove the definition of \@xfloat. Check if you really need that.

Stefan

I am experiencing the same problem. However, I don't know how to apply the above change as there is no \x@float in my stuff, or at least I can't locate it. I don't see it in the color package anywhere either. I'll attach my log file with the hope that you can locate my problem as well.

TIA,
--Hossein
Hossein

Posts: 2
Joined: Mon Jun 22nd, 2009

Stefan_K wrote:
It would work if you remove the definition of \@xfloat. Check if you really need that.

Hossein wrote:
However, I don't know how to apply the above change as there is no \x@float in my stuff, or at least I can't locate it.

Located it (in the thesis style I'm using). Thanks anyhow.
Hossein

Posts: 2
Joined: Mon Jun 22nd, 2009

I am having the same problem. I am also working on a thesis, but the float redefinition is nowhere to be found in the style file. Is there something else that could cause this problem?
danbaatar

Posts: 8
Joined: Mon Apr 26th, 2010

Please provide some information on what you are actually doing!
Joseph Wright
josephwright
Site Moderator

Posts: 813
Joined: Tue Jul 1st, 2008

Here is a pretty minimal example that produces problem (for use together with the attached style file):
Code: Select all  •  Open in online LaTeX editor
\documentclass[10pt]{article}%\documentclass{byuPhDprop}\usepackage{pgf}\usepackage{tikz}\usetikzlibrary{arrows,shapes,automata,backgrounds}\begin{document}\begin{figure}[htb]  \centering    \begin{tikzpicture}[node distance=7mm, line/.style={>=latex}]      \tikzstyle{vertex} = [circle,draw=black, fill=white, minimum size=10mm]      \node[vertex] (x) at (0,0) {$x$};    \end{tikzpicture}\end{figure}\end{document}

If you leave the first line un-commented, and run pdflatex, this produces a pdf with just a drawing of a circle in it labeled with an x.

If you comment out the first line and un-comment the second, so that it's using the style file, then I get this error:
Code: Select all  •  Open in online LaTeX editor
! Too many }'s.\color@endbox ->\color@endgroup \egroup
Attachments
byuPhDprop.cls
The dissertation style file.
danbaatar

Posts: 8
Joined: Mon Apr 26th, 2010

Next

colors