## LaTeX forum ⇒ Math & Science ⇒ Exactly 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

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

Zoro

LaTeXguide.org • LaTeX-Cookbook.net

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

### Exactly under max/min

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}$$

howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)

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

### Exactly under max/min

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 111377 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 111377 times
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2