2

This question is an exact duplicate of:

I am currently writing my PHD thesis and I often have large images (filling 30-50% of a page) with very long captions (also 30-50% of page length) within the text. The problem is, that latex is not capable by default to continue the caption text on the next page. Instead, the caption text just runs across the end of the current page.

The following minimal example shows the issue.

\RequirePackage{fix-cm}
\documentclass[a4paper,twoside,openright,headsepline,parskip]{scrreprt}
\usepackage[scaled=0.92]{helvet}
\usepackage{setspace}
\onehalfspacing
\usepackage[a4paper]{geometry}
\geometry{width=16cm, left=3cm, top=2.5cm, bottom=2.5cm}
\usepackage[headsepline]{scrpage2}
\pagestyle{scrheadings}
\lehead{\fontfamily{cmr}\textsc{Results}}
\rohead{\fontfamily{cmr}\textsc{Results}}
\usepackage[english]{babel}
\usepackage[nooneline]{caption}
\usepackage{graphicx}  
\usepackage[format=plain, font={small, singlespacing}, labelfont=bf]    {caption}
\usepackage{kantlipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\kant[1-2]

\begin{figure}%
\includegraphics[scale=1.1]{example-image-c}
\caption{\kant[1-5]}
\end{figure}

\kant[2-5]

\end{document} 

Crawling the web for that issue, I found one solution that almost fixes the problem. https://groups.google.com/forum/#!topic/latexusersgroup/9Dz1cXtJZHA. I do not understand that thing completely but I guess it redefines the way that captions are made by latex ignoring the float environment. Using this solution gives us the following minimal example:

\RequirePackage{fix-cm}
\documentclass[a4paper,twoside,openright,headsepline,parskip]{scrreprt}
\usepackage[scaled=0.92]{helvet}
\usepackage{setspace}
\onehalfspacing
\usepackage[a4paper]{geometry}
\geometry{width=16cm, left=3cm, top=2.5cm, bottom=2.5cm}
\usepackage[headsepline]{scrpage2}
\pagestyle{scrheadings}
\lehead{\fontfamily{cmr}\textsc{Results}}
\rohead{\fontfamily{cmr}\textsc{Results}}
\usepackage[english]{babel}
\usepackage[nooneline]{caption}
\usepackage{graphicx}  
\usepackage[format=plain, font={small, singlespacing}, labelfont=bf]{caption}
\usepackage{kantlipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% LONG CAPTIONS Configuration
% to be inserted before \begin{document}
% source: https://groups.google.com/forum/#!topic/latexusersgroup/9Dz1cXtJZHA

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeatletter

%Figure environment without an float format
\newenvironment{Figure}{%
   \par\addvspace{12pt plus2pt}%
   \def\@captype{figure}%
}{%
   \par\addvspace{12pt plus2pt}%
}%

%taken from article.cls
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1: #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1: #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

%% If you are having all the figures with huge caption then use thebelow     commands:
%% Otherwise, just comment the below two lines and
%% use "\begin{Figure}...\end{Figure}" instead of "\begin{figure}...    \end{figure}"
\let\figure\Figure% replacing by default
\let\endfigure\endFigure%
%%

\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

\kant[1]

\begin{figure}%
\includegraphics[scale=1.1]{example-image-c}
\caption{\kant[1-3]}
\end{figure}

\kant[2-5]

\end{document} 

Here I have the problem, that somehow the caption cannot be formatted in the correct way although it is defined in the preamble:

  • line spacing in the caption: single
  • caption number and lable: bold
  • small font grade

At least for the bold caption number and lable I found some working hacks. Unfortunately I cannot have a single line spacing for the caption text. Nevertheless, that is crucial for the thesis style.

I have already found some solutions for the long-captions issue, but they were not capable of fixing my problem. It is often related to the fact, that I need to use KOMAscript document class scrreprt for my document (that's a design requirment I got). Nevertheless, I tried out the following solutions:

So, to sum up, all I need is a solution that - allows having captions going across pages - allows having those captions with single line spacing and bold lable/number - allows having the caption text in a smaller font-size then the rest of the text. - accepts long captions (indeed the captions must be capable to be long, e.g. half the page, unfortunately there is no solution like "please make shorter captions " ";-))

My next steps I'll try (any hint is welcome!)

  • manually define single line spacing and font size in captions to make the workaround solution above (https://groups.google.com/forum/#!topic/latexusersgroup/9Dz1cXtJZHA) perfect, but I have already tried several solutions from the web. Unfortunately using the redefinition of makecaptions in the solution from above destroys the approach of using the caption formatting with the package "caption"

  • maybe it is possible to define a kind of custom lable environment like \mylable which is basically normal text but formatted like I'd like them to have.

I would really appreciate if someone here could help me with that problem.

kind regards,

Stephan

marked as duplicate by Joseph Wright Nov 23 '17 at 10:13

This question was marked as an exact duplicate of an existing question.

  • 1
    Some general remarks: The "caption" of a figure or table is usually most effective in conveying its meaning if it's short and snappy. A caption works best if it takes up just one or two lines. If your captions do take up ca. 50% of a full page, you may want to re-think your approach to captioning. Most of what you call a "caption" should probably be part of the legend of the figure or table. And, if your figures are so complicated as to require an enormously long legend/caption, your figures may well be too complicated to even have a chance to convey their intended meanings. – Mico Nov 22 '17 at 19:34
  • @Mico deductive disciplines (e.g. in biology, geology, etc) often have to describe spatially complex natural phenomena (e.g. a rock thin section or a plant cellular structure) at a range of scales via adjacent subfigures. If the detailed written descriptions for such subjects are buried in the main text it is often much less 'readable' than if they are outlined in the caption. Long captions are sometimes necessary (albeit cumbersome). – geordie May 7 at 4:28
  • @geordie - Thanks. Just to clarify: I wrote that the explanatory text should be made part of the legend of the figure or table [emphasis added]. To me, a legend is something that's placed right with (either above or below, in general) the graphical or tabular material, not something that is "buried in the main text". From a visual design point of view, I'd say that combining the real (i.e., short) caption and the legend into a single unstructured blob makes for an aesthetically poor effort that actually hinders the purpose of explaining to readers what the displayed material is all about. – Mico May 7 at 4:37

Browse other questions tagged or ask your own question.