我想對齊圖片中的數字,我嘗試了在網路上找到的許多解決方案,但沒有任何效果。我正在使用 subfig 套件。我掩蓋了這些數字,因為我不擁有這些權利。第一個是用 Gnuplot(epslatex 終端)產生的,第二個是一個簡單的 pdf 圖像。這是我的程式碼:
\begin{figure}[t]
\centering
\begin{adjustbox}{max width=\textwidth}
\subfloat[Caratterizzazione IV @ $T = -30^\circ C$ \label{subfig-1:3d-iv_frigo}]{%
\input{./cap4/3d/iv_frigo}
}
\subfloat[Misura a 50V @ $T = -30^\circ C$ \label{subfig-2:strip_cv}]{%
\includegraphics[scale=0.65]{./3d/misure/50V_frigo}
\put(-40,-7){\footnotesize elettroni}
}
\end{adjustbox}
\caption{Frigo}
\label{fig:frigo}
\end{figure}
答案1
您可以使用該subfloatrow
環境,來自floatrow
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{calc}
\usepackage{caption, subcaption}
\usepackage{floatrow}
\usepackage{graphicx}%[demo]
\usepackage[showframe]{geometry}
\begin{document}
\begin{figure}
\floatsetup{capposition=below, floatrowsep=qquad}
\centering
\ffigbox{%
\begin{subfloatrow}
\centering
\ffigbox[0.40\textwidth]{\caption{\emph{Traccia Table} (1939)}}{%
\includegraphics[width=0.35\textwidth]{traccia-table}%[width=0.4\textwidth]
}
\ffigbox[0.50\textwidth]{\caption{\emph{Le Cahier d’une Écolière} (1931)}}{%
\includegraphics[width=0.45\textwidth]{cahier}%
}
\end{subfloatrow}}%
{\caption{Méret Oppenheim (1913-1985)} \label{MO}}
\end{figure}
\end{document}
答案2
這個解決方案對我有用。使用包subcaption
.
\begin{figure}[ht]
\centering
\begin{subfigure}[t]{0.49\textwidth}
\includegraphics[width=1\linewidth]{example-image-a.pdf}
\caption{Caption for figure 1}
\end{subfigure}
\begin{subfigure}[t]{0.49\textwidth}
\includegraphics[width=1\linewidth]{example-image-a.pdf}
\caption{Caption for figure 2}
\end{subfigure}
\vspace{6pt}
\caption{Caption for the two figures}
\end{figure}