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}
Best Answer
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
or whatever width you need if you want to squeeze something in