我有 7 张图像,需要使用子图环境成对显示,但每个子图重叠并隐藏了一些上部标题,如下图所示:
以下是 tex 代码:
\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{here}
\usepackage{subcaption}
\begin{document}
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{LaTeX.jpg}
\caption{Titre image 1}
\label{img1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{latex.jpg}
\caption{Titre image 2}
\label{img2}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{latex.jpg}
\caption{Titre image 3}
\label{img3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{latex.jpg}
\caption{Titre image 4}
\label{img4}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{latex.jpg}
\caption{Titre image 5}
\label{img5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{latex.jpg}
\caption{Titre image 6}
\label{img6}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[width=\textwidth]{latex.jpg}
\caption{Titre image 7}
\label{img7}
\end{subfigure}
\captionsetup{justification=centering}
\caption{Titre global}
\label{global}
\end{figure}
\end{document}
那么我该如何解决这个问题?谢谢。