natbib似乎无法正常使用pdf_book / rticles

时间:2017-02-21 21:23:47

标签: r r-markdown bookdown

在我的.Rmd文件中,我引用.bib文件中的位置如下:“让我引用一篇文章:[@ SampleTitle2016]”

当我'编织当前'时,我希望有.tex文件,引用文章由\ cite,\ citep或\ citet命令提供。

我注意到如果我在输出参数中省略'citation_package:natbib'这一行,引用就会以原始文本形式提供:

how it looks without natbib

但是,如果添加提到的行,.tex文件看起来更好,但由于某种原因,参考书目无法正确显示/(编译?) - 我看到“?”而不是适当的引用:

how it looks with natbib

我的.Rmd看起来如下:

---
title: "Sample document"
abstract: "This is a sample abstract \\newline This is the second line of abstract \\par \\textbf{Keywords:} keywordA, keywordB"
author:
  - name: Mateusz Kędzior
    email: alice@example.com
    affiliation: Some Institute of Technology
    footnote: Corresponding Author
bibliography: bibliography_escaped.bib
output:
  bookdown::pdf_book:
    base_format: rticles::elsevier_article
    keep_tex: true
    citation_package: natbib
---

## Sample Text

Let me cite an article: [@SampleTitle2016].

Without natbib, in .tex file citep  command is not used in output .tex file.

An with natbib, it seems there's problem with bibliography compilation.

## References

我的参考书目文件如下:

@article{SampleTitle2016,
    title = "This is sample title only \{\k{A}\} \{\L{}\}",
    journal = "Some journal",
    volume = "99",
    number = "",
    pages = "21 - 31",
    year = "2018",
    note = "This is fake",
    url = "http://ImustChangedThatLinkBecauseSOdoNotALLOWletmeG",
    author = "Mateusz K\k{e}dzior and \.{Z}\k{a}\'{c}\l{} \'{Z}\k{e}\'{n}",
    keywords = "keywordC",
    keywords = "Keyword D",
}

@article{OtherTitle2010,
    title = "{{This is different \k{A} title only}}",
    journal = "Some journal",
    volume = "150",
    number = "",
    pages = "21 - 31",
    year = "2020",
    note = "This is fake",
    url = "http://someLink/",
    author = "\.{Z}\k{a}\'{c}\l{} \'{Z}\k{e}\'{n}",
    keywords = "keyword\k{A}",
    keywords = "Keyword \'{Z}",
}

0 个答案:

没有答案