3

I use Book class to compile a journal and need to prepare both one-sided and two-sided versions of the journal which have different settings (margins, ...). Each time I make a change in my TeX file, I have to apply the change to both versions.

Is there any way to typeset both versions by a single file and a single click?

lockstep
  • 250,273

1 Answers1

8

You should only have the text in one file.

file a.tex can be

\documentclass[twoside]{book}
\input{mainfile}

file b.tex can be

\documentclass[oneside]{book}
\input{mainfile}

then any text changes just need to be made once in mainfile.tex or files that it includes.

You mention 'single click', that depends on the IDE you are using, you could set up a command that typesets both documents in most, although personally I wouldn't. You presumably only need one version until final edits are done.

lockstep
  • 250,273
David Carlisle
  • 757,742