Thanks for the reply, it helped.
I've come up with the following code, which is closer to what I want, but not quite. It puts the vertical dots at the far right, and then aligns the b terms with the dots, rather than align the vertical dots with the b terms. In other words, I want the b terms to be in their natural positions, then the vertical dots to be aligned with them.
Code: Select all
\begin{alignat*}{4}
&\text{maximise }\quad &&c_1x_1 + c_2x_2 + \ldots + c_nx_n \\
&\text{subject to }&&a_{11}x_1 + a_{12}x_2 + \ldots + a_{1n}x_n &&&\leq b_1 \\
& &&a_{21}x_1 + a_{22}x_2 + \ldots + a_{2n}x_n &&&\leq b_2 \\
& &&\vdots &&&\vdots \\
& &&a_{m1}x_1 + a_{m2}x_2 + \ldots + a_{mn}x_n \leq b_m \\
&\text{and }&&x_1 \geq 0, x_2 \geq 0, \ldots, x_n \geq 0
\end{alignat*}
Also, If I try introducing more alignment columns to align the various terms of the "subject to" equations, then everything goes a bit crazy.
Code: Select all
\begin{alignat*}{8}
&\text{maximise }\quad &&c_1x_1 + c_2x_2 + \ldots + c_nx_n \\
&\text{subject to } &&a_{11}x_1 + &&&a_{12}x_2 + &&&&\ldots + a_{1n}x_n &&&&&\leq b_1 \\
& &&a_{21}x_1 + &&&a_{22}x_2 + &&&&\ldots + a_{2n}x_n &&&&&\leq b_2 \\
& &&\vdots &&&&&\vdots \\
& &&a_{m1}x_1 + &&&a_{m2}x_2 + &&&&\ldots + a_{mn}x_n &&&&&\leq b_m \\
&\text{and }&&x_1 \geq 0, x_2 \geq 0, \ldots, x_n \geq 0
\end{alignat*}
