TransWikia.com

Clash between hyperxmp and authblk

TeX - LaTeX Asked on October 1, 2021

Here is a MWE:

documentclass{article}

title{Title}
author{Author}
usepackage{hyperxmp}
usepackage{hyperref}
usepackage{authblk}
usepackage{pdfcomment}
begin{document}
maketitle
some text
end{document}

This leads to multiple "token not allowed in PDF string" warnings. This can be reproduced without the pdfcomment package, but it certainly makes things much worse.

I believe something happens when processing metadata; a related situation occurs hyperref’s pdfusetitle option fails with authblk, but the situation isn’t exactly the same.

One Answer

Set the author for the pdf metadata with pdfauthor. Then hyperxmp will no longer try to get it from the author command which authblk redefines in an way quite unsuitable for pdf metadata:

documentclass{article}

title{Title}
author{Author}
usepackage{hyperxmp}
usepackage[pdfauthor={Author}]{hyperref}
usepackage{authblk}
usepackage{pdfcomment}
begin{document}
maketitle
some text
end{document}

Correct answer by Ulrike Fischer on October 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP