2

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

当我“编织当前”时,我想要一个 .tex 文件,其中对文章的引用由 \cite、\citep 或 \citet 命令提供。

我注意到,如果我在输出参数中省略了 'citation_package: natbib' 行,引用将作为原始文本提供:

没有 natbib 的样子

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

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}",
}
4

0 回答 0