Featured Book

LaTeX Beginners Guide

Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 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 14 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

color package incompatible with figures?

colorsAdd tags Information and discussion about graphics, figures & tables in LaTeX documents.

color package incompatible with figures?

Postby terry7788 on Mon May 11th, 2009

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 writeLaTeX
\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 writeLaTeX
 <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
(24.81 KiB) Downloaded 133 times
thesis.tex
(5.93 KiB) Downloaded 509 times
Last edited by cgnieder on Sun Sep 15th, 2013, edited 1 time in total.
Reason: added code markup
terry7788
 
Posts: 3
Joined: Mon May 11th, 2009

Re: color package incompatible with figures?

Postby Stefan_K on 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
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6387
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: color package incompatible with figures?

Postby localghost on Wed May 13th, 2009

Try the xcolor package instead and see if its working.


Best regards and welcome to the board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: color package incompatible with figures?

Postby terry7788 on Tue May 19th, 2009

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

Re: color package incompatible with figures?

Postby terry7788 on Tue May 19th, 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

Re: color package incompatible with figures?

Postby Hossein on Mon Jun 22nd, 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

Re: color package incompatible with figures?

Postby Hossein on 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

Re: color package incompatible with figures?

Postby danbaatar on Mon Apr 26th, 2010

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

Re: color package incompatible with figures?

Postby josephwright on Mon Apr 26th, 2010

Please provide some information on what you are actually doing!
Joseph Wright
josephwright
Site Moderator
 
Posts: 802
Joined: Tue Jul 1st, 2008

Re: color package incompatible with figures?

Postby danbaatar on Tue Apr 27th, 2010

Here is a pretty minimal example that produces problem (for use together with the attached style file):
Code: Select all  •  Open in writeLaTeX
\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 writeLaTeX
! Too many }'s.
\color@endbox ->\color@endgroup \egroup
Attachments
byuPhDprop.cls
The dissertation style file.
(7.34 KiB) Downloaded 127 times
danbaatar
 
Posts: 8
Joined: Mon Apr 26th, 2010

Next

Topic Tags

colors

Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: No registered users and 14 guests