pandoc 没有正确转换乳胶样式的引用 [英] pandoc not converting latex style citations correctly

查看:16
本文介绍了pandoc 没有正确转换乳胶样式的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 markdown 中使用乳胶风格的引用 cite{key} 以便我可以使用 pandoc 很好地创建 tex 和 pdf 文档.但是,当我引用某些内容时,它会在括号中显示关键字而不是引用样式,例如作者姓名或引用编号.换句话说,我希望它在 PDF 中显示为这是我的引文 [1]",而是显示为这是我的引文 [mykey]".此外,在我添加 # References 标头后,我的引用列表没有显示.这是怎么回事?

I want to use latex-style citations cite{key} in my markdown so that I can create tex and pdf documents nicely using pandoc. However, when I cite something, it shows the keyword in brackets instead of the citation style, such as author name or citation number. In other words, I want it to show up in the PDF as "This is my citation [1]" but instead it is appearing as "This is my citation [mykey]". Also, my references list isn't showing up after I add my # References header. What is going on here?

以下是用于生成此命令的示例命令以及示例文件和我当前不正确的输出文件 (test.pdf).

Below is my sample command for producing this along with the sample files and my current incorrect output file (test.pdf).

pandoc test.md --biblatex --biblio test.bib --csl chicago-author-date.csl -o test.pdf

test.md

% My test pandoc-ument

I want to reference this: cite{Gepasi1993}

# References

test.bib

@ARTICLE{Gepasi1993,
    Author         = {P. Mendes},
    Journal        = {Comput. Applic. Biosci.},
    Pages          = {563--571},
    Title          = {GEPASI: A software package for modelling the dynamics, steady states and control of biochemical and other systems.},
    Volume         = {9},
    Year           = {1993}
}

test.pdf

I want to reference this: [Gepasi1993]

推荐答案

--biblatex 选项不适用于在markdown 中直接编写biblatex.它的作用是转换原生 pandoc markdown 引用,例如

The --biblatex option is not for writing biblatex directly in markdown. What it does is convert native pandoc markdown citations, like

[@Gepasil1993, p. 5] 

在 LaTeX 输出中引用 biblatex.

to biblatex citations in LaTeX output.

如果您使用 pandoc markdown 引用而不是 LaTeX 引用,您将发现引文有效.使用这个命令:

If you use pandoc markdown citations instead of the LaTeX ones, you'll find that the citations work. Use this command:

pandoc test.md --biblio test.bib --csl chicago-author-date.csl -o test.pdf 

使用此输入:

I want to reference this: [@Gepasi1993] 

Pandoc 的引用格式记录在 Pandoc 用户指南中.

Pandoc's citation format is documented in the Pandoc User's Guide.

如果您真的想在降价输入中使用原始 biblatex 引文,你可以,但是你需要照顾参考书目你自己.你会这样做:

If you really want to use raw biblatex citations in your markdown input, you can, but then you need to take care of the bibliography stuff yourself. You'd do it this way:

pandoc test.md --parse-raw -t latex -s > test.tex 
pdflatex test 
biber test 
pdflatex test 
pdfltatex test 

这篇关于pandoc 没有正确转换乳胶样式的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