2016-11-30 34 views
9

我的R降价(rmd)中没有链接格式化为蓝色。将以下简单的rmd编织为pdf将文本颜色留下黑色。只有在盘旋时才会意识到它实际上是一个链接。将它编织为html将使链接变蓝。当然,我可以使用乳胶包装,但我想知道这是为什么?由于某种原因,R降价链接未格式化为蓝色时

sessionInfo() ř版本3.3.0(2016年5月3日) 平台:x86_64的-W64-的mingw32/64(64位) 下运行:视窗7 64(建立7601)服务包1 经由一个命名空间加载(和未附): knitr_1.15

RStudio 1.0.44

--- 
title: "R Notebook" 
output: 
    pdf_document: default 
    html_notebook: default 
--- 

```{r, echo=F} 
# tex/pandoc options for pdf creation 
x <- Sys.getenv("PATH") 
y <- paste(x, "E:\\miktex\\miktex\\bin", sep=";") 
Sys.setenv(PATH = y) 
``` 

[link](www.rstudio.com) 

enter image description here

回答

21

urlcolor: blue添加到yaml。

--- 
title: "R Notebook" 
output: 
    pdf_document: default 
    html_notebook: default 
urlcolor: blue 
--- 

```{r, echo=F} 
# tex/pandoc options for pdf creation 
x <- Sys.getenv("PATH") 
y <- paste(x, "E:\\miktex\\miktex\\bin", sep=";") 
Sys.setenv(PATH = y) 
``` 

[Link to R Studio](www.rstudio.com) 

Bare urls will also be highlighted: 

http://www.rstudio.com 

enter image description here

+0

有趣的是它像一阵微风,但即使我指定我的蓝色链接变为红色。任何想法为什么?标准的pandoc布局也许? –

相关问题