LaTeX forum ⇒ Graphics, Figures & Tablescolor package incompatible with figures?

Information and discussion about graphics, figures & tables in LaTeX documents.
terry7788
Posts: 3
Joined: Mon May 11, 2009 11:13 am

color package incompatible with figures?

Postby terry7788 » Mon May 11, 2009 11:37 am

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>
  1. \begin{figure}[tb]
  2. \centering\includegraphics[width=0.8\linewidth]{fig/concepts}
  3. \caption{...}
  4. \label{fig:concepts}
  5. \end{figure}

======== quoted from TEX file ======<END>
======== quoted from log file ======<BEGIN>
  1. <use fig/concepts.pdf>
  2. ! Too many }'s.
  3. \color@endbox ->\color@endgroup \egroup
  4.  
  5. l.57 \end{figure}
  6.  
  7. You've closed more groups than you opened.
  8. Such booboos are generally harmless, so keep going.
  9.  
  10.  
  11. ! 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 194 times
thesis.tex
(5.93 KiB) Downloaded 677 times
Last edited by cgnieder on Sun Sep 15, 2013 7:58 pm, edited 1 time in total.
Reason: added code markup

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7801
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon May 11, 2009 4:16 pm

Hi Terry,

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

Stefan
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Wed May 13, 2009 11:42 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

terry7788
Posts: 3
Joined: Mon May 11, 2009 11:13 am

Postby terry7788 » Tue May 19, 2009 6:43 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

terry7788
Posts: 3
Joined: Mon May 11, 2009 11:13 am

Postby terry7788 » Tue May 19, 2009 6:49 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

Hossein
Posts: 2
Joined: Mon Jun 22, 2009 12:07 am

Postby Hossein » Mon Jun 22, 2009 1:42 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

Hossein
Posts: 2
Joined: Mon Jun 22, 2009 12:07 am

Postby Hossein » Mon Jun 22, 2009 2:34 am

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. :)

Link:
BBcode:
HTML:
Hide post links
Show post links

danbaatar
Posts: 8
Joined: Mon Apr 26, 2010 11:14 pm

Postby danbaatar » Mon Apr 26, 2010 11:15 pm

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?

Link:
BBcode:
HTML:
Hide post links
Show post links

josephwright
Site Moderator
Posts: 813
Joined: Tue Jul 01, 2008 2:19 pm
Contact:

Postby josephwright » Mon Apr 26, 2010 11:20 pm

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

Link:
BBcode:
HTML:
Hide post links
Show post links

danbaatar
Posts: 8
Joined: Mon Apr 26, 2010 11:14 pm

Postby danbaatar » Tue Apr 27, 2010 7:12 pm

Here is a pretty minimal example that produces problem (for use together with the attached style file):
  1. \documentclass[10pt]{article}
  2. %\documentclass{byuPhDprop}
  3.  
  4. \usepackage{pgf}
  5. \usepackage{tikz}
  6. \usetikzlibrary{arrows,shapes,automata,backgrounds}
  7.  
  8. \begin{document}
  9. \begin{figure}[htb]
  10. \centering
  11. \begin{tikzpicture}[node distance=7mm, line/.style={>=latex}]
  12. \tikzstyle{vertex} = [circle,draw=black, fill=white, minimum size=10mm]
  13. \node[vertex] (x) at (0,0) {$x$};
  14. \end{tikzpicture}
  15. \end{figure}
  16. \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:
  1. ! Too many }'s.
  2. \color@endbox ->\color@endgroup \egroup
Attachments
byuPhDprop.cls
The dissertation style file.
(7.34 KiB) Downloaded 194 times

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest