# Text directly over objects

• Nov 29th 2008, 03:53 PM
Mathstud28
Text directly over objects
I know how to do things like $\displaystyle \overbrace{\longrightarrow}^{\text{yay!}}$...but how would I do this $\displaystyle \longrightarrow^{\text{yay!}}$ but have it centered over the arrow. Same thing for something under like $\displaystyle \max\left(\xi\right)_{x\in(-1,1)}$
• Nov 29th 2008, 03:57 PM
Chris L T521
Quote:

Originally Posted by Mathstud28
I know how to do things like $\displaystyle \overbrace{\longrightarrow}^{\text{yay!}}$...but how would I do this $\displaystyle \longrightarrow^{\text{yay!}}$ but have it centered over the arrow. Same thing for something under like $\displaystyle \max\left(\xi\right)_{x\in(-1,1)}$

Try \xrightarrow{yay!} ... $\displaystyle \xrightarrow{yay!}$

The general syntax is \xrightarrow[subscript]{superscript} (also works for \xleftarrow)
• Nov 29th 2008, 04:00 PM
Mathstud28
Quote:

Originally Posted by Chris L T521
Try \xrightarrow{yay!} ... $\displaystyle \xrightarrow{yay!}$

The general syntax is \xrightarrow[subscript]{superscript} (also works for \xleftarrow)

$\displaystyle \xrightarrow{\text{yay!}}$

$\displaystyle \xmax[x\in(-1,1)]$

$\displaystyle \xrightarrow[\text{yay!}]$

It does not work for non-arrows? And I cannot seem to get the text under the arrow.
• Nov 29th 2008, 04:06 PM
Chris L T521
Quote:

Originally Posted by Mathstud28
$\displaystyle \xrightarrow{\text{yay!}}$

$\displaystyle \xmax[x\in(-1,1)]$

$\displaystyle \xrightarrow[\text{yay!}]{}$

It does not work for non-arrows? And I cannot seem to get the text under the arrow.

Fixed the third one... it should be \xrightarrow[\text{yay!}]{}

For the second one, use the \limits command: \max\limits_{x\in(-1,1)} gives you $\displaystyle \max\limits_{x\in(-1,1)}$.
• Nov 30th 2008, 01:18 AM
flyingsquirrel
Quote:

Originally Posted by Chris L T521
For the second one, use the \limits command: \max\limits_{x\in(-1,1)} gives you $\displaystyle \max\limits_{x\in(-1,1)}$.

Why do you use the \limits command, Chris ? \max_{x\in(-1,1)} gives $\displaystyle \max_{x\in(-1,1)}$ too.
• Nov 30th 2008, 01:21 AM
Mathstud28
Quote:

Originally Posted by flyingsquirrel
Why do you use the \limits command, Chris ? \max_{x\in(-1,1)} gives $\displaystyle \max_{x\in(-1,1)}$ too.

$\displaystyle \max_{x\in(-1,1)}(\xi)$

Thank you Flyingsquirrel, the problem was the order I was writing. I was writing $$\max(\xi)_{x\in(-1,1)}$$
• Nov 30th 2008, 01:28 AM
Moo
$\displaystyle \stackrel{yup}{\longrightarrow}$

\stackrel{yup}{\longrightarrow}
• Nov 30th 2008, 01:50 AM
Mathstud28
Quote:

Originally Posted by Moo
$\displaystyle \stackrel{yup}{\longrightarrow}$

\stackrel{yup}{\longrightarrow}

$\displaystyle \stackrel{\stackrel{thank}{you}}{\longrightarrow}$
• Nov 30th 2008, 02:08 AM
Moo
$\displaystyle \stackrel{\displaystyle{\stackrel{thank}{you}}}{\l ongrightarrow}$

does it look better ?
It depends on how you want to use it, \displaystyle looks more useful for a three lines stuff.
• Nov 30th 2008, 02:34 AM
flyingsquirrel
Quote:

Originally Posted by Moo
\displaystyle looks more useful for a three lines stuff.

\substack gives a nice result : $\displaystyle \stackrel{\substack{\text{a two lines}\\ \text{stuff} }}{\longrightarrow}$, $\displaystyle \stackrel{\substack{\text{and a } \\ \text{three lines}\\ \text{stuff} }}{\longrightarrow}$.

To write the whole proof over the arrow, use Chris' solution : $\displaystyle f(x)\xrightarrow[x\to0]{\text{Let }\varepsilon>0.\,\text{According to the previous lemma, if one lets}\,\delta=\ldots }\pi$.