%<+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
% \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, urlcolor = blue,
+ breaklinks = true]{hyperref}
}
+ \ifpdfing
+ \PassOptionsToPackage{pdftex}{hyperref}
+ \else
+ \PassOptionsToPackage{dvips}{hyperref}
+ \fi
\fi
% \end{macrocode}
%
% \begin{macrocode}
\marginparpush5\p@
% \end{macrocode}
-%
+%
% Footnotes need some setting up now.
%
% \begin{macrocode}
%
% \begin{environment}{titlepage}
%
-% The \env{titlepage} environment typesets its contents on a title page.
+% The \env{titlepage} environment typesets its contents on a title page.
% The implementation is fairly straightforward: we just need to do some
% fiddling with two-column layouts. We also add in some hacking to make
% title pages centred properly, a bit like the \env{central} environment.
\@tempswafalse%
\fi%
\hbox{}\vfil%
- \begin{centrepage}%
\secdef\@part\@spart%
}
% \end{macrocode}
\addcontentsline{toc}{part}{#1}%
\fi%
\markboth{}{}%
+ \begin{centrepage}%
\centering%
\interlinepenalty\@M%
\reset@font%
%
% \begin{macrocode}
\def\@spart#1{%
+ \begin{centrepage}%
\centering%
\interlinepenalty\@M%
\reset@font%
% descenders, although obviously we must lower the rule if the heading really
% is very deep indeed.
%
-%
+%
% We'll approach this a bit at a time.
%
% \begin{macrocode}
% And now we can set the paragraph indent.
% \begin{macrocode}
\if@indentpar
- \parindent\leftmargini
+ \parindent1.2em
\else
\parindent\z@
\fi
\let\@listi\@listI
\@listi%
\def\@listii{%
+ \topsep\z@\@plus\p@%
\leftmargin\leftmarginii%
\labelwidth\leftmarginii%
\advance\labelwidth-\labelsep%
% \begin{macro}{\@dottedtocline}
%
% This is actually a part of the \LaTeX\ kernel, although it's not quite
-% right the way it is. We've improved the handling of line breaks after the
+% right the way it is. We've improved the handling of line breaks after the
% title.
%
% \begin{macrocode}
%
% The |passim| encapsulator is used to typeset the word `\textit{passim}'
% after a page range.
-%
+%
% \begin{macrocode}
\def\passim#1{#1 \textit{passim}} % Passim encapsulator for indices
% \end{macrocode}
\@combinefloats
\ifvoid\footins \else
\setbox\@outputbox \vbox {%
- \boxmaxdepth \@maxdepth
+ \boxmaxdepth \@maxdepth
\unvbox \@outputbox
\vskip \skip\footins
\vfil
\parindent\z@ \parskip\z@
\everypar{\parskip\parboxparskip\everypar{}}%
\linewidth\hsize
- \@totalleftmargin\z@
+ \@totalleftmargin\z@
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
\parfillskip\@flushglue \lineskip\normallineskip
\baselineskip\normalbaselineskip