From: Mark Wooding Date: Thu, 9 Oct 2008 13:05:44 +0000 (+0100) Subject: strayman: Allow turning off of hyperref. X-Git-Tag: 1.1.3~8 X-Git-Url: https://git.distorted.org.uk/~mdw/strayman/commitdiff_plain/2938496043f273a0e0c5c93e3c126df9731288cf strayman: Allow turning off of hyperref. Unfortunately hyperref really doesn't like strayman itself! --- diff --git a/strayman.dtx b/strayman.dtx index 6eca86c..1c983d3 100644 --- a/strayman.dtx +++ b/strayman.dtx @@ -35,7 +35,7 @@ %<+strayman> [2003/09/04 1.10 Straylight document class] % \end{meta-comment} % -% \CheckSum{3044} +% \CheckSum{3058} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -56,7 +56,7 @@ % \begin{meta-comment} % %<*driver> -\documentclass[10pt,a4paper,book]{strayman} +\documentclass[10pt,a4paper,book,nohyperref]{strayman} \input{mdwtools} \usepackage{mdwlist} \describesclass{strayman} @@ -194,6 +194,7 @@ \newif\if@numbering\@numberingtrue \newif\if@herefloats\@herefloatsfalse \newif\if@runinsubsubsec\@runinsubsubsectrue +\newif\if@hyperref\@hyperreftrue \newif\if@indentpar \newdimen\pagesurround \let\headfam\rmfamily @@ -285,6 +286,8 @@ \DeclareOption{indentpar}{\@indentpartrue} \DeclareOption{noindentpar}{\@indentparfalse} \DeclareOption{book}{\@titlepagetrue\@articlefalse} +\DeclareOption{hyperref}{\@hyperreftrue} +\DeclareOption{nohyperref}{\@hyperreffalse} % \end{macrocode} % % \subsection{Set up the options} @@ -306,11 +309,19 @@ \ifpdfing \pdfpageheight\paperheight \pdfpagewidth\paperwidth +\fi +\if@hyperref \AtEndOfClass{% \RequirePackage[% - pdftex, bookmarks = true, bookmarksnumbered = true, bookmarksdepth = 3, - colorlinks = true, linkcolor = blue, breaklinks = true]{hyperref} + bookmarks = true, bookmarksnumbered = true, bookmarksdepth = 3, + colorlinks = true, linkcolor = blue, citecolor = blue, + breaklinks = true]{hyperref} } + \ifpdfing + \PassOptionsToPackage{pdftex}{hyperref} + \else + \PassOptionsToPackage{dvips}{hyperref} + \fi \fi % \end{macrocode} %