This question already has an answer here:

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?

marked as duplicate by egreg, Guido, Mico, Jesse, user31729 Oct 16 '14 at 11:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The easiest way is probably to create two dummy documents final.tex and draft.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?).

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

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