## Latex tip

21.09.2007 23:54

I have a feeling I had this problem at least once before, found the solution and forgot about it. So, here's the whole story hoping I won't forget about this the third time.

The twoside option to the article document class in Latex makes the document suitable for duplex printing (for example by making margins slightly different on odd and even pages, etc.). It's just one of those little things that make Latex documents look really nice when printed. However Latex documentation doesn't mention that it also has one nasty side effect...

It changes page layout from this:

to this:

Why is this you ask? Some grepping through the Latex configuration brings up this little gem (in article.cls):

```\if@twoside
\else
\raggedbottom
\fi
```

Which means that the raggedbottom option is not enabled if the twoside option is enabled. I'm sure a perfectly reasonable explanation exists for this (as it seems to for every other thing in Latex), however to me this kind of layout just looks plain ugly.

The solution is obviously to include a \raggedbottom command at the beginning of the document. This way the page layout you've painstakingly fine tuned doesn't break when you switch from single side to duplex printing.

Posted by | Categories: Code