# How to use \marginpar with narrow margins

The \marginpar command is useful to create marginal notes in a document. In particular, it is used by the \todo command from the todonotes package. However, when the margins are narrower than usual, such as when using the fullpage package to save paper, the marginal note doesn't fit and gets chopped off the side of the page. How can we fix \marginpar so that it places the text inside the available margins?

In the following example, the word "elaborate" is cut off the side of the page:

\documentclass{article}
\usepackage{fullpage}
\begin{document}
There is a lot to say here.
\marginpar{Possibly elaborate here.}
\end{document}

• Add \usepackage[marginpar=2cm]{geometry} for example? – user31729 Mar 1 '15 at 11:21

## 2 Answers

The width of a marginpar is \marginparwidth separated from the text block by \marginparsep.

Any code that is changing the margins should ensure that the sum of these fits in the margin space.

fullpage doesn't bother, presumably because the intention there is to make the text block full width so that essentially there are no margins wide enough for text.

Given that, there is a reasonable assumption that there are no marginal notes.

However you can use

\setlength\marginparwidth{10pt}


or whatever width you need if you want to squeeze something in

• 10pt is way too small, but 2cm does the trick. – Ari Brodsky Mar 1 '15 at 20:52

The \marginparwidth length is responsible for this, it can be set either directly (see David's answer) or using the geometry package.

\documentclass{article}
\usepackage[marginpar=2cm]{geometry}
\begin{document}
There is a lot to say here.
\marginpar{Possibly elaborate here.}
\end{document}




• It should be pointed out that the geometry package must be loaded before the fullpage package, otherwise it seems to cancel the effect of fullpage. – Ari Brodsky Mar 1 '15 at 20:52
• As you can see, there is no fullpage in my code and it's not needed, as far I as believe. You can achieve basically any typesetting area with geometry`. – user31729 Mar 1 '15 at 20:59