Debian Codegraph @

texmf-dist/doc/latex/tufte-latex/sample-book.tex

raw
1 \documentclass{tufte-book}
2
3 \hypersetup{colorlinks}% uncomment this line if you prefer colored hyperlinks (e.g., for onscreen viewing)
4
5 %%
6 % Book metadata
7 \title{A Tufte-Style Book\thanks{Thanks to Edward R.~Tufte for his inspiration.}}
8 \author[The Tufte-LaTeX Developers]{The Tufte-LaTeX\ Developers}
9 \publisher{Publisher of This Book}
10
11 %%
12 % If they're installed, use Bergamo and Chantilly from www.fontsite.com.
13 % They're clones of Bembo and Gill Sans, respectively.
14 %\IfFileExists{bergamo.sty}{\usepackage[osf]{bergamo}}{}% Bembo
15 %\IfFileExists{chantill.sty}{\usepackage{chantill}}{}% Gill Sans
16
17 %\usepackage{microtype}
18
19 %%
20 % Just some sample text
21 \usepackage{lipsum}
22
23 %%
24 % For nicely typeset tabular material
25 \usepackage{booktabs}
26
27 %%
28 % For graphics / images
29 \usepackage{graphicx}
30 \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
31 \graphicspath{{graphics/}}
32
33 % The fancyvrb package lets us customize the formatting of verbatim
34 % environments. We use a slightly smaller font.
35 \usepackage{fancyvrb}
36 \fvset{fontsize=\normalsize}
37
38 %%
39 % Prints argument within hanging parentheses (i.e., parentheses that take
40 % up no horizontal space). Useful in tabular environments.
41 \newcommand{\hangp}[1]{\makebox[0pt][r]{(}#1\makebox[0pt][l]{)}}
42
43 %%
44 % Prints an asterisk that takes up no horizontal space.
45 % Useful in tabular environments.
46 \newcommand{\hangstar}{\makebox[0pt][l]{*}}
47
48 %%
49 % Prints a trailing space in a smart way.
50 \usepackage{xspace}
51
52 %%
53 % Some shortcuts for Tufte's book titles. The lowercase commands will
54 % produce the initials of the book title in italics. The all-caps commands
55 % will print out the full title of the book in italics.
56 \newcommand{\vdqi}{\textit{VDQI}\xspace}
57 \newcommand{\ei}{\textit{EI}\xspace}
58 \newcommand{\ve}{\textit{VE}\xspace}
59 \newcommand{\be}{\textit{BE}\xspace}
60 \newcommand{\VDQI}{\textit{The Visual Display of Quantitative Information}\xspace}
61 \newcommand{\EI}{\textit{Envisioning Information}\xspace}
62 \newcommand{\VE}{\textit{Visual Explanations}\xspace}
63 \newcommand{\BE}{\textit{Beautiful Evidence}\xspace}
64
65 \newcommand{\TL}{Tufte-\LaTeX\xspace}
66
67 % Prints the month name (e.g., January) and the year (e.g., 2008)
68 \newcommand{\monthyear}{%
69 \ifcase\month\or January\or February\or March\or April\or May\or June\or
70 July\or August\or September\or October\or November\or
71 December\fi\space\number\year
72 }
73
74
75 % Prints an epigraph and speaker in sans serif, all-caps type.
76 \newcommand{\openepigraph}[2]{%
77 %\sffamily\fontsize{14}{16}\selectfont
78 \begin{fullwidth}
79 \sffamily\large
80 \begin{doublespace}
81 \noindent\allcaps{#1}\\% epigraph
82 \noindent\allcaps{#2}% author
83 \end{doublespace}
84 \end{fullwidth}
85 }
86
87 % Inserts a blank page
88 \newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
89
90 \usepackage{units}
91
92 % Typesets the font size, leading, and measure in the form of 10/12x26 pc.
93 \newcommand{\measure}[3]{#1/#2$\times$\unit[#3]{pc}}
94
95 % Macros for typesetting the documentation
96 \newcommand{\hlred}[1]{\textcolor{Maroon}{#1}}% prints in red
97 \newcommand{\hangleft}[1]{\makebox[0pt][r]{#1}}
98 \newcommand{\hairsp}{\hspace{1pt}}% hair space
99 \newcommand{\hquad}{\hskip0.5em\relax}% half quad space
100 \newcommand{\TODO}{\textcolor{red}{\bf TODO!}\xspace}
101 \newcommand{\ie}{\textit{i.\hairsp{}e.}\xspace}
102 \newcommand{\eg}{\textit{e.\hairsp{}g.}\xspace}
103 \newcommand{\na}{\quad--}% used in tables for N/A cells
104 \providecommand{\XeLaTeX}{X\lower.5ex\hbox{\kern-0.15em\reflectbox{E}}\kern-0.1em\LaTeX}
105 \newcommand{\tXeLaTeX}{\XeLaTeX\index{XeLaTeX@\protect\XeLaTeX}}
106 % \index{\texttt{\textbackslash xyz}@\hangleft{\texttt{\textbackslash}}\texttt{xyz}}
107 \newcommand{\tuftebs}{\symbol{'134}}% a backslash in tt type in OT1/T1
108 \newcommand{\doccmdnoindex}[2][]{\texttt{\tuftebs#2}}% command name -- adds backslash automatically (and doesn't add cmd to the index)
109 \newcommand{\doccmddef}[2][]{%
110 \hlred{\texttt{\tuftebs#2}}\label{cmd:#2}%
111 \ifthenelse{\isempty{#1}}%
112 {% add the command to the index
113 \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2}}% command name
114 }%
115 {% add the command and package to the index
116 \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2} (\texttt{#1} package)}% command name
117 \index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% package name
118 }%
119 }% command name -- adds backslash automatically
120 \newcommand{\doccmd}[2][]{%
121 \texttt{\tuftebs#2}%
122 \ifthenelse{\isempty{#1}}%
123 {% add the command to the index
124 \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2}}% command name
125 }%
126 {% add the command and package to the index
127 \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2} (\texttt{#1} package)}% command name
128 \index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% package name
129 }%
130 }% command name -- adds backslash automatically
131 \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument
132 \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument
133 \newenvironment{docspec}{\begin{quotation}\ttfamily\parskip0pt\parindent0pt\ignorespaces}{\end{quotation}}% command specification environment
134 \newcommand{\docenv}[1]{\texttt{#1}\index{#1 environment@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
135 \newcommand{\docenvdef}[1]{\hlred{\texttt{#1}}\label{env:#1}\index{#1 environment@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
136 \newcommand{\docpkg}[1]{\texttt{#1}\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}}% package name
137 \newcommand{\doccls}[1]{\texttt{#1}}% document class name
138 \newcommand{\docclsopt}[1]{\texttt{#1}\index{#1 class option@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name
139 \newcommand{\docclsoptdef}[1]{\hlred{\texttt{#1}}\label{clsopt:#1}\index{#1 class option@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name defined
140 \newcommand{\docmsg}[2]{\bigskip\begin{fullwidth}\noindent\ttfamily#1\end{fullwidth}\medskip\par\noindent#2}
141 \newcommand{\docfilehook}[2]{\texttt{#1}\index{file hooks!#2}\index{#1@\texttt{#1}}}
142 \newcommand{\doccounter}[1]{\texttt{#1}\index{#1 counter@\texttt{#1} counter}}
143
144 % Generates the index
145 \usepackage{makeidx}
146 \makeindex
147
148 \begin{document}
149
150 % Front matter
151 \frontmatter
152
153 % r.1 blank page
154 \blankpage
155
156 % v.2 epigraphs
157 \newpage\thispagestyle{empty}
158 \openepigraph{%
159 The public is more familiar with bad design than good design.
160 It is, in effect, conditioned to prefer bad design,
161 because that is what it lives with.
162 The new becomes threatening, the old reassuring.
163 }{Paul Rand%, {\itshape Design, Form, and Chaos}
164 }
165 \vfill
166 \openepigraph{%
167 A designer knows that he has achieved perfection
168 not when there is nothing left to add,
169 but when there is nothing left to take away.
170 }{Antoine de Saint-Exup\'{e}ry}
171 \vfill
172 \openepigraph{%
173 \ldots the designer of a new system must not only be the implementor and the first
174 large-scale user; the designer should also write the first user manual\ldots
175 If I had not participated fully in all these activities,
176 literally hundreds of improvements would never have been made,
177 because I would never have thought of them or perceived
178 why they were important.
179 }{Donald E. Knuth}
180
181
182 % r.3 full title page
183 \maketitle
184
185
186 % v.4 copyright page
187 \newpage
188 \begin{fullwidth}
189 ~\vfill
190 \thispagestyle{empty}
191 \setlength{\parindent}{0pt}
192 \setlength{\parskip}{\baselineskip}
193 Copyright \copyright\ \the\year\ \thanklessauthor
194
195 \par\smallcaps{Published by \thanklesspublisher}
196
197 \par\smallcaps{tufte-latex.googlecode.com}
198
199 \par Licensed under the Apache License, Version 2.0 (the ``License''); you may not
200 use this file except in compliance with the License. You may obtain a copy
201 of the License at \url{http://www.apache.org/licenses/LICENSE-2.0}. Unless
202 required by applicable law or agreed to in writing, software distributed
203 under the License is distributed on an \smallcaps{``AS IS'' BASIS, WITHOUT
204 WARRANTIES OR CONDITIONS OF ANY KIND}, either express or implied. See the
205 License for the specific language governing permissions and limitations
206 under the License.\index{license}
207
208 \par\textit{First printing, \monthyear}
209 \end{fullwidth}
210
211 % r.5 contents
212 \tableofcontents
213
214 \listoffigures
215
216 \listoftables
217
218 % r.7 dedication
219 \cleardoublepage
220 ~\vfill
221 \begin{doublespace}
222 \noindent\fontsize{18}{22}\selectfont\itshape
223 \nohyphenation
224 Dedicated to those who appreciate \LaTeX{}
225 and the work of \mbox{Edward R.~Tufte}
226 and \mbox{Donald E.~Knuth}.
227 \end{doublespace}
228 \vfill
229 \vfill
230
231
232 % r.9 introduction
233 \cleardoublepage
234 \chapter*{Introduction}
235
236 This sample book discusses the design of Edward Tufte's
237 books\cite{Tufte2001,Tufte1990,Tufte1997,Tufte2006}
238 and the use of the \doccls{tufte-book} and \doccls{tufte-handout} document classes.
239
240
241 %%
242 % Start the main matter (normal chapters)
243 \mainmatter
244
245
246 \chapter{The Design of Tufte's Books}
247 \label{ch:tufte-design}
248
249
250 \newthought{The pages} of a book are usually divided into three major
251 sections: the front matter (also called preliminary matter or prelim), the
252 main matter (the core text of the book), and the back matter (or end
253 matter).
254
255 \newthought{The front matter} of a book refers to all of the material that
256 comes before the main text. The following table from shows a list of
257 material that appears in the front matter of \VDQI, \EI, \VE, and \BE
258 along with its page number. Page numbers that appear in parentheses refer
259 to folios that do not have a printed page number (but they are still
260 counted in the page number sequence).
261
262 \bigskip
263 \begin{minipage}{\textwidth}
264 \begin{center}
265 \begin{tabular}{lcccc}
266 \toprule
267 & \multicolumn{4}{c}{Books} \\
268 \cmidrule(l){2-5}
269 Page content & \vdqi & \ei & \ve & \be \\
270 \midrule
271 Blank half title page & \hangp{1} & \hangp{1} & \hangp{1} & \hangp{1} \\
272 Frontispiece\footnotemark{}
273 & \hangp{2} & \hangp{2} & \hangp{2} & \hangp{2} \\
274 Full title page & \hangp{3} & \hangp{3} & \hangp{3} & \hangp{3} \\
275 Copyright page & \hangp{4} & \hangp{4} & \hangp{4} & \hangp{4} \\
276 Contents & \hangp{5} & \hangp{5} & \hangp{5} & \hangp{5} \\
277 %Blank & -- & \hangp{6} & \hangp{6} & \hangp{6} \\
278 Dedication & \hangp{6} & \hangp{7} & \hangp{7} & 7 \\
279 %Blank & -- & \hangp{8} & -- & \hangp{8} \\
280 Epigraph & -- & -- & \hangp{8} & -- \\
281 Introduction & \hangp{7} & \hangp{9} & \hangp{9} & 9 \\
282 \bottomrule
283 \end{tabular}
284 \end{center}
285 \end{minipage}
286 \vspace{-7\baselineskip}\footnotetext{The contents of this page vary from book to book. In
287 \vdqi this page is blank; in \ei and \ve this page holds a frontispiece;
288 and in \be this page contains three epigraphs.}
289 \vspace{7\baselineskip}
290
291 \bigskip
292 The design of the front matter in Tufte's books varies slightly from the
293 traditional design of front matter. First, the pages in front matter are
294 traditionally numbered with lowercase roman numerals (\eg, i, ii, iii,
295 iv,~\ldots). Second, the front matter page numbering sequence is usually
296 separate from the main matter page numbering. That is, the page numbers
297 restart at 1 when the main matter begins. In contrast, Tufte has
298 enumerated his pages with arabic numerals that share the same page counting
299 sequence as the main matter.
300
301 There are also some variations in design across Tufte's four books. The
302 page opposite the full title page (labeled ``frontispiece'' in the above
303 table) has different content in each of the books. In \VDQI, this page is
304 blank; in \EI and \VE, this page holds a frontispiece; and in \BE, this
305 page contains three epigraphs.
306
307 The dedication appears on page~6 in \vdqi (opposite the introduction), and
308 is placed on its own spread in the other books. In \ve, an epigraph shares
309 the spread with the opening page of the introduction.
310
311 None of the page numbers (folios) of the front matter are expressed except in
312 \be, where the folios start to appear on the dedication page.
313
314 \newthought{The full title page} of each of the books varies slightly in
315 design. In all the books, the author's name appears at the top of the
316 page, the title it set just above the center line, and the publisher is
317 printed along the bottom margin. Some of the differences are outlined in
318 the following table.
319
320 \bigskip
321 \begin{center}
322 \footnotesize
323 \begin{tabular}{lllll}
324 \toprule
325 Feature & \vdqi & \ei & \ve & \be \\
326 \midrule
327 Author & & & & \\
328 \quad Typeface & serif & serif & serif & sans serif \\
329 \quad Style & italics & italics & italics & upright, caps \\
330 \quad Size & 24 pt & 20 pt & 20 pt & 20 pt \\
331 \addlinespace
332 Title & & & & \\
333 \quad Typeface & serif & serif & serif & sans serif \\
334 \quad Style & upright & italics & upright & upright, caps \\
335 \quad Size & 36 pt & 48 pt & 48 pt & 36 pt \\
336 \addlinespace
337 Subtitle & & & & \\
338 \quad Typeface & \na & \na & serif & \na \\
339 \quad Style & \na & \na & upright & \na \\
340 \quad Size & \na & \na & 20 pt & \na \\
341 \addlinespace
342 Edition & & & & \\
343 \quad Typeface & sans serif & \na & \na & \na \\
344 \quad Style & upright, caps & \na & \na & \na \\
345 \quad Size & 14 pt & \na & \na & \na \\
346 \addlinespace
347 Publisher & & & & \\
348 \quad Typeface & serif & serif & serif & sans serif \\
349 \quad Style & italics & italics & italics & upright, caps \\
350 \quad Size & 14 pt & 14 pt & 14 pt & 14 pt \\
351 \bottomrule
352 \end{tabular}
353 \end{center}
354
355 \begin{figure*}[p]
356 \fbox{\includegraphics[width=0.45\linewidth]{graphics/vdqi-title.pdf}}
357 \hfill
358 \fbox{\includegraphics[width=0.45\linewidth]{graphics/ei-title.pdf}}
359 \\\vspace{\baselineskip}
360 \fbox{\includegraphics[width=0.45\linewidth]{graphics/ve-title.pdf}}
361 \hfill
362 \fbox{\includegraphics[width=0.45\linewidth]{graphics/be-title.pdf}}
363 \end{figure*}
364
365 \newthought{The tables of contents} in Tufte's books give us our first
366 glimpse of the structure of the main matter. \VDQI is split into two
367 parts, each containing some number of chapters. His other three books only
368 contain chapters---they're not broken into parts.
369
370 \begin{figure*}[p]\index{table of contents}
371 \fbox{\includegraphics[width=0.45\linewidth]{graphics/vdqi-contents.pdf}}
372 \hfill
373 \fbox{\includegraphics[width=0.45\linewidth]{graphics/ei-contents.pdf}}
374 \\\vspace{\baselineskip}
375 \fbox{\includegraphics[width=0.45\linewidth]{graphics/ve-contents.pdf}}
376 \hfill
377 \fbox{\includegraphics[width=0.45\linewidth]{graphics/be-contents.pdf}}
378 \end{figure*}
379
380
381 \section{Typefaces}\label{sec:typefaces1}\index{typefaces}
382 \index{fonts|see{typefaces}}
383
384 Tufte's books primarily use two typefaces: Bembo and Gill Sans. Bembo is used
385 for the headings and body text, while Gill Sans is used for the title page and
386 opening epigraphs in \BE.
387
388 Since neither Bembo nor Gill Sans are available in default \LaTeX{}
389 installations, the \TL document classes default to using Palatino and
390 Helvetica, respectively. In addition, the Bera Mono typeface is used for
391 \texttt{monospaced} type.
392
393 The following font sizes are defined by the \TL classes:
394
395 \begin{table}[h]\index{typefaces!sizes}
396 \footnotesize%
397 \begin{center}
398 \begin{tabular}{lccl}
399 \toprule
400 \LaTeX{} size & Font size & Leading & Used for \\
401 \midrule
402 \verb+\tiny+ & 5 & 6 & sidenote numbers \\
403 \verb+\scriptsize+ & 7 & 8 & \na \\
404 \verb+\footnotesize+ & 8 & 10 & sidenotes, captions \\
405 \verb+\small+ & 9 & 12 & quote, quotation, and verse environments \\
406 \verb+\normalsize+ & 10 & 14 & body text \\
407 \verb+\large+ & 11 & 15 & \textsc{b}-heads \\
408 \verb+\Large+ & 12 & 16 & \textsc{a}-heads, \textsc{toc} entries, author, date \\
409 \verb+\LARGE+ & 14 & 18 & handout title \\
410 \verb+\huge+ & 20 & 30 & chapter heads \\
411 \verb+\Huge+ & 24 & 36 & part titles \\
412 \bottomrule
413 \end{tabular}
414 \end{center}
415 \caption{A list of \LaTeX{} font sizes as defined by the \TL document classes.}
416 \label{tab:font-sizes}
417 \end{table}
418
419 \section{Headings}\label{sec:headings1}\index{headings}
420
421 Tufte's books include the following heading levels: parts,
422 chapters,\sidenote{Parts and chapters are defined for the \texttt{tufte-book}
423 class only.} sections, subsections, and paragraphs. Not defined by default
424 are: sub-subsections and subparagraphs.
425
426 \begin{table}[h]
427 \begin{center}
428 \footnotesize%
429 \begin{tabular}{lcr}
430 \toprule
431 Heading & Style & Size \\
432 \midrule
433 Part & roman & \measure{24}{36}{40} \\
434 Chapter & italic & \measure{20}{30}{40} \\
435 Section & italic & \measure{12}{16}{26} \\
436 Subsection & italic & \measure{11}{15}{26} \\
437 Paragraph & italic & 10/14 \\
438 \bottomrule
439 \end{tabular}
440 \end{center}
441 \caption{Heading styles used in \BE.}
442 \label{tab:heading-styles}
443 \end{table}
444
445 \paragraph{Paragraph} Paragraph headings (as shown here) are introduced by
446 italicized text and separated from the main paragraph by a bit of space.
447
448 \section{Environments}
449
450 The following characteristics define the various environments:
451
452
453 \begin{table}[h]
454 \begin{center}
455 \footnotesize%
456 \begin{tabular}{lcl}
457 \toprule
458 Environment & Font size & Notes \\
459 \midrule
460 Body text & \measure{10}{14}{26} & \\
461 Block quote & \measure{9}{12}{24} & Block indent (left and right) by \unit[1]{pc} \\
462 Sidenotes & \measure{8}{10}{12} & Sidenote number is set inline, followed by word space \\
463 Captions & \measure{8}{10}{12} & \\
464 \bottomrule
465 \end{tabular}
466 \end{center}
467 \caption{Environment styles used in \BE.}
468 \label{tab:environment-styles}
469 \end{table}
470
471
472 \chapter[On the Use of the tufte-book Document Class]{On the Use of the \texttt{tufte-book} Document Class}
473 \label{ch:tufte-book}
474
475 The \TL document classes define a style similar to the
476 style Edward Tufte uses in his books and handouts. Tufte's style is known
477 for its extensive use of sidenotes, tight integration of graphics with
478 text, and well-set typography. This document aims to be at once a
479 demonstration of the features of the \TL document classes
480 and a style guide to their use.
481
482 \section{Page Layout}\label{sec:page-layout}
483 \subsection{Headings}\label{sec:headings}\index{headings}
484 This style provides \textsc{a}- and \textsc{b}-heads (that is,
485 \Verb|\section| and \Verb|\subsection|), demonstrated above.
486
487 If you need more than two levels of section headings, you'll have to define
488 them yourself at the moment; there are no pre-defined styles for anything below
489 a \Verb|\subsection|. As Bringhurst points out in \textit{The Elements of
490 Typographic Style},\cite{Bringhurst2005} you should ``use as many levels of
491 headings as you need: no more, and no fewer.''
492
493 The \TL classes will emit an error if you try to use
494 \linebreak\Verb|\subsubsection| and smaller headings.
495
496 % let's start a new thought -- a new section
497 \newthought{In his later books},\cite{Tufte2006} Tufte
498 starts each section with a bit of vertical space, a non-indented paragraph,
499 and sets the first few words of the sentence in \textsc{small caps}. To
500 accomplish this using this style, use the \doccmddef{newthought} command:
501 \begin{docspec}
502 \doccmd{newthought}\{In his later books\}, Tufte starts\ldots
503 \end{docspec}
504
505
506 \section{Sidenotes}\label{sec:sidenotes}
507 One of the most prominent and distinctive features of this style is the
508 extensive use of sidenotes. There is a wide margin to provide ample room
509 for sidenotes and small figures. Any \doccmd{footnote}s will automatically
510 be converted to sidenotes.\footnote{This is a sidenote that was entered
511 using the \texttt{\textbackslash footnote} command.} If you'd like to place ancillary
512 information in the margin without the sidenote mark (the superscript
513 number), you can use the \doccmd{marginnote} command.\marginnote{This is a
514 margin note. Notice that there isn't a number preceding the note, and
515 there is no number in the main text where this note was written.}
516
517 The specification of the \doccmddef{sidenote} command is:
518 \begin{docspec}
519 \doccmd{sidenote}[\docopt{number}][\docopt{offset}]\{\docarg{Sidenote text.}\}
520 \end{docspec}
521
522 Both the \docopt{number} and \docopt{offset} arguments are optional. If you
523 provide a \docopt{number} argument, then that number will be used as the
524 sidenote number. It will change of the number of the current sidenote only and
525 will not affect the numbering sequence of subsequent sidenotes.
526
527 Sometimes a sidenote may run over the top of other text or graphics in the
528 margin space. If this happens, you can adjust the vertical position of the
529 sidenote by providing a dimension in the \docopt{offset} argument. Some
530 examples of valid dimensions are:
531 \begin{docspec}
532 \ttfamily 1.0in \qquad 2.54cm \qquad 254mm \qquad 6\Verb|\baselineskip|
533 \end{docspec}
534 If the dimension is positive it will push the sidenote down the page; if the
535 dimension is negative, it will move the sidenote up the page.
536
537 While both the \docopt{number} and \docopt{offset} arguments are optional, they
538 must be provided in order. To adjust the vertical position of the sidenote
539 while leaving the sidenote number alone, use the following syntax:
540 \begin{docspec}
541 \doccmd{sidenote}[][\docopt{offset}]\{\docarg{Sidenote text.}\}
542 \end{docspec}
543 The empty brackets tell the \Verb|\sidenote| command to use the default
544 sidenote number.
545
546 If you \emph{only} want to change the sidenote number, however, you may
547 completely omit the \docopt{offset} argument:
548 \begin{docspec}
549 \doccmd{sidenote}[\docopt{number}]\{\docarg{Sidenote text.}\}
550 \end{docspec}
551
552 The \doccmddef{marginnote} command has a similar \docarg{offset} argument:
553 \begin{docspec}
554 \doccmd{marginnote}[\docopt{offset}]\{\docarg{Margin note text.}\}
555 \end{docspec}
556
557 \section{References}
558 References are placed alongside their citations as sidenotes,
559 as well. This can be accomplished using the normal \doccmddef{cite}
560 command.\sidenote{The first paragraph of this document includes a citation.}
561
562 The complete list of references may also be printed automatically by using
563 the \doccmddef{bibliography} command. (See the end of this document for an
564 example.) If you do not want to print a bibliography at the end of your
565 document, use the \doccmddef{nobibliography} command in its place.
566
567 To enter multiple citations at one location,\cite[-3\baselineskip]{Tufte2006,Tufte1990} you can
568 provide a list of keys separated by commas and the same optional vertical
569 offset argument: \Verb|\cite{Tufte2006,Tufte1990}|.
570 \begin{docspec}
571 \doccmd{cite}[\docopt{offset}]\{\docarg{bibkey1,bibkey2,\ldots}\}
572 \end{docspec}
573
574 \section{Figures and Tables}\label{sec:figures-and-tables}
575 Images and graphics play an integral role in Tufte's work.
576 In addition to the standard \docenvdef{figure} and \docenvdef{tabular} environments,
577 this style provides special figure and table environments for full-width
578 floats.
579
580 Full page--width figures and tables may be placed in \docenvdef{figure*} or
581 \docenvdef{table*} environments. To place figures or tables in the margin,
582 use the \docenvdef{marginfigure} or \docenvdef{margintable} environments as follows
583 (see figure~\ref{fig:marginfig}):
584
585 \begin{marginfigure}%
586 \includegraphics[width=\linewidth]{helix}
587 \caption{This is a margin figure. The helix is defined by
588 $x = \cos(2\pi z)$, $y = \sin(2\pi z)$, and $z = [0, 2.7]$. The figure was
589 drawn using Asymptote (\url{http://asymptote.sf.net/}).}
590 \label{fig:marginfig}
591 \end{marginfigure}
592
593 \begin{docspec}
594 \textbackslash begin\{marginfigure\}\\
595 \qquad\textbackslash includegraphics\{helix\}\\
596 \qquad\textbackslash caption\{This is a margin figure.\}\\
597 \qquad\textbackslash label\{fig:marginfig\}\\
598 \textbackslash end\{marginfigure\}\\
599 \end{docspec}
600
601 The \docenv{marginfigure} and \docenv{margintable} environments accept an optional parameter \docopt{offset} that adjusts the vertical position of the figure or table. See the ``\nameref{sec:sidenotes}'' section above for examples. The specifications are:
602 \begin{docspec}
603 \textbackslash{begin\{marginfigure\}[\docopt{offset}]}\\
604 \qquad\ldots\\
605 \textbackslash{end\{marginfigure\}}\\
606 \mbox{}\\
607 \textbackslash{begin\{margintable\}[\docopt{offset}]}\\
608 \qquad\ldots\\
609 \textbackslash{end\{margintable\}}\\
610 \end{docspec}
611
612 Figure~\ref{fig:fullfig} is an example of the \docenv{figure*}
613 environment and figure~\ref{fig:textfig} is an example of the normal
614 \docenv{figure} environment.
615
616 \begin{figure*}[h]
617 \includegraphics[width=\linewidth]{sine.pdf}%
618 \caption{This graph shows $y = \sin x$ from about $x = [-10, 10]$.
619 \emph{Notice that this figure takes up the full page width.}}%
620 \label{fig:fullfig}%
621 \end{figure*}
622
623 \begin{figure}
624 \includegraphics{hilbertcurves.pdf}
625 % \checkparity This is an \pageparity\ page.%
626 \caption[Hilbert curves of various degrees $n$.][6pt]{Hilbert curves of various degrees $n$. \emph{Notice that this figure only takes up the main textblock width.}}
627 \label{fig:textfig}
628 %\zsavepos{pos:textfig}
629 \end{figure}
630
631 As with sidenotes and marginnotes, a caption may sometimes require vertical
632 adjustment. The \doccmddef{caption} command now takes a second optional
633 argument that enables you to do this by providing a dimension \docopt{offset}.
634 You may specify the caption in any one of the following forms:
635 \begin{docspec}
636 \doccmd{caption}\{\docarg{long caption}\}\\
637 \doccmd{caption}[\docarg{short caption}]\{\docarg{long caption}\}\\
638 \doccmd{caption}[][\docopt{offset}]\{\docarg{long caption}\}\\
639 \doccmd{caption}[\docarg{short caption}][\docopt{offset}]%
640 \{\docarg{long caption}\}
641 \end{docspec}
642 A positive \docopt{offset} will push the caption down the page. The short
643 caption, if provided, is what appears in the list of figures/tables, otherwise
644 the ``long'' caption appears there. Note that although the arguments
645 \docopt{short caption} and \docopt{offset} are both optional, they must be
646 provided in order. Thus, to specify an \docopt{offset} without specifying a
647 \docopt{short caption}, you must include the first set of empty brackets
648 \Verb|[]|, which tell \doccmd{caption} to use the default ``long'' caption. As
649 an example, the caption to figure~\ref{fig:textfig} above was given in the form
650 \begin{docspec}
651 \doccmd{caption}[Hilbert curves...][6pt]\{Hilbert curves...\}
652 \end{docspec}
653
654 Table~\ref{tab:normaltab} shows table created with the \docpkg{booktabs}
655 package. Notice the lack of vertical rules---they serve only to clutter
656 the table's data.
657
658 \begin{table}[ht]
659 \centering
660 \fontfamily{ppl}\selectfont
661 \begin{tabular}{ll}
662 \toprule
663 Margin & Length \\
664 \midrule
665 Paper width & \unit[8\nicefrac{1}{2}]{inches} \\
666 Paper height & \unit[11]{inches} \\
667 Textblock width & \unit[6\nicefrac{1}{2}]{inches} \\
668 Textblock/sidenote gutter & \unit[\nicefrac{3}{8}]{inches} \\
669 Sidenote width & \unit[2]{inches} \\
670 \bottomrule
671 \end{tabular}
672 \caption{Here are the dimensions of the various margins used in the Tufte-handout class.}
673 \label{tab:normaltab}
674 %\zsavepos{pos:normaltab}
675 \end{table}
676
677 \newthought{Occasionally} \LaTeX{} will generate an error message:\label{err:too-many-floats}
678 \begin{docspec}
679 Error: Too many unprocessed floats
680 \end{docspec}
681 \LaTeX{} tries to place floats in the best position on the page. Until it's
682 finished composing the page, however, it won't know where those positions are.
683 If you have a lot of floats on a page (including sidenotes, margin notes,
684 figures, tables, etc.), \LaTeX{} may run out of ``slots'' to keep track of them
685 and will generate the above error.
686
687 \LaTeX{} initially allocates 18 slots for storing floats. To work around this
688 limitation, the \TL document classes provide a \doccmddef{morefloats} command
689 that will reserve more slots.
690
691 The first time \doccmd{morefloats} is called, it allocates an additional 34
692 slots. The second time \doccmd{morefloats} is called, it allocates another 26
693 slots.
694
695 The \doccmd{morefloats} command may only be used two times. Calling it a
696 third time will generate an error message. (This is because we can't safely
697 allocate many more floats or \LaTeX{} will run out of memory.)
698
699 If, after using the \doccmd{morefloats} command twice, you continue to get the
700 \texttt{Too many unprocessed floats} error, there are a couple things you can
701 do.
702
703 The \doccmddef{FloatBarrier} command will immediately process all the floats
704 before typesetting more material. Since \doccmd{FloatBarrier} will start a new
705 paragraph, you should place this command at the beginning or end of a
706 paragraph.
707
708 The \doccmddef{clearpage} command will also process the floats before
709 continuing, but instead of starting a new paragraph, it will start a new page.
710
711 You can also try moving your floats around a bit: move a figure or table to the
712 next page or reduce the number of sidenotes. (Each sidenote actually uses
713 \emph{two} slots.)
714
715 After the floats have placed, \LaTeX{} will mark those slots as unused so they
716 are available for the next page to be composed.
717
718 \section{Captions}
719 You may notice that the captions are sometimes misaligned.
720 Due to the way \LaTeX's float mechanism works, we can't know for sure where it
721 decided to put a float. Therefore, the \TL document classes provide commands to
722 override the caption position.
723
724 \paragraph{Vertical alignment} To override the vertical alignment, use the
725 \doccmd{setfloatalignment} command inside the float environment. For
726 example:
727
728 \begin{fullwidth}
729 \begin{docspec}
730 \textbackslash begin\{figure\}[btp]\\
731 \qquad \textbackslash includegraphics\{sinewave\}\\
732 \qquad \textbackslash caption\{This is an example of a sine wave.\}\\
733 \qquad \textbackslash label\{fig:sinewave\}\\
734 \qquad \hlred{\textbackslash setfloatalignment\{b\}\% forces caption to be bottom-aligned}\\
735 \textbackslash end\{figure\}
736 \end{docspec}
737 \end{fullwidth}
738
739 \noindent The syntax of the \doccmddef{setfloatalignment} command is:
740
741 \begin{docspec}
742 \doccmd{setfloatalignment}\{\docopt{pos}\}
743 \end{docspec}
744
745 \noindent where \docopt{pos} can be either \texttt{b} for bottom-aligned
746 captions, or \texttt{t} for top-aligned captions.
747
748 \paragraph{Horizontal alignment}\label{par:overriding-horizontal}
749 To override the horizontal alignment, use either the \doccmd{forceversofloat}
750 or the \doccmd{forcerectofloat} command inside of the float environment. For
751 example:
752
753 \begin{fullwidth}
754 \begin{docspec}
755 \textbackslash begin\{figure\}[btp]\\
756 \qquad \textbackslash includegraphics\{sinewave\}\\
757 \qquad \textbackslash caption\{This is an example of a sine wave.\}\\
758 \qquad \textbackslash label\{fig:sinewave\}\\
759 \qquad \hlred{\textbackslash forceversofloat\% forces caption to be set to the left of the float}\\
760 \textbackslash end\{figure\}
761 \end{docspec}
762 \end{fullwidth}
763
764 The \doccmddef{forceversofloat} command causes the algorithm to assume the
765 float has been placed on a verso page---that is, a page on the left side of a
766 two-page spread. Conversely, the \doccmddef{forcerectofloat} command causes
767 the algorithm to assume the float has been placed on a recto page---that is, a
768 page on the right side of a two-page spread.
769
770
771 \section{Full-width text blocks}
772
773 In addition to the new float types, there is a \docenvdef{fullwidth}
774 environment that stretches across the main text block and the sidenotes
775 area.
776
777 \begin{Verbatim}
778 \begin{fullwidth}
779 Lorem ipsum dolor sit amet...
780 \end{fullwidth}
781 \end{Verbatim}
782
783 \begin{fullwidth}
784 \small\itshape\lipsum[1]
785 \end{fullwidth}
786
787 \section{Typography}\label{sec:typography}
788
789 \subsection{Typefaces}\label{sec:typefaces}\index{typefaces}
790 If the Palatino, \textsf{Helvetica}, and \texttt{Bera Mono} typefaces are installed, this style
791 will use them automatically. Otherwise, we'll fall back on the Computer Modern
792 typefaces.
793
794 \subsection{Letterspacing}\label{sec:letterspacing}
795 This document class includes two new commands and some improvements on
796 existing commands for letterspacing.
797
798 When setting strings of \allcaps{ALL CAPS} or \smallcaps{small caps}, the
799 letter\-spacing---that is, the spacing between the letters---should be
800 increased slightly.\cite{Bringhurst2005} The \doccmddef{allcaps} command has proper letterspacing for
801 strings of \allcaps{FULL CAPITAL LETTERS}, and the \doccmddef{smallcaps} command
802 has letterspacing for \smallcaps{small capital letters}. These commands
803 will also automatically convert the case of the text to upper- or
804 lowercase, respectively.
805
806 The \doccmddef{textsc} command has also been redefined to include
807 letterspacing. The case of the \doccmd{textsc} argument is left as is,
808 however. This allows one to use both uppercase and lowercase letters:
809 \textsc{The Initial Letters Of The Words In This Sentence Are Capitalized.}
810
811
812
813 \section{Document Class Options}\label{sec:options}
814
815 \index{class options|(}
816 The \doccls{tufte-book} class is based on the \LaTeX\ \doccls{book}
817 document class. Therefore, you can pass any of the typical book
818 options. There are a few options that are specific to the
819 \doccls{tufte-book} document class, however.
820
821 The \docclsoptdef{a4paper} option will set the paper size to \smallcaps{A4} instead of
822 the default \smallcaps{US} letter size.
823
824 The \docclsoptdef{sfsidenotes} option will set the sidenotes and title block in a
825 \textsf{sans serif} typeface instead of the default roman.
826
827 The \docclsoptdef{twoside} option will modify the running heads so that the page
828 number is printed on the outside edge (as opposed to always printing the page
829 number on the right-side edge in \docclsoptdef{oneside} mode).
830
831 The \docclsoptdef{symmetric} option typesets the sidenotes on the outside edge of
832 the page. This is how books are traditionally printed, but is contrary to
833 Tufte's book design which sets the sidenotes on the right side of the page.
834 This option implicitly sets the \docclsopt{twoside} option.
835
836 The \docclsoptdef{justified} option sets all the text fully justified (flush left
837 and right). The default is to set the text ragged right.
838 The body text of Tufte's books are set ragged right. This prevents
839 needless hyphenation and makes it easier to read the text in the slightly
840 narrower column.
841
842 The \docclsoptdef{bidi} option loads the \docpkg{bidi} package which is used with
843 \tXeLaTeX\ to typeset bi-directional text. Since the \docpkg{bidi}
844 package needs to be loaded before the sidenotes and cite commands are defined,
845 it can't be loaded in the document preamble.
846
847 The \docclsoptdef{debug} option causes the \TL classes to output debug
848 information to the log file which is useful in troubleshooting bugs. It will
849 also cause the graphics to be replaced by outlines.
850
851 The \docclsoptdef{nofonts} option prevents the \TL classes from
852 automatically loading the Palatino and Helvetica typefaces. You should use
853 this option if you wish to load your own fonts. If you're using \tXeLaTeX, this
854 option is implied (\ie, the Palatino and Helvetica fonts aren't loaded if you
855 use \tXeLaTeX).
856
857 The \docclsoptdef{nols} option inhibits the letterspacing code. The \TL\
858 classes try to load the appropriate letterspacing package (either pdf\TeX's
859 \docpkg{letterspace} package or the \docpkg{soul} package). If you're using
860 \tXeLaTeX\ with \docpkg{fontenc}, however, you should configure your own
861 letterspacing.
862
863 The \docclsoptdef{notitlepage} option causes \doccmd{maketitle} to generate a title
864 block instead of a title page. The \doccls{book} class defaults to a title
865 page and the \doccls{handout} class defaults to the title block. There is an
866 analogous \docclsoptdef{titlepage} option that forces \doccmd{maketitle} to
867 generate a full title page instead of the title block.
868
869 The \docclsoptdef{notoc} option suppresses \TL's custom table of contents
870 (\textsc{toc}) design. The current \textsc{toc} design only shows unnumbered
871 chapter titles; it doesn't show sections or subsections. The \docclsopt{notoc}
872 option will revert to \LaTeX's \textsc{toc} design.
873
874 The \docclsoptdef{nohyper} option prevents the \docpkg{hyperref} package from
875 being loaded. The default is to load the \docpkg{hyperref} package and use the
876 \doccmd{title} and \doccmd{author} contents as metadata for the generated
877 \textsc{pdf}.
878
879 \index{class options|)}
880
881
882
883 \chapter[Customizing Tufte-LaTeX]{Customizing \TL}
884 \label{ch:customizing}
885
886 The \TL document classes are designed to closely emulate Tufte's book
887 design by default. However, each document is different and you may encounter
888 situations where the default settings are insufficient. This chapter explores
889 many of the ways you can adjust the \TL document classes to better fit
890 your needs.
891
892 \section{File Hooks}
893 \label{sec:filehooks}
894
895 \index{file hooks|(}
896 If you create many documents using the \TL classes, it's easier to
897 store your customizations in a separate file instead of copying them into the
898 preamble of each document. The \TL classes provide three file hooks:
899 \docfilehook{tufte-common-local.tex}{common}, \docfilehook{tufte-book-local.tex}{book}, and
900 \docfilehook{tufte-handout-local.tex}{handout}.\sloppy
901
902 \begin{description}
903 \item[\docfilehook{tufte-common-local.tex}{common}]
904 If this file exists, it will be loaded by all of the \TL document
905 classes just prior to any document-class-specific code. If your
906 customizations or code should be included in both the book and handout
907 classes, use this file hook.
908 \item[\docfilehook{tufte-book-local.tex}{book}]
909 If this file exists, it will be loaded after all of the common and
910 book-specific code has been read. If your customizations apply only to the
911 book class, use this file hook.
912 \item[\docfilehook{tufte-common-handout.tex}{handout}]
913 If this file exists, it will be loaded after all of the common and
914 handout-specific code has been read. If your customizations apply only to
915 the handout class, use this file hook.
916 \end{description}
917
918 \index{file hooks|)}
919
920 \section{Numbered Section Headings}
921 \label{sec:numbered-sections}
922 \index{headings!numbered}
923
924 While Tufte dispenses with numbered headings in his books, if you require them,
925 they can be anabled by changing the value of the \doccounter{secnumdepth}
926 counter. From the table below, select the heading level at which numbering
927 should stop and set the \doccounter{secnumdepth} counter to that value. For
928 example, if you want parts and chapters numbered, but don't want numbering for
929 sections or subsections, use the command:
930 \begin{docspec}
931 \doccmd{setcounter}\{secnumdepth\}\{0\}
932 \end{docspec}
933
934 The default \doccounter{secnumdepth} for the \TL document classes is $-1$.
935
936 \begin{table}
937 \footnotesize
938 \begin{center}
939 \begin{tabular}{lr}
940 \toprule
941 Heading level & Value \\
942 \midrule
943 Part (in \doccls{tufte-book}) & $-1$ \\
944 Part (in \doccls{tufte-handout}) & $0$ \\
945 Chapter (only in \doccls{tufte-book}) & $0$ \\
946 Section & $1$ \\
947 Subsection & $2$ \\
948 Subsubsection & $3$ \\
949 Paragraph & $4$ \\
950 Subparagraph & $5$ \\
951 \bottomrule
952 \end{tabular}
953 \end{center}
954 \caption{Heading levels used with the \texttt{secnumdepth} counter.}
955 \end{table}
956
957 \section{Changing the Paper Size}
958 \label{sec:paper-size}
959
960 The \TL classes currently only provide three paper sizes: \textsc{a4},
961 \textsc{b5}, and \textsc{us} letter. To specify a different paper size (and/or
962 margins), use the \doccmd[geometry]{geometry} command in the preamble of your
963 document (or one of the file hooks). The full documentation of the
964 \doccmd{geometry} command may be found in the \docpkg{geometry} package
965 documentation.\cite{pkg-geometry}
966
967
968 \section{Customizing Marginal Material}
969 \label{sec:marginal-material}
970
971 Marginal material includes sidenotes, citations, margin notes, and captions.
972 Normally, the justification of the marginal material follows the justification
973 of the body text. If you specify the \docclsopt{justified} document class
974 option, all of the margin material will be fully justified as well. If you
975 don't specify the \docclsopt{justified} option, then the marginal material will
976 be set ragged right.
977
978 You can set the justification of the marginal material separately from the body
979 text using the following document class options: \docclsopt{sidenote},
980 \docclsopt{marginnote}, \docclsopt{caption}, \docclsopt{citation}, and
981 \docclsopt{marginals}. Each option refers to its obviously corresponding
982 marginal material type. The \docclsopt{marginals} option simultaneously sets
983 the justification on all four marginal material types.
984
985 Each of the document class options takes one of five justification types:
986 \begin{description}
987 \item[\docclsopt{justified}] Fully justifies the text (sets it flush left and
988 right).
989 \item[\docclsopt{raggedleft}] Sets the text ragged left, regardless of which
990 page it falls on.
991 \item[\docclsopt{raggedright}] Sets the text ragged right, regardless of
992 which page it falls on.
993 \item[\doccls{raggedouter}] Sets the text ragged left if it falls on the
994 left-hand (verso) page of the spread and otherwise sets it ragged right.
995 This is useful in conjunction with the \docclsopt{symmetric} document class
996 option.
997 \item[\docclsopt{auto}] If the \docclsopt{justified} document class option
998 was specified, then set the text fully justified; otherwise the text is set
999 ragged right. This is the default justification option if one is not
1000 explicitly specified.
1001 \end{description}
1002
1003 \noindent For example,
1004 \begin{docspec}
1005 \doccmdnoindex{documentclass}[symmetric,justified,marginals=raggedouter]\{tufte-book\}
1006 \end{docspec}
1007 will set the body text of the document to be fully justified and all of the
1008 margin material (sidenotes, margin notes, captions, and citations) to be flush
1009 against the body text with ragged outer edges.
1010
1011 \newthought{The font and style} of the marginal material may also be modified using the following commands:
1012
1013 \begin{docspec}
1014 \doccmd{setsidenotefont}\{\docopt{font commands}\}\\
1015 \doccmd{setcaptionfont}\{\docopt{font commands}\}\\
1016 \doccmd{setmarginnotefont}\{\docopt{font commands}\}\\
1017 \doccmd{setcitationfont}\{\docopt{font commands}\}
1018 \end{docspec}
1019
1020 The \doccmddef{setsidenotefont} sets the font and style for sidenotes, the
1021 \doccmddef{setcaptionfont} for captions, the \doccmddef{setmarginnotefont} for
1022 margin notes, and the \doccmddef{setcitationfont} for citations. The
1023 \docopt{font commands} can contain font size changes (e.g.,
1024 \doccmdnoindex{footnotesize}, \doccmdnoindex{Huge}, etc.), font style changes (e.g.,
1025 \doccmdnoindex{sffamily}, \doccmdnoindex{ttfamily}, \doccmdnoindex{itshape}, etc.), color changes (e.g.,
1026 \doccmdnoindex{color}\texttt{\{blue\}}), and many other adjustments.
1027
1028 If, for example, you wanted the captions to be set in italic sans serif, you could use:
1029 \begin{docspec}
1030 \doccmd{setcaptionfont}\{\doccmdnoindex{itshape}\doccmdnoindex{sffamily}\}
1031 \end{docspec}
1032
1033 \chapter{Compatibility Issues}
1034 \label{ch:compatibility}
1035
1036 When switching an existing document from one document class to a \TL document class, a few changes to the document may have to be made.
1037
1038 \section{Converting from \doccls{article} to \doccls{tufte-handout}}
1039
1040 The following \doccls{article} class options are unsupported: \docclsopt{10pt}, \docclsopt{11pt}, \docclsopt{12pt}, \docclsopt{a5paper}, \docclsopt{b5paper}, \docclsopt{executivepaper}, \docclsopt{legalpaper}, \docclsopt{landscape}, \docclsopt{onecolumn}, and \doccls{twocolumn}.
1041
1042 The following headings are not supported: \doccmd{subsubsection} and \doccmd{subparagraph}.
1043
1044 \section{Converting from \doccls{book} to \doccls{tufte-book}}
1045
1046 The following \doccls{report} class options are unsupported: \docclsopt{10pt}, \docclsopt{11pt}, \docclsopt{12pt}, \docclsopt{a5paper}, \docclsopt{b5paper}, \docclsopt{executivepaper}, \docclsopt{legalpaper}, \docclsopt{landscape}, \docclsopt{onecolumn}, and \doccls{twocolumn}.
1047
1048 The following headings are not supported: \doccmd{subsubsection} and \doccmd{subparagraph}.
1049
1050
1051
1052 \chapter{Troubleshooting and Support}
1053 \label{ch:troubleshooting}
1054
1055 \section{\TL Website}\label{sec:website}
1056 The website for the \TL packages is located at
1057 \url{http://code.google.com/p/tufte-latex/}. On our website, you'll find
1058 links to our \smallcaps{svn} repository, mailing lists, bug tracker, and documentation.
1059
1060 \section{\TL Mailing Lists}\label{sec:mailing-lists}
1061 There are two mailing lists for the \TL project:
1062
1063 \paragraph{Discussion list}
1064 The \texttt{tufte-latex} discussion list is for asking questions, getting
1065 assistance with problems, and help with troubleshooting. Release announcements
1066 are also posted to this list. You can subscribe to the \texttt{tufte-latex}
1067 discussion list at \url{http://groups.google.com/group/tufte-latex}.
1068
1069 \paragraph{Commits list}
1070 The \texttt{tufte-latex-commits} list is a read-only mailing list. A message
1071 is sent to the list any time the \TL code has been updated. If you'd like to
1072 keep up with the latest code developments, you may subscribe to this list. You
1073 can subscribe to the \texttt{tufte-latex-commits} mailing list at
1074 \url{http://groups.google.com/group/tufte-latex-commits}.
1075
1076 \section{Getting Help}\label{sec:getting-help}
1077 If you've encountered a problem with one of the \TL document classes, have a
1078 question, or would like to report a bug, please send an email to our
1079 mailing list or visit our website.
1080
1081 To help us troubleshoot the problem more quickly, please try to compile your
1082 document using the \docclsopt{debug} class option and send the generated
1083 \texttt{.log} file to the mailing list with a brief description of the problem.
1084
1085
1086
1087 \section{Errors, Warnings, and Informational Messages}\label{sec:tl-messages}
1088 The following is a list of all of the errors, warnings, and other messages generated by the \TL classes and a brief description of their meanings.
1089 \index{error messages}\index{warning messages}\index{debug messages}
1090
1091 % Errors
1092 \docmsg{Error: \doccmd{subparagraph} is undefined by this class.}{%
1093 The \doccmd{subparagraph} command is not defined in the \TL document classes.
1094 If you'd like to use the \doccmd{subparagraph} command, you'll need to redefine
1095 it yourself. See the ``Headings'' section on page~\pageref{sec:headings} for a
1096 description of the heading styles available in the \TL document classes.}
1097
1098 \docmsg{Error: \doccmd{subsubsection} is undefined by this class.}{%
1099 The \doccmd{subsubsection} command is not defined in the \TL document classes.
1100 If you'd like to use the \doccmd{subsubsection} command, you'll need to
1101 redefine it yourself. See the ``Headings'' section on
1102 page~\pageref{sec:headings} for a description of the heading styles available
1103 in the \TL document classes.}
1104
1105 \docmsg{Error: You may only call \doccmd{morefloats} twice. See the\par\noindent\ \ \ \ \ \ \ \ Tufte-LaTeX documentation for other workarounds.}{%
1106 \LaTeX{} allocates 18 slots for storing floats. The first time
1107 \doccmd{morefloats} is called, it allocates an additional 34 slots. The second
1108 time \doccmd{morefloats} is called, it allocates another 26 slots.
1109
1110 The \doccmd{morefloats} command may only be called two times. Calling it a
1111 third time will generate this error message. See
1112 page~\pageref{err:too-many-floats} for more information.}
1113
1114 % Warnings
1115 \docmsg{Warning: Option `\docopt{class option}' is not supported -{}- ignoring option.}{%
1116 This warning appears when you've tried to use \docopt{class option} with a \TL
1117 document class, but \docopt{class option} isn't supported by the \TL document
1118 class. In this situation, \docopt{class option} is ignored.}
1119
1120 % Info / Debug messages
1121 \docmsg{Info: The `\docclsopt{symmetric}' option implies `\docclsopt{twoside}'}{%
1122 You specified the \docclsopt{symmetric} document class option. This option automatically forces the \docclsopt{twoside} option as well. See page~\pageref{clsopt:symmetric} for more information on the \docclsopt{symmetric} class option.}
1123
1124
1125 \section{Package Dependencies}\label{sec:dependencies}
1126 The following is a list of packages that the \TL document
1127 classes rely upon. Packages marked with an asterisk are optional.
1128 \begin{multicols}{2}
1129 \begin{itemize}
1130 \item xifthen
1131 \item ifpdf*
1132 \item ifxetex*
1133 \item hyperref
1134 \item geometry
1135 \item ragged2e
1136 \item chngpage \emph{or} changepage
1137 \item paralist
1138 \item textcase
1139 \item soul*
1140 \item letterspace*
1141 \item setspace
1142 \item natbib \emph{and} bibentry
1143 \item optparams
1144 \item placeins
1145 \item mathpazo*
1146 \item helvet*
1147 \item fontenc
1148 \item beramono*
1149 \item fancyhdr
1150 \item xcolor
1151 \item textcomp
1152 \item titlesec
1153 \item titletoc
1154 \end{itemize}
1155 \end{multicols}
1156
1157
1158
1159
1160 %%
1161 % The back matter contains appendices, bibliographies, indices, glossaries, etc.
1162
1163
1164
1165
1166
1167
1168
1169 \backmatter
1170
1171 \bibliography{sample-handout}
1172 \bibliographystyle{plainnat}
1173
1174
1175 \printindex
1176
1177 \end{document}
1178