Question

How to place a character below a function in Latex?

Is it possible to place a character or a formula below an other part of a larger formula in Latex?

foo f(x) = ...
 x

In case that this example is not clear. I'd like to make one of my custom functions - just defined as \text{foo} in a math environment - look like one of the built-in functions like sum, min or max which accept parameters that are placed above or below the function symbol.

Simply using \text{foo}_x does not work.

 21  106426  21
1 Jan 1970

Solution

 48

The function you're looking for is \underset provided by the amsmath package. Here's an example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\underset{below}{above}$
\end{document}

Output:

enter image description here

2011-05-18

Solution

 11

You can declare the foo as a math operator. Then use it in any equation environment. See below

\DeclareMathOperator*{\foo}{foo} %in preamble

\begin{align}
   \foo_x f(x) = ...
\end{align}
2011-05-19