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}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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.Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis