使用标题时,即使没有图片列表,引用排序也不正确

使用标题时,即使没有图片列表,引用排序也不正确

本论坛上有很多关于使用参考书目样式时引文编号顺序不正确的问题unsrt。这种情况是指在有图片列表的情况下在标题中使用引文。出现在图片列表中的引文在正文中的引文之前编号。当放置图片时,它们的引文似乎与文档的其余部分顺序不符。

一种可能的答案是使用\notoccite包。另一种方法是使用可选参数来\caption防止引用出现在图表列表中。

在问题中未分类的引用和浮动,展示了一个 MWE(如下所示),证明了这个问题可能发生即使没有数字列表。发布了一个 hack,部分解决了 MWE 案例的问题,但并未完全解释或解决问题。

我想知道:

  1. Latex 为什么会产生这种现象?
  2. 是否有一个优雅的解决方案,不需要重新定义内部宏?

MWE(致谢艾伦·芒恩):

\documentclass[12pt,oneside]{book}
\usepackage[super,sort&compress]{natbib}
\bibpunct{[}{]}{,}{s}{}{} 
\bibliographystyle{unsrtnat}
\usepackage{hyperref}
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\usepackage{filecontents}
\usepackage{caption}
\begin{filecontents}{\jobname.bib}
@incollection{Baauw2001,
    Address = {Somerville, MA},
    Author = {Sergio Baauw},
    Booktitle = {Proceedings of the 25th Annual Boston University Conference on Language Development},
    Editor = {A. H.-J. Do and L. Dom{\'\i}nguez and A. Johansen},
    Pages = {82-93},
    Publisher = {Cascadilla Press},
    Title = {Expletive determiners in child Dutch and Spanish},
    Year = {2001}}

@article{barker1998,
    Author = {Chris Barker},
    Journal = {Natural Language \& Linguistic Theory},
    Pages = {679-717},
    Title = {Partitives, Double Genitives and Anti-Uniqueness},
    Volume = {16},
    Year = {1998}}

@book{Berwick1985,
    Address = {Cambridge, MA},
    Author = {Berwick, Robert C.},
    Publisher = {MIT Press},
    Title = {Acquisition of syntactic knowledge},
    Year = {1985}}

@phdthesis{Carlson1977,
    Author = {Carlson, Gregory N.},
    School = {University of Massachusetts, Amherst},
    Title = {Reference to Kinds in {E}nglish},
    Year = {1977}}

\end{filecontents}

\begin{document}

\chapter{A chapter}
\lipsum
Some text.\cite{Carlson1977}
\lipsum[3]
\cite{Barker1998,Baauw2001}
\begin{figure}[tbp]
\centering
\includegraphics[width=.5\textwidth]{demo.jpg}
\captionof{figure}[A figure from Berwick]{A figure from \protect\cite{Berwick1985}}
\end{figure}
\lipsum[2]
\bibliography{\jobname}
\end{document}

答案1

引文按其出现的顺序编号但在你的情况下,图形向后浮动,所以你得到[4]页面顶部的图形,通常的解决方案是认为这是可以的,因为浮动是明确的不是在主文档流中,因此顺序有点难以定义。如果您不希望浮动向后浮动,请添加

\usepackage{flafter}

然后t将允许浮动元素移至后续页面的顶部,但不允许它向后浮动至此页面的顶部,因此在这种情况下b选择 并且浮动元素出现在末尾,并带有引用[4]

或者,如果您想要浮动在顶部,则可以将figure环境移到源中的较早位置,即在\cite生成 2,3 之前,或者将放置\nocite{...}在相似点,其中...是图形标题中参考的关键。

相关内容