Page LayoutGeometry package ruins all the margins

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
ChoKamir
Posts: 12
Joined: Tue Jan 18, 2011 12:22 pm

Geometry package ruins all the margins

Post by ChoKamir »

Hi,

I stumbled upon this problem, because I wanted to correct the margins of my title page. I've a two sided document, which resulted in the title page not being centered. On the internet I came across the solution to use the geometry package and define a new layout before the title page and restore the previous one after. This works great. The problem is however that the geometry package in general ruins my margings. I.e. without the package the margins are beautiful (default), but with the package included the oddsidemargin disappears and the textwidth is too wide.

Here an example:

Code: Select all

\documentclass[a4paper,titlepage,twoside,openright]{report}
\usepackage{geometry}
\usepackage{layout}

\begin{document}
\layout
\end{document}
Very simple but sufficient. I use the layout package to print the margin settings. It has no influence on the problem, because removing that package from my document does not change anything. Attached the two pdfs. The correct one with \usepackage{geometry} out-commented, and the incorrect one with the code above. Any help be appreciated very much!

Best regards,

ChoKamir

PS the reset option on the geometry package does not work.
Attachments
Test_incorrect.pdf
(46.83 KiB) Downloaded 236 times
Test_correct.pdf
(46.74 KiB) Downloaded 244 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Geometry package ruins all the margins

Post by frabjous »

Have you tried reading the geometry package documentation? It has all sorts of options for changing the margins to whatever you want them to be. Consider also not using geometry and use the tocenter package to center the title page.
ChoKamir
Posts: 12
Joined: Tue Jan 18, 2011 12:22 pm

Re: Geometry package ruins all the margins

Post by ChoKamir »

I read the documentation, the problem is that it shouldn't ruin all the margins at first place. Ofcourse you can mannually correct the margins, but that would mean that whenever you change the paper size etc. you have to recorrect them. While the natural/default margins are just fine to me. Also the weird thing is that the reset command does not work as documented. That is why I posted the question where to see if it is an error in the geometry package or whether I'm doing something wrong.

Thanks for pointing out the tocenter package!
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Geometry package ruins all the margins

Post by frabjous »

Do keep in mind that what some people call "ruin", other people call "improve".

I actually agree with you that the default margins are preferable, but from what I gather you and I are in the minority, and it is in general thought that the defaults provided by the geometry package are preferable to the old defaults, and that the changes are intentional. Go figure.

Anyway, the "reset" option is supposed to make geometry restore the previous layout, but at least for me, it doesn't work quite right.

So I guess the options are either to manually change the margins back, or else forgo geometry and use another means (e.g., tocenter) to center your titlepage.
Post Reply