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

196 line
4.7KB

  1. \NeedsTeXFormat{LaTeX2e}[1994/06/01]
  2. \ProvidesClass{tufte-handout}[2007/10/18 v1.1.0 Tufte-handout class]
  3. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}%
  4. \typeout{NOTE: Passing ``\CurrentOption" option on to the
  5. standard LaTeX book class}}
  6. \ProcessOptions
  7. \LoadClass[11pt]{article}%
  8. %%
  9. % Set page layout geometry -- someone please submit a patch to make letterpaper optional!
  10. \RequirePackage[letterpaper,includemp,width=6.5in,marginparsep=0.375in,marginparwidth=2in]{geometry}
  11. %%
  12. % Separation marginpars by a line's worth of space.
  13. \setlength\marginparpush{\baselineskip}
  14. %%
  15. % Font for margin items
  16. \newcommand{\@tufteh@marginfont}{\normalfont\scriptsize\sffamily}
  17. %%
  18. % Modify \raggedright from latex.ltx to allow hyphenation per Donald Arseneau
  19. \def\@tufteh@raggedright{%
  20. \let\\\@centercr\@rightskip\z@ plus 0.08\hsize% changed this line
  21. \rightskip\@rightskip
  22. \leftskip\z@skip}
  23. %%
  24. % Turn off section numbering
  25. \setcounter{secnumdepth}{-1}
  26. %%
  27. % Tighten up space between displays (e.g., a figure or table) and make symmetric
  28. \setlength\abovedisplayskip{6pt plus 2pt minus 4pt}
  29. \setlength\belowdisplayskip{6pt plus 2pt minus 4pt}
  30. %%
  31. % To accomodate full-width display environments
  32. \RequirePackage{chngpage}
  33. % Compute length used for full-width displays
  34. \newlength{\@tufteh@overhang}
  35. \setlength{\@tufteh@overhang}{\marginparwidth}
  36. \addtolength{\@tufteh@overhang}{\marginparsep}
  37. %%
  38. % Alter \maketitle from article.cls
  39. \renewcommand\maketitle{\par
  40. \global\let\and\relax
  41. \begingroup
  42. \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
  43. \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
  44. \long\def\@makefntext##1{\parindent 1em\noindent
  45. \hb@xt@1.8em{%
  46. \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
  47. \newpage
  48. \global\@topnum\z@
  49. \@maketitle
  50. \@thanks
  51. \endgroup
  52. \global\let\thanks\relax
  53. \global\let\maketitle\relax
  54. \global\let\@maketitle\relax
  55. \global\let\@thanks\@empty
  56. \global\let\@author\@empty
  57. \global\let\@date\@empty
  58. \global\let\@title\@empty
  59. \global\let\title\relax
  60. \global\let\author\relax
  61. \global\let\date\relax
  62. }
  63. \def\@maketitle{%
  64. \newpage
  65. \let\footnote\sidenote
  66. {\noindent\large\bfseries \@title\par}%
  67. \vskip 3pt%
  68. {\small \@date\par}%
  69. \vskip 3pt%
  70. {\small \@author\par}
  71. }
  72. %%
  73. % Abstract
  74. \renewenvironment{abstract}%
  75. {\begin{quotation}
  76. \begin{sffamily}
  77. \begin{small}}%
  78. { \end{small}
  79. \end{sffamily}
  80. \end{quotation}}
  81. %%
  82. % Require paralist package for tigher lists
  83. \RequirePackage{paralist}
  84. % Add rightmargin to compactenum
  85. \def\@compactenum@{%
  86. \expandafter\list\csname label\@enumctr\endcsname{%
  87. \usecounter{\@enumctr}%
  88. \rightmargin=2em% added this
  89. \parsep\plparsep
  90. \itemsep\plitemsep
  91. \topsep\pltopsep
  92. \partopsep\plpartopsep
  93. \def\makelabel##1{\hss\llap{##1}}}}
  94. %%
  95. % An environment for paragraph-style section
  96. \providecommand\newthought[1]{\vspace{1.8\baselineskip plus 3pt minus 2pt}%
  97. {\noindent\scshape #1}}
  98. %%
  99. % Sidenote: "Where God meant footnotes to go." --Tufte
  100. \newcommand{\sidenote}[2][-0.8\baselineskip]%
  101. {\footnotemark%
  102. \marginpar{\@tufteh@marginfont
  103. \vspace*{#1}
  104. \textsuperscript{\thefootnote}%
  105. \@tufteh@raggedright #2}}
  106. %%
  107. % Sidenote without the footnote mark
  108. \providecommand\marginnote[1]{\marginpar{\footnotesize\raggedright #1}}
  109. %%
  110. % Margin figure
  111. \newcommand{\marginfigure}[2][-1.2ex]%
  112. {\marginpar{\def\@captype{figure}
  113. \normalfont\scriptsize
  114. \vspace*{#1}
  115. \@tufteh@raggedright #2}}
  116. %%
  117. % Margin table
  118. \newcommand{\margintable}[2][-1.2ex]%
  119. {\marginpar{\def\@captype{table}
  120. \normalfont\scriptsize
  121. \vspace*{#1}
  122. \@tufteh@raggedright #2}}
  123. %%
  124. % Full-width figure
  125. \renewenvironment{figure*}[1][htbp]
  126. {\@float{figure}[#1]
  127. \begin{adjustwidth}{}{-\tufteh@overhang}%
  128. \begin{minipage}{\linewidth}}
  129. { \end{minipage}%
  130. \end{adjustwidth}%
  131. \end@float}
  132. %%
  133. % Full-width table
  134. \renewenvironment{table*}[1][htbp]
  135. {\@float{table}[#1]
  136. \begin{adjustwidth}{}{-\tufteh@overhang}%
  137. \begin{minipage}{\linewidth}}
  138. { \end{minipage}%
  139. \end{adjustwidth}%
  140. \end@float}
  141. %%
  142. % Full-page-width area
  143. \newenvironment{fullwidth}
  144. {\begin{adjustwidth}{}{-\tufteh@overhang}}%
  145. {\end{adjustwidth}}
  146. %%
  147. % Set raggedright and paragraph indentation for document
  148. \AtBeginDocument{\@tufteh@raggedright\setlength\parindent{1em}}
  149. \endinput