In the following code the package that give the problems is
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up,width=0.85\textwidth]{caption}
What I want to do is change captionwidth
so that it is less wide than the normal text.
The problem comes when I want to use subfloat
to put several pictures next to each other.
The subcaptions
don't stay underneath the pictures, but overlay or swap or… do things they shouldn't be doing.
My question is, if there is a way to change captionwidth
, without this problem in subfloat
?
\documentclass[a4paper,11pt,twoside]{book}
\usepackage[dutch,british]{babel}
\usepackage{hyperref}
\usepackage{url}
\usepackage{amssymb,amsmath}
\usepackage{amsthm}
\usepackage[width=0.85\textwidth]{caption} %THIS IS THE PACKAGE WITH THE PROBLEM
\usepackage[margin=3cm]{geometry}
\usepackage{float}
\usepackage{subfig}
\usepackage{graphicx}
\selectlanguage{british}
\begin{document}
\begin{figure}[!ht]
\centering
\subfloat[fig1, not ok]{\label{fig1}\includegraphics[height=0.15\textwidth]{fig1}}\quad
\subfloat[fig2, not ok]{\label{fig2}\includegraphics[height=0.15\textwidth]{fig2}}
\caption{This caption is ok \cite{cursus, cd}.}
\label{figTotal}
\end{figure}
\end{document}
Best Answer
Separate the setting for figure and subfigure captions: