Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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