我使用以下代码显示四个图形。编译时,我得到每个图形的标签为 a、b、c 和 d。我希望这些标签用括号显示为 (a)、(b)、(c) 和 (d)。我该怎么做?
\begin{figure*}[ht]
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{figure_a}
\caption{}
\label{fig7:a}
\vspace{4ex}
\end{subfigure}%%
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{figure_b}
\caption{}
\label{fig7:b}
\vspace{4ex}
\end{subfigure}
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{figure_c}
\caption{}
\label{fig7:c}
\end{subfigure}%%
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{figure_d}
\caption{}
\label{fig7:d}
\end{subfigure}
\caption{My caption }
\label{myfig}
\end{figure*}
答案1
这是subcaption
包裹:
\documentclass{article}
\usepackage{graphicx,subcaption}
\begin{document}
\begin{figure*}[ht]
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{example-image-a}
\caption{}
\end{subfigure}%%
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{example-image-b}
\caption{}
\end{subfigure}
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{example-image-c}
\caption{}
\end{subfigure}%%
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{example-image-a}
\caption{}
\end{subfigure}
\caption{My caption}
\end{figure*}
\end{document}
可以使用以下功能修改上述样式caption
(因为它是由同一位作者写的)。