要使用 bibtex 引用书目编译 pdf,我认为将 YAML 编写为就足够了
---
title: super awesome paper
author: albert enstein
bibliography: /path/to/bib/file.bib
---
并将此命令输入终端:
pandoc test.md -o test.pdf
但是它不起作用。相反,我必须手动将 bib 文件添加到终端命令中:
pandoc test.md --bibliography=/path/to/bib/file.bib -o test.pdf
我做错了什么?
最佳答案
如果您不想使用标志 --bibliography=/path/to/bib/file,我相信您需要使用标志
。这是因为使用 --filter pandoc-citeproc
。围兜--bibliography=
标志相当于编写 --metadata bibliography=FILE --filter pandoc-citeproc
( https://pandoc.org/MANUAL.html#citation-rendering )。
关于当 .bib 文件采用 YAML 格式时,pandoc 不会打印引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41653335/