I would like to have two subfigures but on two rows. I tried with this code:
\documentclass[11pt,a4paper,titlepage]{report}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[h!]
\centering
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=1.8\linewidth]{image}
\caption{Caption for image 1}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=1.8\linewidth]{image}
\caption{Caption for image 2}
\end{subfigure}
\caption{A caption for both images}
\end{figure}
\end{document}
The result is: both figures are aligned to the right side of the page while the caption of each figure is still in the center.
Really appreciate if some one could help me!
Edit: Image of the result if this could help
Best Answer
Well,
1.8\linewidth
is 80% too wide for the current block (which is.5\textwidth
wide), causing a problem. Try using only\linewidth
or at least some portion of it.Remember that
\linewidth
is a relative length. See Difference between\textwidth
,\linewidth
and\hsize
.