我正努力准备出版。PDF看起来不错,但我正在努力获得一个我满意的HTML,我希望有人能帮助我。我的乳胶文件包含以下内容:
\usepackage[backend=biber,style=alphabetic,sorting=nyt,maxbibnames=99]{biblatex}
\addbibresource{book.bib}
我的BibTeX文件包含如下条目:
@inproceedings{Bacc2013,
author = {Alberto Bacchelli and Christian Bird},
title = {Expectations, Outcomes, and Challenges of Modern Code Review},
booktitle = {2013 International Conference on Software Engineering ({ICSE'13})},
year = {2013},
month = {5},
local = {bacchelli-2013-code-review.pdf},
note = {A summary of work on code review.}
}
我把所有东西都编译成:
$ pdflatex book.tex
$ biber book
$ pdflatex book.tex
$ pdflatex book.tex
PDF正文中的引文使用BibTeX键作为引文键:
Debugging depends on being able to read code, which multiple studies have
shown is the single most effective way to find bugs [Basi1987; Keme2009;
Bacc2013]. The code quality rubric developed in [Steg2014; Steg2016a], which is
online at [Steg2016b], is a good checklist of things to look for, though it is best
presented in chunks rather than all at once.
书目也使用引文键,并包括
note
字段。(我宁愿是在约会之后,但我尽量不求月亮。)[Bacc2013] Alberto Bacchelli and Christian Bird. "Expectations, Outcomes, and
Challenges of Modern Code Review". In: 2013 International Conference on
Software Engineering (ICSE’13). A summary of work on code review. May 2013.
我怎么能用Pandoc复制这个?我的命令行是:
$ pandoc -s --css=assets/bootstrap.css --css=assets/book.css --toc --toc-depth=2 \
--template=template.html --bibliography=book.bib \
-o index.html book.tex
其中
template.html
是Pandoc的默认HTML模板的副本,该模板经过了轻微调整以使用Bootstrap CSS。我希望生成的HTML在正文和书目中都使用BibTeX引文键。(我也希望引用链接到书目条目,书目条目包括note
字段,但一步一步……)我在寻找什么魔力? 最佳答案
为了在所有输出格式中产生相同的引用,pandoc使用内置的pandoc-citeproc过滤器,而不是依赖于LaTeX。这也意味着您不能使用乳胶来影响引文输出:
从pandoc manual开始:
引用和引用可以使用
Citation Style Language中列出的Zotero Style Repository。使用--csl
选项或csl
元数据字段。默认情况下,pandoc-citeproc
将使用
Chicago Manual of Style作者日期格式。CSL项目提供
关于finding and editing styles的更多信息。
另请参见this answer on tex.stackexchange。
关于html - 如何在Pandoc和Biber中强制使用BibTeX key 作为引文 key ?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/56317287/