Page Layout ⇒ Migration from a4wide to geometry package
Migration from a4wide to geometry package
Thanks
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Migration from a4wide to geometry package
It can't be done without some manual settings. But as I found out these are only a few. With the below example I almost get exactly the same layout with geometry as it is done by a4wide.AleCes wrote:[…] Is there a quick-and-dirty option that enables me to get this without resorting to manual (and boring) settings? […]
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{geometry}
%\usepackage{a4wide}
\usepackage{layout}
\geometry{
includeheadfoot,
margin=2.54cm
}
\begin{document}
\layout
\end{document}
For future projects you should get familiar with the geometry package since it is much more flexible in its settings and does them in a better way. This prevents conflicts with other packages. And you should not hesitate to take a closer look at its manual. It's not complicated and has many examples for explanation.
- Attachments
-
- layout-a4wide.pdf
- Page dimensions as set by the »a4wide« package.
- (83.97 KiB) Downloaded 1371 times
-
- layout-geometry.pdf
- Default page dimensions as set by the »geometry« package.
- (84.07 KiB) Downloaded 993 times
-
- layout-geometry-custom.pdf
- Customized page dimensions done with the »geometry« package.
- (83.97 KiB) Downloaded 790 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Migration from a4wide to geometry package

I'd downloaded the manual long ago, but my problem was that I didn't know the precise data about the a4wide layout nor did I manage to find any information about that. I only knew it suited me because it reduced those useless (for me) large margins.
One last question: what is fontenc about? Is it essential for layout settings? I've never used it.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Migration from a4wide to geometry package
No, it's not essential for the page layout. I got used to including it even in forum examples because it invokes the right font encoding (Cork Encoding) for languages other than English when using PDFLaTeX. I must admit it's a bit misplaced here since you prefer to work with XeLaTeX. The right encoding for PDFLaTeX is very important when writing accented characters e. g. in European languages (in your case á, è or ç). It provides correct hyphenation and makes PDF files searchable for terms which include accented characters. In default encoding such characters are assembled.AleCes wrote:[…] One last question: what is fontenc about? Is it essential for layout settings? I've never used it.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Migration from a4wide to geometry package

Thank you for your help!