Graphics, Figures & TablesConflict with setspace + rotating packages?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gbrown
Posts: 3
Joined: Tue Aug 16, 2011 6:49 pm

Conflict with setspace + rotating packages?

Post by gbrown »

Hi all,

I'm trying to produce a document with rotated tables (using the rotating package) and double-spaced text (using the setspace package.) The example below behaves exactly as expected as long as the setspace package is commented out. However, as soon as it is added, I receive the error message:

Code: Select all

! Extra }, or forgotten \endgroup.
color\@endbox -> egroup
I.44 \end{sidewaystable}
Any ideas how to get these two packages to work together?

Here's the example:

Code: Select all

\documentclass[11pt]{article}
%\usepackage{setspace} %without this package, code compiles fine
\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{amsthm} 
\usepackage{graphicx} 
\usepackage{verbatim}
\usepackage{subfigure} 
\usepackage{float}
\usepackage{rotating}  
\usepackage{enumerate} 

\begin{document}

\begin{sidewaystable}[h!]
\centering
\caption{An Example Table.}
\begin{tabular}{cc}
\hline
\hline
Column 1 & Column 2  \\
\hline
\hline
Position (1,1) & Position (1,2) \\
Position (2,1) & Position (2,2) \\
\hline
\end{tabular} 
\label{tab:exampletable}
\end{sidewaystable}

\end{document}
Last edited by gbrown on Thu Aug 18, 2011 2:24 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Re: Conflict with setspace + rotating packages?

Post by Stefan Kottwitz »

Hi,

on my system that example can be compiled also with setspace without any error, both with LaTeX and pdfLaTeX.
The error message points to line 44, however the example has just 31 lines. Could it be that you got the error in code you did not post?

If the error is really for exactly this example, then please post the .log file as attachment, we could have a look at it to find the cause.

Stefan
LaTeX.org admin
gbrown
Posts: 3
Joined: Tue Aug 16, 2011 6:49 pm

Re: Conflict with setspace + rotating packages?

Post by gbrown »

Thanks for the quick reply. I deleted my comments in the original file to make sure there are only 31 lines. Here is the .log file.
Attachments
test_rotate.log
(8.11 KiB) Downloaded 270 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Conflict with setspace + rotating packages?

Post by Stefan Kottwitz »

Try

Code: Select all

\AtBeginDocument{%
  \providecommand\color@endbox{\egroup}%
}
in your preamble.

Stefan
LaTeX.org admin
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Conflict with setspace + rotating packages?

Post by sommerfee »

I assume this is the problem:
/Users/gbrown/Library/texmf/tex/latex/setspace.sty
This seems to be a very old version of setspace.sty. (It does not even tell which version it is.)

I recommend to delete this file, afterwards the actual version of setspace.sty from your TeXlive distribution will be used instead which should compile fine.
gbrown
Posts: 3
Joined: Tue Aug 16, 2011 6:49 pm

Re: Conflict with setspace + rotating packages?

Post by gbrown »

@sommerfee: I deleted the old version of setspace.sty and that seemed to do the trick -- the example (and also a longer document!) compiles without errors now.

@Stefan_K: I'll definitely keep your tip in mind for future reference.

Thank you both!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Conflict with setspace + rotating packages?

Post by Stefan Kottwitz »

Hi gbrown,

you don't need to remember that, I just know it from a bugfix of the rotating package and had the idea it could work here as workaround because of that error message.

As it's solved, it would be great if you mark the question as
solved then. This helps us to see the still open questions. Just edit your first post in this thread (the question) and choose the checkmark symbol as topic icon.

Thanks,

Stefan
LaTeX.org admin
Post Reply