General ⇒ Can margin note be used in the math mode?
Can margin note be used in the math mode?
I am a new comer for LaTeX. I meet a problem in writing tex.
I wanna add some margin note beside the math equation by \marginpar. but LaTeX tells me: "not in outer par mode".
I have read some documents and searched the internet, but found nothing.
Does LaTeX (or its philosophy) don't "tolerate" margin note in the math mode?
Hope someone can give me some advice.
THANK A LOT advanced.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Can margin note be used in the math mode?
You can control the placement of the marginal notes using \vspace, as the following example suggests:
Code: Select all
\documentclass{book}
\usepackage{amsmath}
\begin{document}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
%
\begin{equation}
x^n+y^n=z^n
\end{equation}
\marginpar{This marginal note will appear after the equation}%
%
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
%
\begin{equation}
x^n+y^n=z^n
\end{equation}
\marginpar{\vspace{-3\baselineskip}This marginal note will appear in front of the equation}%
%
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Can margin note be used in the math mode?
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Can margin note be used in the math mode?
Thanks for localghost's welcome.

Thanks again.
Re: Can margin note be used in the math mode?
Both of them do work!

THANKS both of you.