LaTeX forum ⇒ Graphics, Figures & TablesConflict between graphicx and colortbl?

Information and discussion about graphics, figures & tables in LaTeX documents.
Posts: 2
Joined: Tue Apr 12, 2011 11:18 pm

Conflict between graphicx and colortbl?

Postby thomash » Tue Apr 12, 2011 11:30 pm


I would like to include a table with highlighted rows into my thesis, so I am trying to load the colortbl package. Unfortunately, when I add \usepackage{colortbl} to my preamble, I get the following error:

! Too many }'s.
\color@endbox ->\color@endgroup \egroup

l.29 \end{figure}

From doing some digging around on Google, I gather that this is probably due to some kind of conflict between the color package (used by colortbl) and graphicx, which I am using to include all my figures. The error occurs at the first invocation of \includegraphics in my document, which seems to support this theory. Unfortunately, I can't figure out how to resolve this issue! Right now in my preamble I have:


(in addition to a bunch of other package inclusions, definitions, etc.) I have tried switching the order of the statements, passing in a few options, etc. but nothing has worked. :( Any suggestions would be appreciated!

Posts: 223
Joined: Thu Dec 04, 2008 4:39 am

Postby mas » Wed Apr 13, 2011 3:53 am

I have been using those two packages without any problem. You should post a minimal example which gives you the error.


OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim

Posts: 2
Joined: Tue Apr 12, 2011 11:18 pm

Postby thomash » Wed Apr 13, 2011 7:02 pm

Thanks for the reply! In coming up with a minimal example, I've determined that it's a problem with a custom .sty file I'm using for all my thesis formatting... the following example compiles:




\caption[Radon transform]{Parameterization of the Radon transform in 2D. }\label{F:radon}


but uncommenting \usepackage{sfuthesis} leads to the error specified in the first post. I suppose this means that sfuthesis.sty is redefining some command and creating a conflict with colortbl...

Unfortunately I am kind of a neophyte when it comes to writing .sty files, so I'm not really sure where to start with this error. The file was given to me by another student who used it for his thesis; the university has lots of formatting requirements and apparently this .sty file addresses all of them. I've attached it to this post if anyone wants to have a look -- although I realize it may be asking a bit much for someone to debug a custom .sty file. :) Nonetheless, if it is a simple thing that can be fixed, please let me know!

(7.56 KiB) Downloaded 197 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9768
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Apr 13, 2011 7:40 pm

Hi Thomas,

that style file is of 1996. Before we try to fix problems with this very old style file, you might consider to use a newer one.

Stefan admin

Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 4 guests