LaTeX forum ⇒ Math & ScienceExactly under max/min

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Roronoa Zoro
Posts: 1
Joined: Wed Mar 02, 2011 9:14 am

Exactly under max/min

Postby Roronoa Zoro » Wed Mar 02, 2011 9:33 am

When I write my code

\max_{0 \leq q \leq n-1}

the '0<= q <= n-1' does not show underneath the max, instead next to it but a little bit below. I want '0<= q <= n-1' exactly under the max.

Thank you


Recommended reading 2021: •
LaTeX Beginner's Guide LaTeX Cookbook
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Exactly under max/min

Postby Frits » Wed Mar 02, 2011 10:40 am

This only happens when you use an inline math environment. I agree that doesn't look okay, but if LaTeX would put the argument underneath the \max, your linespacing would need to be larger which doesn't look nice overall.
My advice would be to rewrite your sentence to announce an equation. Something like:
The function we want to maximize yields:
\max_{0 \leq q \leq n-1}
\end{equation} - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter

User avatar
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Exactly under max/min

Postby shadgrind » Wed Mar 02, 2011 4:09 pm

If you're OK with the possibility of the inline math part overlapping text on the line below, then there's a way of doing this so that the line spacing doesn't change:

We will now show that
$\smash{\displaystyle\max_{0 \leq q \leq n-1}} f(q) \le n$,
blah blah blah blah blah blah blah blah blah blah blah blah.

That will look like this:

inline.png (5.12 KiB) Viewed 107313 times

Notice that if I had one more "blah" then there would be some overlap. To avoid that you'd have to remove the \smash command, but that would cause extra space for the line below, which may look bad compared to the spacing between other lines:

inline2.png (5.76 KiB) Viewed 107313 times
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2

Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 1 guest