Here's what my equation looks like; it's in an align*
environment:
I want to put a circle around $\varepsilon \frac{dL}{d\varepsilon}$
and everything else unchanged.
Q: How do I draw a circle around a term in an
align*
equation?
I found that \textcircled
doesn't work in math mode and \tikz \node[circle,draw] { $\varepsilon \frac{dL}{d\varepsilon}$};
is not suitable as it shifts the term:
I get fairly close using \boxed{\varepsilon \frac{dL}{d\varepsilon}}
, but it's not a circle:
Here's a working example:
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align*}
L(q+\varepsilon) = L(q) + \varepsilon \frac{dL}{d\varepsilon} + \cdots \\
\end{align*}
\end{document}
Best Answer
The TikZ-way you tried works, you just forgot to set the baseline of the
tikzpicture
to the baseline of the text inside the math node. Here is an adjusted solution which also respects the mathstyle outside of the node.