marginal notes

StartSearchLaTeX for Beginners F.A.Q. LaTeX faqLaTeX topicsfont sizearrowsminipageitalicsboldtext colormatrixfontslistingstables

1 Marginal notes with LaTeX

With LaTeX it is also possible to set margin notes on the page margin of the document. It should be noted, however, that the design of the margins differs between one-sided and two-page text formatting. With a one-sided text formatting, there are only right sides and the margin is equally wide on both sides. And with two-sided text formatting, there are both left and right sides and the width of the margins generally varies.

1.1 The marginpar command

The marginpar command takes into account the different text formatting variations in the way that the mandatory element refers to the right side, since both one- and two-page formatting have a right side, and the optional element refers to left sides.

\marginpar[left margin]{right margin} 

However, the optional parameter can only be used meaningfully in a two-sided record.

1.2 Left instead of right margin

To place a margin note (or all of them) in the left margin when formatting text on one side, use the reversemarginpar command. From the point where this command was placed, the following margin notes are placed on the left margin. The normalmarginpar command restores the original representation, that is, on the right margin.

\reversemarginpar % Change to the left margin 
\marginpar[left margin]{right margin} 
\normalmarginpar % switch back to the right margin

1.3 Orientation of the text of the marginal note

In the standard system, the alignment of the text of the margin note is always in justification. If you want to change the alignment of the text, you can use the flushleft, flushright and centering commands.

\marginpar{\flushleft left justified text instead of justification} 

\marginpar{\flushright right-justified text instead of justification} 

\marginpar{\centering centered text instead of justification} 

If the commands from the ragged2e package are used to align the text, hyphenation is much better.

1.4 Width of the marginal note

The margin note has a width marginparwidth of up to 65pt (dots) which is slightly less than 2.3 cm (which is a little less then one inch). In case you want to change the length / width, this can go to the length itself or in case you use the geometry package, it can be set as an option with this package.

\setlength{\marginparwidth}{4cm}
\usepackage[a4paper,...,marginparwidth=4cm,...]{geometry}

In the same way, the space between the text and the margin note marginparsep can also be changed.

\setlength{\marginparsep}{0.5cm}
\usepackage[a4paper,...,marginparsep=0.5cm,...]{geometry}

In both cases, however, you should note that the selected sizes must also fit into the page margin. If the width or the space is too large, it can happen that part of the marginal note is written beyond the page margin and thus does not appear in the document. There is no error message or warning.

The following table shows the effect of the font size on the width and spacing of the margin notes using the article class as an example.

table 1: effect of font-size
font size 10pt 11pt 12pt
width of marginal note65pt 59pt 44pt
space (distance) to text11pt10pt 10pt

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