X-Git-Url: https://git.distorted.org.uk/~mdw/strayman/blobdiff_plain/b8d14be93379e4a61ccb6d06a7c30a39dfe44481..a6bb7088656fd64c2011bc13ea06554ace78994b:/strayman.dtx

diff --git a/strayman.dtx b/strayman.dtx
index d1327ba..8c4304d 100644
--- a/strayman.dtx
+++ b/strayman.dtx
@@ -35,7 +35,7 @@
 %<+strayman>              [2003/09/04 1.10 Straylight document class]
 % \end{meta-comment}
 %
-% \CheckSum{3040}
+% \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}
@@ -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, urlcolor = blue,
+      breaklinks = true]{hyperref}
   }
+  \ifpdfing
+    \PassOptionsToPackage{pdftex}{hyperref}
+  \else
+    \PassOptionsToPackage{dvips}{hyperref}
+  \fi
 \fi
 %    \end{macrocode}
 %
@@ -1656,6 +1667,7 @@
 \let\@listi\@listI
 \@listi%
 \def\@listii{%
+  \topsep\z@\@plus\p@%
   \leftmargin\leftmarginii%
   \labelwidth\leftmarginii%
     \advance\labelwidth-\labelsep%
