25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

331 lines
12KB

  1. \documentclass{tufte-handout}
  2. \usepackage{amsmath}
  3. % Set up the images/graphics package
  4. \usepackage{graphicx}
  5. \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
  6. \graphicspath{{graphics/}}
  7. \usepackage{mcaption} % FIXME move to .cls file
  8. %\title{An Example of the Usage of the Tufte-Handout Style\thanks{Inspired by Edward~R. Tufte!}}
  9. \title{An Example of the Usage of the Tufte-Handout Style}
  10. \author{The Tufte-\LaTeX\ Developers}
  11. %\date{22 February 2008} % if the \date{} command is left out, the current date will be used
  12. \usepackage{helvet}
  13. % The following package makes prettier tables. We're all about the bling!
  14. \usepackage{booktabs}
  15. % The units package provides nice, non-stacked fractions and better spacing
  16. % for units.
  17. \usepackage{units}
  18. % The fancyvrb package lets us customize the formatting of verbatim
  19. % environments. We use a slightly smaller font.
  20. \usepackage{fancyvrb}
  21. \fvset{fontsize=\normalsize}
  22. \usepackage{multicol}
  23. %\usepackage[savepos]{zref}
  24. \usepackage{lipsum}
  25. \usepackage{url}
  26. \urldef{\asyurl}\url{http://asymptote.sf.net/}
  27. \begin{document}
  28. \maketitle % this prints the handout title, author, and date
  29. \begin{abstract}
  30. \noindent This document describes the Tufte handout \LaTeX\ document style.
  31. It also provides examples and comments on the style's use.
  32. \end{abstract}
  33. %\printclassoptions
  34. The \Verb|tufte-handout| document class defines a style similar to the
  35. style Edward Tufte uses in his books and handouts. Tufte's style is known
  36. for its extensive use of sidenotes, tight integration of graphics with
  37. text, and well-set typography. This document aims to be at once a
  38. demonstration of the features of the \Verb|tufte-handout| document class
  39. and a style guide to its use.
  40. \section{Page Layout}\label{sec:page-layout}
  41. \subsection{Headings}\label{sec:headings}
  42. This style provides \textsc{a}- and \textsc{b}-heads (that is,
  43. \Verb|\section| and \Verb|\subsection|) demonstrated above.
  44. If you need more than two levels of section headings, you'll have to define
  45. them yourself at the moment;\sidenote{See see ``Defining new sections'' on
  46. page~\pageref{sec:defining-sections} for help with defining more heading
  47. levels.} there are no pre-defined styles for anything below a
  48. \Verb|\subsection|. As Bringhurst points out in \textit{The Elements of
  49. Typographic Style},\cite{Bringhurst2005} you should ``use as many levels of
  50. headings as you need: no more, and no fewer.''
  51. The Tufte-handout class will emit an error if you try to use
  52. \Verb|\subsubsection| and smaller headings.
  53. %\medskip
  54. %\begin{fullwidth}
  55. %\begin{Verbatim}
  56. %! Package tufte-handout Error: \subsubsection is undefined by this class.
  57. %(tufte-handout) See Robert Bringhurst's _The Elements of
  58. %(tufte-handout) Typographic Style_, section 4.2.2.
  59. %(tufte-handout) \subsubsection was used.
  60. %\end{Verbatim}
  61. %\end{fullwidth}
  62. %\medskip
  63. % let's start a new thought -- a new section
  64. \newthought{In his later books},\cite{Tufte2006} Tufte
  65. starts each section with a bit of vertical space, a non-indented paragraph,
  66. and sets the first few words of the sentence in \textsc{small caps}. To
  67. accomplish this using this style, use the \Verb|\newthought| command:
  68. \Verb|\newthought{In his later books}, Tufte starts|\ldots
  69. \subsection{Sidenotes}\label{sec:sidenotes}
  70. One of the most prominent and distinctive features of this style is the
  71. extensive use of sidenotes. There is a wide margin to provide ample room
  72. for sidenotes and small figures. Any \Verb|\footnote|s will automatically
  73. be converted to sidenotes.\footnote{This is a sidenote that was entered
  74. using the \texttt{\textbackslash footnote} command.} If you'd like to place ancillary
  75. information in the margin without the sidenote mark (the superscript
  76. number), you can use the \Verb|\marginnote| command.\marginnote{This is a
  77. margin note. Notice that there isn't a number preceding the note, and
  78. there is no number in the main text where this note was written.}
  79. \subsection{References}
  80. References are placed alongside their citations as sidenotes,
  81. as well. This can be accomplished using the normal \Verb|\cite|
  82. command.\footnote{The first paragraph of this document includes a citation.}
  83. The complete list of references may also be printed automatically by using
  84. the \Verb|\bibliography| command. (See the end of this document for an
  85. example.) If you do not want to print a bibliography at the end of your
  86. document, use the \Verb|\nobibliography| command in its place.
  87. To enter multiple citations at one
  88. location,\cite{Tufte2006}\cite{Tufte1990} you will need to use multiple
  89. \Verb|\cite| commands: \Verb|\cite{Tufte2006}| \Verb|\cite{Tufte1990}|. Each
  90. \Verb|\cite| command will generate its own sidenote and its own sidenote
  91. number.
  92. \section{Figures and Tables}\label{sec:figures-and-tables}
  93. Images and graphics play an integral role in Tufte's work.
  94. In addition to the standard \Verb|figure| and \Verb|tabular| environments,
  95. this style provides special figure and table environments for full-width
  96. floats.
  97. Full page width figures and tables may be placed in \texttt{figure*} or
  98. \texttt{table*} environments. To place figures or tables in the margin,
  99. use the \Verb|marginfigure| or \Verb|margintable| environments as follows
  100. (see figure~\ref{fig:marginfig}):
  101. \begin{marginfigure}
  102. \includegraphics[width=\marginparwidth]{helix}
  103. \caption{This is a margin figure. The helix is defined by
  104. $x = \cos(2\pi z)$, $y = \sin(2\pi z)$, and $z = [0, 2.7]$. The figure was
  105. drawn using Asymptote (\asyurl).}
  106. \label{fig:marginfig}
  107. \end{marginfigure}
  108. \begin{Verbatim}
  109. \begin{marginfigure}
  110. \includegraphics{blah}
  111. \caption{This figure is in the margin.}
  112. \end{marginfigure}
  113. \end{Verbatim}
  114. Figure~\ref{fig:fullfig} is an example of the \Verb|figure*|
  115. environment and figure~\ref{fig:textfig} is an example of the normal
  116. \Verb|figure| environment.
  117. \begin{figure*}
  118. \includegraphics{sine.pdf}
  119. \caption{This graph shows $y = \sin x$ from about $x = [-10, 10]$.
  120. \emph{Notice that this figure takes up the full page width.}}
  121. \label{fig:fullfig}
  122. %\zsavepos{pos:fullfig}
  123. \end{figure*}
  124. \begin{figure}
  125. \includegraphics{hilbertcurves.pdf}
  126. \caption{Hilbert curves of various degrees $n$.
  127. \emph{Notice that this figure only takes up the main textblock width.}}
  128. \label{fig:textfig}
  129. %\zsavepos{pos:textfig}
  130. \end{figure}
  131. Table~\ref{tab:normaltab} shows table created with the \texttt{booktabs}
  132. package. Notice the lack of vertical rules---they serve only to clutter
  133. the table's data.
  134. \begin{table}[ht]
  135. \centering
  136. \fontfamily{ppl}\selectfont
  137. \begin{tabular}{ll}
  138. \toprule
  139. Margin & Length \\
  140. \midrule
  141. Paper width & \unit[8\nicefrac{1}{2}]{inches} \\
  142. Paper height & \unit[11]{inches} \\
  143. Textblock width & \unit[6\nicefrac{1}{2}]{inches} \\
  144. Textblock/sidenote gutter & \unit[\nicefrac{3}{8}]{inches} \\
  145. Sidenote width & \unit[2]{inches} \\
  146. \bottomrule
  147. \end{tabular}
  148. \caption{Here are the dimensions of the various margins used in the Tufte-handout class.}
  149. \label{tab:normaltab}
  150. %\zsavepos{pos:normaltab}
  151. \end{table}
  152. \section{Full-width text blocks}
  153. In addition to the new float types, there is a \texttt{fullwidth}
  154. environment that stretches across the main text block and the sidenotes
  155. area.
  156. \begin{Verbatim}
  157. \begin{fullwidth}
  158. Lorem ipsum dolor sit amet...
  159. \end{fullwidth}
  160. \end{Verbatim}
  161. \begin{fullwidth}
  162. \small\itshape\lipsum[1]
  163. \end{fullwidth}
  164. \section{Typography}\label{sec:typography}
  165. \subsection{Typefaces}\label{sec:typefaces}
  166. If the Palatino and Bera Mono typefaces are installed, this style will use
  167. them automatically. Otherwise, we'll fall back on the Computer Modern
  168. typefaces.
  169. \subsection{Letterspacing}\label{sec:letterspacing}
  170. This document class includes two new commands and some improvements on
  171. existing commands for letterspacing.
  172. When setting strings of \allcaps{ALL CAPS} or \smallcaps{small caps}, the
  173. letterspacing---that is, the spacing between the letters---should be
  174. increased slightly.\cite{Bringhurst2005} The \Verb|\allcaps| command has proper letterspacing for
  175. strings of \allcaps{FULL CAPITAL LETTERS}, and the \Verb|\smallcaps| command
  176. has letterspacing for \smallcaps{small capital letters}. These commands
  177. will also automatically convert the case of the text to upper- or
  178. lowercase, respectively.
  179. The \Verb|\textsc| command has also been redefined to include
  180. letterspacing. The case of the \Verb|\textsc| argument is left as is,
  181. however. This allows one to use both uppercase and lowercase letters:
  182. \textsc{The Initial Letters Of The Words In This Sentence Are Capitalized.}
  183. \section{Customization}\label{sec:customization}
  184. \subsection{Document class options}\label{sec:options}
  185. The \Verb|tufte-handout| class is based on the \LaTeX\ \Verb|article|
  186. document class. Therefore, you can pass any of the typical article
  187. options. There are a few options that are specific to the
  188. \Verb|tufte-handout| document class, however.
  189. The \Verb|a4paper| option will set the paper size to \smallcaps{A4} instead of
  190. the default \smallcaps{US} letter size.
  191. The \Verb|sfsidenotes| option will set the sidenotes in a \textsf{sans
  192. serif} typeface instead of the default roman.
  193. The \Verb|twoside| option will modify the running heads so that the page
  194. number is printed on the outside edge (as opposed to always printing the page
  195. number on the right-side edge in \Verb|oneside| mode).
  196. The \Verb|symmetric| option typesets the sidenotes on the outside edge of
  197. the page. This is how books are traditionally printed, but is contrary to
  198. Tufte's book design which sets the sidenotes on the right side of the page.
  199. This option implicitly sets the \Verb|twoside| option.
  200. The \Verb|justified| option sets all the text fully justified (flush left
  201. and right). The default is to set the text ragged right.
  202. The body text of Tufte's books are set ragged right. This prevents
  203. needless hyphenation and makes it easier to read the text in the slightly
  204. narrower column.
  205. \subsection{Defining new sections}\label{sec:defining-sections}
  206. As mentioned on page~\pageref{sec:headings}, the \Verb|tufte-handout|
  207. document class only defines \Verb|\section| and \Verb|\subsection|
  208. headings.
  209. If you wanted to define, say, a \Verb|\paragraph| heading, you could do it
  210. as follows:
  211. \begin{Verbatim}
  212. \makeatletter
  213. \renewcommand\paragraph{\@startsection{paragraph}% the name of the new section
  214. {4}% the section level number
  215. {0em}% indentation amount
  216. {\baselineskip}% amount of space to leave before heading
  217. {-1.5em}% amount of space to leave after heading
  218. {\normalfont\itshape}% style
  219. }
  220. \makeatother
  221. \end{Verbatim}
  222. Place that code in the preamble of your document and you'll now be able to use
  223. \Verb|\paragraph|.
  224. For more details on defining section levels, see \textit{The \LaTeX\
  225. Companion},\cite{Mittelbach2004} or use the \Verb|titlesec| package.
  226. \section{Installation}\label{sec:installation}
  227. To install the \Verb|tufte-handout| class, simply drop the
  228. \Verb|tufte-handout.cls| file into the same directory as your \Verb|.tex|
  229. file.
  230. % TODO add instructions for installing it globally
  231. \section{Support}\label{sec:support}
  232. \subsection{Package Dependencies}\label{sec:dependencies}
  233. The following is a list of packages that the \Verb|tufte-handout| document
  234. class relies upon. Packages marked with an asterisk are optional.
  235. \begin{multicols}{2}
  236. \begin{itemize}
  237. \item geometry
  238. \item ragged2e
  239. \item chngpage
  240. \item paralist
  241. \item textcase
  242. \item footmisc
  243. \item natbib and bibentry
  244. \item placeins
  245. \item caption
  246. \item fancyhdr
  247. \item microtype*
  248. \item soul*
  249. \item palatino*
  250. \item beramono*
  251. \end{itemize}
  252. \end{multicols}
  253. \subsection{Tufte-\LaTeX\ Website}\label{sec:website}
  254. The website for the Tufte-\LaTeX\ packages is located at
  255. \url{http://code.google.com/p/tufte-latex/}. On our website, you'll find
  256. links to our \smallcaps{svn} repository, mailing lists, bug tracker, and documentation.
  257. \bibliography{sample-handout}
  258. \bibliographystyle{plainnat}
  259. %\section{Float Positions---DEBUG}
  260. %Full figure: $x=\zposx{pos:fullfig}$, $y=\zposy{pos:fullfig}$
  261. %Text figure: $x=\zposx{pos:textfig}$, $y=\zposy{pos:textfig}$
  262. %Normal table: $x=\zposx{pos:normaltab}$, $y=\zposy{pos:normaltab}$
  263. \end{document}