乳胶:参考号错误

发布于 2024-09-29 07:14:57 字数 4043 浏览 2 评论 0原文

我的 .tex 文件中有 6 个数字。无论我在哪里引用第六张图片,在 pdf 中我都会得到Figure1.5 而不是Figure1.6(少 1 个),但是单击链接后,我会转到右图图1.6。

同样,当我引用第五张图片时,在 pdf 中我得到的是图 1.4 而不是图 1.5,当我单击链接时,我再次转到图 1.5 。

对第四张图像的引用也是如此,我在 pdf 中少了 1 个(1.3 而不是 1.4)。与 1.3 相同,我得到 1.2。

但是对于 1.2,我得到的正是 1.2,而 1.1 我得到的是 1.1。

为什么会发生这种情况?我认为这是由于图中的 \caption\label 顺序造成的,但我已经验证了它们的顺序是正确的。所以我认为这不是问题所在。

帮助!


1.1 至 1.6 的数字代码

\begin{figure}
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.1a} \includegraphics[width=0.48\textwidth]{Images/Figure001.png}}
        \hspace{1.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.1b} \includegraphics[width=0.48\textwidth]{Images/Figure002.png}}
    \end{center}
        \textit{\caption{abcd...........xyz}}
    \label{figure1.1}
\end{figure}

%--------------------------------%

\begin{figure}
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.2a} \includegraphics[width=0.48\textwidth]{Images/Figure004.png}}
        \hspace{1.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.2b} \includegraphics[width=0.48\textwidth]{Images/Figure005.png}}
    \end{center}
        \textit{\caption{abcd...........xyz}}
    \label{figure1.2}
\end{figure}

%-------- --------------------------%

\begin{figure}
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.3a} \includegraphics[width=0.45\textwidth]{Images/Figure006.png}}
        \hspace{2.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.3b} \includegraphics[width=0.45\textwidth]{Images/Figure007.png}}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.3c} \includegraphics[width=0.95\textwidth]{Images/Figure008.png}}
    \end{center}
        \textit{\caption{abcd...........xyz}}
    \label{figure1.3}
\end{figure}

%---------------------- -----------%

\begin{figure}[H]
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4a} \includegraphics[width=0.30\textwidth]{Images/Figure009a.png}}
    \end{center}

    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4b} \includegraphics[width=0.45\textwidth]{Images/Figure010.png}}
        \hspace{2.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4c} \includegraphics[width=0.45\textwidth]{Images/Figure011.png}}
    \end{center}

    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4d} \includegraphics[width=0.403\textwidth]{Images/Figure012.png}}
        \hspace{2.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4e} \includegraphics[width=0.45\textwidth]{Images/Figure013.png}}
    \end{center}

\textit{\caption{abcd...........xyz}}
\label{figure1.4}

\end{figure}

%--------------------------------%

  \begin{figure}
            \begin{center}
                \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.5a} \includegraphics[width=0.403\textwidth]{Images/Figure014a.png}}
                \hspace{2.0mm}
                \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.5b} \includegraphics[width=0.403\textwidth]{Images/Figure014b.png}}
            \end{center}

            \begin{center}
            \subfigure[\textit{abcd...........xyz]{\label{fig:Fig1.5c} \includegraphics[width=1\textwidth]{Images/Figure015.png}}
            \end{center}

        \textit{\caption{abcd...........xyz}}
        \label{figure1.5}

        \end{figure}

%-- -------------------------------------------%

\begin{figure}[H]
    \begin{center}
    \includegraphics[width=0.80\textwidth]{Images/Figure015a.png}
    \textit{\caption{abcd...........xyz}}
\end{center}
    \label{figure1.6}
\end{figure}

I have 6 figures in my .tex file. Wherever I put a reference to the 6th image, in the pdf I get Figure1.5 instead of Figure1.6 (1 less) but upon clicking the link I go to the right figure Figure1.6.

Similarly, when I refer to 5th image, in the pdf I get Figure1.4 instead of Figure1.5, once again when I click the link I go to Figure1.5.

Same goes to a reference to 4th image, I get 1 less (1.3 instead of 1.4) in the pdf. Same with 1.3, I get 1.2.

But for 1.2 I get exactly 1.2 and 1.1 I get 1.1.

Why is this happening? I thought it was due to \caption and \label order in the figure, but I have already verified that they are in the right order. So I don't think so that it is that problem.

Help!


Code for figures from 1.1 to 1.6

\begin{figure}
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.1a} \includegraphics[width=0.48\textwidth]{Images/Figure001.png}}
        \hspace{1.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.1b} \includegraphics[width=0.48\textwidth]{Images/Figure002.png}}
    \end{center}
        \textit{\caption{abcd...........xyz}}
    \label{figure1.1}
