我有五个数字需要放入以下布局中:
到目前为止,我已经设法获得上述布局(使用以下脚本),除了我想要添加到图形中的子图(a,b,c,d,e)的标签(左下角的子图内)。
\begin{figure}
\captionsetup[subfigure]{labelformat=empty}
\begin{minipage}{.25\textwidth}
\begin{subfigure}{\textwidth}
\subcaption{Title1}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_1}
\hspace{1cm}
\end{subfigure}
\begin{subfigure}{\textwidth}
\vspace{0.3cm}
\subcaption{Title3}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_3}
\hspace{1cm}
\end{subfigure}
\end{minipage}
\hfill
\begin{minipage}{.25\textwidth}
\begin{subfigure}{\textwidth}
\subcaption{Title2}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_2}
\hspace{1cm}
\end{subfigure}
\begin{subfigure}{\textwidth}
\vspace{0.3cm}
\subcaption{Title4}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_4}
\hspace{1cm}
\end{subfigure}
\end{minipage}
\hfill
\begin{minipage}{.45\textwidth}
\begin{subfigure}{\textwidth}
\subcaption{Title5}
\vspace{0.1cm}
\includegraphics[width=\textwidth,trim=1cm 0cm 2cm 0.5cm]{Figure_5}
\end{subfigure}
\end{minipage}
\end{figure}
{{\bf Insert Caption Here}
如果有人能帮助我实现这一目标,我将不胜感激。
先感谢您!
答案1
借助以下包含从这里修改的解决方案 你可以得到这个结果:
\documentclass{article}
\usepackage{graphicx}
\usepackage{caption,subcaption,tikz}
\DeclareCaptionFormat{suboverlay}{\gdef\subcapoverlay{(\thesubfigure) #3\par}}
\DeclareCaptionStyle{suboverlay}{format=suboverlay}
\captionsetup[subfigure]{format=suboverlay}
\newcommand{\subcaptionOverlay}[1]{%
\subcaption{}%
\begin{tikzpicture}
\node [inner sep=0,anchor=south west]at (-3ex,-2ex) (image) {#1};
\draw node [black] {\subcapoverlay};
\end{tikzpicture}%
}
\begin{document}
\begin{figure}%
\begin{minipage}{.25\textwidth}
\begin{subfigure}{\textwidth}
\centering\textbf{Title 1}
\subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering\textbf{Title 3}
\subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
\end{subfigure}
\end{minipage}
\hfill
\begin{minipage}{.25\textwidth}
\begin{subfigure}{\textwidth}
\centering\textbf{Title 2}
\subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering\textbf{Title 4}
\subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
\end{subfigure}
\end{minipage}
\hfill
\begin{minipage}{.45\textwidth}
\begin{subfigure}{\textwidth}
\centering\textbf{Title 5}
\subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
\end{subfigure}
\end{minipage}
\end{figure}
\end{document}