From 6cfd3e4b14b2e041b49c9d011fd92cc543a6ed7e Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Sun, 15 Nov 2009 07:43:17 +0000 Subject: [PATCH] * Now we capture the \caption and \label definitions at each float instead of at \AtBeginDocument. * This works around a bug: if you use the [nohyper] doc class option and then load hyperref later, hyperref will will redefine things during \AtBeginDocument, but the redefintion would occur *after* TL stored the original LaTeX defintions of \caption and \label, so TL would restore the LaTeX defintions instead of the hyperref definitions. git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@130 516e2f36-ce3a-0410-bea4-1d4a03f5df72 --- sample-book.pdf | Bin 341173 -> 341173 bytes sample-handout.pdf | Bin 123585 -> 123585 bytes tufte-common.def | 8 ++------ 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sample-book.pdf b/sample-book.pdf index ab15bdf366da5c3e7e5084d3bc2f59128d95ae14..aca500092ea0c9a1329f02255ecb7a091dfa648c 100644 GIT binary patch delta 131 zcmdn`Qe^8(k%kt=7N!>FEi4cIavPc&7#dp|8t59BP2LzH%4cb4h%9trZtC{pe=Lto wolVRg9bHW=ESyXXOkCaE%q(0?%nXgpT}>SgoDD239qkls2q~F9!-Q290G>7_R{#J2 delta 131 zcmdn`Qe^8(k%kt=7N!>FEi4cIavPW%ni?3I8tNLDP2LzH%4cb4h%9trZtC{pe=Lto uoehD&!qU>n#o5T&+04ky+0EF(%-q@B$ko}v%*e>VPQiwdlIb%{SY-i;-z41t diff --git a/sample-handout.pdf b/sample-handout.pdf index 6e3f2f2ed43327582f4bcf1a25af5d8300c91eee..7ba2453410cc7c5f59527177dafa7c9569771b83 100644 GIT binary patch delta 158 zcmX?jl>OjQ_J%Et53Xt(ni?1yTN;?^8kngY7^rJ<>HFrVxFnXODrmS^85tN@8XCfs zZ0Ekl7{-%e=w@zW;^JgrY2j#YV&v>*Y-nKN>Sk)@YUXO-=xk(Zr(i=+NvwjM9anKl ZVo^y&QED2Op^<@!g)x_^s;j>n7XWAHD60Sf delta 158 zcmX?jl>OjQ_J%Et53Xt(m>ZfJ7@C;t8kngY7^rJ<>HFrVxFnXODrmS^85tN@8XCfs zZ0Ekl7{-%e?r37^>gH_WXzAwUWZ`7sXy#;TX=q|(V(H>yW@&C{r(i=+NvwjM9anKl ZVo^y&QED2Op^<@!g)x_^s;j>n7XW~sDDeOQ diff --git a/tufte-common.def b/tufte-common.def index 106a570..c86b58a 100644 --- a/tufte-common.def +++ b/tufte-common.def @@ -1069,12 +1069,6 @@ \let\@tufte@orig@float\@float \let\@tufte@orig@endfloat\end@float -% Save original LaTeX \caption and \label commands -\AtBeginDocument{% - \let\@tufte@orig@caption\caption% - \let\@tufte@orig@label\label% -} - % New length for tweaking float captions \newlength{\@tufte@caption@vertical@offset} \setlength{\@tufte@caption@vertical@offset}{0pt} @@ -1122,6 +1116,8 @@ {\renewcommand{\floatalignment}{b}\@tufte@float@debug{Presumed position: [bottom]}}% {\renewcommand{\floatalignment}{t}\@tufte@float@debug{Presumed position: [top]}}% % Capture the contents of the \caption and \label commands to use later + \global\let\@tufte@orig@caption\caption% + \global\let\@tufte@orig@label\label% \renewcommand{\caption}{\optparams{\@tufte@caption}{[][0pt]}}% \renewcommand{\label}[1]{\@tufte@label{##1}}% \@tufte@orig@float{#2}[#1]%