[Tex/LaTex] Defining shortcuts

macros

I am using $\longrightarrow{}$ at many places in my document. I should say around two to three times per page.
I was wondering if there is a way to assign a shortcut (i.e. lra) and wherever I use lra it will put $\longrightarrow{}$.

So far I am getting by with Ctrl+C & Ctrl+V.

Best Answer

alt text

\documentclass{minimal}
\def\lra{\ensuremath\longrightarrow}
\def\lras{\ensuremath\longrightarrow\ }
\begin{document}
\noindent%
The \lra without a trailing space.

\noindent%
The \lras with a trailing space.
\end{document}
Related Question