How to set margin in LaTeX?

In this tutorial, you will learn how to set page margins in LaTeX.

If you want to set 1in the page margin on every side then you can use the fullpage package, this package will set 1in page margin on every side (left, right, bottom, and top).

\documentclass[a4paper]{article}
\usepackage{fullpage}
\usepackage{lipsum}
\begin{document}

\lipsum

\end{document}

Output:

1in Page margin on every side.
But if you want more control on your hand, you can use the geometry package. This package gives you an margin=<len> option so you can set it as you want. In <len> you can use any unit value which is accepted by LaTeX.

\documentclass[a4paper]{article}
\usepackage[margin=3cm]{geometry}
\usepackage{lipsum}
\begin{document}

\lipsum

\end{document}

Output:

3cm page margin on every side.
You can also set the size of the page margin for different sides. The geometry package also provides left=<len>, right=<len>, bottom=<len>, and top=<len> options to set different sizes of margins on different sides.

\documentclass[a4paper]{article}
\usepackage[ left=0.75in, right=0.75in, bottom=1in, top=1in]{geometry}
\usepackage{lipsum}
\begin{document}

\lipsum
\lipsum

\end{document}

Output:

Set different size of page margin for different sides.

Leave a Reply

Your email address will not be published. Required fields are marked *