From 630a4ac84d0e5664728460b8da640118d175d9db Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Thu, 27 Aug 2009 08:00:00 +0000 Subject: [PATCH] * Added \ProvidesFile to the tufte-common.def file so it has a nicer description in the \listfiles output. * Created a utility command \gsetlength which is conceptually equivalent to \global\setlength. git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@123 516e2f36-ce3a-0410-bea4-1d4a03f5df72 --- sample-book.pdf | Bin 323012 -> 323012 bytes sample-handout.pdf | Bin 123585 -> 123585 bytes tufte-common.def | 27 +++++++++++++++++---------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/sample-book.pdf b/sample-book.pdf index 564e6d0e1c3e678f871bc9c04f0620177f83238d..0028ad995ee4839c978fb05565ccb695727cf9c1 100644 GIT binary patch delta 124 zcmX?dTlmOr;f5B*7N!>FEi5bcvY8tgnOYc3U&z8J$!%$1VFckDOn!GXW4qNp7A<{e t7dIC(Gjj_^Lqi~8WNGMVX<};TY-wn2Xli0)FEi5bcvKt#17#SLwOkcm3MFz&1{O)MRcB_3XTKdig#>U1@ pmX_uQrmjGhX6EM3&gMoIW=2Mq=1%6OZpL;BHiVQ+U;dUw769>#B02y7 diff --git a/sample-handout.pdf b/sample-handout.pdf index bf998e4a7790668c0e8f2e48631bbda760f7d48a..044bce3b9a3e9dabc4c26a004f509229f16dadf4 100644 GIT binary patch delta 135 zcmX?jl>OjQ_J%Et53jPD8yK0Io0?94ag|X9#@Wt&jWLWT!NkOjQ_J%Et53jNt8yFZF8W~J~ag|X9#@Wt&jWLWT!N}Cy&C$is#MRl+%+c7* z*wM+w+|t0v%+=Y##KO?o)K0;MppsYxJ3Fr8lEk8tilWpsE}%^&7RFqvs;>TSTmX@v BBz^z@ diff --git a/tufte-common.def b/tufte-common.def index 0498976..bd672b5 100644 --- a/tufte-common.def +++ b/tufte-common.def @@ -1,6 +1,8 @@ -%\NeedsTeXFormat{LaTeX2e}[1994/06/01] +%% +%% This file contains the code that's common to the Tufte-LaTeX document classes. +%% -%\ProvidesPackage{tufte-common}[2009/05/17 v3.0.0 Common code for the Tufte-LaTeX styles] +\ProvidesFile{tufte-common.def}[2009/08/24 v3.0.0 Common code for the Tufte-LaTeX styles] %% % The `xkeyval' package simplifies the user interface for the document class options @@ -273,8 +275,15 @@ } %% -% Load the `hyperref' package. We will set more options later. -% TODO Set nice defaults for hyperref options +% Globally sets the length +\newcommand*{\gsetlength}[2]{% + \setlength{#1}{#2}% + \global#1=#1\relax% +} + +%%% +%% Load the `hyperref' package. + \ifthenelse{\boolean{@tufte@loadhyper}}{% \ifthenelse{\boolean{@tufte@xetex}} {\RequirePackage[xetex]{hyperref}} @@ -896,10 +905,9 @@ \let\cite\@tufte@infootnote@cite% use the in-sidenote \cite command \gdef\@tufte@citations{}% clear out any old citations \ifthenelse{\NOT\isempty{#2}}{% - \setlength{\@tufte@sidenote@vertical@offset}{#2}% - \global\@tufte@sidenote@vertical@offset=\@tufte@sidenote@vertical@offset% + \gsetlength{\@tufte@sidenote@vertical@offset}{#2}% }{% - \global\@tufte@sidenote@vertical@offset=0pt% + \gsetlength{\@tufte@sidenote@vertical@offset}{0pt}% }% \ifthenelse{\isempty{#1}}{% % no specific footnote number provided @@ -1049,8 +1057,7 @@ \ifthenelse{\isempty{#1}}% {\gdef\@tufte@stored@shortcaption{#3}}% {\gdef\@tufte@stored@shortcaption{#1}}% - \setlength{\@tufte@caption@vertical@offset}{-#2}% we want a positive offset to lower captions - \global\@tufte@caption@vertical@offset\@tufte@caption@vertical@offset% + \gsetlength{\@tufte@caption@vertical@offset}{-#2}% we want a positive offset to lower captions \gdef\@tufte@stored@caption{#3}% } @@ -1120,7 +1127,7 @@ \begin{lrbox}{\@tufte@caption@box}\hbox{}\end{lrbox}% \gdef\@tufte@stored@shortcaption{}% \gdef\@tufte@stored@caption{}% - \global\@tufte@caption@vertical@offset=0pt% reset caption offset + \gsetlength{\@tufte@caption@vertical@offset}{0pt}% reset caption offset } \newcommand{\@tufte@float@textwidth}[3][0pt]{%