你们中有谁熟悉classicthesis
和arsclassica
包吗?
我正在将它们用于我的博士论文,它们很棒,但我遇到了一个小问题。
classicthesis
定义\graffito{...}
用于在页面外边距添加小注释的命令。这些注释通常采用较小的黑色斜体 Times 字体格式。不幸的是,正如您在附图的顶部所看到的,如果您使用hyperref
(或其他包)为链接(或其他内容,如首字母缩略词)着色,并且其中一个链接跨越定义 a 的两行\graffito(...)
,则整个注释将获得链接的颜色。
我经常使用 LaTeX 撰写科学论文,因此我不太了解其内部工作原理。我设法在classicthesis
负责的源代码中隔离了以下代码\graffito{...}
。我认为在以下代码的第四行某处添加就足够了\color{black}
:注释实际上变成了黑色,但添加了一个空行(参见附图的底部)。您能告诉我如何修改它以避免它被链接着色吗?您能解释一下为什么吗?
% Graffiti as in GKP's book "Concrete Mathematics"
% thanks to Lorenzo Pantieri and Enrico Gregorio
\def\graffito@setup{%
\slshape\footnotesize% <=== I'm going to add \color{black} right here!
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
%\DeclareRobustCommand{\graffito}[1]{\marginpar%
% [\graffito@setup\raggedleft\hspace{0pt}{#1}]%
% {\graffito@setup\raggedright\hspace{0pt}{#1}}}
\let\oldmarginpar\marginpar
\renewcommand{\marginpar}[1]{\oldmarginpar%
[\graffito@setup\raggedleft\hspace{0pt}{#1}]%
{\graffito@setup\raggedright\hspace{0pt}{#1}}}
希望以下最小工作示例能帮到您。提前致谢!
\documentclass[paper=a4,fontsize=11pt,BCOR=5mm,twoside,open=right,titlepage,
headinclude,footinclude,captions=tableheading,numbers=noenddot,fleqn,
cleardoublepage=empty]{scrreprt}
\usepackage[pdftex]{hyperref}
\usepackage[smaller,printonlyused,withpage]{acronym}
\usepackage[dvipsnames,svgnames,x11names,table,fixpdftex,hyperref]{xcolor}
\usepackage[eulerchapternumbers,eulermath,beramono,pdfspacing,linedheaders]{classicthesis}
\usepackage{arsclassica}
\renewcommand{\bflabel}[1]{{#1}\hfill}
\renewcommand*{\acsfont}[1]{\textsmaller{\textsf{\textsc{\textbf{\color{webgreen}{#1}}}}}}
\renewcommand*{\acffont}[1]{\textsf{\textsc{\color{webgreen}{#1}}}}
\areaset[current]{336pt}{750pt}
\setlength{\marginparwidth}{7em}
\setlength{\marginparsep}{2em}
\pdfcompresslevel=9
\pdfadjustspacing=1
\hypersetup{
colorlinks=true, linktocpage=true, pdfstartpage=3, pdfstartview=FitV,%
breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,%
plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
hypertexnames=true, pdfhighlight=/O,%nesting=true,%frenchlinks,%
urlcolor=webbrown, linkcolor=RoyalBlue, citecolor=webgreen, %pagecolor=RoyalBlue,%
pdftitle={The Title},%
pdfauthor={\textcopyright\ Stefano},%
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX with hyperref and classicthesis}%
}
\begin{document}
\cleardoublepage
\acresetall
\chapter{A Chapter} % (fold)
\label{cha:a_chapter}
An application field\graffito{Technical domains} that is often cited
in this regard is that of \acp{WS} and \ac{SOA} in general.
\begin{acronym}[SOA]
\acro{SOA}{Service\--Oriented Architecture}
\acro{WS}{Web Service}
\end{acronym}
% chapter a_chapter (end)
\end{document}
答案1
\leavevmode
在命令前添加\color
。
grfguide
(请参阅LaTeX 颜色支持文档中关于此内容的脚注。(抱歉,这不是我的错:-)
所有驱动程序都会出现不同类型的问题。由于某些技术困难,
\footnote{
至少有两个原因:1) 的存在\texttt{\char`\\special}
\m{whatsit}
阻止了\texttt{\char`\\addvspace}
当前垂直列表上的“看到”空间,因此导致它错误地添加额外的垂直空间。2) A\m{whatsit}
作为 a 中的第一个项目\texttt{\char`\\vtop}
移动了框的参考点。}
%
\documentclass[paper=a4,fontsize=11pt,BCOR=5mm,twoside,open=right,titlepage,
headinclude,footinclude,captions=tableheading,numbers=noenddot,fleqn,
cleardoublepage=empty]{scrreprt}
\usepackage[pdftex]{hyperref}
\usepackage[smaller,printonlyused,withpage]{acronym}
\usepackage[dvipsnames,svgnames,x11names,table,fixpdftex,hyperref]{xcolor}
\usepackage[eulerchapternumbers,eulermath,beramono,pdfspacing,linedheaders]{classicthesis}
\usepackage{arsclassica}
\renewcommand{\bflabel}[1]{{#1}\hfill}
\renewcommand*{\acsfont}[1]{\textsmaller{\textsf{\textsc{\textbf{\color{webgreen}{#1}}}}}}
\renewcommand*{\acffont}[1]{\textsf{\textsc{\color{webgreen}{#1}}}}
\areaset[current]{336pt}{750pt}
\setlength{\marginparwidth}{7em}
\setlength{\marginparsep}{2em}
\pdfcompresslevel=9
\pdfadjustspacing=1
\hypersetup{
colorlinks=true, linktocpage=true, pdfstartpage=3, pdfstartview=FitV,%
breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,%
plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
hypertexnames=true, pdfhighlight=/O,%nesting=true,%frenchlinks,%
urlcolor=webbrown, linkcolor=RoyalBlue, citecolor=webgreen, %pagecolor=RoyalBlue,%
pdftitle={The Title},%
pdfauthor={\textcopyright\ Stefano},%
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX with hyperref and classicthesis}%
}
\makeatletter
\def\graffito@setup{%
\slshape\footnotesize% <=== I'm going to add \color{black} right here!
\leavevmode\color{black}%
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
\makeatother
\begin{document}