
¿Cómo obtengo el segundo marcador de alineación en el primer signo menos en la primera línea del siguiente alignat
entorno? Me gustaría usarlo para escribir la segunda expresión en dos líneas, alineando el signo más que precede a la notación sigma.
\documentclass{amsart}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
f(x_{4}) &= (x_{4} &&- x_{1}) + (x_{4} - x_{2}) + (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{4}) \\
&= \bigl[(x_{4} - x_{3}) + (x_{3} - x_{1})\bigr] + \bigl[(x_{4} - x_{3}) + (x_{3} - x_{2})\bigr] + (x_{4} - x_{3}) \\
&&+ \sum_{i=5}^{8} \bigl[(x_{i} - x_{3}) - (x_{4} - x_{3})\bigr] \\
&= (x_{3} - x_{1}) + (x_{3} - x_{2}) - (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{3}) \\
&< (x_{3} - x_{1}) + (x_{3} - x_{2}) + \sum_{i=4}^{8} (x_{i} - x_{3}) \\
&< \sum_{i=1}^{8} \vert x_{i} - x_{3} \vert \\
&= f(x_{3}) ,
\end{alignat*}
\end{document}
Respuesta1
Alinearía la primera -
en la segunda expresión con el uso +
dentro del entorno.+(x_4 - x_3)
aligned
align*
\documentclass{amsart}
\usepackage{amsmath}
\begin{document}
\begin{align*}
f(x_{4}) &= (x_{4}-x_{1}) + (x_{4} - x_{2}) + (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{4}) \\
&=\begin{aligned}[t]\bigl[(x_{4} &- x_{3}) + (x_{3} - x_{1})\bigr] + \bigl[(x_{4} - x_{3}) + (x_{3} - x_{2})\bigr] \\
&+(x_{4} - x_{3})+\sum_{i=5}^{8} \bigl[(x_{i} - x_{3}) - (x_{4} - x_{3})\bigr] \end{aligned} \\
&= (x_{3} - x_{1}) + (x_{3} - x_{2}) - (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{3}) \\
&< (x_{3} - x_{1}) + (x_{3} - x_{2}) + \sum_{i=4}^{8} (x_{i} - x_{3}) \\
&< \sum_{i=1}^{8} \vert x_{i} - x_{3} \vert \\
&= f(x_{3}) ,
\end{align*}
\end{document}
Respuesta2
¿Una alineación como esta?
\documentclass{amsart}
\begin{document}
\begin{align*}
f(x_4) &= (x_4 - x_1) + (x_4 - x_2) + (x_4 - x_3) + \sum_{i=5}^8 (x_i - x_4) \\
&= \bigl[(x_4 - x_3) + (x_3 - x_1)\bigr] + \bigl[(x_4 - x_3) + (x_3 - x_2)\bigr] + (x_4 - x_3) \\
&\quad+ \sum_{i=5}^8 \bigl[(x_i - x_3) - (x_4 - x_3)\bigr] \\
&= (x_3 - x_1) + (x_3 - x_2) - (x_4 - x_3) + \sum_{i=5}^8 (x_i - x_3) \\
&< (x_3 - x_1) + (x_3 - x_2) + \sum_{i=4}^8 (x_i - x_3) \\
&< \sum_{i=1}^8 \vert x_i - x_3 \vert \\
&= f(x_3)
\end{align*}
\end{document}
O como sugirió Thruston en los comentarios, con un \qquad
en lugar de \quad
.
O como sugirió Enrico, (x_4-x_3)
también pasó a la siguiente fila.
\documentclass{amsart}
\begin{document}
\begin{align*}
f(x_4) &= (x_4 - x_1) + (x_4 - x_2) + (x_4 - x_3) + \sum_{i=5}^8 (x_i - x_4) \\
&= \bigl[(x_4 - x_3) + (x_3 - x_1)\bigr] + \bigl[(x_4 - x_3) + (x_3 - x_2)\bigr] \\
&\quad + (x_4 - x_3)+ \sum_{i=5}^8 \bigl[(x_i - x_3) - (x_4 - x_3)\bigr] \\
&= (x_3 - x_1) + (x_3 - x_2) - (x_4 - x_3) + \sum_{i=5}^8 (x_i - x_3) \\
&< (x_3 - x_1) + (x_3 - x_2) + \sum_{i=4}^8 (x_i - x_3) \\
&< \sum_{i=1}^8 \vert x_i - x_3 \vert \\
&= f(x_3) ,
\end{align*}
\end{document}
Otro intento después de las aclaraciones en los comentarios:
\documentclass{amsart}
\begin{document}
\begin{align*}
f(x_4) &= (x_4 - x_1) + (x_4 - x_2) + (x_4 - x_3) + \sum_{i=5}^8 (x_i - x_4) \\
&= \bigl[(x_4 - x_3) + (x_3 - x_1)\bigr] + \bigl[(x_4 - x_3) + (x_3 - x_2)\bigr]+ (x_4 - x_3) \\
&\phantom{{}=(x_4} + \sum_{i=5}^8 \bigl[(x_i - x_3) - (x_4 - x_3)\bigr] \\
&= (x_3 - x_1) + (x_3 - x_2) - (x_4 - x_3) + \sum_{i=5}^8 (x_i - x_3) \\
&< (x_3 - x_1) + (x_3 - x_2) + \sum_{i=4}^8 (x_i - x_3) \\
&< \sum_{i=1}^8 \lvert x_i - x_3 \rvert \\
&= f(x_3)
\end{align*}
\end{document}
Respuesta3
¿Quieres decir esto?
% arara: pdflatex
\documentclass{amsart}
\begin{document}
\begin{align*}
f(x_{4})&= (x_{4} - x_{1}) + (x_{4} - x_{2}) + (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{4}) \\
&= \bigl[(x_{4} - x_{3}) + (x_{3} - x_{1})\bigr] + \bigl[(x_{4} - x_{3}) + (x_{3} - x_{2})\bigr] + (x_{4} - x_{3}) \\
&\hphantom{{}= (x_{4}} + \mathop{\smash[b]{\sum_{i=5}^{8}}} \bigl[(x_{i} - x_{3}) - (x_{4} - x_{3})\bigr] \\
&= (x_{3} - x_{1}) + (x_{3} - x_{2}) - (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{3}) \\
&< (x_{3} - x_{1}) + (x_{3} - x_{2}) + \mathop{\smash{\sum_{i=4}^{8}}} (x_{i} - x_{3}) \\
&< \sum_{i=1}^{8} \lvert x_{i} - x_{3} \rvert \\
&= f(x_{3}),
\end{align*}
\end{document}
Sin embargo, no lo recomendaría, ya que no veo ninguna razón para alinearnos en este punto. Pero esto se parece a lo que intentaste hacer anteriormente. Yo tendería a alinearme con el primer, o mejor segundo, o incluso mejor tercer signo de la segunda línea. O usar algunos \quad
o similares, como se recomendó anteriormente, para mantener la coherencia en todas sus fórmulas.
Respuesta4
Yo usaría multlined
del mathtools
paquete:
\documentclass{amsart}
\usepackage{mathtools}
\begin{document}
\begin{align*}
f(x_{4})
& = (x_{4} - x_{1}) + (x_{4} - x_{2}) + (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{4}) \\
& = \!\begin{multlined}[t][0.5\linewidth]
\bigl[(x_{4} - x_{3}) + (x_{3} - x_{1})\bigr]
+ \bigl[(x_{4} - x_{3}) + (x_{3} - x_{2})\bigr] \\
+ (x_{4} - x_{3})
+ \sum_{i=5}^{8} \bigl[(x_{i} - x_{3}) - (x_{4} - x_{3})\bigr]
\end{multlined} \\
& = (x_{3} - x_{1}) + (x_{3} - x_{2}) - (x_{4} - x_{3}) + \sum_{i=5}^{8} (x_{i} - x_{3}) \\
& < (x_{3} - x_{1}) + (x_{3} - x_{2}) + \sum_{i=4}^{8} (x_{i} - x_{3}) \\
& < \sum_{i=1}^{8} \vert x_{i} - x_{3} \vert \\
& = f(x_{3}) ,
\end{align*}
\end{document}