2013-01-12 43 views
11

我想在我的降價中使用乳膠樣式引用\cite{key},以便我可以使用pandoc很好地創建tex和pdf文檔。但是,當我引用某些內容時,它會在括號中顯示關鍵字,而不是引用樣式,例如作者姓名或引用號。換句話說,我希望它在PDF中顯示爲「This is my citation [1]」,但是它卻顯示爲「This is my citation [mykey]」。此外,我添加我的# References標題後,我的參考列表未顯示。這裏發生了什麼?pandoc未正確轉換乳膠樣式引用

下面是我的示例命令以及示例文件和當前不正確的輸出文件(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} 
} 

檢驗.pdf

I want to reference this: [Gepasi1993] 

回答

23

--biblatex選項不適用於直接在降價中書寫biblatex。 它能做什麼是轉換本地pandoc降價引用,就像

[@Gepasil1993, p. 5] 

到biblatex在LaTeX的輸出引用。

如果您使用pandoc降價引用而不是LaTeX引用,則您會發現引用工作正常。使用此命令:

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

與該輸入:

I want to reference this: [@Gepasi1993] 

Pandoc的引文格式在Pandoc User's Guide記錄。

如果您真的想在您的降價輸入中使用原始biblatex引文,您可以使用 ,但是您需要親自處理參考書目 。你會這樣做:

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