\end{figure}

%---------------------------------%

\begin{figure}
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.2a} \includegraphics[width=0.48\textwidth]{Images/Figure004.png}}
        \hspace{1.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.2b} \includegraphics[width=0.48\textwidth]{Images/Figure005.png}}
    \end{center}
        \textit{\caption{abcd...........xyz}}
    \label{figure1.2}
\end{figure}

%---------------------------------%

\begin{figure}
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.3a} \includegraphics[width=0.45\textwidth]{Images/Figure006.png}}
        \hspace{2.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.3b} \includegraphics[width=0.45\textwidth]{Images/Figure007.png}}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.3c} \includegraphics[width=0.95\textwidth]{Images/Figure008.png}}
    \end{center}
        \textit{\caption{abcd...........xyz}}
    \label{figure1.3}
\end{figure}

%---------------------------------%

\begin{figure}[H]
    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4a} \includegraphics[width=0.30\textwidth]{Images/Figure009a.png}}
    \end{center}

    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4b} \includegraphics[width=0.45\textwidth]{Images/Figure010.png}}
        \hspace{2.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4c} \includegraphics[width=0.45\textwidth]{Images/Figure011.png}}
    \end{center}

    \begin{center}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4d} \includegraphics[width=0.403\textwidth]{Images/Figure012.png}}
        \hspace{2.0mm}
        \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.4e} \includegraphics[width=0.45\textwidth]{Images/Figure013.png}}
    \end{center}

\textit{\caption{abcd...........xyz}}
\label{figure1.4}

\end{figure}

%---------------------------------%

  \begin{figure}
            \begin{center}
                \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.5a} \includegraphics[width=0.403\textwidth]{Images/Figure014a.png}}
                \hspace{2.0mm}
                \subfigure[\textit{abcd...........xyz}]{\label{fig:Fig1.5b} \includegraphics[width=0.403\textwidth]{Images/Figure014b.png}}
            \end{center}

            \begin{center}
            \subfigure[\textit{abcd...........xyz]{\label{fig:Fig1.5c} \includegraphics[width=1\textwidth]{Images/Figure015.png}}
            \end{center}

        \textit{\caption{abcd...........xyz}}
        \label{figure1.5}

        \end{figure}

%---------------------------------%

\begin{figure}[H]
    \begin{center}
    \includegraphics[width=0.80\textwidth]{Images/Figure015a.png}
    \textit{\caption{abcd...........xyz}}
\end{center}
    \label{figure1.6}
\end{figure}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

好菇凉咱不稀罕他 2024-10-06 07:14:57

好的。问题从这一步开始 - 我想要斜体标题,出于我的直觉,我是这样做的:

\textit{\caption{abcd...........xyz}}

对于我的所有标题,我有 \textit 包含 \caption {},这就是导致问题的原因。我不明白为什么。

所以我删除了所有这些,现在参考文献可以完美地工作。

但我仍然想要斜体标题。

因此,我这样做了,我直接为包提供了选项

\usepackage{caption}
\captionsetup{font=it, labelfont=bf}

,这里,font=it 使整个标题(包括标签)斜体显示,labelfont=bf 仅将标签粗体显示。

但这将图的标题斜体化,对于子图的标题,我不得不再次为子图包提供选项,

\usepackage[bf, it, IT]{subfigure}

其中bfit 选项使标签粗体和斜体,而 IT 选项仅使文本斜体。

就这样,问题解决了!

OK. The problem started with this step - I wanted to have italicized captions, which out of my intuition, I was doing it this way:

\textit{\caption{abcd...........xyz}}

For all my captions I have the \textit enclosing the \caption{}, this was what was causing the problem. I don't understand why.

So I removed all of them and the references now work perfectly.

But I still wanted the italics captions.

So, I did this, I gave options to the package directly

\usepackage{caption}
\captionsetup{font=it, labelfont=bf}

Here, font=it italics the entire caption including the label and labelfont=bf bolds only the label.

But this ONLY italicized the captions of a figure, for the captions of a sub-figure I had to once again give options to sub-figure package

\usepackage[bf, it, IT]{subfigure}

Where bf and it options bolds and italics the label and IT option will only italics the text.

Thats it, the problem is solved!

⊕婉儿 2024-10-06 07:14:57

验证图2的参考设置是否正确。

Verify whether the reference to figure 2 is set correctly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文