Sfoglia il codice sorgente

* 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
master
Kevin M. Godby 18 anni fa
parent
commit
7e590dd743
1 ha cambiato i file con 22 aggiunte e 1 eliminazioni
  1. +22
    -1
      tufte-handout.cls

+ 22
- 1
tufte-handout.cls Vedi File

@@ -8,6 +8,12 @@
\newif\if@tufteh@afourpaper \@tufteh@afourpaperfalse \newif\if@tufteh@afourpaper \@tufteh@afourpaperfalse
\DeclareOption{a4paper}{\@tufteh@afourpapertrue} \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 % FIXME: should probably specify options not supported like Mittelbach's aipproc.cls


\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
@@ -32,7 +38,11 @@
%% %%
% Font for margin items % 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 % Modify \raggedright from latex.ltx to allow hyphenation per Donald Arseneau
@@ -224,6 +234,17 @@
{\begin{adjustwidth}{}{-\@tufteh@overhang}}% {\begin{adjustwidth}{}{-\@tufteh@overhang}}%
{\end{adjustwidth}} {\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 % Set raggedright and paragraph indentation for document




Loading…
Annulla
Salva