0

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.

epR8GaYuh
  • 2,432
Gravifer
  • 103
  • 1
  • 5
  • Try loading hyperref the last package. – hesham Jul 29 '20 at 10:24
  • @hesham I have tested and it seems that with any order of these four package the problem persists. This being said, I have been using the current sequence to mitigate conflicts with xr and other packages. – Gravifer Jul 29 '20 at 11:36
  • There is a warning, but is there a problem? – tanGIS Aug 01 '20 at 09:29

1 Answers1

0

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}

Ulrike Fischer
  • 327,261