Browse Source

* Added marginfig and margintab environments to place figures and tables in

the margin.  Thanks, Kjell Magne Fauske!


git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@48 516e2f36-ce3a-0410-bea4-1d4a03f5df72
master
Kevin M. Godby 18 years ago
parent
commit
67a7f54b3d
1 changed files with 37 additions and 3 deletions
  1. +37
    -3
      tufte-handout.cls

+ 37
- 3
tufte-handout.cls View File

@@ -273,8 +273,25 @@
\vspace*{#1}
\@tufteh@raggedright #2}}

% FIXME: if anyone can make this an environment instead -- patch welcome!
%%
% Margin figure environment

\newsavebox{\@tufteh@marginfigbox}
\newenvironment{marginfig}[1]
[-1.2ex]
{\FloatBarrier% process all floats before this point so the figure numbers stay in order.
\begin{lrbox}{\@tufteh@marginfigbox}
\begin{minipage}{\marginparwidth}
\@tufteh@marginfont
\def\@captype{figure}
\vspace*{#1}
\@tufteh@raggedright
}
{\end{minipage}%
\end{lrbox}%
\marginpar{\usebox{\@tufteh@marginfigbox}}}


%%
% Margin table

@@ -286,7 +303,24 @@
\vspace*{#1}
\@tufteh@raggedright #2}}

% FIXME: if anyone can make this an environment instead -- patch welcome!

%%
% Margin table environment
\newsavebox{\@tufteh@margintablebox}
\newenvironment{margintab}[1]
[-1.2ex]
{\FloatBarrier% process all floats before this point so the figure numbers stay in order.
\begin{lrbox}{\@tufteh@margintablebox}
\begin{minipage}{\marginparwidth}
\@tufteh@marginfont
\def\@captype{table}
\vspace*{#1}
\@tufteh@raggedright
}
{\end{minipage}%
\end{lrbox}%
\marginpar{\usebox{\@tufteh@margintablebox}}}


%%
% Full-width figure


Loading…
Cancel
Save