
Quero colocar 5 subimagens, 3 na primeira linha e duas na segunda. Os dois últimos devem ter as mesmas dimensões dos três primeiros, mas centrados (quero dizer, ambos próximos ao centro da página, não nos extremos).
\begin{figure}[H]
\begin{subfigmatrix}{3}
\subfigure[$\mathbb{P}^2$]{\includegraphics{Chapter3/Immagini/RSB/p2.png}}
\subfigure[$\mathbb{P}^4$]{\includegraphics{Chapter3/Immagini/RSB/p4.png}}
\subfigure[$\mathbb{P}^6$]{\includegraphics{Chapter3/Immagini/RSB/p6.png}}
\subfigure[$\mathbb{P}^8$]{\includegraphics{Chapter3/Immagini/RSB/p8.png}}
\subfigure[$\mathbb{P}^{10}$]{\includegraphics{Chapter3/Immagini/RSB/p10.png}}
\end{subfigmatrix}
\caption{RSB -- $\theta'$ contours , $\mathbb{P}^{2,4,6,8,10}$ solutions on a mesh of $2\,400$ elements using the Godunov flux.}
\label{fig:rsb}
\end{figure}
Responder1
Minha ideia foi roubada deaqui. Parece que subfigmatrix
serve \hfill
para fazer o espaçamento entre as subfiguras. Aqui mudamos localmente \hfill
para \hspace{0.1cm}
, para que você tenha sempre 0,1 cm de espaço entre suas subfiguras.
\documentclass{article}
\usepackage{graphicx,subfigmat,etoolbox,amssymb,float}
\begin{document}
\begin{figure}[H]
\patchcmd{\subfigmatrix}{\hfill}{\hspace{0.2cm}}{}{}
\begin{subfigmatrix}{3}
\subfigure[$\mathbb{P}^2$]{\includegraphics{example-image}}
\subfigure[$\mathbb{P}^4$]{\includegraphics{example-image}}
\subfigure[$\mathbb{P}^6$]{\includegraphics{example-image}}
\subfigure[$\mathbb{P}^8$]{\includegraphics{example-image}}
\subfigure[$\mathbb{P}^{10}$]{\includegraphics{example-image}}
\end{subfigmatrix}
\caption{RSB -- $\theta'$ contours , $\mathbb{P}^{2,4,6,8,10}$ solutions on a mesh of $2\,400$ elements using the Godunov flux.}
\label{fig:rsb}
\end{figure}
\end{document}
Outra ideia
Só para lhe oferecer outra ideia: você pode subcaption
tentar \subcaptionbox
:
\documentclass{article}
\usepackage{graphicx,subcaption,amssymb}
\begin{document}
\begin{figure}
\centering
\subcaptionbox{$\mathbb{P}^2$}[0.3\linewidth]{\includegraphics[width=\linewidth]{example-image}}
\subcaptionbox{$\mathbb{P}^4$}[0.3\linewidth]{\includegraphics[width=\linewidth]{example-image}}
\subcaptionbox{$\mathbb{P}^6$}[0.3\linewidth]{\includegraphics[width=\linewidth]{example-image}}
\subcaptionbox{$\mathbb{P}^8$}[0.3\linewidth]{\includegraphics[width=\linewidth]{example-image}}
\subcaptionbox{$\mathbb{P}^{10}$}[0.3\linewidth]{\includegraphics[width=\linewidth]{example-image}}
\caption{RSB -- $\theta'$ contours , $\mathbb{P}^{2,4,6,8,10}$ solutions on a mesh of $2\,400$ elements using the Godunov flux.}
\label{fig:rsb}
\end{figure}
\end{document}
Responder2
O subfigmat
pacote usa subfigure
algo que está obsoleto há cerca de 20 anos.
Aqui está uma abordagem semelhante, com subfig
. Algum truque é necessário porque \subfloat
ignora os espaços depois dele.
\documentclass{article}
\usepackage{graphicx,amssymb,subfig}
\usepackage{showframe}
\NewCommandCopy\ORIsubfloat\subfloat
\NewDocumentCommand{\NEWsubfloat}{om}{%
\begingroup\setlength{\spaceskip}{0pt}%
\IfValueTF{#1}{\ORIsubfloat[#1]{#2}}{\ORIsubfloat{#2}}%
\endgroup\space\ignorespaces
}
\newlength{\subfloatmatrixwidth}
\newenvironment{subfloatmatrix}[2][0.2cm]{%
\centering
\setlength{\subfloatmatrixwidth}{%
\dimexpr(\columnwidth-(#1)*\numexpr(#2-1)\relax)/(#2)\relax
}%
\setlength{\spaceskip}{#1 minus 1pt}%
\setkeys{Gin}{width=\subfloatmatrixwidth}%
\setlength{\lineskip}{\medskipamount}%
\RenewCommandCopy\subfloat\NEWsubfloat
}{\par}
\begin{document}
\begin{figure}[htp]
\begin{subfloatmatrix}{3}
\subfloat[$\mathbb{P}^2$]{\includegraphics{example-image}}
\subfloat[$\mathbb{P}^4$]{\includegraphics{example-image}}
\subfloat[$\mathbb{P}^6$]{\includegraphics{example-image}}
\subfloat[$\mathbb{P}^8$]{\includegraphics{example-image}}
\subfloat[$\mathbb{P}^{10}$]{\includegraphics{example-image}}
\end{subfloatmatrix}
\caption{RSB -- $\theta'$ contours , $\mathbb{P}^{2,4,6,8,10}$ solutions on
a mesh of $2\,400$ elements using the Godunov flux.}
\label{fig:rsb}
\end{figure}
\end{document}
O ambiente também possui um argumento opcional para a separação entre subfloats, padrão 0,2cm.
O mesmo, mas com
\begin{subfloatmatrix}[0.5cm]{3}