LaTeX forum ⇒ Math & Scienceputting things under each other

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
tomasb47
Posts: 1
Joined: Sun Jan 27, 2019 11:17 am

putting things under each other

Postby tomasb47 » Sun Jan 27, 2019 1:46 pm

Dear All,

If I write $$\sup_y$$, Latex will produce a formula with "y" centered under the text string "sup".
Is there any way I can write a formula replacing the string "sup" by some
other string, for example by "maximize"? I can of course write $$\max_y$$
but I really want the string to be "maximize" and/or "minimize", and I want "y" to be centered under "maximize".
If I write $$\mbox{maximize}_y$$ then "Y" will only be a subscript. I cannot use $$\stackrel$$ since then I will
get the "y" above "maximize", and if I change the order then "maximize" will be out of line (above the main text line).
Hoping for help
/Tomas Bjork

User avatar
Stefan Kottwitz
Site Admin
Posts: 9434
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jan 27, 2019 6:09 pm

Hi Tomas,

welcome to the forum!

You could use \DeclareMathOperator* of amsmath:

  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \DeclareMathOperator*{\maximize}{maximize}
  4. \begin{document}
  5. $$\maximize_y$$
  6. \end{document}


operator.png
operator.png (5.5 KiB) Viewed 352 times


Stefan
Site admin


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 1 guest