Goal
To provide a good-looking template of basic linear programs for users of Mathematics Stack Exchange.
\[
\begin{array}{cccll}
\max &z=&x_1&+x_2 & \\
\text{s.t.}& & & \phantom{+}x_2 + s_1 &= 8 \\
& & -x_1&+x_2 - s_2&=-4 \\
& & x_1&+x_2+s_3&= 12 \\
& & & s_1,s_2,s_3 &\ge 0
\end{array}
\]
Solution
1 2 3 4 5 6 7 |
|
Inadequacies
If you want a prettier template, you may see
this $\rm TeX$–$\rm \LaTeX$ Stack Exchange question. I
tried added @{}
in the first argument of the array
environment to
eliminate the excessive inter-column space—this works great in $\rm
\LaTeX$. However, neither @{}
nor \multicolumn{4}{l}{...}
is
processed by MathJax.