You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1179 line
47KB

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