0

I wish to be able to switch between a centred pdf layout and offset layout for printing and binding.

Using the "oneside" and "twoside" document class options seems to be best for this.

However, when using the following geometry options:

\documentclass[11pt,twoside]{book}
\usepackage{lipsum}
\usepackage{geometry}
\geometry{a4paper,
            textwidth=146.5mm,
            hcentering,
            top=0.6in,
            bottom=0.8in,
            headheight=20pt,
            headsep=0.25in,
            foot=9pt,
            footskip=0.3in,
            bindingoffset=0.5in,
            includeheadfoot}


\title{\bf An MWE}
\author{for SO}
\date{\today}

\begin{document}
\frontmatter
\maketitle
\lipsum[1-2]
\lipsum[1-6]
\end{document}

However, when in oneside mode the offset is always applied on the left, resulting in an ugly layout.

I do not want to have to fiddle with the geometry options when changing the documentclass argument, as that seems prone to a mix up.

1 Answer 1

1

In a oneside document all pages are treated the same but in a twoside document the margins can be different between even and odd pages.

I suggest that you have two geometry specifications, one for centered text and the other for the (printing binding) offset with centered text. Chose which one to use before compiling. The comment package enables you to comment out (\begin{comment} whatever \end{comment}) large chunks of LaTeX input.

2
  • 1
    You can use \makeatletter\if@twoside\geometry{...}\else{\geometry{...}\fi\makeatother to swap automatically. Jun 17, 2022 at 13:57
  • @JohnKormylo Thank you for your very helpful suggestion. Jun 18, 2022 at 18:12

You must log in to answer this question.

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