# Change the tag for equations

I want to show my equations in the form (Eq. 1) instead of (1).

I am trying using \tag but this changes completely.

-
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Christian Hupfer Apr 28 '14 at 15:34
How should the equation numbers appear in cross-references: as (Eq. n), or as (n)? –  Mico Apr 28 '14 at 15:38

use

\documentclass[a5paper]{article}
\usepackage{amsmath}
\renewcommand\theequation{Eq.~\arabic{equation}}

\begin{document}
$$\label{eq:1} a^2+b^2=c^2$$
A cross-reference to equation~(\ref{eq:1}).
\end{document}


-
Thanks. It works! –  user2890946 Apr 28 '14 at 17:37
Is the word "equation" in the sentence "A cross-reference to equation (Eq. 1)" maybe redundant? –  Mico Apr 28 '14 at 17:45

You could use the \tagform@ macro of the amsmath package.

\documentclass{article}
\usepackage{amsmath}
\makeatletter % make "@" a letter-type symbol
\def\tagform@#1{\maketag@@@{(Eq.~#1\unskip\@@italiccorr)}}
\makeatother
\setlength\textwidth{2.5in} % just for this example
\begin{document}
$$\label{eq:1} a^2+b^2=c^2$$
A cross-reference to equation (\ref{eq:1}).
\end{document}

-
Thanks for the help. It works! –  user2890946 Apr 28 '14 at 17:38

You can use the mathtools package and define tagforms, i.e. the formatting of the equation tag. The \usetagform is a switch to a new formatting of the tag, and you can have several. It is better in that case to use the cleveref package for the cross-references, as the default \eqref uses the formatting of the last \usetagform that appears outside of a group, which may not be wanted:

\documentclass[12pt,a5paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier}
\usepackage{mathtools}
\usepackage{cleveref}
\usepackage{xcolor}

\newtagform{Eq}[\upshape]{(\text{Eq. }}{)}
\usetagform{Eq}
\newtagform{coloured}[\color{red}{[}]{}{]}

\begin{document}
Some stuff ...

$$\label{silly} a = b + c$$
As one can see in \cref{silly}, i. e.  in \eqref{silly}…
\usetagform{coloured}
$$\label{oomph} a² = b² + c²$$
or in \cref{oomph}, i. e.  in  \eqref{oomph}

$$\usetagform{default} \label{grump} a³ = b³ + c³$$
or in \cref{grump}, i. e.  in  \eqref{grump}

\end{document}


-
Thanks for the help. It works! –  user2890946 Apr 28 '14 at 17:37
I forgot to say that you can change tag form only locally, i.e. have different types of equations with different tag forms. –  Bernard Apr 28 '14 at 17:55