Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\text{maximize } & \text{long expression} \\
\text{with } & \begin{aligned}[t]
a & \in A \\
b & \in B
\end{aligned}
\end{align}
\end{document}
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\text{maximize } & \text{long expression} \\
\text{with } & \begin{aligned}[t]
a & \in A \\
b & \in B
\end{aligned}
\end{align}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
align
environments instead of nesting.Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat}{3}
\text{maximize } &&& \text{\rlap{long expression}} \\
\text{with } &&&& a & \in A \\
&&&& b & \in B
\end{alignat}
\end{document}
alignat
is explained in the amsmath user's guide. In short: the mandatory argument contains the number of alignment columns, and the & mark both alignment points (right and left aligned as in align
) and column separation, alternating.NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p