Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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

\documentclass[a4paper,12pt,twoside]{article}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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