Rename linkcolor' to colorlnk' to avoid conflict with the hyperref package.

This commit is contained in:
Casper Ti. Vector 2011-12-22 00:18:06 +08:00
parent 8d695b75d0
commit 14bdbe9bff
4 changed files with 18 additions and 11 deletions

View File

@ -74,7 +74,7 @@
\item \textbf{\texttt{[no]tocbibind}}\footnote{%
“tocbibind”是%
\textbf{t}able \textbf{o}f \textbf{c}ontents”%
\textbf{bib}liography”和“\textbf{ind}ex”的缩写。
\textbf{bib}liography”和“\textbf{ind}ex”的缩写。%
}
启用 \verb|tocbibind| 选项后,%
\verb|\tableofcontents| 命令生成的目录中%
@ -95,7 +95,7 @@
基于上述考虑,%
\emph{%
pkuthss-extra 宏包默认启用 \texttt{nouppermark} 选项,
即在不在页眉中使用大写的章节名
即在不在页眉中使用大写的章节名%
}
\item \textbf{\texttt{[no]spechap}}\footnote{%
@ -120,19 +120,24 @@
则需在设定完文档信息之后自行调用%
\ref{ssec:misc} 小节中介绍的 %
\texttt{\string\setpdfmetadata} 命令以完成%
pdf 文档元数据的设定。
pdf 文档元数据的设定。%
}
\item \textbf{\texttt{[no]linkcolor}}
\item \textbf{\texttt{[no]colorlnk}}\footnote{%
此选项等价于低于 1.3 版的 pkuthss-extra 宏包%
\texttt{[no]linkcolor} 选项,
但后来发现这会和 hyperref 宏包的一个同名选项冲突,
故改为 \texttt{[no]colorlnk}%
}
是否在生成的 pdf 文档中使用彩色的链接。
\end{itemize}
例如,在提交打印版的论文时,
彩色的链接文字在黑白打印出来之后可能颜色会很浅。
此时用户可以启用 pkuthss-extra 宏包的 nolinkcolor 选项,
此时用户可以启用 pkuthss-extra 宏包的 nocolorlnk 选项,
使所有的链接变为黑色,以免影响打印:
\begin{Verbatim}[frame=single]
\documentclass[...,nolinkcolor]{pkuthss} % “...”代表其它的选项。
\documentclass[...,nocolorlnk]{pkuthss} % “...”代表其它的选项。
\end{Verbatim}
用户还可以进一步修改 \verb|img/| 目录中 %
\verb|pkulogo.eps| 和 \verb|pkuword.eps| 两个图片文件,

View File

@ -2,8 +2,8 @@
% Copyright (c) 2010-2011 Casper Ti. Vector
% Public domain.
% 在黑白打印时彩色链接可能变成浅灰色,此时可将“linkcolor”改为“nolinkcolor”。
\documentclass[UTF8,linkcolor]{pkuthss}
% 在黑白打印时彩色链接可能变成浅灰色此时可将“colorlnk”改为“nocolorlnk”。
\documentclass[UTF8,colorlnk]{pkuthss}
% 使得打字机粗体可以被使用。
\usepackage{lmodern}

View File

@ -61,7 +61,9 @@
% document information.
\pkuthssextra@int@boolopt{pdfmeta}{true}
% Whether to use coloured hyperlinks in generated PDF.
\pkuthssextra@int@boolopt{linkcolor}{true}
% Previously named `linkcolor', but this would crash with an option from
% `hyperref' with the same name.
\pkuthssextra@int@boolopt{colorlnk}{true}
% Process all class options now.
\ProcessOptions\relax
@ -163,7 +165,7 @@
\renewcommand\maketitle{\setpdfmetadata\pkuthssextra@tmp@maketitle}
\fi
\ifpkuthssextra@opt@linkcolor
\ifpkuthssextra@opt@colorlnk
% Use coloured hyperlinks in generated PDF.
\hypersetup{colorlinks=true}
\else

View File

@ -51,7 +51,7 @@
\pkuthss@int@extraopt{spechap}
\pkuthss@int@extraopt{upcite}
\pkuthss@int@extraopt{pdfmeta}
\pkuthss@int@extraopt{linkcolor}
\pkuthss@int@extraopt{colorlnk}
% Pass all other options to `ctexbook' document class.
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
% Process all class options now.