# Hyperref: using abbreviated labels like Eq., but keep correct spacing after period

The following code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\renewcommand{\equationautorefname}{Eq.}
\renewcommand{\figureautorefname}{Fig.}

\begin{document}
$$\label{eq1} x = 3.$$
My reference to \autoref{eq1}.
\end{document}


produces output like "see Eq. 1" where the spacing will be an end-of-sentence spacing. Normally I would type something like Eq.\ 1 to prevent this. How to achieve this?

• Don't show only snippets, make a complete example that can be tested directly. – Ulrike Fischer Jun 24 '19 at 7:55
• I don't get an end of sentence space, I get the same spacing as Eq.~1 – daleif Jun 24 '19 at 8:20

The space is clearly an normal space (non-breaking) and not an end-of-sentence space. If you want a smaller space you can define the name to take an argument so that it "eats" this space, and replace it by e.g. \,:

\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}

\renewcommand{\equationautorefname}{Eq.}
\renewcommand{\figureautorefname}{Fig.}

\begin{document}
$$\label{eq1} x = 3.$$
My reference to  \autoref{eq1}.   %normal, non-breaking

\noindent My reference to Eq.\ 1. %normal

\noindent My reference to Eq. 1.  %end of sentence

\renewcommand{\equationautorefname}[1]{Eq.\,}

\noindent My reference to \autoref{eq1}. %small
\end{document}


• Thanks, not sure how I missed that. – Kappie001 Jun 24 '19 at 11:39