Skip to main content
The twoside document class option formats a LaTeX document for double-sided printing: it mirrors left and right margins on odd and even pages, enables separate odd/even running headers, and lets \cleardoublepage insert a blank even page so new chapters open on a right-hand (odd) page. The oneside option uses identical margins and headers on every page, which fits screen reading and single-sided printing.

Class defaults (oneside vs twoside)

Pass oneside or twoside in the optional argument of \documentclass[...]{...} to override a class’s default:

Inner and outer margins with geometry

In a bound two-sided book, odd pages sit on the right of an open spread (spine on the left) and even pages sit on the left (spine on the right). Load geometry and specify inner (spine side) and outer (fore-edge) so LaTeX mirrors the margins automatically between odd and even pages:
twoside-margins.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
Under twoside, geometry treats left as an alias for inner and right as an alias for outer, so both pairs flip automatically on even pages (pass asymmetric to geometry only if you want twoside headers without flipping margins). Use inner and outer in two-sided preambles so the intent stays clear.

Binding offset, openright, openany, and \cleardoublepage

When a document will be glued or sewn into a spine, add bindingoffset=<length> to geometry. geometry reserves that strip along the inner edge of every page—left on odd pages, right on even pages—before computing the remaining inner and outer margins. In classes with \chapter (book and report), two class options control which page side starts a new chapter:
  • openright (default in book): \chapter runs \cleardoublepage before the heading. In a twoside document, if the previous chapter ends on an odd page, \cleardoublepage inserts a blank even page so the next chapter starts on an odd (right-hand) page.
  • openany (default in report): \chapter runs \clearpage, so the next chapter starts on the very next page whether odd or even.
In a oneside document, \cleardoublepage behaves identically to \clearpage and never inserts an extra blank page, even if openright is passed.
twoside-openright.tex

Odd and even headers

With twoside active, built-in \pagestyle{headings} and the fancyhdr package can place different content on odd (O) and even (E) pages—commonly putting the page number on the outer corners (LE,RO) and the title or chapter/section mark on the inner corners (LO,RE):
twoside-headers.tex
For full fancyhdr syntax, rules, and custom page styles, see Headers and footers. For Roman vs. Arabic page numbering, see Page numbering.

Try it in the editor

geometry and fancyhdr are preinstalled in LaTeX Cloud Studio’s TeX Live 2026 (full distribution) environment. Start from the Book template in LaTeX Cloud Studio and replace main.tex with the complete example.