Do you know how to create a command like \verb with completely custom format?
TeX's \def command supports this variant:
\def\eqn #1 $#2${\begin{equation}%
\label{eq:#1}%
#2%
\end{equation}}
After that, you can use this as follows:
\eqn emc $e=mc^2$
Often, you need to create a variant of a command with a star (just like \newcommand and \newcommand*)
(
Read more... )