# Math notes between equations

Hi I was searching for a function that allows me to do what the picture shows, if someone could make a function like \underset{}_{}, where you put what you want to appear below the text, to make a function that allows me to put information pointing with an arrow to a place in the equation. Thank you for your help. Also, sorry for not having any code. • Even though it does not do exactly what you want, I suggest you to have a look at witharrows. Jan 3 at 11:40
• What is that? I haven't heard of it Jan 3 at 12:32
• witharrows is a LaTeX package I have written which provides a way to add indications about a calculus. It's available on CTAN. Jan 3 at 13:10
• It's a great package I will check it Jan 3 at 13:50
• Is there any package for a question I asked in another post? The post is : tex.stackexchange.com/questions/628843/math-box-with-notes Jan 3 at 13:52

I would use tikzmark. \documentclass{article}
\usepackage{tikz,amsmath}
\usetikzlibrary{tikzmark}
\usepackage{lipsum} %>>> for dummy text only
\begin{document}
\lipsum
\vspace*{8mm}  % a gap for tikzmark later. Change as you wish

$A(r)=\int_{V'}\dfrac{\mu_0}{4\pi}\dfrac{M(r')\times \hat{R} d\tau'}{R^2}\; \tikzmarknode{e1}{=} \;\dfrac{\mu_0}{4\pi}\int_{V'}M(r')\times\nabla'\left(\dfrac{1}{R}\right)d\tau'$
\begin{tikzpicture}[overlay,remember picture]
\draw[stealth-,cyan,thick] (e1)+(90:.2)--+(90:.7) node[above=-2mm]{$\dfrac{\hat R}{R^2}=\nabla'\left(\dfrac{1}{R}\right)$};
\end{tikzpicture}
\lipsum
\end{document}

• I was wondering if this could be an evironment or a newcommand to do it multiple times Jan 3 at 8:32
• @alvaritomendez Surely you can make a \newcommand as the usual syntax of TeX/LaTeX. However, I think that is not so convenient as you expect (try and see!) I like the hand-made, manual controls such as \vspace*{8mm}, etc Jan 3 at 10:31
• Thank you a lot, I will try to make a new command because I have to make this notes everal times (more than 100) so I think it will help me. Jan 3 at 11:14
• (The narrative really caught me off guard! Hilarious! Thank you! :) Jan 3 at 21:03
• If i not upvoted you i am not Happy🤗🤗🤗🤗🤗 Jan 9 at 8:26

Rather than cram too much visual information into what is already a lengthy derivation, I'd employ \shortintertext{...} and \intertext{...} directives to intersperse the explations with the actual steps of the derivation. That way, you're giving your readers some visual "breathers" between the steps. If you feel it's necessary or beneficial, you can still use colors (say, blue) to differentiate the explanations visually from the actual formulas. \documentclass{article}
\usepackage{mathtools,bm,xcolor}
\begin{document}

\begin{align*}
\bm{A}(\bm{r})
&= \int\limits_{V'} \frac{\mu_0}{4\pi} \frac{\bm{M}(\bm{r}') \times \widehat{\bm{R}}\, d\tau'}{R^2}\\
\shortintertext{Employ \textcolor{blue}{$\displaystyle\frac{\widehat{\bm{R}}}{R^2}=\bm{\nabla}'\biggl(\frac{1}{R}\biggr)$}:}
&= \frac{\mu_0}{4\pi} \int\limits_{V'} \bm{M}(\bm{r}')\times \bm{\nabla}'\biggl(\frac{1}{R}\biggr) \, d\tau'\\
\intertext{Employ \textcolor{blue}{$\displaystyle \bm{M}(\bm{r}')\times \bm{\nabla}'\biggl(\frac{1}{R}\biggr) = \frac{\bm{\nabla}'\times \bm{M}}{R}-\bm{\nabla}'\times\biggl(\frac{\bm{M}}{R}\biggr)$}:}
&= \frac{\mu_0}{4\pi}\int\limits_{V'} \frac{\bm{\nabla}'\times \bm{M}}{R} \,d\tau' +
\frac{\mu_0}{4\pi}\int\limits_{V'}\biggl[-\bm{\nabla}'\times\biggl(\frac{\bm{R}}{R} \biggr) \biggr]\,d\tau'\\
\intertext{Employ \dots}
\end{align*}

\end{document}

• It's a good option but not what I'm searching for, becaus it makes the equations to long and I need a short way to explain some changes from one side to the other, but thanks Jan 3 at 8:34
• @alvaritomendez - I would like beg to differ with the view that my solution suggesion "makes the equations too long". Why? The screenshot you posted which contains a single, very long line, which cannot be replicated realistically in TeX/LaTeX unless one chooses a rather diminutive font size and an even smaller for the colored material. The only realistic option, in my opinion, is to split the equation across several lines -- at which point the colored explanatory material hardly takes up any extral space.
– Mico
Jan 3 at 8:43
• It's just my opinion and as in the previous awnser I got the exact awnser for what I asked for, and I'm asking if there is a way to do it more easy for doing it several times Jan 3 at 10:15