我在文章中附加文件时遇到问题。它返回 2 个错误:一个与 有关color
,另一个与hyperref
:
!LaTeX 错误:包的选项冲突
color
。!LaTeX 错误:包的选项冲突
hyperref
。
这是我的 MWE:
\documentclass[11pt,spanish]{article}
\usepackage[utf8]{inputenc}
\usepackage[unicode]{attachfile}
\usepackage[usenames,dvipsnames]{color}
\usepackage[bookmarks=true,
bookmarksnumbered=false, % true means bookmarks in
% left window are numbered
bookmarksopen=false, % true means only level 1
% are displayed.
colorlinks=true,
linkcolor=rojo_javi,
urlcolor=azul_alberto]{hyperref}
\definecolor{webgreen}{rgb}{0, 0.5, 0} % less intense green
\definecolor{webblue}{rgb}{0, 0, 0.5} % less intense blue
\definecolor{webred}{rgb}{0.5, 0, 0} % less intense red
\definecolor{dblackcolor}{rgb}{0.0,0.0,0.0}
\definecolor{dbluecolor}{rgb}{.01,.02,0.7}
\definecolor{dredcolor}{rgb}{0.8,0,0}
\definecolor{dgraycolor}{rgb}{0.30,0.3,0.30}
\definecolor{azul_alberto}{rgb}{.01,.02,0.9}
\definecolor{rojo_javi}{rgb}{0.5, 0, 0}
\begin{document}
\section{Education}
\attachfile[icon=PushPin]{files/z_LM7805_datasheet.pdf}
\end{document}
我能做些什么??
答案1
加载hyperref
并使用以下方法更改设置\hypersetup
:
\documentclass{article}
\usepackage{attachfile2}
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{azul_alberto}{rgb}{.01,.02,0.9}
\definecolor{rojo_javi}{rgb}{0.5, 0, 0}
\usepackage{hyperref}
\hypersetup{
bookmarksnumbered=false, % true means bookmarks in
% left window are numbered
bookmarksopen=false, % true means only level 1
% are displayed.
colorlinks=true,
linkcolor=rojo_javi,
urlcolor = azul_alberto
}
\begin{document}
\section{Education}
\attachfile[icon=PushPin]{example-image.pdf}
\end{document}
另外,使用attachfile2
。