1

I need referencing from an equation, such as:

\documentclass{article}
\usepackage{amssymb,amsmath}
\begin{document}
\begin{equation} \label{eq:1}
 y+x=3
\end{equation}
 some text \ref{eq:1} some text  
\end{document}

will result in: 'some text Eq.(1) some text'. Not just number, but with Eq. or 'Equation' insert before the number in brackets.

  • 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 Feb 15 '15 at 15:26
  • If you use amssymb and amsmath, I suggest to use \eqref{eq:1} instead of \ref{eq:1}, but I can't reproduce Eq.(1). There must be something in between – user31729 Feb 15 '15 at 15:33
  • I've tried already, it only produce (1) and not Eq.(1). – user1893912 Feb 15 '15 at 15:35
  • So what's the question then, if it does not show Eq.(1)? – user31729 Feb 15 '15 at 15:35
  • I need the referencing in the text to be 'Eq.(1)', not just '(1)'. – user1893912 Feb 15 '15 at 15:37
4

Use cleveref.

\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{cleveref}
\crefname{equation}{Eq.}{Eqs.}
\begin{document}
\begin{equation} \label{eq:1}
 y+x=3
\end{equation}
 some text \cref{eq:1} some text
\end{document}

enter image description here

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