Rmarkdown removes citation hyperlink

前端 未结 2 1973
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-19 05:04

when using Rmarkdown to build a pdf with citations included, it removes the hyperlinks of the citations by default.

Looking at the latex file produced, I can see \\u

2条回答
  •  甜味超标
    2020-12-19 05:33

    By default pandoc will do the rendering of the citations. I see two alternatives.

    1. Use \citet{sharpe} in the Rmd instead of @sharpe. Downside: you can only render the Rmd into pdf.
    2. Use the --natbib argument. Downside: You need an extra bibtex step when rendering into pdf.

    Update: You can also provide the option link-citations: true in your YAML (since pandoc v1.16) and keep the pandoc syntax for citations.

提交回复
热议问题