# Appendix TOC link does not work when using Polyglossia (TeX Live 2015)

MWE:

\documentclass{book}

\usepackage{appendix}
\usepackage{hyperref}
\usepackage{polyglossia}
\setdefaultlanguage{spanish}

\begin{document}
\tableofcontents
\include{chapter1}
\begin{appendices}
\include{appendixA}
\end{appendices}
\end{document}


With this example, the TOC correctly points to the page number of the appendix, but the link does not work (it doesn't point anywhere). Using the PDF's table of contents does not work either. Using \appendix works, however.

What's weirder, this only happens with TeX Live 2015, as shipped in Ubuntu 16.04. It does not happen with the previous LTS version.

Is this a known bug? How can I solve it proper?

• Apéndice.a is the hyperanchor, which causes troubles. – user31729 Apr 24 '16 at 20:30

Since polyglossia allows unicode characters, the name Apéndice as content of \appendixname causes a problem for the hyperanchor that is to be set for the correct linking.

The appendix package defines \Hy@chapname to be \appendixname, which is Apéndice in this case → 'wrong'.

Redefining \Hy@chapname cures the problem -- just use a anchorname with 'regular' letters, i.e. no accents. etc.

\documentclass{book}

\usepackage{appendix}
\usepackage{polyglossia}

\setdefaultlanguage{spanish}

\usepackage{hyperref}

\makeatletter
\def\Hy@chapapp{#1}%
}
\makeatother

\begin{document}
\tableofcontents
\chapter{Chapter 1}
\begin{appendices}

• @amyspark: I can't check with TL 2013, unfortunately, but there have been some updates to polyglossia, but I think the issue is rather how xelatex builds up the links. – user31729 Apr 25 '16 at 13:29