Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

I am trying to write an generalised limit operator, which look approximately like the standard \lim, except it has an additional symbol in front, connected by a hyphen (see example below). I would very much like this generalised limit to really look like the good old \lim; in particular, if I take limit over a variable x, then I would like the symbol x to be placed below. I almost managed to accomplish this by exploiting the old \lim, and adding the prefix:

> p \!\! - \!\! \lim_x 

However, if I replace x by a longer string (say, several variables), I get too much whitespace. I tried grouping the limit into a single object, like below, but this leads to the variable being placed right of the limit symbol, not below:

> {p \!\! - \!\! \lim}_x 

Could someone please advise me what is the best way of writing such a limit?

Here is a minimal example and the output.


Naive example: 
p-\lim_{x} f(x), \qquad
p-\lim_{x_1,x_2,\dots,x_n} f(x_1,x_2,\dots,x_n)

With \verb"\!" used for indentation, without grouping: 
p\!\!-\!\!\lim_{x} f(x), \qquad
p\!\!-\!\!\lim_{x_1,x_2,\dots,x_n} f(x_1,x_2,\dots,x_n)

With \verb"\!" used for indentation, plus grouping  : 
{p\!\!-\!\!\lim}_{x} f(x), \qquad
\operatorname{p\!\!-\!\!\lim}\limits_{x_1,x_2,\dots,x_n} f(x_1,x_2,\dots,x_n)


enter image description here

share|improve this question

marked as duplicate by egreg, Paul Gaborit, Torbjørn T., Joseph Wright Jul 28 '13 at 13:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Did you see tex.stackexchange.com/questions/73232/…? –  egreg Jul 28 '13 at 11:14
@egreg: No, I did not, but that looks very relevent. Thank you! –  Feanor Jul 28 '13 at 11:37

1 Answer 1

up vote 3 down vote accepted

You can use


in your preamble, which will define a command \plim which you can use in your document with, for example,

\plim_{x\to\infty} f(x)

This will produce a roman (upright) 'p'. If you want an italic 'p', the definition should be

share|improve this answer
The “p” will be upright, which probably isn't wanted. –  egreg Jul 28 '13 at 11:17
This is precisely what I needed, thank you! I replaced \DeclareMathOperator* by a \newcommand with \operatorname* so that I could replace p by other, but other than that, you solution works perfectly. –  Feanor Jul 28 '13 at 12:11
The right command is \mathnormal, but this is already covered in the question I linked as duplicate. –  egreg Jul 28 '13 at 12:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.