GeneralAdd annotations on half-lines

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
knucles
Posts: 2
Joined: Mon Apr 09, 2012 4:59 am

Add annotations on half-lines

Post by knucles »

I've been wondering how to do this for a while... although the application is equations, I think that the actual implementation will be more of a general TeX/LaTeX problem so I'm posting it in the general forum. Basically I want to be able to do something like:

Code: Select all

\begin{align}
a &= b \\
b &= c \eqnote{but $b = a$, so} \\
a &= c
\end{align}
...and then have the text "but $b = a$, so" appear to the right of the equations, but vertically aligned to fall half way between the last two lines. I've created a function which does this by assuming that all lines are a certain height, but this fails if either line contains tall expressions like integrals.

I'm wondering whether there's a way for the \eqnote function to determine the height of its line, the height of the following line, and then use that information to place its argument half way between the two lines.

Recommended reading 2024:

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

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

Post Reply