[Tex/LaTex] Subfigure float – caption above, and how to break figure over two pages

captionsfloats

Firstly, thanks a lot in advance for your help with this problem. I've looked long and hard but not found a solution anywhere. I am writing my PhD thesis in Lyx and love how it makes the formatting so smart and easy, but I am having real trouble with some of my figures. I have three things I would like to achieve:

1) I would like to make figures with several subfloats (to show the same combination of an image and a graph in each. (I'll attach an example to this email). It really is valuable to have all three subfloats under the same single figure heading.
The problem is that only two of my three floats fit on a page and the third one is started but gets lost off the bottom. I don't want to make the figures smaller so they fit. Can I persuade Lyx to split the figure over two pages (a bit like it does with long tables)?

2) I would like the captions of the subfigures ABOVE the figures.

3) I would like the gap between the subfigure legends and the images to be bigger (you can see how squashed up they are).

I'm using the following in my document preamble to justify the labels on the left.

\usepackage{caption}
\captionsetup{labelfont=bf,format=plain,indention=0cm,
justification=raggedright,singlelinecheck=false} 

I tried to upload a pdf of what happens to the figure but it took too long so perhaps you can take it on trust that the bottom of the figure and main figure legend disappears off the end of the page.

Best Answer

I'm not a lyx user, so I am not sure if its treatment of figures is different from LaTeX. In LaTeX, for question 2, just put caption above figure. something like this:

\documentclass{article}
% In preamble:
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}
% In document:
\begin{figure}
    \caption{A caption.}
    \label{fig:my-figure}
    \begin{subfigure}[b]{0.45\textwidth}
        \centering
        \subcaption{img\_A}
        \label{fig:my-figureA}
        \includegraphics[width=\textwidth]{img_a}
    \end{subfigure}
    \begin{subfigure}[b]{0.45\textwidth}
        \centering
        \subcaption{img\_B}
        \label{fig:my-figureB}
        \includegraphics[width=\textwidth]{img_b}
    \end{subfigure}
    \caption{A caption.}
    \label{fig:my-figure}
\end{figure}
\end{document}

Latex doesn't enable automatic breaking of floats into subfloats. This you should do manually.