我試著將 4 個數字放在一起,以便左邊的三個數字是子圖並屬於圖 1,另一個獨立的數字作為最右邊的數字。
我有兩個問題:
首先,當我在文本中引用數字時,編號是從0開始的,而實際上應該從1開始,如何使其從1開始?
其次,如果我沒有為其中一個子圖分配標題,我就無法在文本中引用它們。
以下是我的程式碼和我想要做的事情的圖像。
\documentclass{article}
\usepackage{amsmath}
\usepackage[demo]{graphicx}
\usepackage{caption}
\captionsetup[subfigure]{labelsep=space,font=small}
\usepackage{subfigure}
\begin{document}
\begin{figure*}[t]
\begin{minipage}[t]{.75\textwidth}
\begin{minipage}[t]{.29\textwidth}
\centering
\includegraphics[width=1.0\linewidth]{wu8_wedges}
\captionof{subfigure}{this is a caption}
\label{fig:a}
\end{minipage}
\hfill
\begin{minipage}[t]{.29\textwidth}
\includegraphics[width=1.0\linewidth]{wu8_wedges}
\label{fig:b}
\end{minipage}
\hfill
\begin{minipage}[t]{.29\textwidth}
\includegraphics[width=1.0\linewidth]{wu8_wedges}
\label{fig:c}
\end{minipage}%
\caption{Fig 1 caption this is}
\end{minipage}
\begin{minipage}[t]{.23\textwidth}
\centering
\includegraphics[width=1.0\linewidth]{wu8_wedges}
\caption{Fig 2 caption this is $\beta$}
\label{fig:nextfig}
\end{minipage}
\end{figure*}
Why is it Figure \ref{fig:a}, and how to make references to Figures \ref{fig:b} and \ref{fig:c} work. Reference to Figure \ref{fig:nextfig} works?
\end{document}
答案1
作為上述評論的補充:
\documentclass{article}
\usepackage{amsmath}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subfig}
\begin{document}
\begin{figure*}[t]
\begin{minipage}[t]{.75\linewidth}\centering
\subfloat[\label{fig:a}]{\includegraphics[width=0.3\linewidth]{wu8_wedges}}
\hfil
\subfloat[\label{fig:b}]{\includegraphics[width=0.3\linewidth]{wu8_wedges}}
\hfil
\subfloat[\label{fig:c}]{\includegraphics[width=0.3\linewidth]{wu8_wedges}}
\caption{Figure 1 has three subfigures}
\label{fig:1}
\end{minipage}%
\begin{minipage}[t]{.23\textwidth}\centering
\includegraphics[width=0.9\linewidth]{wu8_wedges}
\caption{Figure 2 has only one image}
\label{fig:2}
\end{minipage}
\end{figure*}
See references for figures \ref{fig:a}, \ref{fig:b} and \ref{fig:c} which are part of Figure \ref{fig:1} and for Figure \ref{fig:2}. References works!
\end{document}