# Label position in equation environment

I am looking for a way to align the label of an equation environment to the base line of the formula text. The default behavior of

$$\begin{array}{llr} \hat x &= \underset{x} {\text{arg\,min}} & f(x)+ \sum_i \lambda_i g_i(x) \end{array} \tag{SomeLabel}$$


seems to produce

Here, the label is actually vertically centered to the whole equation. I think it would be nicer if it was aligned with the base line. Anyone know how to fix this?

• Unfortunately "you're doing it wrong." There's no need for an array here.
– Werner
Dec 23, 2019 at 17:36
• Also see Command for argmin or argmax?
– Werner
Dec 23, 2019 at 17:36
• If you must use array, move the label down one line, just before the . Dec 23, 2019 at 20:58

Why array?

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\argmin}{arg\,min}

\begin{document}

$$\hat x = \argmin_{x} f(x)+ \sum_i \lambda_i g_i(x) \tag{SomeLabel}$$

\end{document}


• You are absolutely right. I used 'array' because sometimes there are additional constraints to the optimization problem, so multiple lines. But, here it is not needed. Thanks.
– Sirg
Dec 30, 2019 at 14:50