hyperxmp 和 authblk 之间的冲突

hyperxmp 和 authblk 之间的冲突

以下是 MWE:

\documentclass{article}

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

这会导致多次“PDF 字符串中不允许使用 token”警告。此问题可以在没有软件包的情况下重现pdfcomment,但这肯定会使情况变得更糟。

我相信在处理元数据时会发生一些事情;发生相关情况hyperref 的 pdfusetitle 选项因 authblk 而失败,但情况并不完全相同。

答案1

使用 设置 pdf 元数据的作者pdfauthor。然后 hyperxmp 将不再尝试从以不适合 pdf 元数据的方式重新定义的\author命令中获取它:authblk

\documentclass{article}

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

相关内容