3

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{equation}
\begin{array}{llr} 
\hat x &= \underset{x} {\text{arg\,min}} & f(x)+ \sum_i \lambda_i g_i(x)
\end{array} \tag{SomeLabel}
\end{equation}

seems to produce

equation

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?

Sirg
  • 33

1 Answers1

4

Why array?

\documentclass{article}
\usepackage{amsmath}

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

\begin{document}

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

\end{document}

enter image description here

egreg
  • 1,121,712
  • 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 '19 at 14:50