Hi all.
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.
General ⇒ Can margin note be used in the math mode?
NEW: TikZ book now 40% off at Amazon.com for a short time.

Can margin note be used in the math mode?
Hi umb365,
You can control the placement of the marginal notes using \vspace, as the following example suggests:
Of course, according to your needs, you can use any valid LaTeX length as the argument of \vspace.
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}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Can margin note be used in the math mode?
Additional capability for marginal notes is provided by the marginnote package.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Can margin note be used in the math mode?
gmedina localghost: Thanks for your warn advice. I will try them. Hope one of them may works.
Thanks for localghost's welcome.
Thanks again.
Thanks for localghost's welcome.

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

THANKS both of you.