The key for \label
and \ref
consists of ASCII letters, digits, and punctuation (LaTeX Companion, 2ed).
Package babel
does some hacking to allow its shorthands.
The key
is internally used to create a command \r@<key>
via \csname
. This can be broken by anything, which is not a character or does not expand to a letter. Accented letters quite often breaks this, depending on their implementation (packages inputenc
, fontenc
), examples:
Font encoding OT1
(default in LaTeX2e) does not have slots for the accented characters, thus is implementation uses the \accent
primitive, which cannot be used in \csname
.
The font encoding T1
has slots, thus it might work, e.g.:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
\section{Hello World}
\label{Molécules d'immunoglobulines}
\ref{Molécules d'immunoglobulines}
\end{document}
The .aux
file contains:
\newlabel{Mol\IeC {\'e}cules d'immunoglobulines}{{1}{1}}
The simple example works with this for of the accented letter, but there is no grantee that this works with all packages.
Best for accented characters are LuaLaTeX or XeLaTeX, when the accented characters are also ordinary letters at TeX level, because these TeX engines are capable of Unicode.