gpt4 book ai didi

R Markdown : How to use icons

转载 作者:行者123 更新时间:2023-12-05 03:19:45 25 4
gpt4 key购买 nike

我想在 R markdown 脚本中的标题开头包含图标。我找到了一个这样做的女孩的简历模板,但这对我不起作用:

https://github.com/loreabad6/R-CV/blob/master/CV.Rmd

'library(fontawesome)'

\faIcon{university}

我也试过:In `rmarkdown`, how to add icon in sentence?

`r icons::fontawesome("markdown")`

我需要做什么?

最佳答案

HTML

您可以使用以下代码添加图标:

---
title: "Untitled"
author: "Author"
date: "2022-08-15"
output: html_document
---

```{r setup, include=FALSE}
remotes::install_github("mitchelloharawild/icons")
icons::download_fontawesome()
```

# This is my title `r icons::fontawesome("markdown")`

输出:

enter image description here

PDF

您可以使用 latex 包 fontawesome5。在运行以下代码之前,我必须安装包 rsvg(仅在控制台中):

---
title: "Untitled"
author: "Author"
date: "2022-08-15"
output:
pdf_document:
keep_tex: true
header-includes:
- \usepackage{fontawesome5}
---

# This is my title `r icons::fontawesome("markdown")`

输出:

enter image description here

关于R Markdown : How to use icons,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73362511/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com