浏览代码

* 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
master
Kevin M. Godby 16 年前
父节点
当前提交
6cfd3e4b14
共有 3 个文件被更改,包括 2 次插入6 次删除
  1. 二进制
      sample-book.pdf
  2. 二进制
      sample-handout.pdf
  3. +2
    -6
      tufte-common.def

二进制
sample-book.pdf 查看文件


二进制
sample-handout.pdf 查看文件


+ 2
- 6
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]%


正在加载...
取消
保存