3

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

I am trying using \tag but this changes completely.

2
  • 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}. – user31729 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
2

use

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

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

enter image description here

1
  • 2
    Is the word "equation" in the sentence "A cross-reference to equation (Eq. 1)" maybe redundant? – Mico Apr 28 '14 at 17:45
4

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

enter image description here

\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}
\begin{equation}\label{eq:1}
a^2+b^2=c^2 
\end{equation}
A cross-reference to equation (\ref{eq:1}).
\end{document}
0
3

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 ...

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

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

\end{document} 

enter image description here

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.