due to the help of Ulrike in my question How to get long captions across pages I can now finally use extra long captions for my theses. Thanks again :-) The following code block is used for this for each picture:
\begin{figure}[H]
\includegraphics{largeImage}
\end{figure}
\bigskip
\setbox0\vbox{\makeatletter
\let\caption@rule\relax
\captionof{figure}[short caption]{\kant[1-4]}
\global\skip1\lastskip\unskip
\global\setbox1\lastbox
}
\unvbox0
\setbox0\hbox{\unhbox1\unskip\unskip\unpenalty
\global\setbox1\lastbox}
\unvbox1
\vskip\skip1
I need to use colored table rows in my thesis. As soon as I include the colortbl package with \include{colortbl} which is kind of best practice for that demand, my long text captions are always moved to the next page and I do not know why. Even if I don't use a command shipped with colortbl, the caption is simply moved to the next page instead of continuing there, here is the comparison.
with \usepackage{colortbl}:
without \usepackage{colortbl}:
So, something strange happens when loading the package colortbl...
-> Is there an alternative to colortbl in order to have some background colors behind rows? I just found the idea to put a colored image in the background but that only applies to single cells, not to multicolumn rows (Texture or image as background for a single table cell).
-> Maybe something the package code itself can be changes / overridden in order to get rid of that issue (I don't have any idea why colors can have an impact to the page layout....) Although I am a Latex Beginner, I could try to have a look to the source code of the package but I cannot find the relevant file containing the actual package code (https://ctan.org/pkg/colortbl?lang=de)
Does anyone have an idea how to get colored table rows in combination with the long-captions fix from How to get long captions across pages
As requested, here is the MWE. As soon as you uncomment the \usepackage{colortbl} package the caption gets moved to the next page as already mentioned in How to get figure caption to span multiple pages, without having to switch everything to capt-of? by Willy Adler:
\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}
\usepackage{float}
%\usepackage{colortbl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\kant[1]
\begin{figure}[H]%
\includegraphics[scale=1.1]{example-image-c}
\end{figure}
\bigskip
\setbox0\vbox{\makeatletter
\let\caption@rule\relax
\captionof{figure}[short caption]{\kant[1-4]}
\global\skip1\lastskip\unskip
\global\setbox1\lastbox
}
\unvbox0
\setbox0\hbox{\unhbox1\unskip\unskip\unpenalty
\global\setbox1\lastbox}
\unvbox1
\vskip\skip1
\kant[6-7]
\end{document}
kind regards,
Stephan


\include{colortbl}? – David Carlisle Nov 26 '17 at 15:01colortab? – Bernard Nov 26 '17 at 15:14Cheers, Stephan
– Stephan Weiser Nov 26 '17 at 18:07cheers,
Stephan
– Stephan Weiser Nov 26 '17 at 18:13\include{colortbl}in the text not in the code! That is very confusing,\includeis a latex command but can't be used withcolortbl– David Carlisle Nov 26 '17 at 19:15