13

I'm trying to create a document that has different margins on even and odd pages. This is what I've tried:

\documentclass[a4paper,12pt]{article}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage[all,cmtip]{xy}
\usepackage{graphicx}
\usepackage{resizegather}

\hfuzz=2pt

\oddsidemargin=51pt
\evensidemargin=11pt

This would give me precisely the margins I want, but for some reason, \oddsidemargin and \evensidemargin are not independent. When I set one of them, the other is fixed. After reading some answers here, I tried setting changing the first line to

\documentclass[a4paper,12pt,twoside]{article}

but this completely messes with my layout and I get a bunch of "underfull \vbox"'s. (Although the left and right margins then behave as expected.) So, my question is as follows:

How do I make \oddsidemargin and \evensidemargin behave independently without introducing any other (undesired) behaviour?

  • 3
    Don't adjust internal TeX settings by yourself in LaTeX as long you don't know exactly what you are doing. To change the margin use the geometry package which takes care to keep all internal settings in sync. – Martin Scharrer Jul 1 '13 at 22:01
  • 1
    \usepackage[inner=XXpt,textwidth=345pt]{geometry} together with the twoside option uses the same text width as oneside. Adjust XX to be what you want. – egreg Jul 1 '13 at 22:24
  • @egreg: Thanks, this helps a bit. My vertical spacing (between paragraphs) still changes, though. Any idea why that might be? – Dejan Govc Jul 1 '13 at 22:31
  • 1
    Issue also \raggedbottom; but this problem usually arises when one has big figures with the [H] option. Do you? – egreg Jul 1 '13 at 22:33
  • @egreg: [htb], [hbt] and [ht] actually. Very helpful, btw, if you make these two comments into an answer, I'd be glad to accept it. In fact, after also changing textheight by half a pt, it works perfectly. – Dejan Govc Jul 1 '13 at 22:48
6

LaTeX uses different margins on odd and even pages only if the twoside option is activated in the \documentclass line.

With the geometry package it's fairly easy to adjust the page setup parameters. For example

\documentclass[a4paper,twoside]{article}

\usepackage[
  inner=<XX>pt,
  textwidth=345pt,
]{geometry}

would set the usual "oneside" textwidth. Choose the value for <XX>pt to suit your needs. Check the manual of geometry for other options, in particular for setting the text height.

Spacing between paragraphs can be due to big indivisible objects near the end of a page. If there are many short subsections, this may happen, or if there are big math displays. Curing the appearance is a job to be done when the text is in final form.

A \raggedbottom command before \begin{document} will avoid this, at the expense of having non even page height.

4

LaTeX just uses the odd side settings unless you specify the twoside option to the class.

\documentclass[a4paper,12pt,twoside]{article}
4

Often we use different margins on odd and even pages for double-sided printing. It allows us to knit documents. I use GOST layout:

\documentclass[a4paper,12pt,twoside]{article}
\usepackage[inner=3cm,outer=1cm]{geometry}

If you remove twoside parameter you get classic layout for one-side printing.

  • A warm welcome to TeX.SE! – A Feldman Apr 12 '16 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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