[Tex/LaTex] Memoir oneside/twoside question

conditionalsdouble-sidedmemoir

I have a memoir-class document:

\documentclass[oneside,letterpaper]{memoir}

which I set to oneside or twoside depending on if I want to create either an electronic copy (one side) or printable copy (two side). I have three questions:

  1. Is it possible to have it (TeXnicCenter in this case) create two PDF versions when I build (both onesided and twosided) automatically, with different file names?

  2. There is a blank page I need to add only when in twoside mode, not oneside. How can I integrate that with the above question?

  3. If I can't do the two-versions-on-build, how can I do in "if-then" that checks if it's set to oneside or twoside mode? i.e.

    if(twoside) then
        add blank page;
    end
    

Best Answer

In general you can use the test \if@twoside to test for twoside but for conditional blank pages it normally suffices to use \cleardoublepage which acts like \clearpage in one side documents but will force a blank page if necessary to get to an odd page in twoside documents.

Related Question