Graphics, Figures & TablesProblem with tables with REVTeX 4

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ridox
Posts: 2
Joined: Tue Apr 05, 2011 9:59 pm

Problem with tables with REVTeX 4

Post by ridox »

Hi,
Recently I have been having troubles with REVTeX 4 and tables. Until yesterday everything was working fine, but know I have this error:

!Undefined control sequence.
\CT@setup ->\@tempdimp \col@sep
\@tempdimc \col@sep \def \CT@color {\global...
1.21 \begin{tabular}{|cc|}
?


My code is:

Code: Select all

\documentclass[a4paper,superscriptaddress,prb,showkeys]{revtex4}
\topmargin 0cm
\textwidth 15.5 cm
\textheight 21.5 cm
\oddsidemargin 0cm
\evensidemargin 1cm
\setlength{\parindent}{3mm}
\setlength{\parskip}{2mm}
\usepackage{graphicx}
\usepackage{ctable}
\usepackage{multirow}
\usepackage{subfig}
\usepackage{makeidx}
\usepackage{subfloat}
\usepackage{colortbl}
\usepackage{array}
\begin{document}
\begin{tabular}{|cc|}
  \hline
  1 & 2 \\
  3 & 4 \\
  \hline
\end{tabular}
\end{document}
I am working with W7, Winedt 6.0 and MikTek 2.8

Does anyone see a problem??
I am thinking that for some unknown reason the package unconfigure it some how...
in that is the case... how can i uninstall REVTeX 4...
Thanks in advance for your help.

R

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
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with tables with REVTeX 4

Post by localghost »

It's an incompatibility between the (old) revtex4 class and the colortbl package. It already occurs when loading the package and creating a simple table as in your example.

Code: Select all

\documentclass[a4paper,superscriptaddress,prb,showkeys]{revtex4}
\usepackage[table]{xcolor}   % loads »colortbl«

\begin{document}
  \begin{tabular}{|cc|}\hline
    1 & 2 \\
    3 & 4 \\ \hline
  \end{tabular}
\end{document}
Use the current revtex4-1 class and study its manual. Perhaps some specifications and class options have changed.


Best regards and welcome to the board
Thorsten
ridox
Posts: 2
Joined: Tue Apr 05, 2011 9:59 pm

Problem with tables with REVTeX 4

Post by ridox »

Thanks localhost
It works, I just change:
\documentclass[12pt,aps,prd, superscritptaddress]{revtex4}
to
\documentclass[12pt,aps,prd, superscritptaddress]{revtex4-1}

I also found another incompatibility...

I cannot force the table to be at the bottom, e.g.

Code: Select all

\begin{tabular}[!b]{|cc|}
  \hline
  1 & 2 \\
  3 & 4 \\
  \hline
\end{tabular}
I don't need it, so I just remove the !. But could be good to know if someone know the solution... probably I will read the manual in more detail.

Thx :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with tables with REVTeX 4

Post by localghost »

ridox wrote:[…] I also found another incompatibility […]
No, you didn't. You just mixed up the optional parameters.
  • For the tabular environment there are optional parameters (b,t) for alignment with respect to the current line.
  • For the table environment there are optional parameters for floating placement in the document (!,b,h,p,t)
And by the way, page and paper dimensions are better set up by the geometry package. Your method is far from being recommendable.
Post Reply