newpax 与 pdfpages 错误

newpax 与 pdfpages 错误

我试图在将多个 PDF 合并为一个带有目录的 PDF 时保留超链接。newpax似乎是这样,但我无法用这个 MWE 进行编译:

\documentclass[a4paper,11pt]{article}

\usepackage{ifxetex,ifluatex}

\usepackage[usenames, dvipsnames]{xcolor} % Required for specifying colours by name
\definecolor{htmlblue}{HTML}{0000EE}
\usepackage[bookmarks, colorlinks, breaklinks]{hyperref} % Required for links
\hypersetup{
    linkcolor=black,
    citecolor=black,
    urlcolor=htmlblue,
    pdftitle={$title$},
    pdfauthor={$author$},
}
\urlstyle{same}

\usepackage{pdfpages}
\includepdfset{pagecommand=\thispagestyle{plain}}

\usepackage{newpax}

\title{$title$}
\author{$author$}

\begin{document}
\maketitle
 
\bigskip

\tableofcontents

\phantomsection
\addcontentsline{toc}{section}{First PDF}
\includepdf[pages=-]{letter.pdf}
 
\phantomsection
\addcontentsline{toc}{section}{Second PDF}
\includepdf[pages=-]{article.pdf}

\end{document}

我收到的错误是:

Error producing PDF.
! Package newpax Error: PDF resource management code not found!
(newpax)                newpage will no work..

我找不到其他使用示例newpax。我做错了什么?

相关内容