I am typesetting some mathematical equations using \begin{align*}
environment. Hopefully to make the steps clear I am adding text above =, \leq, \geq
but I am having troubles with aligning them e.g.:
\begin{align*}
x_1 + x_2
\overset{\text{some text}}=& 2y^3 \leq\\
\overset{\text{some longer text}}\leq& 3z
\end{align*}
The result is, that the \leq
is not centered with =
sign above. Is there a neat way to solve this? In some different cases I am using this approach:
\begin{align*}
x_1 + x_2
\overset{\text{some text}}=& 2y^3 \leq\\
\overset{\phantom{\text{some text}}}\leq& 3z
\end{align*}
But I don't think that adding some phantom characters to the first example would be a good way how to do it.
Best Answer
This solution proposes use of
makebox
where adjustment of width is possible for one's need.Code