From 5c3c5ff11dae4f4562424fa0a5baeda1db198385 Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Fri, 2 Jan 2009 05:08:40 +0000 Subject: [PATCH] * Added a `notoc' option to suppress the Tufte-style table of contents. This may be useful if one wants more than just chapters listed in the TOC. git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@72 516e2f36-ce3a-0410-bea4-1d4a03f5df72 --- tufte-common.sty | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/tufte-common.sty b/tufte-common.sty index dcb79d6..67e5448 100644 --- a/tufte-common.sty +++ b/tufte-common.sty @@ -85,6 +85,13 @@ \setboolean{@tufte@twoside}{true} } +%% +% `notoc' option -- suppresses the Tufte-style table of contents + +\newboolean{@tufte@toc} +\setboolean{@tufte@toc}{true} +\DeclareOption{notoc}{\setboolean{@tufte@toc}{false}} +\DeclareOption{toc}{\setboolean{@tufte@toc}{true}} %% % `justified' option -- uses fully justified text (flush left and flush @@ -853,13 +860,16 @@ % Formatting for main TOC (printed in front matter) % {section} [left] {above} {before w/label} {before w/o label} {filler + page} [after] -\titlecontents{chapter}% - [0em] % distance from left margin - {\begin{fullwidth}\fontsize{13pt}{18pt}\selectfont} % above (global formatting of entry) - {\contentslabel{2em}\rm\itshape} % before w/label (label = ``Chapter 1'') - {\rm\itshape} % before w/o label - {\rm\qquad\thecontentspage} % filler + page (leaders and page num) - [\vspace{1.5\baselineskip}\end{fullwidth}] % after +\ifthenelse{\boolean{@tufte@toc}} + {\titlecontents{chapter}% + [0em] % distance from left margin + {\begin{fullwidth}\fontsize{13pt}{18pt}\selectfont} % above (global formatting of entry) + {\contentslabel{2em}\rm\itshape} % before w/label (label = ``Chapter 1'') + {\rm\itshape} % before w/o label + {\rm\qquad\thecontentspage} % filler + page (leaders and page num) + [\vspace{1.5\baselineskip}\end{fullwidth}] % after + } + {} %\titlecontents{chapter}% % [0em]% distance from left margin