Ver código fonte

* 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 anos atrás
pai
commit
6cfd3e4b14
3 arquivos alterados com 2 adições e 6 exclusões
  1. BIN
      sample-book.pdf
  2. BIN
      sample-handout.pdf
  3. +2
    -6
      tufte-common.def

BIN
sample-book.pdf Ver arquivo


BIN
sample-handout.pdf Ver arquivo


+ 2
- 6
tufte-common.def Ver arquivo

@@ -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]%


Carregando…
Cancelar
Salvar