Math & ScienceA Sidenote in the Equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
JohnHommos
Posts: 2
Joined: Thu Feb 17, 2011 2:53 pm

A Sidenote in the Equation

Post by JohnHommos »

How can I add a side-note to an equation line?

Something along the lines of

Code: Select all

\begin{equation*}\begin{aligned}
X &= Y+Z \sidenote{Because $X=C$} \\
Y &= X-Z \sidenote{Rearranging}
\end{aligned}\end{equation*}
I do *not* want the side-note to appear in the margins
But I want it to be right aligned (just like the equation
number)

Thank you,
Last edited by JohnHommos on Thu Feb 17, 2011 3:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

A Sidenote in the Equation

Post by frabjous »

Here are a couple options to consider. The first puts the labels exactly where the equation numbers would usually be. The second just right-aligns them to the right of the equations, but not all the way to the edge of the page.

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align}
X &= Y+Z \tag*{Because $X=C$} \\
Y &= X-Z \tag*{Rearranging}
\end{align}

\begin{equation*}
\begin{aligned}
X &= Y+Z &\text{Because $X=C$} \\
Y &= X-Z &\text{Rearranging}
\end{aligned}
\end{equation*}

\end{document}
JohnHommos
Posts: 2
Joined: Thu Feb 17, 2011 2:53 pm

Re: A Sidenote in the Equation

Post by JohnHommos »

The first method is actually exactly what I need.

Thank you
Post Reply