Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the capt-of package to create a caption for my figures:

\newcommand\figureFrame[4]{%
    \begin{center}
        \includegraphics[#1]{#2}
        \captionof{figure}{#3}\label{#4}
    \end{center}
}

Now I get the following error whenever a cite is in my caption text:

pdflatex> Package caption Warning: The option `hypcap=true' will be ignored for this
pdflatex> (caption)                particular \caption on input line 112.

I looked at the documentation, but found nothing for "hypcap". How can I fix this or do I have to fix this?

(There's now minimum working example because I think the answer is only a hint to the correct place in documentation :-))

share|improve this question
2  
BTW: Loading the capt-of package has no effect when the caption package is loaded, too. But I must confess that I don't know if I have documented this, will take a look now... –  Axel Sommerfeldt Oct 22 '11 at 11:48

2 Answers 2

up vote 7 down vote accepted

This warning comes from the caption package, not capt-of. See section 6.5 of the caption documentation for details of hypcap.

share|improve this answer
    
Ok, this sounds like my problem :-) But what to do now? I need the hyperref package to use it for chapter links etc. and I want refs to a figure to be placed at the beginning of the figure and not the caption. Replace the hyperref package? –  strauberry Oct 23 '11 at 8:21
1  
Try putting \captionsetup{type=figure} immediately before the \includegraphics command. –  Ian Thompson Oct 23 '11 at 8:48
    
very nice one :-) Thank you! –  strauberry Oct 23 '11 at 8:58

Quoting from pp. 37--38 of the documentation of the caption (!) package:

\captionof{htypei}{. . . } vs. \captionsetup{type=htypei}+\caption{. . .}

Without hyperref loaded, both will give you identical results. But with hyperref loaded, and with hypcap=true requested, the hyperlink anchor will be placed different. For example:

\begin{minipage}{\linewidth}
. . .
\captionof{figure}{A figure}
\end{minipage}

will place the hyperlink anchor at the caption. (And if hypcap=true is set, you will get a warning about this.)

share|improve this answer

Your Answer

 
discard

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.