.bib文件位于YAML中时,pandoc不打印引用 [英] pandoc does not print references when .bib file is in YAML
问题描述
要使用bibtex参考书目编译pdf,我认为将YAML编写为
To compile a pdf with a bibtex bibliography, I thought it was sufficient to write the YAML as
---
title: super awesome paper
author: albert enstein
bibliography: /path/to/bib/file.bib
---
并将此命令打入终端:
pandoc test.md -o test.pdf
但是它不起作用。相反,我必须手动将围嘴文件添加到终端命令:
But it does not work. Instead I have to manually add the bib file to the terminal command:
pandoc test.md --bibliography=/path/to/bib/file.bib -o test.pdf
我在做什么错?
推荐答案
我相信您需要使用标志-filter pandoc-citeproc
如果您不想使用标志-bibliography = / path / to / bib / file.bib
。这是因为使用-bibliography =
标志等效于编写-metadata bibliography = FILE --filter pandoc-citeproc
( https://pandoc.org/MANUAL.html#citation-rendering )。
I believe you need to use the flag --filter pandoc-citeproc
if you don't want to use the flag --bibliography=/path/to/bib/file.bib
. This is because using the --bibliography=
flag is equivalent to writing --metadata bibliography=FILE --filter pandoc-citeproc
(https://pandoc.org/MANUAL.html#citation-rendering).
这篇关于.bib文件位于YAML中时,pandoc不打印引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!