diff --git a/sample-book.pdf b/sample-book.pdf index 6e66838..39058e6 100644 Binary files a/sample-book.pdf and b/sample-book.pdf differ diff --git a/sample-book.tex b/sample-book.tex index eb95dec..d08cca8 100644 --- a/sample-book.tex +++ b/sample-book.tex @@ -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. diff --git a/sample-handout.pdf b/sample-handout.pdf index cba3263..cc2f0b6 100644 Binary files a/sample-handout.pdf and b/sample-handout.pdf differ diff --git a/sample-handout.tex b/sample-handout.tex index 3d8309f..415ac25 100644 --- a/sample-handout.tex +++ b/sample-handout.tex @@ -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 diff --git a/tufte-common.sty b/tufte-common.sty index 5fb3310..6bcc0c3 100644 --- a/tufte-common.sty +++ b/tufte-common.sty @@ -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]{%