如何使用 Latex 和 bibtex 引用参考文献范围

发布于 2024-09-28 18:10:34 字数 90 浏览 3 评论 0原文

你好 假设我有 3 个依次引用的参考文献,即 [1][2][3]。

但我想看看[1]-[3]。

我应该怎么办。

谢谢。

Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].

But I want to see [1]-[3].

What should I do.

Thank you.

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

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

发布评论

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

评论(5

云裳 2024-10-05 18:10:34

有多种方法可以更改 bibtex 引文的格式。一种方法是使用 cite 包。另一个是 natbib 包,可能带有 sort&compress 选项(即 \usepackage[sort&compress] {natbib})。许多出版物也有自己的样式来实现这一点,即使不写作时,我也经常使用 revtex 样式对于 APS 期刊,因为它们效果很好。尝试其中一些,看看是否有帮助。

There are ways to change how bibtex formats your citations. One way is to use the cite package. Another is the natbib package perhaps with the sort&compress option (i.e., \usepackage[sort&compress]{natbib}). Many publications also have their own styles that will accomplish this, I often use the revtex styles even when not writing for APS journals since they work quite well. Try some of these to see if they help.

原来是傀儡 2024-10-05 18:10:34

如果您在 \cite 命令中放置多个标签,例如:

\cite{pugh1, pugh2, barneymcgrew}

这些标签将一起列出在同一个方括号内,并且在最终文档中看起来类似于 [1,4,9]。如果您引用的部分或全部参考文献具有序列号,则会在文档中注明,例如 [1,3-6,8-9] 等。

请注意,对参考书目进行排序的方式会对此产生影响:如果您选择按照文本中首次引用的顺序列出项目,这在很大程度上会自然发生。但是,如果您按作者姓名等对参考书目进行排序,那么您的参考文献连续的可能性就会大大降低。

If you put more than one tag in your \cite command, such as:

\cite{pugh1, pugh2, barneymcgrew}

these will be listed together within the same square brackets, and look something like [1,4,9] in the final document. If some or all of the references which you cite turn out to have sequential numbers, this will be indicated in the document something like [1,3-6,8-9] and so on.

Note that the way in which you sort your bibliography will make a difference to this: if you choose to list items in the order in which they are first cited in the text, this will largely happen naturally. However, if you sort your bibliography by, say, author's name, your references are much less likely to be consecutive.

苦笑流年记忆 2024-10-05 18:10:34

如果您使用 biblatex,则可以使用 numeric-comp 样式(请参阅 文档第 3.3.1 节

\usepackage[style=numeric-comp]{biblatex}

这将对引文中的数字进行排序(并压缩)[8, 3, 1 , 7, 2],变为 [1–3, 7, 8]

此外,如果您希望引文按照它们在文本中出现的顺序进行编号,您可以指定 no对 biblatex 进行排序

\usepackage[style=numeric-comp, sorting=none]{biblatex}

因此,如果上面的例子是文本中的第一个引用,它将变成 [1–5]

If you're using biblatex, you can use the numeric-comp style (see Section 3.3.1 of the documentation)

\usepackage[style=numeric-comp]{biblatex}

This will sort (and compress) the numbers inside the citation [8, 3, 1, 7, 2], becomes [1–3, 7, 8]

Additionally, if you want the citations to be numbered in the order they appear in the text, you can specify no sorting to biblatex with

\usepackage[style=numeric-comp, sorting=none]{biblatex}

So if the above example was the first citation in the text, it would become [1–5]

指尖微凉心微凉 2024-10-05 18:10:34

使用 \cite 包可能会解决您的问题。
您可以将以下任一行添加到您的代码中:

\usepackage{cite}
\usepackage[noadjust]{cite}

Using \cite package would probably resolve your problem.
You could add either of the following lines to your code:

\usepackage{cite}
\usepackage[noadjust]{cite}
芸娘子的小脾气 2024-10-05 18:10:34
\usepackage{cite} 
...
\bibliographystyle{unsrt} 

对我来说效果很好!

\usepackage{cite} 
...
\bibliographystyle{unsrt} 

worked well for me!

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