2

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.

2
  • 2
    Welcome to TeX.SX!. Please provide a MWE in order to help you to help you. We need to know, for example, if you are using subcaption, subfigure or subfig packages. Question two is solved simply with \caption above the figure but if you are using subcaption. This does not work for subfig package.
    – Fran
    Aug 30, 2012 at 18:53
  • Thanks, Fran! Sorry for the delayed reply. Unfortunatly, I don't really understand the fundamentals of latex so am strugglying to answer your questions. Fortunately, I have found some help locally and hopefully I will be ok now. But if not, I'll be back with answers soon!
    – Ellie
    Sep 12, 2012 at 15:40

1 Answer 1

2

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.

2
  • this code looks mighty familiar :)
    – cmhughes
    Aug 30, 2012 at 21:18
  • Thank you! I've had a play with that and found some help locally so hopefully I'll get it sorted soon.
    – Ellie
    Sep 12, 2012 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .