如何使用 Latex 和 bibtex 引用参考文献范围
你好 假设我有 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
有多种方法可以更改 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.
如果您在
\cite
命令中放置多个标签,例如:这些标签将一起列出在同一个方括号内,并且在最终文档中看起来类似于 [1,4,9]。如果您引用的部分或全部参考文献具有序列号,则会在文档中注明,例如 [1,3-6,8-9] 等。
请注意,对参考书目进行排序的方式会对此产生影响:如果您选择按照文本中首次引用的顺序列出项目,这在很大程度上会自然发生。但是,如果您按作者姓名等对参考书目进行排序,那么您的参考文献连续的可能性就会大大降低。
If you put more than one tag in your
\cite
command, such as: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.
如果您使用 biblatex,则可以使用
numeric-comp
样式(请参阅 文档第 3.3.1 节)这将对引文中的数字进行排序(并压缩)
[8, 3, 1 , 7, 2]
,变为[1–3, 7, 8]
此外,如果您希望引文按照它们在文本中出现的顺序进行编号,您可以指定 no对 biblatex 进行排序
因此,如果上面的例子是文本中的第一个引用,它将变成
[1–5]
If you're using biblatex, you can use the
numeric-comp
style (see Section 3.3.1 of the documentation)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
So if the above example was the first citation in the text, it would become
[1–5]
使用
\cite
包可能会解决您的问题。您可以将以下任一行添加到您的代码中:
Using
\cite
package would probably resolve your problem.You could add either of the following lines to your code:
对我来说效果很好!
worked well for me!