We can change the margins of a LaTeX document fine-tuning different lengths that are defined inside the system. In this tutorial, however, we will see how to more conveniently change the margins and other page-related lengths using the geometry package.
Geometry package: simple method for customizing page layout
Geometry package, written by Hideo Umeki, provides a flexible and easy interface to page dimensions. It lets you change the page layout with intuitive parameters, that are passed as optional arguments when including the package. Basically, when you call the package inside your document you make a declaration of the following style:
where key=val is a list of keys and values separated by commas, every value being a valid TeX dimension, and every key is one of the following:
Sets the width that the text will take up on the page.
Sets the height that the text will take up on the page.
3. left, lmargin, inner
These three parameters change the length of the left margin.
4. right, rmargin, outer
These three parameters change the length of the right margin.
5. top, tmargin
These two parameters determine the height of the top margin.
6. bottom, bmargin
These two parameters set the distance from the bottom edge of the document to its baseline.
Determines the height of the header.
Determines the separation between the baseline of the head and the text body.
This option corresponds to the separation between the baseline of the last line of text and the top of the footnote text.
This corresponds to the distance separation between the baseline of the last line of text and the baseline of the footer.
These two parameters determine the width of the right margin left for notes.
Determines the size of the paper. This parameter, unlike the previous ones, has to be set to a couple of TeX dimensions separated with a comma, and between braces, for example:
With all of this, you should be able to fully customize the blank space left in the pages of your document. If this is not good enough for you, or maybe you want to look for some predefined page geometries and sizes, you can always look up the documentation for the geometry package.
We reached the end of this short tutorial, If you have any remarks or suggestions, please feel free to reach us via email at email@example.com