strayman: Allow turning off of hyperref.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 9 Oct 2008 13:05:44 +0000 (14:05 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 9 Oct 2008 13:05:44 +0000 (14:05 +0100)
Unfortunately hyperref really doesn't like strayman itself!

strayman.dtx

index 6eca86c..1c983d3 100644 (file)
@@ -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>
 %
 %<*driver>
-\documentclass[10pt,a4paper,book]{strayman}
+\documentclass[10pt,a4paper,book,nohyperref]{strayman}
 \input{mdwtools}
 \usepackage{mdwlist}
 \describesclass{strayman}
 \newif\if@numbering\@numberingtrue
 \newif\if@herefloats\@herefloatsfalse
 \newif\if@runinsubsubsec\@runinsubsubsectrue
+\newif\if@hyperref\@hyperreftrue
 \newif\if@indentpar
 \newdimen\pagesurround
 \let\headfam\rmfamily
 \DeclareOption{indentpar}{\@indentpartrue}
 \DeclareOption{noindentpar}{\@indentparfalse}
 \DeclareOption{book}{\@titlepagetrue\@articlefalse}
+\DeclareOption{hyperref}{\@hyperreftrue}
+\DeclareOption{nohyperref}{\@hyperreffalse}
 %    \end{macrocode}
 %
 % \subsection{Set up the options}
 \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}
 %