Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to place a character below a function in Latex?

Tags:

math

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.

like image 584
t6d Avatar asked May 18 '11 17:05

t6d


People also ask

How do you write below in LaTeX?

The important things being: \underset which takes two arguments, the first is put under the second. \mathrm to make median appear upright and differentiate it from a multiplication of 6 variables named m, e, d, i, a, and n. \{ and \} need backslashes because { and } are part of the LaTeX base language.

How do you write below Sup in LaTeX?

To write text as a subscript, use an underscore followed by the text in curly brackets. The symbol "&" on its own is used as part of a code in LaTeX. To enter and use this symbol as a character, simply use the \& command. Commands written in the math environment appear in red.

How do you write under a formula in LaTeX Max?

In both the OP's use case and in my answer, \max is used in display math mode -- in which case it's not necessary to use \limits . If, in contrast, \max is used inline math mode, then \limits is indeed needed if the objective is to place the argument below "max".

What is $$ in LaTeX?

$$ ? LaTeX defines inline- and display-maths commands, apparently duplicating the TeX primitive maths sequences which surround maths commands with single (or pairs of) dollar signs. In fact, LaTeX's inline maths grouping, \( ... \) , has (almost) exactly the same effect as the TeX primitive version $ ...


2 Answers

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

like image 89
abcd Avatar answered Sep 30 '22 16:09

abcd


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}
like image 33
hanoosh Avatar answered Sep 30 '22 16:09

hanoosh