TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes the margins need to be changed for a particular page, paragraph, or other section of text. For example, if I'm writing a letter and want the left margin to be almost at the right side of the page for the four lines of my address, or if I am combining prose with poetry and want the poems to be indented relative to the rest of the work.

What is the best way to change both left and right margins on the fly?

share|improve this question
up vote 32 down vote accepted

There are several packages available on CTAN to do this. changepage looks promising but you can find other alternatives by searching for "margins" or "changepage" on ctan search.

share|improve this answer
changepage seems to do just what I'm after, through the \begin{adjustwidth}{left change length}{right change length} environment. Thanks! – Michael Underwood Jul 29 '10 at 17:49

Here is how you can do it. Put the following in the preamble (before \begin{document})


then in the text you can use


where <arg> is the distance you want to include on the margin (the first one defines the right-hand side margin, and the second defines the left-hand side one).

So, for example, to add 0.5 cm to the margins on either side, you would have:

%your text here  

This is exactly how the command


is defined, but with the set to 1cm. The command quote can be used without having to load any packages, by the way.

share|improve this answer
Thanks Vivi. I take it you mean "where <arg> is the distance...", right? Are there any advantages to this version over using a package such as changepage? – Michael Underwood Jul 30 '10 at 22:32
@Michael: Sorry, because of html the <arg> was not showing (though it was written). About the advantages over changepage, I really don't know. I have never used changepage and didn't even know it existed. I guess I need to try it out :) Have you tried the package yet? Is it good and straightforward? – Vivi Jul 30 '10 at 22:39
I haven't used it for a specific purpose yet, but was able to figure out how to do what I asked for and test it out within minutes of seeing David's suggestion. Some advantages claimed in the documentation that I haven't tested are: Correctly identifying left- and right-side pages if they are different; working inside floats; being able to change the top and bottom margins as well as left and right. – Michael Underwood Jul 30 '10 at 22:58
This is a very elegant solution. Works perfectly, even inside a float (which is where i needed it). – Trevor Oct 22 '12 at 22:17
The command dont works if you use it with a long text running across pages in a document definided with not equals inner and outer margins. – Raffaele Santoro Dec 28 '13 at 3:44

With either one of the KOMA-Script classes or the package scrextend (which is part of KOMA-Script), you can use the addmargin environment.






% Syntax: \begin{addmargin}[<left indentation>]{<indentation>}



enter image description here

share|improve this answer
thanks for that, that's exactly what i've been looking for for a while now. – David Wright Apr 21 '13 at 12:55

what about the \narrower (TeX?) command? Is it ok to use even though it does not offer a very precise control?

{\narrower\narrower\narrower \lipsum[4]
share|improve this answer
\narrower will indent the text by one \parindent. For more precise control one can also use \hskip 10pt etc. Of course is ok if you only want to indent once. \narrower\narrower will indent both left and right. – Yiannis Lazarides Sep 30 '10 at 1:47

Earlier versions of the geometry package did not allow to change the margins inside the document. The package gmeometric could help then.

Today geometry supports changing the margin inside the document by its commands \newgeometry{...} accepting the same key=value arguments and by \restoregeometry, see the manual of the current package version.

share|improve this answer
FYI: the \newgeometry and \restoregeometry commands cause a page break. – cjm Apr 26 at 4:24

It might not answer the question directly, but:

There is a letter class:


for writing letters.

And for verse there is a package called...wait for it...verse:


As I said, it doesn't answer the specific question, but it might solve the two applications you want the solution for.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.