TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My document seems to be switching left margins at random and I do not know what is causing this. I am running MacTex and compiling it like this

latex thesis.tex
bibtex A
bibtex B
latex thesis.tex
dvips -t letter -o thesis.ps thesis.dvi
ps2pdf14 -dPDFSETTINGS=/prepress -dEmbedAllFonts=true thesis.ps thesis.pdf

My header looks like this:






\newcites{A,B}{Primary Bibliography,Secondary Bibliography}

Below is a link to a screenshot of what looks like, I inserted a ruler to highlight the issue. There is no command in the paragraph except the \todo you can see in red.

The \patchcmd is simply to avoid pagebreaks for empty chapters, the problem persists if I remove it.

enter image description here

share|improve this question
It is because you are using twoside option. Try change to oneside. The spacing you refer to will only be the same if you have the same margin sizes on the left and right side of the text. Try printing it in duplex and you will see why it does this. – zeroth May 16 '12 at 8:18
You're doing two contradictory actions: \usepackage{a4} (which is obsolete, by the way) and dvips -t letter ... – egreg May 16 '12 at 8:21
Indeed. \usepackage[a4paper]{geometry} please - and read l2tabu-en. – Martin Schröder May 16 '12 at 8:24
Whoa! Thanks for all the help guys. Seems like my template is a bit outdated and not very optimized. Having trouble with eps to pdf conversion now, but I'm sure others have solved that problem and wrote about it somewhere. btw. I was quite sure it wasn't random, that's why i wrote "seemingly" :-) – andsens May 17 '12 at 10:46
up vote 5 down vote accepted

It's not random. You're using the twoside option, so the margins are different on even (left hand) and odd (right hand) pages.

If you need "symmetric" setup on the pages, remove the options.

There's another source of problems: you're using the obsolete package a4 that should set the text block for being positioned on ISO A4 paper, but then you convert the DVI file by passing to dvips the option -t letter, that is, printing on American letter paper. Be consistent: if you plan to output on letter paper, then say


If you instead plan to output on ISO A4 paper, use


The openright option is useless if you don't call the twoside option.

Consider also to use the modern package graphicx for the inclusion of graphic objects, rather than the obsolete epsfig (which is included in the distributions only for back compatibility).

If you have a fairly recent TeX distribution (MacTeX 2010 or later), there is no need to do the "LaTeX-dvips-ps2pdf" route: run directly pdflatex. If you use graphicx instead of epsfig, the EPS files will be automatically converted to PDF for inclusion.

share|improve this answer
@AndreasWallner Thanks for fixing the silly typo which I'm sorry of. – egreg May 16 '12 at 10:02

Your Answer


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.