3

I have 3 subfigures that I insert at width=0.5\textwidth, which leaves some empty space. I would like to insert the main caption in this space. How can I do this? I am using subcaption package for this but I read that floatrow might be a bit more flexible in cases like this. Solutions with either (or any other) package are welcome.

\documentclass[10pt, a4paper]{report}
\usepackage[paperheight=5.5in, paperwidth=6.267in, top=0in, bottom=0in, left=0in, right=0in]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}



\usepackage{graphicx} 
\usepackage[bf]{caption}
\usepackage[singlelinecheck=false, aboveskip=-3pt]{subcaption}
\renewcommand\thesubfigure{\Alph{subfigure}} 


\begin{document}
\pagenumbering{gobble}
\setcounter{figure}{6}
\begin{figure}
        \captionsetup[subfigure]{labelformat=simple}
        %\captionsetup{font={onehalfspacing},skip=-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
        \end{subfigure}\vspace{-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}\vspace{-15pt}
        \caption{Figure caption describes subfigures A, B and C}
\end{figure}

\end{document}

example

EDIT: sorry for not being clear, the empty space I refer to is [below subfigure B and beside subfigure C]. That is, when I have an odd number of subfigures and I'd like to not have the main caption below the whole figure but use space more efficiently by inserting it to the right of the last subfigure. I'll upload a figure soon to make this clear.

If I insert an additional subfigure (but only the legend without the actual figure), I get something close to what I want:

\begin{subfigure}[t]{0.49\textwidth}
                %\caption{}              
                \vspace{50 pt}        
                \caption{Figure caption describes subfigures A, B and C; this is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legend}
        \end{subfigure}

The problem with this is that the legend has subfigure numbering, whereas I need it to be main figure numbering. I suspect that there might be a way to define a new subtype of caption, maybe in subcaption.sty but I am not sure how! example2

2 Answers 2

1

This was sufficient for my purpose, although I'm sure there would be a better way to do this. (Not sure about the etiquette here, should I delete my question now that I have figured out what to do? Or leave it for better answers/other users?)

\documentclass[10pt, a4paper]{report}
\usepackage[paperheight=7.5in, paperwidth=6.267in, top=0in, bottom=0in, left=0in, right=0in]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}



\usepackage{graphicx} 
\usepackage[bf]{caption}
\usepackage[singlelinecheck=false, aboveskip=-3pt]{subcaption}
\renewcommand\thesubfigure{\Alph{subfigure}} 

\newcommand{\fillcaption}[1]{ %new command with the argument being the text of the caption
\textbf{Figure \arabic{figure}:} #1 %Makes main figure number, concatenates it to legend
\addtocounter {figure} {1} %increments main figure count
} 
%\newcommand{\bfillcaption}[2]{\fillcaption{\textbf{#1} #2}} %bolds first sentence of fillcaption
\begin{document}
\pagenumbering{gobble}
\setcounter{figure}{6}
\begin{figure}
        \captionsetup[subfigure]{labelformat=simple}
        %\captionsetup{font={onehalfspacing},skip=-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
        \end{subfigure}\vspace{-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}
        \begin{subfigure}[t]{0.49\textwidth}
                \vspace{10 pt}        
                \fillcaption{Figure legend here} {A. This describes subfigure (A). B. This describes subfigure (B). C. This describes subfigure (C).  }
        \end{subfigure}
        %\caption{Figure caption describes subfigures A, B and C}
\end{figure}

\end{document}

example

1
  • I think it's OK to leave question and answer here. However you could mark your (favorite) answer as being accepted.
    – U. Windl
    Commented Apr 6, 2019 at 0:27
0

Thanks srao, I have improved upon your code a bit making it simpler and thus also easier to read. I added the makebox command to allow the figure to expand to larger than the page width, not really needed.

\documentclass[a4paper]{report}
\usepackage{subcaption}
\usepackage{todonotes}

\newcommand{\fillcaption}[1]{ %new command with the argument being the text of the caption
\addtocounter {figure} {1} %increments main figure count
\vspace{0pt}
Figure \arabic{figure}: #1 %Makes main figure number, concatenates it to legend
}

\begin{document}
\begin{figure}
\makebox[\textwidth][c]
{
    \begin{tabular}{p{0.7\linewidth} p{0.7\linewidth}}
        \fillcaption{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}&
        \vspace{0pt}
        \subcaptionbox{About a}{\missingfigure{}}\\
        \subcaptionbox{About b}{\missingfigure{}}&
        \subcaptionbox{About c}{\missingfigure{}}
    \end{tabular}
}
\end{figure}
\end{document}
3
  • This does not seem to answer the question...
    – Werner
    Commented Mar 24, 2015 at 23:35
  • @Werner could you elaborate on what you see as missing? Commented Mar 26, 2015 at 13:40
  • (1) There seems no need (from the OP) to make an "oversized figure fit within the page boundary". Something like that is already discussed in side by side figures wider than margins; (2) Does your answer match the required output of the OP? Figure caption in the lower-right? No. (3) Focus on the addition you bring to the set of solutions: Using a tabular structure for layout; (4) Consider not using \missingfigure but some example images instead.
    – Werner
    Commented Mar 26, 2015 at 14:30

You must log in to answer this question.

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