Let us assume the following example:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\pt}{$p_{T}$}
\begin{document}
We analyse all cases of the transverse momentum \pt. First, let us
assume that $p_{T} \leq 50 \text{GeV}$.
\end{document}
The result is
It is inviting to use the command \pt in the second mathematical expression and write it like that
$\pt \leq 50 \text{GeV}$
In case I do it, I get the error
! Missing $ inserted.
<inserted text>
$
l.6 ...omentum \pt. First, let us assume that $\pt
\leq 50 \text{GeV}$.
Suggestions?


\ptis different of\pT) – Phelype Oleinik Dec 25 '17 at 19:12\ensuremathfor math macro – egreg Dec 25 '17 at 20:59