I'm trying to fit two figures side by side (with the same size) in the width of the text, using the floatrow
package. I use the showframe
option and the \fbox
in mwe for better visualization. how to fit perfectly on text width?
\documentclass[]{report}
\usepackage[a4paper,showframe]{geometry}
\usepackage{subcaption}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{floatrow}
\begin{document}
\lipsum[1]
\begin{figure}[htb!]
\ffigbox[\textwidth]
{\begin{subfloatrow}[2]\setlength\fboxsep{0pt}\setlength\fboxrule{0.75pt}\fbox{\ffigbox[0.49\textwidth]
{
\caption{sidewalk perforation}
\label{subfig:furadeira}
}
{ \setlength\fboxsep{0pt}
\setlength\fboxrule{0.75pt}
\fbox{\includegraphics[width=0.48\textwidth]{image1.jpg}}}
\setlength\fboxsep{0pt}
\setlength\fboxrule{0.75pt}}
\fbox{\ffigbox[0.49\textwidth]
{
\caption{volatile organic compounds measurement}
\label{subfig:medicaomalha}
}
{
\setlength\fboxsep{0pt}
\setlength\fboxrule{0.75pt}
\fbox{\includegraphics[width=0.48\textwidth]{image2.jpg}}
}}
\end{subfloatrow}
}
{
\caption{Hot spot investigation}
\label{fig:hotspot}
}
\end{figure}%
\lipsum[1]
\end{document}