[Tex/LaTex] Prevent figure captions from running into footers with full page figures

captionsfloats

I'm trying to figure out how to prevent a figure caption from running into the footer of a page with a large caption.

\documentclass[review,authoryear,12pt]{elsarticle}

\usepackage{float}

\begin{document}

\begin{figure}[H]
\includegraphics[width = \linewidth, keepaspectratio]
{Figures_Figure_4}
\caption{(A) Cumulative density plot comparing differential expression among all genes to specified gene-list subsets. 
(B) Comparison of AHC reads between genes that are down-regulated and up-regulated in \textit{miR-15/16\textsuperscript{$\Delta$/$\Delta$}} subsetted by location of miR-15/16 seed locations along each transcript. 
(C) Heatmap of genes with a p value of less than or equal to 0.05 plotted along side a bar graph of AHC read depth at miR-15/16 seed matches for each gene they occur at. 
(D) GSEA enrichment plot of KEGG Cell Cycle associated genes.
(E) Heatmap of KEGG Cell Cycle genes with miR-15/16 seed matches in their 3'UTRplotted along side a bar graph of AHC read depth at miR-15/16 seed matches for each gene they occur at.  (*) denotes genes with no prior evidence of miR-15/16 targeting by miRTarBase.}
\label{fig:global transcriptional changes}
\end{figure}
\end{document}

Is there a universal command or page height that can be used for this?
enter image description here

Notice how the caption runs into the page number at the bottom.

Best Answer

with unknown page layout is possible to give only general advice: instead \begin{figure}[H] use \begin{figure}[htbp]. for example, in the following small document (called minimal working example: mwe)

\documentclass{article}
\usepackage{geometry}
\usepackage[demo]{graphicx}
\usepackage[font=footnotesize,labelfont=bf]{caption}

%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{figure}[htbp]
    \centering
\includegraphics[height=\linewidth,
                 keepaspectratio]{Figures_Figure_4}
    \caption{
(A) Cumulative density plot comparing differential expression among all genes to specified gene-list subsets.
(B) Comparison of AHC reads between genes that are down-regulated and up-regulated in \textit{miR-15/16\textsuperscript{$\Delta$/$\Delta$}} subsetted by location of miR-15/16 seed locations along each transcript.
(C) Heatmap of genes with a p value of less than or equal to 0.05 plotted along side a bar graph of AHC read depth at miR-15/16 seed matches for each gene they occur at.
(D) GSEA enrichment plot of KEGG Cell Cycle associated genes.
(E) Heatmap of KEGG Cell Cycle genes with miR-15/16 seed matches in their 3'UTRplotted along side a bar graph of AHC read depth at miR-15/16 seed matches for each gene they occur at.
(*) denotes genes with no prior evidence of miR-15/16 targeting by miRTarBase.}
\label{fig:global transcriptional changes}
    \end{figure}
\end{document}

the images is on one page and caption not protrude to footer of page.

enter image description here

for further help you need first provide complete small document, which we can copy and test in our computers. in it define size size of your imege (width, height).

edit:

  • don't use option [H]. it prevent float environment to flow and usually cause unexpected problem and very ugly document. use it as as desperate try of last resort to put figure on desired place
  • you had to ensure, that image is not to height. for example, if caption is 1/2 text height tall, than the height of image can be only 1/2 text height. this you ensure with

\includegraphics[height=0.5\textheight, keepaspectratio]{<image file name>{
  • i would reconsider if i liked to have such image in my document. it is ugly composed, unclear and has in caption information which (to my opinion of course) belong to document text
  • i would rather split your image into five subimage and from them compose image, for example in two floats where i will to second float add \ContinuedFloat from caption package for correct figure numbering.

  • remember, you cant put elephant into suitcase.