when I label an equation in the equation environment and refer to it via \ref{eq1} and when I write in the text

 Eq. \ref{eq1}

there is a one more white space between Eq. and the reference.

  • 2
    Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format- in particular, could you explicitly say what your question is? – cmhughes Oct 20 '13 at 15:51
  • I dont want the additional space between Eq and the number of the equation – lambda1990 Oct 20 '13 at 15:59

This is most likely a visual difference due to the Eq. being considered an end-of-sentence space. You can avoid this by forcing a regular space (that is, Eq.\ \ref{eq1}), or even better, use Eq.~\ref{eq1}, or even more better, add \usepackage{amsmath} to your document preamble and use Eq.~\eqref{eq1}.

Here are the options, visually:

enter image description here

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
A simple quadratic equation:
  f(x) = ax^2 + bx + c \label{quadratic}
\indent See Eq. \ref{quadratic}. \par
See Eq.\ \ref{quadratic}. \par
See Eq.~\ref{quadratic}. \par
See Eq.~\eqref{quadratic}.
  • I have to hand out may bchelor thesis tomorrow and I have a lot of Eq. and I dont want to change this manually. Can I do this via a renewcommand? :-) – lambda1990 Oct 20 '13 at 16:50
  • @lambda1990: That's unfortunate. Do you use any cross-referencing packages that could influence the way \ref works? Like varioref, cleveref, hyperref, ...? – Werner Oct 20 '13 at 16:54
  • 1
    @lambda1990: Why not just do a search-and-replace for Eq. to Eq.~? – Werner Oct 20 '13 at 17:02
  • 1
    Do a global search and replace of Eq. \ref -> Eq.~\ref. – Mico Oct 20 '13 at 17:02
  • @lambda1990: A really ambitious attempt would be to use \let\oldref\ref \def\ref{\unskip\nobreakspace\oldref} in your preamble. But then you can't use \eqref, and other things may break... undoubtedly. – Werner Oct 20 '13 at 17:30

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.