set margin latex

set margin latex

StartSearchLaTeX for Beginners F.A.Q.LaTeX faqLaTeX topicsLaTeX course
< colored text   > latex matrices 

set margin in latex

How to set margin in latex? The easiest way is to use usepackage geometry, because it allows esay changing of the different margins which are normally used within latex.

set margin latex example

\documentclass{article}  
\usepackage[left=2cm, right=5cm, top=2cm]{geometry}
\begin{document}
Some text …
left margin is 2 cm, right margin 5 cm and the top margin is 2 cm.
\end{document}

change textwidth

Usepackage geometry also allows an esay way to change the textwidth as the next exmaple would show us:

set textwidth latex example

\documentclass{article}  
\usepackage[textwidth=5cm]{geometry}
\begin{document}
Some text …
which now got the width of 5 cm
\end{document}
Finally set margin and set textwidth could be combined:
\documentclass{article}  
\usepackage[left= 2cm, textwidth=10cm]{geometry}
\begin{document}
Some text …
which now got the width of 10 cm and a left margin with a width of 2cm.
\end{document}

Online Generator

custom paper size and margins in LaTeX - online

Contact   Privacy Policy   disclosures

accept decline

This website uses cookies and pixel tags to ensure you get the best experience on our website. By using this website, you consent to the use of cookies.learn more about cookies see also our privacy policy