Linking to url with rmarkdown using Knit Word in Rstudio

随声附和 提交于 2021-02-07 14:40:55

问题


Is there an easy way to link to a webpage in rmarkdown without displaying the link?

For example, putting "https://www.google.com/" in a .rmd file renders as the entire website, but I want something analogous to <a href="https://www.google.com/">ABC</a> instead.

The html method above, i.e., <a href= ... works when I knit to html, but it does not work when I knit to a word document.


回答1:


Markdown provides two ways to create a link as you mention (and I suppose that is supported on rmarkdown).

  1. Markdown way: [ABC](http://example.com)
  2. HTML way: <a href="http://example.com">ABC</a> The first way is native and the second way is supported since Markdown allows every HTML code.


来源:https://stackoverflow.com/questions/25024224/linking-to-url-with-rmarkdown-using-knit-word-in-rstudio

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!