1

I'd like to reproduce the output seen below within the alignat environment:

desired

So essentially I'm looking for a way to have some identifier on the left and vertically centred (as MIP is here). Sort of similar to the \tags often found on the right hand side of the output. I would prefer to still be able to use those right-hand tags along with any solution, if that is possible.

Troy
  • 13,741
  • Are you using align or align*? In other words, do you want numbers on the right or not? – egreg Mar 04 '17 at 15:04

2 Answers2

2

This solution uses \reqnomode and \leqnomode defined here.

enter image description here

\documentclass{article}

\usepackage{amsmath}
\makeatletter
\newcommand{\leqnomode}{\tagsleft@true}
\newcommand{\reqnomode}{\tagsleft@false}
\makeatother

\begin{document}
% By default, labels are on the right-hand side
\leqnomode % switch to left-hand labels
\begin{align*}
  \max cx&+hy \\
       Ax&+Gy\leq b \tag{MIP}\\
        x&\geq0,\text{ $y\geq0$ and integer}
\end{align*}
\reqnomode % switch back to right-hand labels
\end{document}
gernot
  • 49,614
1

Another solution, if (MIP) is meant as a description, rather than as a tag.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
            &&  \max cx&+hy \\
\text{(MIP)}&&       Ax&+Gy\leq b \\
            &&        x&\geq0,\text{ $y\geq0$ and integer}
\end{align}
\end{document}
gernot
  • 49,614