![尝试使用 hyperref 包(使用 xelatex)时出现“使用...与其定义不匹配”错误](https://linux22.com/image/443851/%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%20hyperref%20%E5%8C%85%EF%BC%88%E4%BD%BF%E7%94%A8%20xelatex%EF%BC%89%E6%97%B6%E5%87%BA%E7%8E%B0%E2%80%9C%E4%BD%BF%E7%94%A8...%E4%B8%8E%E5%85%B6%E5%AE%9A%E4%B9%89%E4%B8%8D%E5%8C%B9%E9%85%8D%E2%80%9D%E9%94%99%E8%AF%AF.png)
我收到以下错误:
! Use of \HyColor@WithModel doesn't match its definition.
\@ifnextchar ... \reserved@d =#1\def \reserved@a {
#2}\def \reserved@b {#3}\f...
l.8 }
尝试使用以下文件运行时latexmk -xelatex
:
\documentclass[a4paper]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage[colorlinks]{hyperref}
\hypersetup{
citecolor = \color{MidnightBlue}
}
\title{The Title}
\author{John Doe}
\begin{document}
\maketitle
The quick brown fox jumps over the lazy dog.
\end{document}
这里的罪魁祸首似乎是\color
。当我给出一个标准颜色(例如red
)时hypersetup
,一切都正常。