我想为第一列添加描述“column a”,为第二列添加描述“column b”,为第三列添加描述“column c”。该怎么做?
\documentclass{article}
\begin{document}
\begin{figure}[h!]
\includegraphics[width=0.32\textwidth]{example-image-a}
\includegraphics[width=0.32\textwidth]{example-image-b}
\includegraphics[width=0.32\textwidth]{example-image-c}
\includegraphics[width=0.32\textwidth]{example-image-a}
\includegraphics[width=0.32\textwidth]{example-image-b}
\includegraphics[width=0.32\textwidth]{example-image-c}
\includegraphics[width=0.32\textwidth]{example-image-a}
\includegraphics[width=0.32\textwidth]{example-image-b}
\includegraphics[width=0.32\textwidth]{example-image-c}
\caption{Column A $\rightarrow$ Column B $\rightarrow$ Column C. }
\end{figure}
\end{document}
答案1
通过表格实现更多控制的解决方案:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h!]
\begin{tabular}{c@{\hspace{1.5mm}}c@{\hspace{1.5mm}}c}
\includegraphics[width=0.32\textwidth]{example-image-a}&
\includegraphics[width=0.32\textwidth]{example-image-b}&
\includegraphics[width=0.32\textwidth]{example-image-c}\\[0.1mm]
\includegraphics[width=0.32\textwidth]{example-image-a}&
\includegraphics[width=0.32\textwidth]{example-image-b}&
\includegraphics[width=0.32\textwidth]{example-image-c}\\[0.1mm]
\includegraphics[width=0.32\textwidth]{example-image-a}&
\includegraphics[width=0.32\textwidth]{example-image-b}&
\includegraphics[width=0.32\textwidth]{example-image-c}\\[0.1mm]
(a) &
(b) &
(c)
\end{tabular}
\caption{Column A $\rightarrow$ Column B $\rightarrow$ Column C. }
\end{figure}
\end{document}
答案2
使用子图,参见相关问题。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}[t]
\centering
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics{a}
\includegraphics{a}
\includegraphics{a}
\subcaption{caption of Column A}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics{b}
\includegraphics{b}
\includegraphics{b}
\subcaption{caption of Column B}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics{c}
\includegraphics{c}
\includegraphics{c}
\subcaption{caption of Column C}
\end{subfigure}
\caption{Caption of all the figures }
\end{figure}
\end{document}
您可以在图形环境中嵌套子图。
答案3
解决方案如下subfigure
:
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[h!]
\begin{subfigure}[t]{.32\linewidth}
\includegraphics[width=\linewidth]{example-image-a}
\includegraphics[width=\linewidth]{example-image-b}
\includegraphics[width=\linewidth]{example-image-c}
\caption{Column A $\rightarrow$}
\end{subfigure}
\begin{subfigure}[t]{.32\linewidth}
\includegraphics[width=\linewidth]{example-image-a}
\includegraphics[width=\linewidth]{example-image-b}
\includegraphics[width=\linewidth]{example-image-c}
\caption{Column B $\rightarrow$}
\end{subfigure}
\begin{subfigure}[t]{.32\linewidth}
\includegraphics[width=\linewidth]{example-image-a}
\includegraphics[width=\linewidth]{example-image-b}
\includegraphics[width=\linewidth]{example-image-c}
\caption{Column C. }
\end{subfigure}
\caption{Caption for all the three subfigures}
\end{figure}
\end{document}