Browse Source

* Added [nohyper] documentclass option that suppresses loading of the hyperref

package.  Fixes issue 26.


git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@99 516e2f36-ce3a-0410-bea4-1d4a03f5df72
master
Kevin M. Godby 16 years ago
parent
commit
5c07f74422
5 changed files with 21 additions and 12 deletions
  1. BIN
      sample-book.pdf
  2. +0
    -2
      sample-book.tex
  3. BIN
      sample-handout.pdf
  4. +1
    -1
      sample-handout.tex
  5. +20
    -9
      tufte-common.sty

BIN
sample-book.pdf View File


+ 0
- 2
sample-book.tex View File

@@ -727,8 +727,6 @@ option will revert to \LaTeX's \textsc{toc} design.
\index{class options|)}


\chapter{Debug Stuff}


%%
% The back matter contains appendices, bibliographies, indices, glossaries, etc.


BIN
sample-handout.pdf View File


+ 1
- 1
sample-handout.tex View File

@@ -65,7 +65,7 @@ This style provides \textsc{a}- and \textsc{b}-heads (that is,
\Verb|\section| and \Verb|\subsection|), demonstrated above.

If you need more than two levels of section headings, you'll have to define
them yourself at the moment;\sidenote{See see ``\nameref{sec:defining-sections}'' on
them yourself at the moment;\sidenote{See the ``\nameref{sec:defining-sections}'' on
page~\pageref{sec:defining-sections} for help with defining more heading
levels.} there are no pre-defined styles for anything below a
\Verb|\subsection|. As Bringhurst points out in \textit{The Elements of


+ 20
- 9
tufte-common.sty View File

@@ -105,6 +105,14 @@
\DeclareOption{bidi}{\setboolean{@tufte@loadbidi}{true}}
\DeclareOption{nobidi}{\setboolean{@tufte@loadbibi}{false}}

%%
% `nohyper' option -- loads the bidi package for bi-directional text

\newboolean{@tufte@loadhyper}
\setboolean{@tufte@loadhyper}{true}
\DeclareOption{hyper}{\setboolean{@tufte@loadhyper}{true}}
\DeclareOption{nohyper}{\setboolean{@tufte@loadhyper}{false}}

% FIXME: should probably specify options not supported like Mittelbach's aipproc.cls

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@tufte@class}}
@@ -149,13 +157,16 @@
%%
% Load the `hyperref' package. We will set more options later.
% TODO Set nice defaults for hyperref options
\ifthenelse{\boolean{@tufte@xetex}}
{\RequirePackage[hyperfootnotes=false,xetex]{hyperref}}
{\RequirePackage[hyperfootnotes=false]{hyperref}}

\hypersetup{%
pdfborder = {0 0 0},
bookmarksdepth = section,
\ifthenelse{\boolean{@tufte@loadhyper}}{%
\ifthenelse{\boolean{@tufte@xetex}}
{\RequirePackage[xetex]{hyperref}}
{\RequirePackage{hyperref}}
\hypersetup{%
pdfborder = {0 0 0},
bookmarksdepth = section,
hyperfootnotes=false,
}%
}{%
}

%%
@@ -359,7 +370,7 @@
\ifthenelse{\isempty{#1}}%
{\renewcommand{\plaintitle}{\thanklesstitle}}% use thankless title
{\renewcommand{\plaintitle}{#1}}% use provided plain-text title
\hypersetup{pdftitle={\plaintitle}}% set the PDF metadata title
\ifthenelse{\boolean{@tufte@loadhyper}}{\hypersetup{pdftitle={\plaintitle}}}{}% set the PDF metadata title
}

\def\@author{}% default author is empty (suppresses LaTeX's ``no author'' warning)
@@ -373,7 +384,7 @@
\ifthenelse{\isempty{#1}}
{\renewcommand{\plainauthor}{\thanklessauthor}}% use thankless author
{\renewcommand{\plainauthor}{#1}}% use provided plain-text author
\hypersetup{pdfauthor={\plainauthor}}% set the PDF metadata author
\ifthenelse{\boolean{@tufte@loadhyper}}{\hypersetup{pdfauthor={\plainauthor}}}{}% set the PDF metadata author
}

\renewcommand*{\date}[1]{%


Loading…
Cancel
Save