I have found several questions on TeX.SE and elsewhere about making figure captions span multiple pages (e.g., How do I make figure captions span multiple pages?).
I gather that the caption package puts the caption in unbreakable boxes.
Some answers recommend the use of the capt-of package. capt-of seems to work fine, but breaks caption instances. So it seems that using capt-of to enable long figure captions would require me to switch every single caption in my paper to capt-of, which is a burden and seems to eliminate the benefits of floating figures.
Here's a MWE (also on Overleaf) with a figure with short caption and a figure with a long captionof. I would like to be able to have both \usepackage{capt-of}
and \usepackage[font={small,sf}, singlelinecheck=false]{caption} enabled, and still have my long caption span multiple pages.
\documentclass{article}
% I can't have both caption and capt-of enabled.
% Caption alone doesn't let long captions span multiple pages.
\usepackage[font={small,sf}, singlelinecheck=false]{caption}
% Capt-of alone would require me to reformat many figures.
\usepackage{capt-of}
% But enabling both breaks capt-of's ability to span captions across pages.
\usepackage{lipsum}
\begin{document}
\lipsum[1]
% I have many figures that are formatted like this.
\begin{figure}[h!]
\centering
\rule{0.3\textwidth}{0.3\textheight}
\caption[Short caption]{\lipsum[1]}
\end{figure}
\lipsum[1-10]
% This seems to be the best way to get long captions to span multiple pages, while being styled like the above figure.
\begin{centering}
\sffamily
\rule{0.5\textwidth}{0.75\textheight}
\captionof{figure}[short caption]{\lipsum[1-4]}
\label{figure}
\end{centering}
\end{document}
Alternatively, some way to easily allow captions to span pages without having to re-format would be great.
captionpackage also defines\captionof{...}{...}, so you don't needcapt-offor that when you already loadcaption. And please add MWEs to the question rather than Overleaf. – Torbjørn T. Nov 04 '17 at 22:02captionalone doesn't allow captions to span multiple pages. I'll add the MWE now. – Mr. W. Nov 04 '17 at 22:03captionoffor my figures with very long captions. But if I use that alone, mycaptionformatting (small, sans-serif) is lost. – Mr. W. Nov 04 '17 at 22:06\begin{figure}[h!]is usually wrong, latex will warn and change it to[!ht]but[htp]would be better. – David Carlisle Nov 04 '17 at 22:30\caption{What i was writing about for the last three pages}. – Johannes_B Nov 05 '17 at 06:29