From 7e590dd743da808985a8950195cd668a58177410 Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Mon, 25 Feb 2008 02:13:21 +0000 Subject: [PATCH] * Added 'sfsidenotes' option to the tufte-handout class. Using this option will set sidenotes and captions in the sans serif font. The default is to set the sidenotes and captions in the serif font. * New requirement: the 'caption' package. git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@41 516e2f36-ce3a-0410-bea4-1d4a03f5df72 --- tufte-handout.cls | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tufte-handout.cls b/tufte-handout.cls index e36a463..e7a907d 100644 --- a/tufte-handout.cls +++ b/tufte-handout.cls @@ -8,6 +8,12 @@ \newif\if@tufteh@afourpaper \@tufteh@afourpaperfalse \DeclareOption{a4paper}{\@tufteh@afourpapertrue} +%% +% sfsidenotes option -- typesets sidenotes in sans serif typeface + +\newif\if@tufteh@sfsidenotes \@tufteh@sfsidenotesfalse +\DeclareOption{sfsidenotes}{\@tufteh@sfsidenotestrue} + % FIXME: should probably specify options not supported like Mittelbach's aipproc.cls \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} @@ -32,7 +38,11 @@ %% % Font for margin items -\newcommand{\@tufteh@marginfont}{\normalfont\scriptsize\sffamily} +\if@tufteh@sfsidenotes + \newcommand{\@tufteh@marginfont}{\normalfont\scriptsize\sffamily} +\else + \newcommand{\@tufteh@marginfont}{\normalfont\scriptsize} +\fi %% % Modify \raggedright from latex.ltx to allow hyphenation per Donald Arseneau @@ -224,6 +234,17 @@ {\begin{adjustwidth}{}{-\@tufteh@overhang}}% {\end{adjustwidth}} +%% +% Format the captions in a style similar to the sidenotes + +% if 'sfsidenotes' option is specified, set the captions in sf, too. +\if@tufteh@sfsidenotes + \RequirePackage[format=default,font={sf,scriptsize},justification=raggedright,singlelinecheck=false]{caption} +\else + \RequirePackage[format=default,font={rm,scriptsize},justification=raggedright,singlelinecheck=false]{caption} +\fi + + %% % Set raggedright and paragraph indentation for document