Pandoc无法正确转换乳胶样式引文 [英] pandoc not converting latex style citations correctly

查看:108
本文介绍了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天全站免登陆