How can I use a downward arrow in a formulae as the below example:
There are some examples in other formats same as using $\underbrace{x}_{y}$ in equations but I could not find a desired style of an equation.
Best Answer
This could be done in a variety of ways as in the answers to this question, or you could use an align environment, using the B character. The \downarrow needs a small shift to the left as shown:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}\label{first:main}
First some separate equations
\begin{equation}
1=1 \tag{\ref{first:main}}
\end{equation}
and another
\begin{equation}
1>0 \label{first:a}
\end{equation}
and another
\begin{equation}
1<2 \label{first:b}
\end{equation}
\end{subequations}
\begin{subequations}\label{second:main}
But it works also with \texttt{align} and the other alignment
environments
\begin{align}
1 &= 1 \tag{\ref{second:main}}\\
1 &> 0 \label{second:a}\\
1 &< 2 \label{second:b}
\end{align}
and you can reference all of them, as seen below.
\end{subequations}
Here are some references: \eqref{first:main}, \eqref{first:a}
and \eqref{second:b}.
\end{document}
You use \xdef{\unexpanded...}. This is essentially \gdef, which totally suffices here.
Your use of \unexpanded is wrong. \unexpanded expects a balanced token list delimited by explicit {, }. If you want to protect a single token from expansion in \edef, use \noexpand. Enrico wrote a nice answer about that.
Best Answer
This could be done in a variety of ways as in the answers to this question, or you could use an
align
environment, using theB
character. The\downarrow
needs a small shift to the left as shown:If you want to adjust the spacing around the arrow, you can add negative space after the appropriate lines: