当 tufte-latex 中的超链接超过一行时,旁注和边注会改变颜色

当 tufte-latex 中的超链接超过一行时,旁注和边注会改变颜色

当使用tufte-booktufte-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}

tufte-latex 和 hyperref 彩色边注

在这种情况下,如何防止边缘材料呈现链接颜色?

答案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}

这将为您提供纯黑色的边注和边注:

在此处输入图片描述

相关内容