使用ToC的彩色链接打印RMarkdown .html输出

时间:2019-04-05 15:38:26

标签: r r-markdown

MWE:

---
title: "Untitled"
output:
  html_document:
    toc: yes
---

## Test 1

## Test 2

Chrome 73.0.3683.103(32位)中的输出:

enter image description here

IE 11中的输出:

enter image description here

在两种情况下,在浏览器中查看时,链接的颜色均清晰可见。但是,当我在Chrome中点击Ctrl + P时,

enter image description here

蓝色链接颜色将从打印预览中消失,并且不会将链接打印为蓝色。

在IE 11中也是如此。这使我认为这不是浏览器问题。如何修复此文档,使链接显示为蓝色?

sessionInfo()输出:

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_3.4.4  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2 htmltools_0.3.6 tools_3.4.4     yaml_2.1.19    
 [8] Rcpp_0.12.17    stringi_1.1.7   rmarkdown_1.9   knitr_1.20      stringr_1.3.1   digest_0.6.18   evaluate_0.10.1

0 个答案:

没有答案