简体   繁体   English

在BibTex [LaTeX]中显示标签

[英]Showing labels in BibTex [LaTeX]

I'm currently using the apalike style for my bibliography, using natbib for author-year, however when I generate the bibliography I lose the labels that normally precede the reference, 我正在使用apalike样式作为我的参考书目,使用natbib作为作者年,然而当我生成参考书目时,我丢失了通常在参考文献之前的标签,

ie [S. 即[S. Rostami, 2010] Shahin Rostami (2010) https://stackoverflow.com/questions/ask etc etc.. Rostami,2010] Shahin Rostami(2010) https://stackoverflow.com/questions/ask等等。

I read apalike.bst and it seems this is intended, my quesiton is, how do I get them back? 我读了apalike.bst,似乎这是有意的,我的问题是,我该如何让他们回来? Something I can include in the preamble? 我可以在序言中包含哪些内容? Otherwise is there a similar style that shows labels? 否则有类似的风格显示标签?

Also, I'm doing this all in Lyx. 另外,我在Lyx做这一切。

OK, a real answer! 好的,一个真正的答案!

Advice: don't use homebrew citation styles in scientific articles. 建议:不要在科学文章中使用自制引文样式。 If your university recommends a specific style (eg, APA, Chicago), use the existing matching style. 如果您的大学推荐特定样式(例如,APA,芝加哥),请使用现有的匹配样式。 Otherwise, you can get a feel for what is the dominant citation/reflist style by looking at what styles used by the articles you cite. 否则,您可以通过查看您引用的文章所使用的样式来了解主要的引用/重新列表样式。

If you really do want to create such a homebrew cite/reflist style, then the easy option is to copy the .bbl file into your article and edit that: with luck, you can devise a regex that will create all or most of the labels you want. 如果你真的想创建这样一个自制的cite / reflist样式,那么简单的选择是将.bbl文件复制到你的文章中并进行编辑:运气好的话,你可以设计一个可以创建所有或大部分标签的正则表达式你要。 But rerunning Bibtex will not respect the changes you have made. 但重新运行Bibtex将不会尊重您所做的更改。 The "right" thing is to clone apalike.bst and change the way it generates the author/date sentence to include the label information as well. “正确”的事情是克隆apalike.bst并改变它生成作者/日期句子的方式以包括标签信息。 BST hacking is a bit of a black art —time-consuming, fiddly, and poorly documented— but the language is not essentially difficult. BST黑客攻击是一种黑色的艺术消耗,繁琐,文档记录不足 - 但语言并不是很难。 Look at btxhak, Designing Bibtex styles and Nicolas Markey's tutorial to get started. 看看btxhak,Designing Bibtex风格Nicolas Markey的入门教程 Alternatively, there are some bst-hackery-avoiding suggestions in this SO Q&A . 或者,在这个SO Q&A中有一些bst-hackery-avoid建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM