1

I am trying to align figures in my document. When the caption's length is bigger than the other, they are not aligned. Is there an easy way to make it work? It seems that Align two figures vertically with different caption lenghts is related , but I cant figure out how to apply it when using \minipage and how should I figure out the height, Any help is appreciated, here is my code:

\documentclass[12pt]{article}
\usepackage{natbib}
\usepackage{setspace} 
 \doublespacing
\usepackage {tikz}
\usepackage[skip=0pt]{caption}
\usepackage{blindtext}
\usepackage{graphics}
\usepackage{geometry}

\begin{document}

\begin{figure}[!ht] \minipage{0.49\textwidth} \includegraphics[width=\textwidth]{a} \caption{graph I bla bla bla bla bla bla bla bla bla} \endminipage\hfill \minipage{0.49\textwidth} \includegraphics[width=\textwidth]{b} \caption{graph II} \endminipage \end{figure}

\end{document}

My output looks like:

enter image description here

ELLA
  • 175
  • 7
  • 1
    \begin{figure}[!ht] \begin{minipage}[t]{0.49\textwidth} \includegraphics[width=\textwidth]{a} \caption{graph I bla bla bla bla bla bla bla bla bla} \end{minipage}\hfill \begin{minipage}[t]{0.49\textwidth} \includegraphics[width=\textwidth]{b} \caption{graph II} \end{minipage}\hfill \end{figure} should work. – leandriis Aug 10 '20 at 14:55
  • Thank you! It does work :)) What does the [t] in \begin{minipage}[t] do? – ELLA Aug 10 '20 at 15:13
  • 1
    The first optional argument of minipage is the vertical alignment, t stands for top, c for center, b for bottom. – leandriis Aug 10 '20 at 17:24
  • Thank you for the explanation and yes it does answer my question. Thank you! – ELLA Aug 10 '20 at 17:40

0 Answers0