当 .bib 文件采用 YAML 格式时,pandoc 不会打印引用

标签 pandoc bibtex

要使用 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/

相关文章:

html - pandoc 将带有样式表的 html 转换为 docx

image - 如何将带标题的图像放入 pandoc 的项目符号列表中

latex - apsrev4-1 错误 : ! 扫描使用\@secondoftwo 时文件结束

python - bibtex 到 html 与 pybtex,python 3

bibtex - bibTeX被引为stackoverflow

vim - 如何让 Vim 在 Markdown 中高亮显示 Latex 环境

yaml - 软件包在 github 操作上的 R-CMD 检查失败,某种 Tex 问题

python - 使用 Python 解析 BibTeX 引文格式

r - 使用带有引用书目样式的 natbib 的 RStudio 进行引用时出现问题

pandoc - 使用 pandoc 将 html 转换为 docx