Page Layout and Margins
Introduction
Welcome back to Document Structure and Layout! You are now in the fourth lesson of this course. So far, we have built a clear heading hierarchy with sections and subsections, generated an automatic table of contents, and organized content into bulleted and numbered lists. All of that work has focused on the content inside a page. In this lesson, we shift our attention to the page itself: its size, its margins, and the space available for your text. We will use a package called geometry that lets you control the entire page layout from a single line in the preamble.
Why Page Layout Matters
Think about the difference between a printed novel, a homework assignment, and a bound thesis. Each of these documents uses different paper sizes and margin widths to suit the way it will be read, printed, or bound. A novel uses narrow margins to fit more words per page, while a thesis often has a wider left margin to leave room for binding.
LaTeX's default margins depend on both the document class and the paper size. For the standard article class on US letter paper, they work out to approximately 1.5 inches on 12pt documents, 1.75 inches on 11pt documents, and 1.87 inches on 10pt documents — though these values shift when a different paper size or document class is used. Those defaults are chosen to keep lines at a comfortable reading length — the optimum line length is broadly somewhere between 60 characters and 75 characters — but they are not always right for every purpose. Setting page dimensions manually in LaTeX is not straightforward because you would need to adjust several interdependent native length variables. The geometry package solves this by giving you an easy, intuitive way to set page layout parameters without worrying about those low-level details.
How the Page Is Organized
Before we write any code, it helps to understand how LaTeX sees a page. The page layout consists of a total body (the printable area where your text lives) surrounded by margins on all four sides. The simplest relationship between these elements is:
A similar equation applies vertically:
When you specify some of these values, the geometry package automatically computes the rest. You only need to describe what you want, and the package handles the math.



