【问题标题】:Citing multiple publications by same author in same year in RMarkdown在 RMarkdown 中引用同一作者同一年发表的多篇论文
【发布时间】:2020-04-27 21:17:18
【问题描述】:

我有两篇同一作者的引文,它们是在同一年发表的。

现在,我的代码如下所示

blah blah Hansen [-@Hansen2015a; -@Hansen2015b]

我明白了

blah blah Author (2015; 2015) blah blah

我希望结果看起来像这样

blah blah Author (2015a, 2015b) blah blah

就我而言,我想在同一个句子中引用这两个出版物,但如果我要在不同的句子中引用这些出版物,我也想知道如何实现这种刻字。

我尝试在 BibTeX 引用条目中编辑年份以手动插入 ab,但这会导致

blah blah Author (n.d.; n.d.) blah blah

【问题讨论】:

    标签: r r-markdown citations


    【解决方案1】:

    嗨 mdawgig,欢迎来到 Stack Overflow!
    以下是 BibTeX 文件 (.bib) 中的条目(同一作者,同一年份)的两个示例:

    @article{Author_2015a,
        Author = {Author, A. and Another, B.},
        Journal = {Amazing Journal},
        Pages = {50-100},
        Title = {A New Paper},
        Volume = {5},
        Year = {2015}
    }
    
    @article{Author_2015b,
        Author = {Author, A. and Another, C.},
        Journal = {Another Amazing Journal},
        Pages = {100-150},
        Title = {Another New Paper},
        Volume = {7},
        Year = {2015}
    }
    

    在 R Markdown 文档中,这样一行:

    # using minus ( - ) sign before the @ will suppress author's name  
    blah blah Author [-@Author_2015a; -@Author_2015b] blah blah
    

    应该返回期望的结果(在同一个句子中引用两个出版物):

    blah blah Author (2015a, 2015b) blah blah
    

    如果我要引用,我也想知道如何实现这个刻字 这些出版物在不同的句子中。

    那里有很多 R Markdown 资源。您可能会发现其中一些有用(Bibliographies and CitationsBibliographiesBibliographies and citationsCitations)。

    如果这回答了您的问题,请告诉我们。

    【讨论】:

    • 感谢您的回复,但据我所知,我的 .bib 文件和 R Markdown 引用看起来像这样,但错误仍然存​​在。两个 .bib 都像:@Article{Hansen2015a, author = {Hansen, Gretchen and Carpenter, Stephen and Gaeta, Jereme and Hennessy, Joseph and Vander Zanden, Jake}, journal = {Canadian Journal of Fisheries and Aquatic Sciences}, title = {Predicting walleye recruitment as a tool for prioritizing management actions}, year = {2015}, pages = {661-672}, volume = {72}, } 在文本中:in Hansen et al. [-@Hansen2015a; -@Hansen2015b]
    • 我可以完美地复制您的引文。据我所知,Pandoc 在 R Markdown 文档中生成引用。您是否更新了 Rstudio(还有 rmarkdownknitr 软件包)?
    • 我的 rmarkdownknitr 是最新的,但我确实更新了 Rstudio 无济于事。输出仍然是Hansen et al. (2015; 2015)
    • 您是否尝试安装 RStudio Preview?它将自动包含/下载最新的 Pandoc 版本。
    • 我更新到 Preview 和引用是一样的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-05-15
    • 2020-08-26
    • 1970-01-01
    • 1970-01-01
    • 2016-04-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多