leadsheets icon indicating copy to clipboard operation
leadsheets copied to clipboard

Special characters / Umlauts broken in PDF Index (hyperref package)

Open passing opened this issue 1 year ago • 0 comments

I am trying to create a PDF index from the sections of a document using the hyperref package. When the \section comes from the leadsheets songtemplate, the "Umlauts" coming form the song properties are not displayed correctly.

This test document can reproduce the issue:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\usepackage{hyperref}

\usepackage{leadsheets}

\setleadsheets{title-template=custom}

\definesongtitletemplate{custom}{\section{\songproperty{interpret}}}

\begin{document}

\section{ÄÖÜ 1}
hello world

\begin{song}{interpret={ÄÖÜ 2}}
\begin{verse}
^{Em}hello ^{Am}world
\end{verse}
\end{song}

\section{ÄÖÜ 3}
hello world

\end{document}

I have used the lastest texlive docker image to create the PDF:

docker run -ti -v "$(pwd):/data" -w /data --user $UID:$UID texlive/texlive pdflatex test.tex

In the resulting PDF file, the index entry coming from the template is broken:

image

passing avatar Aug 07 '22 22:08 passing