当使用tufte-book
或tufte-handout
文档类时,如果将旁注或边注放在以超链接结尾的行上,并且该超链接延续到下一行(即,超链接在该行末尾中断),则旁注/边注将采用链接的颜色。
下面的 MWE 显示了这种行为。缩短长链接,使它们不再中断到下一行,从而消除了相应边际材料的色彩。
\documentclass{tufte-book}
\hypersetup{colorlinks}
\begin{document}
Here is my label.\label{label}
This\sidenote{this is colored} \hyperref[label]{is a very very very very long link that breaks onto the next line}.
This\sidenote{this is not} \hyperref[label]{is a short link}.
This\marginnote{this is colored} \hyperref[label]{is a very very very very long link that breaks onto the next line}.
This\marginnote{this is not} \hyperref[label]{is a short link}.
\end{document}
在这种情况下,如何防止边缘材料呈现链接颜色?
答案1
所描述的行为看起来像是一个错误。作为一种解决方法,您可以明确设置侧边注和边注的颜色:
\documentclass{tufte-book}
\hypersetup{colorlinks}
\setsidenotefont{\color{black}\footnotesize} <-- set the color and font here
\setmarginnotefont{\color{black}\footnotesize} <-- and here
\begin{document}
Here is my label.\label{label}
This\sidenote{this is colored} \hyperref[label]{is a very very very very long link that breaks onto the next line}.
This\sidenote{this is not} \hyperref[label]{is a short link}.
This\marginnote{this is colored} \hyperref[label]{is a very very very very long link that breaks onto the next line}.
This\marginnote{this is not} \hyperref[label]{is a short link}.
\end{document}
这将为您提供纯黑色的边注和边注: