TransWikia.com

Configuring subfigures within a tabular environment

TeX - LaTeX Asked by Gina Swanney on September 12, 2020

I am trying to configure a table of subfigures (including multirow commands) within a tabular environment, however the result gives me an odd blank space above the mutlirow figure to the right. I have begun and ended the document with the appropriate userpackages. I have additional subfigures on the page before and after attached with the ContinuedFloat command. Any help with this would be amazing! Note that this is for a geological masters project for reference.

Code:

begin{figure}[h!]
centering
caption{Annotated stratigraphy at site RKBS9.}
label{fig:RKBS9_site}

begin{subfigure}{textwidth}
centering
includegraphics[width= linewidth]{Figures/Study_Site/Outcrops/RKBS9_slope_sq.pdf}
caption{Overview of site 9, indicating positions of detailed pictures.}
label{fig:RKBS9_slope}
end{subfigure}
end{figure}%
begin{figure}[ht]ContinuedFloat

centering
begin{tabular}{cc}
begin{subfigure}{0.45textwidth}
    centering
    includegraphics[width= linewidth]{Figures/Study_Site/Outcrops/RKBS9_top_sq2.pdf}
    caption{Upper cover-bed stratigraphy.}
    label{fig:RKBS9_top}
end{subfigure} 
& multirow{4}{*}{begin{subfigure}{0.45textwidth}
    centering
    includegraphics[width= linewidth]{Figures/Study_Site/Outcrops/RKBS9_out_sq2.pdf}
    caption{Contact between Breccas 2 and 1, with the interbedded Hinemaiaia Tephra.}
    label{fig:RKBS9_out}
end{subfigure}} 
begin{subfigure}{0.45textwidth}
    centering
    includegraphics[width= linewidth]{Figures/Study_Site/Outcrops/RKBS9_paleosol_sq2.pdf}
    caption{Paleosol separating Breccia 3 (upper) and Breccia 2 (lower).}
    label{fig:RKBS9_close}
end{subfigure}

end{tabular}
end{figure}%
begin{figure}[ht]ContinuedFloat
centering

begin{subfigure}{textwidth}
centering
includegraphics[width= linewidth]{Figures/Study_Site/Outcrops/RKBS9_longbomb.pdf}
caption{Detailed view of contact between Breccia 2 and 1, with a bomb sag indicting the violent 
impact ballistics preceding the deposition of Breccia 2.}
label{fig:RKBS9_longbomb}
end{subfigure}

end{figure}

The output of the subfigure table (excluding figures on other pages):

enter image description here

One Answer

Welcome to TeX.SE!

With help of valign macro from the adjustbox package (which also load graphicx) you can move baseline the first image in table and image in `multirow˛cell on their top:

documentclass{article}
usepackage[vmargin=20mm]{geometry}
usepackage{multirow}
usepackage{subcaption}
usepackage[demo,  % in real document remove this option!
            export]{adjustbox}

begin{document}

begin{figure}[ht]
caption{Annotated stratigraphy at site RKBS9.}
label{fig:RKBS9_site}

begin{subfigure}{textwidth}
includegraphics[width=linewidth] {Figures/Study_Site/Outcrops/RKBS9_slope_sq.pdf}
caption{Overview of site 9, indicating positions of detailed pictures.}
label{fig:RKBS9_slope}
end{subfigure}
end{figure}

begin{figure}[ht]ContinuedFloat
centering
    begin{tabular}{cc}
begin{subfigure}[t]{0.45textwidth}
    centering
    includegraphics[width=linewidth, valign=t] {Figures/Study_Site/Outcrops/RKBS9_top_sq2.pdf}
    caption{Upper cover-bed stratigraphy.}
    label{fig:RKBS9_top}
end{subfigure} & multirow{4}{*}{begin{subfigure}{0.45textwidth}
    centering
    includegraphics[width=linewidth, height=1.1linewidth, valign=t] {Figures/Study_Site/Outcrops/RKBS9_out_sq2.pdf}
    % in real document remove `height` option or adjust to desired value
    caption{Contact between Breccas 2 and 1, with the interbedded Hinemaiaia Tephra.}
    label{fig:RKBS9_out}
end{subfigure}} 
%
begin{subfigure}{0.45textwidth}
    centering
    includegraphics[width= linewidth] {Figures/Study_Site/Outcrops/RKBS9_paleosol_sq2.pdf}
    caption{Paleosol separating Breccia 3 (upper) and Breccia 2 (lower).}
    label{fig:RKBS9_close}
end{subfigure}    &
    end{tabular}
end{figure}

begin{figure}[ht]ContinuedFloat
begin{subfigure}{textwidth}
centering
includegraphics[width= linewidth] {Figures/Study_Site/Outcrops/RKBS9_longbomb.pdf}
caption{Detailed view of contact between Breccia 2 and 1, with a bomb sag indicting the violent impact ballistics preceding the deposition of Breccia 2.}
label{fig:RKBS9_longbomb}
end{subfigure}

end{figure}
end{document}

enter image description here

Answered by Zarko on September 12, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP