You can achieve the same as in egreg's answer, without amsmath
nor AtBeginDocument
trick:
\documentclass{article}
\newcommand\plim{\mathop{p\mkern2mu\mathrm{\mathchar"702D lim}}}
\begin{document}
$\plim_{a\to\infty}$
$\displaystyle\plim_{a\to\infty}$
\end{document}
Sometimes the math alphabet command \mathrm
does not use the same font as would be used in operator names. So the following slightly more complicated solution does it:
\makeatletter
\newcommand\plim{\mathop{p\mkern2mu{\operator@font\mathchar"702D lim}}}
\makeatother
And regarding the hardcoding of the text hyphen slot, ... well one can complicate the code if one wishes to go around this problem. By the way I am not sure I correctly understood the OP, as here I tried my best to use the hyphen slot (ascii code 45) from the a text font (shorter usually than a minus sign), and not a \textendash
which looks more like a minus sign.
(Sorry I got slightly confused in my explanations, as the math symbol font operators
(used - if it has not been modified - by \operator@font
) is not necessarily 'the' document 'text' font, not is it necessarily the font used by \mathrm
(although it is in the default set-up) but it is at any rate 'a' font, hence my striking out edit in the paragraph above.)
\DeclareMathOperator*{\plim}{-lim}
and use it in math mode asp\plim
and(p+q)\plim
. (Not very logic markup like …)\DeclareMathOperator*{\plim}{\mkern-1mu-lim}
and adjust. I didn't thought about a subscript, though. For that you still need the full operator without the need to manually align the subscript.