这是我想要重现的图。
我能够使用以下代码获得没有小写标签的图形:
\begin{figure}
$$\begin{array}{cl}
\includegraphics[height=2cm]{image1.jpg} &
\includegraphics[height=2cm]{image3.jpg} \\
\includegraphics[height=2cm]{image2.jpg} &
\includegraphics[height=2cm]{image4.jpg}
\end{array}$$
\caption{$(a)-(d)$ are cool}
\end{figure}
我不知道如何让字母出现在每张图片的左下角。有人能帮忙吗?
答案1
只需对您的 MWE 进行微小修改,即可获得更好的输出:
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\[
\begin{array}{rlrl}
(a) & \includegraphics[height=2cm]{image1.jpg} & (b)& \includegraphics[height=2cm]{image3.jpg} \\
(c) & \includegraphics[height=2cm]{image2.jpg} & (d)& \includegraphics[height=2cm]{image4.jpg}
\end{array}
\]
\caption{(a)--(d) are cool}
\end{figure}
\end{document}
输出:
答案2
最好tabular
使用array
:
\documentclass[demo]{article} %% remove demo in your file
\usepackage{amsmath}
\usepackage[export]{adjustbox} %% gives valing key
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{r@{\hspace{2pt}}lr@{\hspace{2pt}}l}
(a) & \includegraphics[valign=b,height=2cm]{image1.jpg} &
(b) & \includegraphics[valign=b,height=2cm]{image3.jpg} \\
(c) & \includegraphics[valign=b,height=2cm]{image2.jpg} &
(d) & \includegraphics[valign=b,height=2cm]{image4.jpg}
\end{tabular}
\caption{(a)--(d) are cool}
\end{figure}
\end{document}
答案3
没必要因为这种事情让你的生活变得复杂
\documentclass{article}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
(a)\includegraphics[width=2cm,height=2cm]{image1}%
(b)\includegraphics[width=2cm,height=2cm]{image1}
(c)\includegraphics[width=2cm,height=2cm]{image1}%
(d)\includegraphics[width=2cm,height=2cm]{image1}
\end{figure}
\end{document}