How can I make the $f(x^0 + d^0) = -b(x^0 + d^0)$ move below the $f(x^0) = -ax^0$?


\documentclass[a4paper,fontsize=13pt]{scrartcl}

\usepackage[english, main=ngerman]{babel}
\usepackage[a4paper,left=3cm,right=3cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{xfrac}
\usepackage{enumitem}
\usepackage{aligned-overset}

\begin{document}

\begin{alignat*}{2}
\rho_{0}
&= \frac{f(x^{0}) - f(x^{0} + d^{0})}{f(x^{0}) - \widetilde{q}_{0}(d^{0})}  \\
&= \frac{f(x^{0}) - f(x^{0} + d^{0})}{-\widetilde{\phi}(x^{0}, \Delta_{0} ; d^{0})}   \\
\overset{\star}&{=} \frac{-a x^{0}+b(x^{0}+d^{0})}{a d^{0}}
f(x^{0})= -a x^{0} \text{ because } x^{0} < 0,
f(x^{0} + d^{0}) = - b(x^{0} + d^{0})  \text{ because } x^{0}+d^{0} \in (0,1) \\
&= \frac{-a x^{0}+b(x^{0}+\Delta_{0})}{a \Delta_{0}}
&= ... \\
&= \left( \frac{b}{a} - 1 \right) \frac{x^0}{\Delta_0} + \frac{b}{a} \\
&= \left( \frac{b}{a} - 1 \right) \frac{x^0}{\frac{\beta_{1} \beta_{2}-1}{\beta_{1}} x^{0}} + \frac{b}{a}
&= \left( \frac{b}{a} - 1 \right) \frac{\beta_{1}}{\beta_{1} \beta_{2}-1} + \frac{b}{a} \\
&= \theta \leq \eta_1 \\
\end{alignat*}

\end{document}



You can do that with an array. Note your font size is too large for this equation with comments to fit within margins. So I changed some spacings, but it remains nearly 16 pt too wide, and may be you should reconsider the font size, at least for this equation.

\documentclass[a4paper,fontsize=13pt]{scrartcl}

\usepackage[english, main=ngerman]{babel}
\usepackage[a4paper, hmargin=3cm, vmargin=2.5cm]{geometry}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{xfrac}
\usepackage{enumitem}
\usepackage{aligned-overset}

\begin{document}

\begin{alignat*}{2}
\rho_{0}
&= \frac{f(x^{0}) - f(x^{0} + d^{0})}{f(x^{0}) - \widetilde{q}_{0}(d^{0})} \\
&= \frac{f(x^{0}) - f(x^{0} + d^{0})}{-\widetilde{\phi}(x^{0}, \Delta_{0} ; d^{0})} \\
\overset{\star}&{=} \frac{-a x^{0}+b(x^{0}+d^{0})}{a d^{0}}
& & \text{\%}\;\begin{array}{|l@{}}
f(x^{0})= -a x^{0}\; \text{ because } x^{0} < 0, \\
f(x^{0} + d^{0}) = - b(x^{0} + d^{0}) \;\text{ because } x^{0}+d^{0} \in (0,1)
\end{array}\\
&= \frac{-a x^{0}+b(x^{0}+\Delta_{0})}{a \Delta_{0}}
& & \text{\%} \; d^{0}=\Delta_{0} \\
&= ... \\
&= \left( \frac{b}{a} - 1 \right) \frac{x^0}{\Delta_0} + \frac{b}{a} \\
&= \left( \frac{b}{a} - 1 \right) \frac{x^0}{\frac{\beta_{1} \beta_{2}-1}{\beta_{1}} x^{0}} + \frac{b}{a}
&\hskip 1.5em&\text{\%} \; \Delta_{0} = \tfrac{\beta_{1} \beta_{2}-1}{\beta_{1}} x^{0} \\
&= \left( \frac{b}{a} - 1 \right) \frac{\beta_{1}}{\beta_{1} \beta_{2}-1} + \frac{b}{a} \\
&= \theta \leq \eta_1 \\
\end{alignat*}

\end{document}


• Awesome! Many thanks. This is exactly what I have been looking for. I would like to ask you one more question: Does this look overall good to you (excluding the meaning of the maths of course)? Should I use another symbol instead of the percen sign? Apr 9 at 10:03
• @u49K3df2: For me, it's fine. Of course, maybe you should explain somewhere that comments and justification are preceded by a percent sign (I know it it because it is used in LaTeX code, but think of a non-latex user. Another possibility would be to use a smaller font size than for the equations themselves. Apr 9 at 11:50

You could simply start a new line in your equations, and "skip the first columns".

For instance:

\documentclass[a4paper,fontsize=13pt]{scrartcl}

\usepackage[english, main=ngerman]{babel}
\usepackage[a4paper,left=3cm,right=3cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{xfrac}
\usepackage{enumitem}
\usepackage{aligned-overset}

\begin{document}

\begin{alignat*}{2}
\rho_{0}
&= \frac{f(x^{0}) - f(x^{0} + d^{0})}{f(x^{0}) - \widetilde{q}_{0}(d^{0})}  \\
&= \frac{f(x^{0}) - f(x^{0} + d^{0})}{-\widetilde{\phi}(x^{0}, \Delta_{0} ; d^{0})}   \\
\overset{\star}&{=} \frac{-a x^{0}+b(x^{0}+d^{0})}{a d^{0}}
f(x^{0})= -a x^{0} \text{ because } x^{0} < 0, \\
&&&   \qquad\qquad \text{\%} \quad  f(x^{0} + d^{0}) = - b(x^{0} + d^{0})  \text{ because } x^{0}+d^{0} \in (0,1) \\
&= \frac{-a x^{0}+b(x^{0}+\Delta_{0})}{a \Delta_{0}}
&= ... \\
&= \left( \frac{b}{a} - 1 \right) \frac{x^0}{\Delta_0} + \frac{b}{a} \\
&= \left( \frac{b}{a} - 1 \right) \frac{x^0}{\frac{\beta_{1} \beta_{2}-1}{\beta_{1}} x^{0}} + \frac{b}{a}