Remove explicit handling of `colorlinks', following the suit of ctex.

Note that `colorlinks' as a document class option is still effective,
since hyperref can still detect the global option anyway.
This commit is contained in:
Casper Ti. Vector 2015-12-16 20:28:58 +08:00
parent 843c88bec3
commit 76c3d24785
5 changed files with 5 additions and 43 deletions

View File

@ -14,11 +14,7 @@
% 采用了自定义的(包括大小写不同于原文件的)字体文件名,
% 并改动 ctex.cfg 等配置文件的用户请自行加入 nofonts 选项;
% 其它用户不用加入 nofonts 选项,加入之后反而会产生错误。
%
% 图书馆要求电子版论文的目录必须为黑色,
% 且某些教务要求打印版论文的文字部分为纯黑色而非灰度打印,
% 【因此最终打印和提交论文前请将“colorlinks”改为“nocolorlinks”。】
\documentclass[UTF8, colorlinks]{pkuthss}
\documentclass[UTF8]{pkuthss}
% 使用 biblatex 排版参考文献,并规定其格式(详见 biblatex-caspervector 的文档)。
% 这里按照英文文献在前中文文献在后排序“sorting = ecnty”
@ -53,12 +49,6 @@
\def\pkuthssffaq{%
\emph{\textcolor{red}{pkuthss 文档模版最常见问题:}}
在最终打印和提交论文之前,
请将 pkuthss 文档类选项中的 %
\texttt{colorlinks} 替换为 \texttt{nocolorlinks}
因为图书馆要求电子版论文的目录必须为黑色,
且某些教务要求打印版论文的文字部分为纯黑色而非灰度打印。
\texttt{\string\cite}\texttt{\string\parencite} %
\texttt{\string\supercite} 三个命令分别产生%
未格式化的、带方括号的和上标且带方括号的引用标记:%

View File

@ -132,14 +132,6 @@
pdf 文档属性的设定。%
}
\item \textbf{\texttt{[no]colorlinks}}\footnote{%
此选项等价于 1.3 及以前版本 pkuthss-extra 宏包
\texttt{[no]linkcolor} 选项,
但后来发现这会和 hyperref 宏包的一个同名选项冲突,
故改为 \texttt{[no]colorlinks}%
}
是否在生成的 pdf 文档中使用彩色的链接。
\item \textbf{其余文档类选项}%
pkuthss 文档类以 ctexbook 文档类为基础,
其接受的其余所有文档类选项均被传递给 ctexbook。
@ -159,15 +151,6 @@
\documentclass[openany, ...]{pkuthss} % 每章从任意页开始。
\end{Verbatim}
又例如,图书馆要求电子版论文的目录必须为黑色,
且某些教务要求打印版论文的文字部分为纯黑而非灰度打印。
此时用户\myemph{%
可以启用 \texttt{nocolorlinks} 选项,使所有的链接变为黑色,以免影响提交%
}
\begin{Verbatim}[frame = single]
\documentclass[..., nocolorlinks]{pkuthss} % “...”代表其它的选项。
\end{Verbatim}
\section{pkuthss 文档类提供的命令和环境}
\subsection{设定文档信息的命令}

View File

@ -31,9 +31,8 @@
\chapter{问题及其解决}
\section{文档中已经提到的常见问题(按重要性排序)}
文档默认情况下是双面模式,章末可能产生空白页,详见第 \ref{sec:options} 节。
最终打印和提交论文前,需设定 \verb|nocolorlinks| 选项,
具体细节见第 \ref{sec:options} 节。
文档默认情况下是双面模式,章末可能产生空白页,
解决方式见第 \ref{sec:options} 节。
通过一些设置,还可以满足例如被引用的文献按照引用顺序排序,
而未引用的文献按照英文文献在前、中文文献在后排序这样的需求,

View File

@ -28,7 +28,7 @@
% chap/pkuthss-encl1.tex
% chap/pkuthss-acknowledge.tex
\documentclass[UTF8, colorlinks]{pkuthss}
\documentclass[UTF8]{pkuthss}
\usepackage[backend = biber, style = caspervector, utf8, sorting = ecnty]{biblatex}
\usepackage{fancyvrb}
@ -39,6 +39,7 @@
\setlength{\bibitemsep}{3bp}
\renewcommand*{\bibfont}{\zihao{5}\linespread{1.27}\selectfont}
\hypersetup{colorlinks = true, allcolors = blue}
\newcommand{\myemph}[1]{\emph{\textcolor{red}{#1}}}
\newcommand{\unemph}[1]{\textup{\textcolor{black}{#1}}}
\newcommand{\docversion}{v1.6.4}

View File

@ -58,8 +58,6 @@
% Whether to automatically set up properties for generated PDF from user
% defined document information (author, title, etc.).
\pkuthss@int@boolopt{pdfprop}{true}
% Whether to use coloured hyperlinks in generated PDF.
\pkuthss@int@boolopt{colorlinks}{true}
% Pass all other options to `ctexbook' document class.
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
% Process all class options now.
@ -217,15 +215,6 @@
% act as wished.
\renewcommand\maketitle{\setpdfproperties\pkuthss@tmp@maketitle}
\fi
\ifpkuthss@opt@colorlinks
% Use coloured hyperlinks in generated PDF.
\hypersetup{colorlinks = true, allcolors = blue}
\else
% Set hyperlink colour to black in order to prevent hyperlinks from being
% too hard-to-recognise in printed thesis.
\hypersetup{hidelinks}
\fi
}
% eg. `\pkuthss@int@infoitema{ctitle}' will expand to: