TransWikia.com

expression below argmax

TeX - LaTeX Asked on March 1, 2021

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}

enter image description here

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.

enter image description here

UPDATE2:
Well, it was clearly because I was using inline math ($). Thanks David!

2 Answers

enter image description here

It isn't clear what you mean by "not work" the output is as I expect.

documentclass{article}

usepackage{amsmath}
DeclareMathOperator*{argmax}{argmax} % thin space, limits underneath in displays

begin{document}



a
[z = argmax_x f(x)]

b
[z = argmax_{x in mathcal{X}} f(x)]

end{document}

Updated question shows it is just an issue of display or inline setting:

enter image description here

documentclass{article}

usepackage{amsmath}
DeclareMathOperator*{argmax}{argmax} % thin space, limits underneath in displays

begin{document}



a
[z = argmax_x f(x)]

b
[z = argmax_{x in mathcal{X}} f(x)]

a2
$z = argmax_x f(x)$

b2
$z = argmax_{x in mathcal{X}} f(x)$


a3 (don't do this)
$z = argmaxlimits_x f(x)$

b3 (or this)
$z = argmaxlimits_{x in mathcal{X}} f(x)$


c
begin{align*}
z &= argmax_x f(x)
z &= argmax_{x in mathcal{X}} f(x)
end{align*}




end{document}

Correct answer by David Carlisle on March 1, 2021

Try using underset{belowtext}{text}.

Note below that:

  • mathrm is for using non-italics Roman font in math mode.
  • , is for adding a thin space
z = underset{x}{mathrm{argmax}}, f(x)

enter image description here

Answered by stackoverflowuser2010 on March 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP