[英]Rmarkdown removes citation hyperlink
當使用Rmarkdown構建包含引文的pdf時,默認情況下會刪除引文的超鏈接。
看看產生的乳膠文件,我可以在pre-amble中看到\\ usepackage {hyperref},但引用如下:
rmd input: @sharpe
latex output: sharpe (1999)
因此,它以pdf格式生成非動態引文 。
我期望的乳膠輸出是:\\ citet {sharpe},它以pdf格式生成超鏈接引文。
任何想法為什么它寫出我的bibtex輸入這樣以及如何使其超鏈接?
默認情況下,pandoc將執行引用的呈現。 我看到兩種選擇。
\\citet{sharpe}
而不是@sharpe
。 缺點:您只能將Rmd渲染為pdf。 --natbib
參數。 缺點:渲染成pdf時需要額外的bibtex
步驟。 更新 :您還可以在YAML中提供選項link-citations: true
(自pandoc v1.16
)並保留引用的pandoc語法。
使用PDF在Rmd中進行鏈接引用的YAML示例
---
title: "Introduction to data mining – Assignment"
author: "Your Name"
date: "Date"
output:
pdf_document: default
bibliography: <references>.bib
csl: <your_csl_file>.csl
link-citations: yes
linkcolor: blue
---
在文字報價。
Here is my quote @AuthorYear
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.