diff --git a/sample-book.pdf b/sample-book.pdf index 23810b9..f4d0929 100644 Binary files a/sample-book.pdf and b/sample-book.pdf differ diff --git a/sample-book.tex b/sample-book.tex index f7c068e..fa176af 100644 --- a/sample-book.tex +++ b/sample-book.tex @@ -1,6 +1,6 @@ \documentclass{tufte-book} -%\hypersetup{colorlinks}% uncomment this line if you prefer colored hyperlinks (e.g., for onscreen viewing) +\hypersetup{colorlinks}% uncomment this line if you prefer colored hyperlinks (e.g., for onscreen viewing) %% % Book metadata @@ -187,6 +187,10 @@ under the License.\index{license} % r.5 contents \tableofcontents +\listoffigures + +\listoftables + % r.7 dedication \cleardoublepage ~\vfill diff --git a/sample-handout.pdf b/sample-handout.pdf index ccfca52..d6d550e 100644 Binary files a/sample-handout.pdf and b/sample-handout.pdf differ diff --git a/tufte-common.sty b/tufte-common.sty index b7b14da..6e840d5 100644 --- a/tufte-common.sty +++ b/tufte-common.sty @@ -1330,25 +1330,84 @@ % Formatting for main TOC (printed in front matter) % {section} [left] {above} {before w/label} {before w/o label} {filler + page} [after] -\ifthenelse{\boolean{@tufte@toc}} - {\titlecontents{chapter}% +\ifthenelse{\boolean{@tufte@toc}}{% + \titlecontents{part}% FIXME [0em] % distance from left margin - {\begin{fullwidth}\fontsize{13pt}{18pt}\selectfont} % above (global formatting of entry) - {\contentslabel{2em}\rmfamily\itshape} % before w/label (label = ``Chapter 1'') - {\rmfamily\itshape} % before w/o label - {\rmfamily\qquad\thecontentspage} % filler + page (leaders and page num) - [\vspace{1.5\baselineskip}\end{fullwidth}] % after - } - {} + {\vspace{1.5\baselineskip}\begin{fullwidth}\LARGE\rmfamily\itshape} % above (global formatting of entry) + {\contentslabel{2em}} % before w/label (label = ``II'') + {} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after + \titlecontents{chapter}% + [0em] % distance from left margin + {\vspace{1.5\baselineskip}\begin{fullwidth}\LARGE\rmfamily\itshape} % above (global formatting of entry) + {\hspace*{0em}\contentslabel{2em}} % before w/label (label = ``2'') + {\hspace*{0em}} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after + \titlecontents{section}% FIXME + [0em] % distance from left margin + {\vspace{0\baselineskip}\begin{fullwidth}\Large\rmfamily\itshape} % above (global formatting of entry) + {\hspace*{2em}\contentslabel{2em}} % before w/label (label = ``2.6'') + {\hspace*{2em}} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after + \titlecontents{subsection}% FIXME + [0em] % distance from left margin + {\vspace{0\baselineskip}\begin{fullwidth}\large\rmfamily\itshape} % above (global formatting of entry) + {\hspace*{4em}\contentslabel{4em}} % before w/label (label = ``2.6.1'') + {\hspace*{4em}} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after + \titlecontents{paragraph}% FIXME + [0em] % distance from left margin + {\vspace{0\baselineskip}\begin{fullwidth}\normalsize\rmfamily\itshape} % above (global formatting of entry) + {\hspace*{6em}\contentslabel{2em}} % before w/label (label = ``2.6.0.0.1'') + {\hspace*{6em}} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after +}{} -%\titlecontents{chapter}% -% [0em]% distance from left margin -% {\fontsize{12pt}{18pt}\selectfont}% above (global formatting of entry) -% {\textit}% before w/ label (label = ``Chapter 1'') -% {\textit}% before w/o label -% {\qquad\thecontentspage}% filler and page (leaders and page num) -% [\vspace{1.5\baselineskip}]% after +%% +% Format lists of figures/tables + +\renewcommand\listoffigures{% + \ifthenelse{\equal{\@tufte@class}{book}}% + {\chapter*{\listfigurename}}% + {\section*{\listfigurename}}% +% \begin{fullwidth}% + \@starttoc{lof}% +% \end{fullwidth}% +} + +\renewcommand\listoftables{% + \ifthenelse{\equal{\@tufte@class}{book}}% + {\chapter*{\listtablename}}% + {\section*{\listtablename}}% +% \begin{fullwidth}% + \@starttoc{lot}% +% \end{fullwidth}% +} + +\newcommand{\@tufte@lof@line}[2]{% + % #1 is the figure/table number and its caption text + % #2 is the page number on which the figure/table appears + \leftskip 0.0em + \rightskip 0em + \parfillskip 0em + \parindent 0.0em + \@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima 2.0em + \advance\leftskip\@tempdima + \null\nobreak\hskip -\leftskip + {#1}\nobreak\qquad\nobreak#2% + \par% +} +\renewcommand*\l@figure{\@tufte@lof@line} +\let\l@table\l@figure %%