有没有办法覆盖特定条目的 bibtex 样式文件?

发布于 2024-08-16 13:38:36 字数 179 浏览 4 评论 0原文

我最喜欢的 bibtex 样式文件通过作者姓名缩写引用。然而,有多种文本应该以不同的方式引用(例如,Elements Geometrie Algebrique 应始终引用为 [EGA])。我知道如何在 bibtex 输出的 .bbl 文件中修改它,但是我必须对每个文件执行此操作。有没有办法从我的 .bib 文件中执行此操作?

My preferred bibtex style file cites via author's initials. However, there are various texts which should be cited differently (for example, Elements Geometrie Algebrique should always be cited as [EGA]). I know how to modify this in the .bbl file that bibtex outputs, but then I have to do this for every file. Is there a way to do this from my .bib file?

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

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

发布评论

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

评论(3

岁吢 2024-08-23 13:38:36

我首选的 bibtex 样式文件通过作者姓名首字母进行引用。然而,有不同的文本应该以不同的方式引用......

我希望我不会因此而受到批评,但是您喜欢的 bibtex 样式文件不能很好地为您的读者服务。我的部分工作是审阅论文,像 [GKS] 这样的一堆首字母缩写远不如 [Guibas, Knuth, and Sharir 1990] 这样完整的作者日期引用有用。对于知识渊博的读者来说,作者和日期通常使得没有必要参考参考书目。对于天真的读者来说,一组名称比一组字母更容易记住,尤其是当其中一个或多个名称可能很熟悉时。这些问题在芝加哥风格手册中进行了详细讨论,其中解释了正确的方法引用专业文献。

我之所以说这么长,是因为我相信你正在解决错误的问题。虽然我相信您的读者很快就会认识到[EGA],但我希望他们也能认识到(Grothendieck 1960)或(Grothendieck and Dieudonné 1967)。

我可以通过更改我的 .bib 文件来[修改作品被引用的方式]吗?

如果您想使用任何标准 BibTeX 样式,则不需要。 BibTeX 使用世界上最糟糕的编程语言之一,并且标准程序对于使用作品的作者或编辑者来形成引文关键字非常严格。如果您确实想这样做,我建议您执行以下过程:

  1. 克隆并修改诸如 plainnat.bst 文件之类的内容。这将使您能够创建新的“参考书目样式”。

  2. 创建一个新类型的 BibTeX 条目,使您能够使用特殊字段指定引文键(key 是一个流行的选择)。

  3. 更改 calc.label 函数以对新的条目类型执行正确的操作。如果幸运的话,更改 calc.label 将足以确保事物正确排序。

  4. .bib 文件中使用非标准类型,并在所有 LaTeX 文档中使用非标准 \bibliographystyle{...}

诸神真的不希望你这样做——你的合著者也不希望你这么做……

My preferred bibtex style file cites via author's initials. However, there are various texts which should be cited differently...

I hope I don't get flamed for this, but your preferred bibtex style file does not serve your readers very well. Part of my job is to review papers, and a jumble of initials like [GKS] is not nearly as helpful as a full author-date citation like [Guibas, Knuth, and Sharir 1990]. For a knowledgeable reader, the authors and date often make it unneccessary to refer to the bibliography. For a naïve reader, a group of names is much easier to remember then a group of letters, especially when one or more of the names may be familiar. These issues are discussed in detail by, e.g., the Chicago Manual of Style, which explains the proper way to cite from the professional literature.

I go on at such length because I believe you are solving the wrong problem. Although I believe your readers will quickly recognize [EGA], I would hope they would also recognize (Grothendieck 1960) or (Grothendieck and Dieudonné 1967).

Can I [modify the way a work is cited] by changing my .bib file?

Not if you want to use any of the standard BibTeX styles. BibTeX uses one of the world's worst programming languages, and the standard programs are very firm about using the author or editor of a work for form the citation key. If you really want to do this, I recommend the following procedure:

  1. Clone and modify something like the plainnat.bst file. This will enable you to create a new "bibliography style."

  2. Create a new type of BibTeX entry which will enable you to specify the citation key using a special field (key is a popular choice).

  3. Alter the calc.label function to do the right thing with your new type of entry. If you're lucky, changing calc.label will be enough to be sure the thing is sorted properly.

  4. Use your nonstandard type in your .bib file and use your nonstandard \bibliographystyle{...} in all your LaTeX documents.

The gods really don't want you to do this—and neither do your coauthors...

风柔一江水 2024-08-23 13:38:36

您可以修改 .bst 程序,以便它查找附加字段(例如 shown-key),如果设置了该字段,则使用该字段而不是通常的字段。

You can modify the .bst program so that it looks for an additional field, say shown-key, and if it is set uses that rather than the usual.

梦醒灬来后我 2024-08-23 13:38:36

如果您愿意使用不同的围兜样式,答案指出了一种方法。使用摘要风格, bibtex 密钥用作引用密钥。然后,您可以根据需要编辑 bib 文件中的每个键。

这种方法的一个直接缺点是您必须编辑 bib 文件中的每个项目,但我相信为这种灵活性付出的代价是合理的。

我已经看到了涉及 natbib 或 biblatex 的其他可能的解决方案,但我想避免这些包,因为我在使用它们时有时会遇到编译问题。

If you are willing to use a different bib style there is a way pointed out by this answer. Using the abstract style, the bibtex key is used as the cite key. Then, you edit each key in the bib file anyway you want it.

A straightforward disadvantage of this approach is that you will have to edit every item in your bib file, however I believe that it is a fair price to pay for such flexibility.

I've seen other possible solutions involving natbib or biblatex, but I wanted to avoid those packages as I sometimes get compilation problems when using them.

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