From 7d12103ae61422f6e5021eb0b5bfaf22f5cbf359 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 17 Jun 2010 07:47:42 -0400 Subject: [PATCH] Added blackref option and notes on overriding hyperref colors. --- drexel-thesis.dtx | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/drexel-thesis.dtx b/drexel-thesis.dtx index 5b9e7c2..41d499f 100644 --- a/drexel-thesis.dtx +++ b/drexel-thesis.dtx @@ -245,6 +245,10 @@ % \emph{do} want pretty, indented TOCs, like the \LaTeX\ defaults pass % \Lopt{indenttoc} to \cls{drexel-thesis}. % +% \DescribeOption{blackref} +% \Lopt{blackref} colors all \pkg{hyperref} links black, so they won't +% stand out in your printed document. +% % \DescribeOption{draftwatermark} % \Lopt{draftwatermark} adds ``DRAFT \meta{date}'' watermarks to each % page. A useful way to remember that the version you're looking at @@ -660,12 +664,25 @@ % \subsubsection{Hyperlinks} % % \cls{drexel-thesis} loads -% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}}. +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{% +% \pkg{hyperref}}. % with the options:\\ % \begin{tabular}{r p{0.8\textwidth}} % |colorlinks| & color the link letters instead of drawing colored boxes. \\ % \end{tabular} % +% The default \pkg{hyperref} colors can be a bit jarring. Feel free +% to use \Lopt{blackref} or override them yourself: +% \begin{example} +% \usepackage{xcolor} +% \definecolor{dark-gray}{gray}{0.3} +% \hypersetup{citecolor=dark-gray} +% \end{example} +% See +% \href{http://mirror.ctan.org/macros/latex/contrib/hyperref/doc/manual.pdf}{% +% the hyperref manual} (\S 3.4 Extension options) +% for a list of |*color| options. +% % If running with a pdftex-based driver, |\author|, |\title|, and % |\degree| automatically set |pdfauthor|, |pdftitle|, and % |pdfsubject| respectively. You can use the |\hypersetup| macro to @@ -736,6 +753,7 @@ \newif\if@boldpart \newif\if@dottedpart \newif\if@indenttoc +\newif\if@blackref \newif\if@draftwatermark \newif\if@mydraftwatermark \newif\if@indentfirst @@ -839,6 +857,14 @@ % \end{macrocode} % \end{option} % +% \begin{option}{blackref} +% Set \Lopt{blackref} flag +% \changes{0.13}{2010/06/17}{W.~Trevor King added blackref option.} +% \begin{macrocode} +\DeclareOptionX{blackref}{\@blackreftrue} +% \end{macrocode} +% \end{option} +% % \begin{option}{draftwatermark} % Set \Lopt{draftwatermark} flag % \begin{macrocode} @@ -1723,6 +1749,18 @@ % \begin{macrocode} \hypersetup{colorlinks} % \end{macrocode} +% If \Lopt{blackref} is set, set all \pkg{hyperref} colors to black. +% \begin{macrocode} +\if@blackref + \hypersetup{linkcolor=black} + \hypersetup{anchorcolor=black} + \hypersetup{citecolor=black} + \hypersetup{filecolor=black} + \hypersetup{menucolor=black} + \hypersetup{runcolor=black} + \hypersetup{urlcolor=black} +\fi +% \end{macrocode} % % \subsubsection{\pkg{hypcap}} % \label{sec:hypcap-inclusion} @@ -3239,7 +3277,7 @@ % \begin{macrocode} %<*example|example-draft> %% See drexel-thesis.pdf for details. -%\documentclass[subfig]{drexel-thesis} +%\documentclass[subfig,blackref]{drexel-thesis} %\documentclass[draft,subfig]{drexel-thesis} %% Enter the appropriate information here -- 2.26.2