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.

750 lines
28KB

  1. \documentclass{tufte-book}
  2. %%
  3. % Book metadata
  4. \title{A Tufte-Style Book\thanks{Thanks to Edward R.~Tufte for his inspiration.}}
  5. \author[The Tufte-LaTeX Developers]{The Tufte-LaTeX\ Developers}
  6. \publisher{Publisher of This Book}
  7. %%
  8. % If they're installed, use Bergamo and Chantilly from www.fontsite.com.
  9. % They're clones of Bembo and Gill Sans, respectively.
  10. %\IfFileExists{bergamo.sty}{\usepackage[osf]{bergamo}}{}% Bembo
  11. %\IfFileExists{chantill.sty}{\usepackage{chantill}}{}% Gill Sans
  12. %\usepackage{microtype}
  13. %%
  14. % Just some sample text
  15. \usepackage{lipsum}
  16. %%
  17. % For nicely typeset tabular material
  18. \usepackage{booktabs}
  19. %%
  20. % For graphics / images
  21. \usepackage{graphicx}
  22. \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
  23. \graphicspath{{graphics/}}
  24. % The fancyvrb package lets us customize the formatting of verbatim
  25. % environments. We use a slightly smaller font.
  26. \usepackage{fancyvrb}
  27. \fvset{fontsize=\normalsize}
  28. %%
  29. % Prints argument within hanging parentheses (i.e., parentheses that take
  30. % up no horizontal space). Useful in tabular environments.
  31. \newcommand{\hangp}[1]{\makebox[0pt][r]{(}#1\makebox[0pt][l]{)}}
  32. %%
  33. % Prints an asterisk that takes up no horizontal space.
  34. % Useful in tabular environments.
  35. \newcommand{\hangstar}{\makebox[0pt][l]{*}}
  36. %%
  37. % Prints a trailing space in a smart way.
  38. \usepackage{xspace}
  39. %%
  40. % Some shortcuts for Tufte's book titles. The lowercase commands will
  41. % produce the initials of the book title in italics. The all-caps commands
  42. % will print out the full title of the book in italics.
  43. \newcommand{\vdqi}{\textit{VDQI}\xspace}
  44. \newcommand{\ei}{\textit{EI}\xspace}
  45. \newcommand{\ve}{\textit{VE}\xspace}
  46. \newcommand{\be}{\textit{BE}\xspace}
  47. \newcommand{\VDQI}{\textit{The Visual Display of Quantitative Information}\xspace}
  48. \newcommand{\EI}{\textit{Envisioning Information}\xspace}
  49. \newcommand{\VE}{\textit{Visual Explanations}\xspace}
  50. \newcommand{\BE}{\textit{Beautiful Evidence}\xspace}
  51. \newcommand{\TL}{Tufte-\LaTeX\xspace}
  52. % Prints the month name (e.g., January) and the year (e.g., 2008)
  53. \newcommand{\monthyear}{%
  54. \ifcase\month\or January\or February\or March\or April\or May\or June\or
  55. July\or August\or September\or October\or November\or
  56. December\fi\space\number\year
  57. }
  58. % Prints an epigraph and speaker in sans serif, all-caps type.
  59. \newcommand{\openepigraph}[2]{%
  60. %\sffamily\fontsize{14}{16}\selectfont
  61. \begin{fullwidth}
  62. \sffamily\large
  63. \begin{doublespace}
  64. \noindent\allcaps{#1}\\% epigraph
  65. \noindent\allcaps{#2}% author
  66. \end{doublespace}
  67. \end{fullwidth}
  68. }
  69. % Inserts a blank page
  70. \newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
  71. \usepackage{units}
  72. % Typesets the font size, leading, and measure in the form of 10/12x26 pc.
  73. \newcommand{\measure}[3]{#1/#2$\times$\unit[#3]{pc}}
  74. % Macros for typesetting the documentation
  75. \newcommand{\hl}[1]{\textcolor{Maroon}{#1}}% prints in red
  76. \newcommand{\hangleft}[1]{\makebox[0pt][r]{#1}}
  77. \newcommand{\hairsp}{\hspace{1pt}}% hair space
  78. \newcommand{\hquad}{\hskip0.5em\relax}% half quad space
  79. \newcommand{\TODO}{\textcolor{red}{\bf TODO!}\xspace}
  80. \newcommand{\ie}{\textit{i.\hairsp{}e.}\xspace}
  81. \newcommand{\eg}{\textit{e.\hairsp{}g.}\xspace}
  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{\doccmd}[1]{%
  87. \texttt{\tuftebs#1}%
  88. \index{#1@\protect\hangleft{\texttt{\tuftebs}}\texttt{#1}}%
  89. }% command name -- adds backslash automatically
  90. \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument
  91. \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument
  92. \newenvironment{docspec}{\begin{quotation}\ttfamily\parskip0pt\parindent0pt\ignorespaces}{\end{quotation}}% command specification environment
  93. \newcommand{\docenv}[1]{\texttt{#1}\index{#1@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
  94. \newcommand{\docpkg}[1]{\texttt{#1}\index{#1@\texttt{#1} package}\index{packages!#1@\texttt{#1}}}% package name
  95. \newcommand{\doccls}[1]{\texttt{#1}}% document class name
  96. \newcommand{\docclsopt}[1]{\texttt{#1}\index{#1@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name
  97. % Generates the index
  98. \usepackage{makeidx}
  99. \makeindex
  100. \begin{document}
  101. % Front matter
  102. \frontmatter
  103. % r.1 blank page
  104. \blankpage
  105. % v.2 epigraphs
  106. \newpage\thispagestyle{empty}
  107. \openepigraph{%
  108. The public is more familiar with bad design than good design.
  109. It is, in effect, conditioned to prefer bad design,
  110. because that is what it lives with.
  111. The new becomes threatening, the old reassuring.
  112. }{Paul Rand%, {\itshape Design, Form, and Chaos}
  113. }
  114. \vfill
  115. \openepigraph{%
  116. A designer knows that he has achieved perfection
  117. not when there is nothing left to add,
  118. but when there is nothing left to take away.
  119. }{Antoine de St-Expurey}
  120. \vfill
  121. \openepigraph{%
  122. \ldots the designer of a new system must not only be the implementor and the first
  123. large-scale user; the designer should also write the first user manual\ldots
  124. If I had not participated fully in all these activities,
  125. literally hundreds of improvements would never have been made,
  126. because I would never have thought of them or perceived
  127. why they were important.
  128. }{Donald E. Knuth}
  129. % r.3 full title page
  130. \maketitle
  131. % v.4 copyright page
  132. \newpage
  133. \begin{fullwidth}
  134. ~\vfill
  135. \thispagestyle{empty}
  136. \setlength{\parindent}{0pt}
  137. \setlength{\parskip}{\baselineskip}
  138. Copyright \copyright\ \the\year\ \thanklessauthor
  139. \par\smallcaps{Published by \thanklesspublisher}
  140. \par\smallcaps{tufte-latex.googlecode.com}
  141. \par Licensed under the Apache License, Version 2.0 (the ``License''); you may not
  142. use this file except in compliance with the License. You may obtain a copy
  143. of the License at \url{http://www.apache.org/licenses/LICENSE-2.0}. Unless
  144. required by applicable law or agreed to in writing, software distributed
  145. under the License is distributed on an \smallcaps{``AS IS'' BASIS, WITHOUT
  146. WARRANTIES OR CONDITIONS OF ANY KIND}, either express or implied. See the
  147. License for the specific language governing permissions and limitations
  148. under the License.\index{license}
  149. \par\textit{First printing, \monthyear}
  150. \end{fullwidth}
  151. % r.5 contents
  152. \tableofcontents
  153. % r.7 dedication
  154. \cleardoublepage
  155. ~\vfill
  156. \begin{doublespace}
  157. \noindent\fontsize{18}{22}\selectfont\itshape
  158. \nohyphenation
  159. Dedicated to those who appreciate \LaTeX{}
  160. and the work of \mbox{Edward R.~Tufte}
  161. and \mbox{Donald E.~Knuth}.
  162. \end{doublespace}
  163. \vfill
  164. \vfill
  165. % r.9 introduction
  166. \cleardoublepage
  167. \chapter*{Introduction}
  168. This sample book discusses the design of Edward Tufte's
  169. books\cite{Tufte2001,Tufte1990,Tufte1997,Tufte2006}
  170. and the use of the \texttt{tufte-book} and \texttt{sample-handout} document classes.
  171. %%
  172. % Start the main matter (normal chapters)
  173. \mainmatter
  174. \chapter{The Design of Tufte's Books}
  175. \label{ch:tufte-design}
  176. \newthought{The pages} of a book are usually divided into three major
  177. sections: the front matter (also called preliminary matter or prelim), the
  178. main matter (the core text of the book), and the back matter (or end
  179. matter).
  180. \newthought{The front matter} of a book refers to all of the material that
  181. comes before the main text. The following table from shows a list of
  182. material that appears in the front matter of \VDQI, \EI, \VE, and \BE
  183. along with its page number. Page numbers that appear in parentheses refer
  184. to folios that do not have a printed page number (but they are still
  185. counted in the page number sequence).
  186. \bigskip
  187. \begin{minipage}{\textwidth}
  188. \begin{center}
  189. \begin{tabular}{lcccc}
  190. \toprule
  191. & \multicolumn{4}{c}{Books} \\
  192. \cmidrule(l){2-5}
  193. Page content & \vdqi & \ei & \ve & \be \\
  194. \midrule
  195. Blank half title page & \hangp{1} & \hangp{1} & \hangp{1} & \hangp{1} \\
  196. Frontispiece\footnotemark{}
  197. & \hangp{2} & \hangp{2} & \hangp{2} & \hangp{2} \\
  198. Full title page & \hangp{3} & \hangp{3} & \hangp{3} & \hangp{3} \\
  199. Copyright page & \hangp{4} & \hangp{4} & \hangp{4} & \hangp{4} \\
  200. Contents & \hangp{5} & \hangp{5} & \hangp{5} & \hangp{5} \\
  201. %Blank & -- & \hangp{6} & \hangp{6} & \hangp{6} \\
  202. Dedication & \hangp{6} & \hangp{7} & \hangp{7} & 7 \\
  203. %Blank & -- & \hangp{8} & -- & \hangp{8} \\
  204. Epigraph & -- & -- & \hangp{8} & -- \\
  205. Introduction & \hangp{7} & \hangp{9} & \hangp{9} & 9 \\
  206. \bottomrule
  207. \end{tabular}
  208. \end{center}
  209. \end{minipage}
  210. \vspace{-7\baselineskip}\footnotetext{The contents of this page vary from book to book. In
  211. \vdqi this page is blank; in \ei and \ve this page holds a frontispiece;
  212. and in \be this page contains three epigraphs.}
  213. \vspace{7\baselineskip}
  214. \bigskip
  215. The design of the front matter in Tufte's books varies slightly from the
  216. traditional design of front matter. First, the pages in front matter are
  217. traditionally numbered with lowercase roman numerals (\eg, i, ii, iii,
  218. iv,~\ldots). Second, the front matter page numbering sequence is usually
  219. separate from the main matter page numbering. That is, the page numbers
  220. restart at 1 when the main matter begins. In contrast, Tufte has
  221. enumerated his pages with arabic numerals that share the same page counting
  222. sequence as the main matter.
  223. There are also some variations in design across Tufte's four books. The
  224. page opposite the full title page (labeled ``frontispiece'' in the above
  225. table) has different content in each of the books. In \VDQI, this page is
  226. blank; in \EI and \VE, this page holds a frontispiece; and in \BE, this
  227. page contains three epigraphs.
  228. The dedication appears on page~6 in \vdqi (opposite the introduction), and
  229. is placed on its own spread in the other books. In \ve, an epigraph shares
  230. the spread with the opening page of the introduction.
  231. None of the page numbers (folios) of the front matter are expressed except in
  232. \be, where the folios start to appear on the dedication page.
  233. \newthought{The full title page} of each of the books varies slightly in
  234. design. In all the books, the author's name appears at the top of the
  235. page, the title it set just above the center line, and the publisher is
  236. printed along the bottom margin. Some of the differences are outlined in
  237. the following table.
  238. \bigskip
  239. \begin{center}
  240. \footnotesize
  241. \begin{tabular}{lllll}
  242. \toprule
  243. Feature & \vdqi & \ei & \ve & \be \\
  244. \midrule
  245. Author & & & & \\
  246. \quad Typeface & serif & serif & serif & sans serif \\
  247. \quad Style & italics & italics & italics & upright, caps \\
  248. \quad Size & 24 pt & 20 pt & 20 pt & 20 pt \\
  249. \addlinespace
  250. Title & & & & \\
  251. \quad Typeface & serif & serif & serif & sans serif \\
  252. \quad Style & upright & italics & upright & upright, caps \\
  253. \quad Size & 36 pt & 48 pt & 48 pt & 36 pt \\
  254. \addlinespace
  255. Subtitle & & & & \\
  256. \quad Typeface & -- & -- & serif & -- \\
  257. \quad Style & -- & -- & upright & -- \\
  258. \quad Size & -- & -- & 20 pt & -- \\
  259. \addlinespace
  260. Edition & & & & \\
  261. \quad Typeface & sans serif & -- & -- & -- \\
  262. \quad Style & upright, caps & -- & -- & -- \\
  263. \quad Size & 14 pt & -- & -- & -- \\
  264. \addlinespace
  265. Publisher & & & & \\
  266. \quad Typeface & serif & serif & serif & sans serif \\
  267. \quad Style & italics & italics & italics & upright, caps \\
  268. \quad Size & 14 pt & 14 pt & 14 pt & 14 pt \\
  269. \bottomrule
  270. \end{tabular}
  271. \end{center}
  272. \begin{figure*}[p]
  273. \fbox{\includegraphics[width=0.45\linewidth]{graphics/vdqi-title.pdf}}
  274. \hfill
  275. \fbox{\includegraphics[width=0.45\linewidth]{graphics/ei-title.pdf}}
  276. \\\vspace{\baselineskip}
  277. \fbox{\includegraphics[width=0.45\linewidth]{graphics/ve-title.pdf}}
  278. \hfill
  279. \fbox{\includegraphics[width=0.45\linewidth]{graphics/be-title.pdf}}
  280. \end{figure*}
  281. \newthought{The tables of contents} in Tufte's books give us our first
  282. glimpse of the structure of the main matter. \VDQI is split into two
  283. parts, each containing some number of chapters. His other three books only
  284. contain chapters---they're not broken into parts.
  285. \begin{figure*}[p]\index{table of contents}
  286. \fbox{\includegraphics[width=0.45\linewidth]{graphics/vdqi-contents.pdf}}
  287. \hfill
  288. \fbox{\includegraphics[width=0.45\linewidth]{graphics/ei-contents.pdf}}
  289. \\\vspace{\baselineskip}
  290. \fbox{\includegraphics[width=0.45\linewidth]{graphics/ve-contents.pdf}}
  291. \hfill
  292. \fbox{\includegraphics[width=0.45\linewidth]{graphics/be-contents.pdf}}
  293. \end{figure*}
  294. \section{Typefaces}\label{sec:typefaces}\index{typefaces}
  295. \index{fonts|see{typefaces}}
  296. Tufte's books primarily use two typefaces: Bembo and Gill Sans. Bembo is used
  297. for the headings and body text, while Gill Sans is used for the title page and
  298. opening epigraphs in \BE.
  299. Since neither Bembo nor Gill Sans are available in default \LaTeX{}
  300. installations, the \TL document classes default to using Palatino and
  301. Helvetica, respectively. In addition, the Bera Mono typeface is used for
  302. \texttt{monospaced} type.
  303. The following font sizes are defined by the \TL classes:
  304. \begin{table}[h]\index{typefaces!sizes}
  305. \footnotesize%
  306. \begin{center}
  307. \begin{tabular}{lccl}
  308. \toprule
  309. \LaTeX{} size & Font size & Leading & Used for \\
  310. \midrule
  311. \verb+\tiny+ & 5 & 6 & sidenote numbers \\
  312. \verb+\scriptsize+ & 7 & 8 & --- \\
  313. \verb+\footnotesize+ & 8 & 10 & sidenotes, captions \\
  314. \verb+\small+ & 9 & 12 & quote, quotation, and verse environments \\
  315. \verb+\normalsize+ & 10 & 14 & body text \\
  316. \verb+\large+ & 11 & 15 & \textsc{b}-heads \\
  317. \verb+\Large+ & 12 & 16 & \textsc{a}-heads, \textsc{toc} entries, author, date \\
  318. \verb+\LARGE+ & 14 & 18 & handout title \\
  319. \verb+\huge+ & 20 & 30 & chapter heads \\
  320. \verb+\Huge+ & 24 & 36 & part titles \\
  321. \bottomrule
  322. \end{tabular}
  323. \end{center}
  324. \caption{A list of \LaTeX{} font sizes as defined by the \TL document classes.}
  325. \label{tab:font-sizes}
  326. \end{table}
  327. \section{Headings}\label{sec:headings}\index{headings}
  328. Tufte's books include the following heading levels: parts,
  329. chapters,\sidenote{Parts and chapters are defined for the \texttt{tufte\-book}
  330. class only.} sections, subsections, and paragraphs. Not defined by default
  331. are: sub-subsections and subparagraphs.
  332. \begin{table}[h]
  333. \begin{center}
  334. \footnotesize%
  335. \begin{tabular}{lcr}
  336. \toprule
  337. Heading & Style & Size \\
  338. \midrule
  339. Part & roman & \measure{24}{36}{40} \\
  340. Chapter & italic & \measure{20}{30}{40} \\
  341. Section & italic & \measure{12}{16}{26} \\
  342. Subsection & italic & \measure{11}{15}{26} \\
  343. Paragraph & italic & 10/14 \\
  344. \bottomrule
  345. \end{tabular}
  346. \end{center}
  347. \caption{Heading styles used in \BE.}
  348. \label{tab:heading-styles}
  349. \end{table}
  350. \paragraph{Paragraph} Paragraph headings (as shown here) are introduced by
  351. italicized text and separated from the main paragraph by a bit of space.
  352. \section{Environments}
  353. The following characteristics define the various environments:
  354. \begin{table}[h]
  355. \begin{center}
  356. \footnotesize%
  357. \begin{tabular}{lcl}
  358. \toprule
  359. Environment & Font size & Notes \\
  360. \midrule
  361. Body text & \measure{10}{14}{26} & \\
  362. Block quote & \measure{9}{12}{24} & Block indent (left and right) by \unit[1]{pc} \\
  363. Sidenotes & \measure{8}{10}{12} & Sidenote number is set inline, followed by word space \\
  364. Captions & \measure{8}{10}{12} & \\
  365. \bottomrule
  366. \end{tabular}
  367. \end{center}
  368. \caption{Environment styles used in \BE.}
  369. \label{tab:environment-styles}
  370. \end{table}
  371. \chapter{On the Use of the \texttt{tufte-book} Document Class}
  372. \label{ch:tufte-book}
  373. The Tufte-\LaTeX\ document classes define a style similar to the
  374. style Edward Tufte uses in his books and handouts. Tufte's style is known
  375. for its extensive use of sidenotes, tight integration of graphics with
  376. text, and well-set typography. This document aims to be at once a
  377. demonstration of the features of the Tufte-\LaTeX\ document classes
  378. and a style guide to their use.
  379. \section{Page Layout}\label{sec:page-layout}
  380. \subsection{Headings}\label{sec:headings}
  381. This style provides \textsc{a}- and \textsc{b}-heads (that is,
  382. \Verb|\section| and \Verb|\subsection|), demonstrated above.
  383. If you need more than two levels of section headings, you'll have to define
  384. them yourself at the moment;\sidenote{See see ``\nameref{sec:defining-sections}'' on
  385. page~\pageref{sec:defining-sections} for help with defining more heading
  386. levels.} there are no pre-defined styles for anything below a
  387. \Verb|\subsection|. As Bringhurst points out in \textit{The Elements of
  388. Typographic Style},\cite{Bringhurst2005} you should ``use as many levels of
  389. headings as you need: no more, and no fewer.''
  390. The Tufte-\LaTeX\ classes will emit an error if you try to use
  391. \linebreak\Verb|\subsubsection| and smaller headings.
  392. % let's start a new thought -- a new section
  393. \newthought{In his later books},\cite{Tufte2006} Tufte
  394. starts each section with a bit of vertical space, a non-indented paragraph,
  395. and sets the first few words of the sentence in \textsc{small caps}. To
  396. accomplish this using this style, use the \hl{\doccmd{newthought}} command:
  397. \begin{docspec}
  398. \doccmd{newthought}\{In his later books\}, Tufte starts\ldots
  399. \end{docspec}
  400. \section{Sidenotes}\label{sec:sidenotes}
  401. One of the most prominent and distinctive features of this style is the
  402. extensive use of sidenotes. There is a wide margin to provide ample room
  403. for sidenotes and small figures. Any \doccmd{footnote}s will automatically
  404. be converted to sidenotes.\footnote{This is a sidenote that was entered
  405. using the \texttt{\textbackslash footnote} command.} If you'd like to place ancillary
  406. information in the margin without the sidenote mark (the superscript
  407. number), you can use the \hl{\doccmd{marginnote}} command.\marginnote{This is a
  408. margin note. Notice that there isn't a number preceding the note, and
  409. there is no number in the main text where this note was written.}
  410. The specification of the \hl{\doccmd{sidenote}} command is:
  411. \begin{docspec}
  412. \doccmd{sidenote}[\docopt{number}][\docopt{offset}]\{\docarg{Sidenote text.}\}
  413. \end{docspec}
  414. Both the \docopt{number} and \docopt{offset} arguments are optional. If you
  415. provide a \docopt{number} argument, then that number will be used as the
  416. sidenote number. It will change of the number of the current sidenote only and
  417. will not affect the numbering sequence of subsequent sidenotes.
  418. Sometimes a sidenote may run over the top of other text or graphics in the
  419. margin space. If this happens, you can adjust the vertical position of the
  420. sidenote by providing a dimension in the \docopt{offset} argument. Some
  421. examples of valid dimensions are:
  422. \begin{docspec}
  423. \ttfamily 1.0in \qquad 2.54cm \qquad 254mm \qquad 6\Verb|\baselineskip|
  424. \end{docspec}
  425. If the dimension is positive it will push the sidenote down the page; if the
  426. dimension is negative, it will move the sidenote up the page.
  427. While both the \docopt{number} and \docopt{offset} arguments are optional, they
  428. must be provided in order. To adjust the vertical position of the sidenote
  429. while leaving the sidenote number alone, use the following syntax:
  430. \begin{docspec}
  431. \doccmd{sidenote}[][\docopt{offset}]\{\docarg{Sidenote text.}\}
  432. \end{docspec}
  433. The empty brackets tell the \Verb|\sidenote| command to use the default
  434. sidenote number.
  435. If you \emph{only} want to change the sidenote number, however, you may
  436. completely omit the \docopt{offset} argument:
  437. \begin{docspec}
  438. \doccmd{sidenote}[\docopt{number}]\{\docarg{Sidenote text.}\}
  439. \end{docspec}
  440. The \doccmd{marginnote} command has a similar \docarg{offset} argument:
  441. \begin{docspec}
  442. \doccmd{marginnote}[\docopt{offset}]\{\docarg{Margin note text.}\}
  443. \end{docspec}
  444. \section{References}
  445. References are placed alongside their citations as sidenotes,
  446. as well. This can be accomplished using the normal \hl{\doccmd{cite}}
  447. command.\sidenote{The first paragraph of this document includes a citation.}
  448. The complete list of references may also be printed automatically by using
  449. the \hl{\doccmd{bibliography}} command. (See the end of this document for an
  450. example.) If you do not want to print a bibliography at the end of your
  451. document, use the \hl{\doccmd{nobibliography}} command in its place.
  452. To enter multiple citations at one location,\cite[-3\baselineskip]{Tufte2006,Tufte1990} you can
  453. provide a list of keys separated by commas and the same optional vertical
  454. offset argument: \Verb|\cite{Tufte2006,Tufte1990}|.
  455. \begin{docspec}
  456. \doccmd{cite}[\docopt{offset}]\{\docarg{bibkey1,bibkey2,\ldots}\}
  457. \end{docspec}
  458. \section{Figures and Tables}\label{sec:figures-and-tables}
  459. Images and graphics play an integral role in Tufte's work.
  460. In addition to the standard \hl{\docenv{figure}} and \hl{\docenv{tabular}} environments,
  461. this style provides special figure and table environments for full-width
  462. floats.
  463. Full page--width figures and tables may be placed in \hl{\docenv{figure*}} or
  464. \hl{\docenv{table*}} environments. To place figures or tables in the margin,
  465. use the \hl{\docenv{marginfigure}} or \hl{\docenv{margintable}} environments as follows
  466. (see figure~\ref{fig:marginfig}):
  467. \begin{marginfigure}%
  468. \includegraphics[width=\linewidth]{helix}
  469. \caption{This is a margin figure. The helix is defined by
  470. $x = \cos(2\pi z)$, $y = \sin(2\pi z)$, and $z = [0, 2.7]$. The figure was
  471. drawn using Asymptote (\url{http://asymptote.sf.net/}).}
  472. \label{fig:marginfig}
  473. \end{marginfigure}
  474. \begin{docspec}
  475. \textbackslash begin\{marginfigure\}\\
  476. \qquad\textbackslash includegraphics\{helix\}\\
  477. \qquad\textbackslash caption\{This is a margin figure.\}\\
  478. \qquad\textbackslash label\{fig:marginfig\}\\
  479. \textbackslash end\{marginfigure\}\\
  480. \end{docspec}
  481. 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:
  482. \begin{docspec}
  483. \textbackslash{begin\{marginfigure\}[\docopt{offset}]}\\
  484. \qquad\ldots\\
  485. \textbackslash{end\{marginfigure\}}\\
  486. \mbox{}\\
  487. \textbackslash{begin\{margintable\}[\docopt{offset}]}\\
  488. \qquad\ldots\\
  489. \textbackslash{end\{margintable\}}\\
  490. \end{docspec}
  491. Figure~\ref{fig:fullfig} is an example of the \docenv{figure*}
  492. environment and figure~\ref{fig:textfig} is an example of the normal
  493. \docenv{figure} environment.
  494. \begin{figure*}[h]
  495. \includegraphics[width=\linewidth]{sine.pdf}%
  496. \caption{This graph shows $y = \sin x$ from about $x = [-10, 10]$.
  497. \emph{Notice that this figure takes up the full page width.}}%
  498. \label{fig:fullfig}%
  499. \end{figure*}
  500. \begin{figure}
  501. \includegraphics{hilbertcurves.pdf}
  502. % \checkparity This is an \pageparity\ page.%
  503. \caption{Hilbert curves of various degrees $n$.
  504. \emph{Notice that this figure only takes up the main textblock width.}}
  505. \label{fig:textfig}
  506. %\zsavepos{pos:textfig}
  507. \end{figure}
  508. Table~\ref{tab:normaltab} shows table created with the \docpkg{booktabs}
  509. package. Notice the lack of vertical rules---they serve only to clutter
  510. the table's data.
  511. \begin{table}[ht]
  512. \centering
  513. \fontfamily{ppl}\selectfont
  514. \begin{tabular}{ll}
  515. \toprule
  516. Margin & Length \\
  517. \midrule
  518. Paper width & \unit[8\nicefrac{1}{2}]{inches} \\
  519. Paper height & \unit[11]{inches} \\
  520. Textblock width & \unit[6\nicefrac{1}{2}]{inches} \\
  521. Textblock/sidenote gutter & \unit[\nicefrac{3}{8}]{inches} \\
  522. Sidenote width & \unit[2]{inches} \\
  523. \bottomrule
  524. \end{tabular}
  525. \caption{Here are the dimensions of the various margins used in the Tufte-handout class.}
  526. \label{tab:normaltab}
  527. %\zsavepos{pos:normaltab}
  528. \end{table}
  529. \section{Full-width text blocks}
  530. In addition to the new float types, there is a \hl{\docenv{fullwidth}}
  531. environment that stretches across the main text block and the sidenotes
  532. area.
  533. \begin{Verbatim}
  534. \begin{fullwidth}
  535. Lorem ipsum dolor sit amet...
  536. \end{fullwidth}
  537. \end{Verbatim}
  538. \begin{fullwidth}
  539. \small\itshape\lipsum[1]
  540. \end{fullwidth}
  541. \section{Typography}\label{sec:typography}
  542. \subsection{Typefaces}\label{sec:typefaces}
  543. If the Palatino, \textsf{Helvetica}, and \texttt{Bera Mono} typefaces are installed, this style
  544. will use them automatically. Otherwise, we'll fall back on the Computer Modern
  545. typefaces.
  546. \subsection{Letterspacing}\label{sec:letterspacing}
  547. This document class includes two new commands and some improvements on
  548. existing commands for letterspacing.
  549. When setting strings of \allcaps{ALL CAPS} or \smallcaps{small caps}, the
  550. letter\-spacing---that is, the spacing between the letters---should be
  551. increased slightly.\cite{Bringhurst2005} The \hl{\doccmd{allcaps}} command has proper letterspacing for
  552. strings of \allcaps{FULL CAPITAL LETTERS}, and the \hl{\doccmd{smallcaps}} command
  553. has letterspacing for \smallcaps{small capital letters}. These commands
  554. will also automatically convert the case of the text to upper- or
  555. lowercase, respectively.
  556. The \hl{\doccmd{textsc}} command has also been redefined to include
  557. letterspacing. The case of the \doccmd{textsc} argument is left as is,
  558. however. This allows one to use both uppercase and lowercase letters:
  559. \textsc{The Initial Letters Of The Words In This Sentence Are Capitalized.}
  560. \section{Document Class Options}\label{sec:options}
  561. \index{class options|(}
  562. The \doccls{tufte-book} class is based on the \LaTeX\ \doccls{book}
  563. document class. Therefore, you can pass any of the typical book
  564. options. There are a few options that are specific to the
  565. \doccls{tufte-book} document class, however.
  566. The \hl{\docclsopt{a4paper}} option will set the paper size to \smallcaps{A4} instead of
  567. the default \smallcaps{US} letter size.
  568. The \hl{\docclsopt{sfsidenotes}} option will set the sidenotes and title block in a
  569. \textsf{sans serif} typeface instead of the default roman.
  570. The \hl{\docclsopt{twoside}} option will modify the running heads so that the page
  571. number is printed on the outside edge (as opposed to always printing the page
  572. number on the right-side edge in \hl{\docclsopt{oneside}} mode).
  573. The \hl{\docclsopt{symmetric}} option typesets the sidenotes on the outside edge of
  574. the page. This is how books are traditionally printed, but is contrary to
  575. Tufte's book design which sets the sidenotes on the right side of the page.
  576. This option implicitly sets the \docclsopt{twoside} option.
  577. The \hl{\docclsopt{justified}} option sets all the text fully justified (flush left
  578. and right). The default is to set the text ragged right.
  579. The body text of Tufte's books are set ragged right. This prevents
  580. needless hyphenation and makes it easier to read the text in the slightly
  581. narrower column.
  582. The \hl{\docclsopt{bidi}} option loads the \docpkg{bidi} package which is used with
  583. \tXeLaTeX\ to typeset bi-directional text. Since the \docpkg{bidi}
  584. package needs to be loaded before the sidenotes and cite commands are defined,
  585. it can't be loaded in the document preamble.
  586. The \hl{\docclsopt{debug}} option causes the Tufte-\LaTeX\ classes to output debug
  587. information to the log file which is useful in troubleshooting bugs. It will
  588. also cause the graphics to be replaced by outlines.
  589. The \hl{\docclsopt{nofonts}} option prevents the Tufte-\LaTeX\ classes from
  590. automatically loading the Palatino and Helvetica typefaces. You should use
  591. this option if you wish to load your own fonts. If you're using \tXeLaTeX, this
  592. option is implied (\ie, the Palatino and Helvetica fonts aren't loaded if you
  593. use \tXeLaTeX).
  594. The \hl{\docclsopt{nols}} option inhibits the letterspacing code. The Tufte-\LaTeX\
  595. classes try to load the appropriate letterspacing package (either pdf\TeX's
  596. \docpkg{letterspace} package or the \docpkg{soul} package). If you're using
  597. \tXeLaTeX\ with \docpkg{fontenc}, however, you should configure your own
  598. letterspacing.
  599. The \hl{\docclsopt{notitlepage}} option causes \verb|\maketitle| to generate a title
  600. block instead of a title page. The \doccls{book} class defaults to a title
  601. page and the \doccls{handout} class defaults to the title block. There is an
  602. analogous \hl{\docclsopt{titlepage}} option that forces \verb|\maketitle| to
  603. generate a full title page instead of the title block.
  604. The \hl{\docclsopt{notoc}} option suppresses Tufte-\LaTeX's custom table of contents
  605. (\textsc{toc}) design. The current \textsc{toc} design only shows unnumbered
  606. chapter titles; it doesn't show sections or subsections. The \docclsopt{notoc}
  607. option will revert to \LaTeX's \textsc{toc} design.
  608. \index{class options|)}
  609. \chapter{Debug Stuff}
  610. %%
  611. % The back matter contains appendices, bibliographies, indices, glossaries, etc.
  612. \backmatter
  613. \bibliography{sample-handout}
  614. \bibliographystyle{plainnat}
  615. \printindex
  616. \end{document}