From a2b538a285ddbcc825fba67ce41d647d39b28443 Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Mon, 25 Feb 2008 02:28:05 +0000 Subject: [PATCH] * Using the 'placeins' package to disallow floats to float beyond the current section or subsection. * New package requirement: placeins git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@45 516e2f36-ce3a-0410-bea4-1d4a03f5df72 --- tufte-handout.cls | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tufte-handout.cls b/tufte-handout.cls index a12bdd2..e6871e5 100644 --- a/tufte-handout.cls +++ b/tufte-handout.cls @@ -176,12 +176,20 @@ % TODO: Combine sequences of citations so that 2,3,4,6 becomes 2-4,6 % but be careful of hypperref interaction + +%% +% The placeins package provides the \FloatBarrier command. This forces +% LaTeX to place all of the floats before proceeding. We'll use this to +% keep the float (figure and table) numbers in sequence. +\RequirePackage{placeins} + %% % Margin figure \newcommand{\marginfigure}[2]% [-1.2ex]% - {\marginpar{\@tufteh@marginfont + {\FloatBarrier% process all floats before this point so the figure numbers stay in order. + \marginpar{\@tufteh@marginfont \def\@captype{figure} \vspace*{#1} \@tufteh@raggedright #2}} @@ -193,7 +201,8 @@ \newcommand{\margintable}[2]% [-1.2ex]% - {\marginpar{\@tufteh@marginfont + {\FloatBarrier% process all floats before this point so the table numbers stay in order. + \marginpar{\@tufteh@marginfont \def\@captype{table} \vspace*{#1} \@tufteh@raggedright #2}}