TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read Margin Figures/captions and the answers within. I have stripped the definition of the marginfloats from the tufte documentclass into the MWE below.

Can the definition of \@tufte@margin@floatbox be tweaked so that the hyperlink goes to the top of the figure, and not below the caption?



% Margin float environment
  {\FloatBarrier% process all floats before this point so the figure/table numbers stay in order.

% Margin figure environment

% Margin table environment



This is a hyperlink to Figure \ref{fig:test}


 \caption{Figure in margin}

share|improve this question
up vote 3 down vote accepted

The hypcap package attempts to find "a solution of the problem with hyperref, that links to floats points below the caption and not at the beginning of the float." (taken directly from the package documentation) Consequently, it provides \capstart to denotes the start of floating environment and where the hyperlink should jump to.

\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\usepacakge{hypcap}% http://ctan.org/pkg/hypcap
% Margin figure environment
   \capstart\endgraf}% <-- Hyperlink jumps to start of 'marginfigure'

% Margin table environment
   \capstart\endgraf}% <-- Hyperlink jumps to start of 'margintable'
share|improve this answer
Awesome, thanks for the background and detailed answer. – cmhughes Sep 3 '11 at 15:40
I actually ended up using \usepackage[all]{hypcap} which fixed all of my hyperlinks to floats. – cmhughes Sep 3 '11 at 18:36
@cmhughes: This, or something related, is causing me an error. – raxacoricofallapatorius May 23 '12 at 2:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.