[Tex/LaTex] How to insert words into equation numbering


I would like to produce equations that have numbers on the right hand side in the style of (eqn 1) rather (1). How would I do this, presumably using a user defined command, but I am having trouble with it.


x + y = 2 (eqn 1)

y = 5 + 4 (eqn 2)

Best Answer

You can go a simple way with

\renewcommand{\theequation}{eqn \arabic{equation}}

or with a fancier approach (see How to move amsmath equation label into LHS margin? for motivation)


% detach \eqref processing from \tag processing
% redefine \tagform@ to have “eqn” in front of the number
  \maketag@@@{(\ignorespaces eqn #1\unskip\@@italiccorr)}%


We reference equation~\eqref{a} which follows
x + y &= 2 \label{a}\\
y     &= 5 + 4

enter image description here