1

Just out of curiosity: Is there a way to compile latex document with two document classes at once?

Suppose that I have a paper which start with line: \documentclass[preprint,authoryear,12pt]{elsarticle}

But finally I would like to compile it with such line: \documentclass[final,5p,times,twocolumn]{elsarticle}

Obviously I can replace these lines and compile file twice, but I wonder if there is any trick to avoid double compilation?

1

1 Answer 1

1

The easiest way is probably to create two dummy documents final.tex and draft.tex.

preprint.tex

\documentclass[preprint,authoryear,12pt]{elsarticle}
\input{main.tex}

final.tex

\documentclass[final,5p,times,twocolumn]{elsarticle}
\input{myfile.tex}

If you are using an IDE to compile make compiling the documents easier, there may be additional hoops to jump through (e.g., Kile: how to use shortcut to compile the root file directly?).

1
  • This is still a double compilation, but in general it is nice and simple workaround.
    – mc2
    Commented Oct 16, 2014 at 11:46

Not the answer you're looking for? Browse other questions tagged .