| 1 |
\NeedsTeXFormat{LaTeX2e}[1994/06/01] |
| 2 |
|
| 3 |
\ProvidesClass{tufte-book}[2015/06/21 v3.5.2 Tufte-book class] |
| 4 |
|
| 5 |
%% |
| 6 |
% Declare we're tufte-book |
| 7 |
\newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) |
| 8 |
\newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) |
| 9 |
|
| 10 |
%% |
| 11 |
% Load the common style elements |
| 12 |
\input{tufte-common.def} |
| 13 |
|
| 14 |
|
| 15 |
%% |
| 16 |
% Set up any book-specific stuff now |
| 17 |
|
| 18 |
%% |
| 19 |
% The front matter in Tufte's /Beautiful Evidence/ contains everything up |
| 20 |
% to the opening page of Chapter 1. The running heads, when they appear, |
| 21 |
% contain only the (arabic) page number in the outside corner. |
| 22 |
%\newif\if@mainmatter \@mainmattertrue |
| 23 |
\renewcommand\frontmatter{% |
| 24 |
\cleardoublepage% |
| 25 |
\@mainmatterfalse% |
| 26 |
\pagenumbering{arabic}% |
| 27 |
%\pagestyle{plain}% |
| 28 |
\fancyhf{}% |
| 29 |
\ifthenelse{\boolean{@tufte@twoside}}% |
| 30 |
{\fancyhead[LE,RO]{\thepage}}% |
| 31 |
{\fancyhead[RE,RO]{\thepage}}% |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
%% |
| 36 |
% The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page |
| 37 |
% numbering---it continues where it left off in the front matter. |
| 38 |
\renewcommand\mainmatter{% |
| 39 |
\cleardoublepage% |
| 40 |
\@mainmattertrue% |
| 41 |
\fancyhf{}% |
| 42 |
\ifthenelse{\boolean{@tufte@twoside}}% |
| 43 |
{% two-side |
| 44 |
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}% |
| 45 |
\fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title |
| 46 |
\fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title |
| 47 |
}% |
| 48 |
{% one-side |
| 49 |
\fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title |
| 50 |
}% |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
%% |
| 55 |
% The back matter contains appendices, indices, glossaries, endnotes, |
| 56 |
% biliographies, list of contributors, illustration credits, etc. |
| 57 |
\renewcommand\backmatter{% |
| 58 |
\if@openright% |
| 59 |
\cleardoublepage% |
| 60 |
\else% |
| 61 |
\clearpage% |
| 62 |
\fi% |
| 63 |
\@mainmatterfalse% |
| 64 |
} |
| 65 |
|
| 66 |
%% |
| 67 |
% Only show the chapter titles in the table of contents |
| 68 |
\setcounter{tocdepth}{0} |
| 69 |
|
| 70 |
%% |
| 71 |
% If there is a `tufte-book-local.sty' file, load it. |
| 72 |
|
| 73 |
\IfFileExists{tufte-book-local.tex}{% |
| 74 |
\@tufte@info@noline{Loading tufte-book-local.tex}% |
| 75 |
\input{tufte-book-local}% |
| 76 |
}{} |
| 77 |
|
| 78 |
%% |
| 79 |
% End of file |
| 80 |
\endinput |