I am trying to use the argmin and the argmax commands that I defined in an algorithm but I keep getting the argument not in the middle but on the right. Does anyone have an idea how to put the argument in the middle.

2 Answers
2

$ introduces text style, you will need either \displaystyle or \limits.
(\sum, \int, \lim, … behave in the same manner: Display-style formulas have their super- and subscripts above and below the sign, in text-style formulas they are typeset like normal super- and subscripts.)

If you find both solutions unsatisfying you can define an additional command that has \limitsbuilt in: