bibtex:参考编号顺序问题

bibtex:参考编号顺序问题

我的 bibtex 参考编号有问题。如下面的屏幕截图所示,编号没有按顺序增加。索引从 1 变为 3、4、5,然后又变为 2。

在此处输入图片描述

提前为冗长的问题致歉,我已尝试将其缩短。我已在下面附加了我的简化乳胶文件。

从源文件中可以看出,有两个图形,删除其中任何一个图形都可以消除该问题(但我需要这些图像)。

如果我注释掉“图片列表”,问题也会消失。同样,我仍然需要这个部分。请帮我找出问题所在。

整个源文件可以从https://www.dropbox.com/s/o6648xgozxnxxfs/BibtexProblem_Question.zip?n=50499474

 \documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
%\documentclass{book}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn

\usepackage[square, numbers, comma, sort&compress]{natbib}  % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim}  % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector}  % Allows "\bvec{}" and "\buvec{}" for "blackboard" style 6
\usepackage{amssymb} 


\begin{document}

\lhead{\emph{List of Figures}}  % Set the left side page header to "List if Figures"
\listoffigures  % Write out the List of Figures

\mainmatter   % Begin normal, numeric (1,2,3...) page numbering
\pagestyle{fancy}  
%\input{Chapter1} % Introduction

This is the first \cite{Ackermann02}

\begin{figure}[h]
 \centering
 \includegraphics[width = 0.4\textwidth]{Figure1.jpg}
 \caption{Figure1 \cite{Ackermann02}. }
 \label{fig:Figure1}
\end{figure}

This is the second \cite{Esteban04, Remondino06, Nguyen12}.

Sixth is this \cite{Olsen09}. 

\begin{figure}[h]
 \centering
 \includegraphics[scale=1.0]{Figure2.eps}
     \hspace{ 5.5 mm}\caption{ (taken from \cite{Olsen09}). }
\label{fig:Figure2}
\end{figure}

\label{Bibliography}
\lhead{\emph{Bibliography}}  % Change the left side page header to "Bibliography"
\bibliographystyle{unsrtnat}  % Use the "unsrtnat" BibTeX style for formatting the Bibliography
\bibliography{Bibliography}  % The references (bibliography) information are stored in the file named "Bibliography.bib"

\end{document}  % The End

该 Latex 文件使用外部论文类,

%%
%% This is file `Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn
%% generated with the docstrip utility.
%%
%% Created by Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk

\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{Thesis}
              [2007/22/02 v1.0
   LaTeX document class]
\def\baseclass{book}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
\def\@checkoptions#1#2{
  \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
  \@tempswafalse
  \@tfor\@this:=#2\do{
    \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
    \ifin@ \@tempswatrue \@break@tfor \fi}
  \let\@this\@empty
  \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
\PassOptionsToClass{a4paper}{\baseclass}
\ProcessOptions\relax
\LoadClass{\baseclass}
\newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}

\newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
\usepackage{setspace}
\usepackage{vmargin}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[scriptsize]{subfigure}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lstpatch}
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
   bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
   colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},
   pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
\pdfstringdefDisableCommands{
   \let\\\space
}
\addtocounter{secnumdepth}{1}
\setcounter{tocdepth}{3}  
\newcounter{dummy}
\newcommand\addtotoc[1]{
\refstepcounter{dummy}
\addcontentsline{toc}{chapter}{#1}}
\renewcommand\listoffigures{
\btypeout{List of Figures}
\addtotoc{List of Figures}
\begin{spacing}{1}{
    \setlength{\parskip}{1pt}
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename
      \@mkboth{\MakeUppercase\listfigurename}
              {\MakeUppercase\listfigurename}}
    \@starttoc{lof}
    \if@restonecol\twocolumn\fi
    \cleardoublepage
}\end{spacing}
}

和 bibtex 文件

@unpublished{Ackermann02,
        author = "Author One",
        title = "modelling",
        note = "Available at",
                year = 2000}

@book{Esteban04,
        author = "Author Two",
        title = "Title Two",
        publisher = "Publisher 2",
        address = "",
        year = "2000"
}           

@book{Nguyen12,
        author = "Author three",
        title = "Title Three",
        publisher = "Publisher 3",
        address = "",
        year = "2000"
}   

@article{Remondino06,   
    author = {Author Four},
    journal = {The Photogrammetric Record},   
    title = {Title four},
    volume = {20},
    year = {2000}
}   

@article{Olsen09,
     author = {Author Five},
     title = {Title Six},
     journal = {Computers and Graphics},         
     volume = {31},
     year = {2000},
     pages = {0--10}
} 

答案1

由于您在命令\listoffigures前面添加了\cite,因此前两个引用的参考文献是\captions 里面的参考文献。

因此它们按以下顺序出现:

阿克曼02

奥尔森09

埃斯特班04

雷蒙迪诺06

阮12

移动\listoffigures到文档末尾即可解决问题。

\documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
%\documentclass{book}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn

\usepackage[square, numbers, comma, sort&compress]{natbib}  % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim}  % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector}  % Allows "\bvec{}" and "\buvec{}" for "blackboard" style 6
\usepackage{amssymb}


\begin{document}

\mainmatter   % Begin normal, numeric (1,2,3...) page numbering
\pagestyle{fancy}
%\input{Chapter1} % Introduction

This is the first \cite{Ackermann02}

\begin{figure}[h]
 \centering
 \includegraphics[width = 0.4\textwidth]{Figure1.jpg}
 \caption{Figure1 \cite{Ackermann02}. }
 \label{fig:Figure1}
\end{figure}

This is the second \cite{Esteban04, Remondino06, Nguyen12}.

Sixth is this \cite{Olsen09}.

\begin{figure}[h]
 \centering
 \includegraphics[scale=1.0]{Figure2.eps}
     \hspace{ 5.5 mm}\caption{ (taken from \cite{Olsen09}). }
\label{fig:Figure2}
\end{figure}

\label{Bibliography}
\lhead{\emph{Bibliography}}  % Change the left side page header to "Bibliography"
\bibliographystyle{unsrtnat}  % Use the "unsrtnat" BibTeX style for formatting the Bibliography
\bibliography{Bibliography}  % The references (bibliography) information are stored in the file named "Bibliography.bib"

\lhead{\emph{List of Figures}}  % Set the left side page header to "List if Figures"
\listoffigures  % Write out the List of Figures

\end{document}  % The End

如果您无法\listoffigures在文档末尾移动,您可以\nocite在之后按正确的顺序引用\begin{document}

 \documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
%\documentclass{book}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn

\usepackage[square, numbers, comma, sort&compress]{natbib}  % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim}  % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector}  % Allows "\bvec{}" and "\buvec{}" for "blackboard" style 6
\usepackage{amssymb}


\begin{document}

\nocite{Ackermann02}
\nocite{Esteban04}
\nocite{Remondino06}
\nocite{Nguyen12}
\nocite{Olsen09}

\lhead{\emph{List of Figures}}  % Set the left side page header to "List if Figures"
\listoffigures  % Write out the List of Figures

\mainmatter   % Begin normal, numeric (1,2,3...) page numbering
\pagestyle{fancy}
%\input{Chapter1} % Introduction

This is the first \cite{Ackermann02}

\begin{figure}[h]
 \centering
 \includegraphics[width = 0.4\textwidth]{Figure1.jpg}
 \caption{Figure1 \cite{Ackermann02}. }
 \label{fig:Figure1}
\end{figure}

This is the second \cite{Esteban04, Remondino06, Nguyen12}.

Sixth is this \cite{Olsen09}.

\begin{figure}[h]
 \centering
 \includegraphics[scale=1.0]{Figure2.eps}
     \hspace{ 5.5 mm}\caption{ (taken from \cite{Olsen09}). }
\label{fig:Figure2}
\end{figure}

\label{Bibliography}
\lhead{\emph{Bibliography}}  % Change the left side page header to "Bibliography"
\bibliographystyle{unsrtnat}  % Use the "unsrtnat" BibTeX style for formatting the Bibliography
\bibliography{Bibliography}  % The references (bibliography) information are stored in the file named "Bibliography.bib"

\end{document}  % The End 

还有两种可能:

  1. 如果您不需要在“图片列表”中打印参考文献的链接,您可以打印标题的“简短形式”。例如,用 代替\caption{ (taken from \cite{Olsen09}). }\caption[Fig. 2]{ (taken from \cite{Olsen09}). }这样\cite就不会收集相应的内容。
  2. .bib文件中,将参考文献按照它们在“参考书目”中出现的准确顺序排列,并放在\nocite{*}紧接之后\begin{document}。无论如何,请注意,在这种情况下,文件中包含的所有参考文献.bib都将被打印,即使是您尚未记录的参考文献\cite...

答案2

您需要在图表列表中禁用文件写入。在示例中,filecontents*环境仅用于使其自包含;您可以使用自己的类和参考书目文件。

\begin{filecontents*}{\jobname.bib}
@unpublished{Ackermann02,
        author = "Author One",
        title = "modelling",
        note = "Available at",
                year = 2000}

@book{Esteban04,
        author = "Author Two",
        title = "Title Two",
        publisher = "Publisher 2",
        address = "",
        year = "2000"
}           

@book{Nguyen12,
        author = "Author three",
        title = "Title Three",
        publisher = "Publisher 3",
        address = "",
        year = "2000"
}   

@article{Remondino06,   
    author = {Author Four},
    journal = {The Photogrammetric Record},   
    title = {Title four},
    volume = {20},
    year = {2000}
}   

@article{Olsen09,
     author = {Author Five},
     title = {Title Six},
     journal = {Computers and Graphics},         
     volume = {31},
     year = {2000},
     pages = {0--10}
} 
\end{filecontents*}
\documentclass{book}

\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage[demo]{graphicx}

\usepackage{etoolbox}

\makeatletter
\newcommand{\disablewritingcites}{%
  \patchcmd{\@nocite}{\if@filesw}{\iffalse}{}{}%
}
\makeatother

\begin{document}


\begingroup\makeatletter\@fileswfalse\makeatother
\listoffigures  % Write out the List of Figures
\endgroup
\mainmatter

This is the first \cite{Ackermann02}

\begin{figure}[h]
 \centering
 \includegraphics[width = 0.4\textwidth]{Figure1.jpg}
 \caption{Figure1 \cite{Ackermann02}. }
 \label{fig:Figure1}
\end{figure}

This is the second \cite{Esteban04, Remondino06, Nguyen12}.

Sixth is this \cite{Olsen09}. 

\begin{figure}[h]
 \centering
 \includegraphics[scale=1.0]{Figure2.eps}
     \hspace{ 5.5 mm}\caption{ (taken from \cite{Olsen09}). }
\label{fig:Figure2}
\end{figure}

\bibliographystyle{unsrtnat}
\bibliography{\jobname}

\end{document}

在此处输入图片描述

相关内容