From c4cad1b99d31ca944138db93fe566884466d5af8 Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Sun, 23 Aug 2009 05:23:24 +0000 Subject: [PATCH] * The sidenote and caption offsets are now stored in global lengths. git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@122 516e2f36-ce3a-0410-bea4-1d4a03f5df72 --- sample-book.pdf | Bin 323012 -> 323012 bytes sample-handout.pdf | Bin 123585 -> 123585 bytes tufte-common.def | 15 +++++++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sample-book.pdf b/sample-book.pdf index 5ec62f84b59eddc17ec549bd38ab330dce532e42..564e6d0e1c3e678f871bc9c04f0620177f83238d 100644 GIT binary patch delta 121 zcmX?dTlmOr;f5B*7N!>FEi5bcvKt#17#SLwOkcm3MFz&1{O)MRcB_3XTKdig#>U1@ pmX_uQrmjGhX6EM3&gMoIW=2Mq=1%6OZpL;BHiVQ+U;dUw769>#B02y7 delta 120 zcmX?dTlmOr;f5B*7N!>FEi5bcvKtwinpzl}PhY>6MTQN+nXEV~bGy|(7A<{eOEWiP r3u8lb6GLZ9S2s5^LpMW914j#ILvvSC7js7wI|Um;N~SM=%OVQ^tW6=? diff --git a/sample-handout.pdf b/sample-handout.pdf index eea8b26c3c05a663f49692832ae17bfd94716698..bf998e4a7790668c0e8f2e48631bbda760f7d48a 100644 GIT binary patch delta 135 zcmX?jl>OjQ_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@ delta 135 zcmX?jl>OjQ_J%Et53jNt8JZdzn3zp}ag|X9#@Wt&jWLWT!PUgY$=TS&(bd`2$;{lz z+|t;<#K6GZ(8$2W#lpzR*iONQppsYxJ3Fr8lEk8tilWpsE}&i$3u7)-RabvEE&!T! BBzOP- diff --git a/tufte-common.def b/tufte-common.def index 7186b51..0498976 100644 --- a/tufte-common.def +++ b/tufte-common.def @@ -888,13 +888,19 @@ % % Define \sidenote command. Can handle \cite. -\newcommand{\@tufte@sidenote@vertical@offset}{0pt} +\newlength{\@tufte@sidenote@vertical@offset} +\setlength{\@tufte@sidenote@vertical@offset}{0pt} % #1 = footnote num, #2 = vertical offset, #3 = footnote text \long\def\@tufte@sidenote[#1][#2]#3{% \let\cite\@tufte@infootnote@cite% use the in-sidenote \cite command \gdef\@tufte@citations{}% clear out any old citations - \ifthenelse{\NOT\isempty{#2}}{\renewcommand{\@tufte@sidenote@vertical@offset}{#2}}{}% + \ifthenelse{\NOT\isempty{#2}}{% + \setlength{\@tufte@sidenote@vertical@offset}{#2}% + \global\@tufte@sidenote@vertical@offset=\@tufte@sidenote@vertical@offset% + }{% + \global\@tufte@sidenote@vertical@offset=0pt% + }% \ifthenelse{\isempty{#1}}{% % no specific footnote number provided \stepcounter\@mpfn% @@ -1043,7 +1049,8 @@ \ifthenelse{\isempty{#1}}% {\gdef\@tufte@stored@shortcaption{#3}}% {\gdef\@tufte@stored@shortcaption{#1}}% - \gdef\@tufte@caption@vertical@offset{-#2}% we want a positive offset to lower captions + \setlength{\@tufte@caption@vertical@offset}{-#2}% we want a positive offset to lower captions + \global\@tufte@caption@vertical@offset\@tufte@caption@vertical@offset% \gdef\@tufte@stored@caption{#3}% } @@ -1113,7 +1120,7 @@ \begin{lrbox}{\@tufte@caption@box}\hbox{}\end{lrbox}% \gdef\@tufte@stored@shortcaption{}% \gdef\@tufte@stored@caption{}% - \gdef\@tufte@caption@vertical@offset{0pt}% reset caption offset + \global\@tufte@caption@vertical@offset=0pt% reset caption offset } \newcommand{\@tufte@float@textwidth}[3][0pt]{%