# tilde between Figure (or Table) and number when \ref{…} with chemstyle and babel spanish

When I reference a figure or table in the text using \ref{something} it appears a tilde between Figura (or Tabla) and the number (something like Figura~1), but I realized it's only when using packages chemstyleand [spanish]{babel}

Here you have a MWE:

\documentclass[a4paper]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{chemstyle}

\begin{document}

\begin{figure}
\includegraphics[width=\textwidth]{lion}
\caption{esto es un león}\label{fig-lion}
\end{figure}
bla bla \ref{fig-lion} bla bla bla bla bla bla bla bla

\end{document}


I use TexShop on a Mac with OSX 10.10. The composition is done with LaTeX (pdfTex).

Is there any incompatibility between chemstyleand [spanish]{babel}? or any error of my settings?

Any help would be greatly appreciated.

• I've tried with some different languages and I've found it happens in spanish and galician. For catalan, italian, portuguese, french, romanian, latin, english, german, dutch, finnish, swedish... it works fine. – Pere Ferriol Aug 9 '15 at 10:27

It's a flaw in how babel handles active characters in labels. There are two options:
\usepackage[spanish.notilde]{babel}

\usepackage[spanish,safe=none]{babel}

• only the second option worked for me ( \usepackage[spanish.notilde, es-tabla]{babel} didn't work) as I'm using es-tabla in order to have Tabla instead of Cuadro, like this \usepackage[spanish,safe=none, es-tabla]{babel} – Pere Ferriol Aug 9 '15 at 16:58
• Write either spanish.tabla.notilde or spanish,es-tabla,es-notilde. – Javier Bezos Aug 10 '15 at 13:20