3

I'm currently using a package for placing the caption on a separate page, CaptionAfterwards, and the hypcap package gives me the following error:

"Package hypcap Error: You have forgotten to use \caption."

I've tried reading and applying answers to a similar question, but without any success.

How do I get these packages to work together nicely? I have a number of large, full-page figures which need to have captions on the following page. Additionally, the captions need to be recognized as such in order to be correctly included in the list of figures.

Is there an alternative method? The comment on this answer suggests to me that the fltpage package is a poor choice, while others partly recommend it.

Below is my minimum working example:

\documentclass[12pt, letterpaper]{report}

% PDF hyperlinks
\usepackage[colorlinks]{hyperref}
\usepackage[figure,table]{hypcap}

\usepackage{textcomp}
\usepackage{fontspec}
%\setmainfont{Droid Serif}

%Figures
\usepackage[CaptionAfterwards]{fltpage}


\begin{document}

This is an example which returns:

"Package hypcap Error: You have forgotten to use \textbackslash caption."

\begin{FPfigure}
    \centering
    \includegraphics[width=4.5in]{Temp_figure.png}
    \caption[Short caption for TOC]{Long caption to describe figure}
    \label{figure1}
\end{FPfigure}

\end{document}
2

Package hypcap is outdated. Better use package caption with option hypcap=true.

Please test the following MWE:

\documentclass[12pt, letterpaper]{report}

\usepackage{graphicx}

% PDF hyperlinks
\usepackage[hypcap=true]{caption}
\usepackage[colorlinks]{hyperref}
%\usepackage[figure,table]{hypcap}

\usepackage{textcomp}
%\usepackage{fontspec}
%\setmainfont{Droid Serif}

%Figures
\usepackage[CaptionAfterwards]{fltpage}


\begin{document}

This is an example which returns:

"Package hypcap Error: You have forgotten to use \textbackslash caption."

\begin{FPfigure}
    \centering
    \includegraphics[width=4.5in]{example-image-a}
    \caption[Short caption for TOC]{Long caption to describe figure}
    \label{figure1}
\end{FPfigure}

\end{document}

Remark: I used picture example-image-a, part of package mwethat must be installed but not called.

  • The change that you proposed worked exactly as hoped, with the caption displayed both in my MWE example and in the larger original document. Thank you. – MurphysLab Sep 27 '15 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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