Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to combine (with combine class) many (about 100) TeX files to prepare a book of abstracts for a conference. They are written using revtex4-1 class. When I use this classes together

\documentclass[11pt,colclass=revtex4-1]{combine}
\title{Book of abstracts}

\begin{document}
\tableofcontents % main ToC
\clearpage

\section{Editor's introduction} 
bla bla bla

%\begin{papers} % start of individual articles/papers
%\coltoctitle{1st article} % first article title into main ToC
%\coltocauthor{A.~N.~Author} % first authors into main ToC
%\label{art1}
%\import{art1} % first article, may have own ToC,
%\end{papers} 

\clearpage
\end{document}

I get this error:

! LaTeX Error: Command \published already defined.

What can I do to fix this problem? I understand, that both in revtex4-1.cls and combine.cls the \published command is defined. In combine.cls with the use of \renewcommand, in revtex4-1.cls with \newcommand (I changed it to \renewcommand but it didn't help).

share|improve this question
    
Since you're willing to edit revtex4-1.cls simply comment out the definition of \published. –  Lev Bishop May 4 '12 at 19:27

2 Answers 2

define an own wrapper class my-revtex.cls which sets the \published to undefined.

\RequirePackage{filecontents}
\begin{filecontents*}{my-revtex.cls}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{revtex4-1}}
\ProcessOptions\relax
\LoadClass{revtex4-1}
\let\Published\published% save the one from revtex
\let\published\relax
\endinput
\end{filecontents*}
\documentclass[11pt,colclass=my-revtex]{combine}
\usepackage{hyperref}
\title{Book of abstracts}

\begin{document}
\tableofcontents % main ToC
\clearpage

\section{Editor's introduction} 
bla bla bla

\begin{papers} % start of individual articles/papers
\coltoctitle{1st article} % first article title into main ToC
\coltocauthor{A.~N.~Author} % first authors into main ToC
\label{art1}
%\import{art1} % first article, may have own ToC,
\end{papers} 

\clearpage
\end{document}
share|improve this answer

You mention that changing the \newcommand{\published}... in the revtex-1 class to \renewcommand... "doesn't help.". Two suggestions: (i) be sure to delete all aux files before recompiling and (ii) if that doesn't help, try a \providecommand statement for \published. Finally, are you sure that \published is not defined in a third instance somewhere?

share|improve this answer
1  
I deleted all aux files. I tried \providecommand, I put it instead of \newcommand or \renewcommand in revtex and combine sty and cls files. I refreshed FNDB od MiKTeX. And nothing helps... In the example I gave there are no more instances (and it doesn't compile). –  Slav Mar 3 '12 at 18:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.