In some places in my document I have used the following (and it works quite well):
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\argmax}{argmax} % thin space, limits underneath in displays
\begin{document}
\[z = \argmax_x f(x)\]
\end{document}
However, when I try to use something like this:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\argmax}{argmax} % thin space, limits underneath in displays
\begin{document}
\begin{tabular}{c l}
$z = \argmax_x f(x)$ \\
$z = \argmax_{x \in \mathcal{X}} f(x)$
\end{tabular}
\end{document}
It does not work anymore. It seems that tabular
is somehow to blame here.
UPDATE2: Well, it was clearly because I was using inline math ($). Thanks David!
$
so get the inline form not the display layout. and it applies to both cases so the "works" "not works" in the original part of the question is misleadingalign
nottabular