【发布时间】:2021-02-24 17:11:41
【问题描述】:
我想在其中一张幻灯片的文本中添加一个图标。 我尝试了一些东西,但最终结果不稳定。该图标正在打印在 html 文件中,但如果我添加幻灯片或一些文本,图标就会消失。即使我将使用 Ctrl+Z 完成的操作恢复为以前的工作代码,图标也不会被打印出来......
我可能遗漏了一些东西,但 bookdown documentation 没有关于该主题的任何内容...
---
title: 'Title'
author: "Author"
date: '`r format(Sys.time(), "%d %B, %Y")`'
output:
ioslides_presentation:
self_contained: true
incremental: false
---
```{r knitr_init, echo=FALSE, message=FALSE, warning=FALSE, cache=FALSE}
## Global options
library(knitr)
library(shiny)
opts_chunk$set(
cache = FALSE,
prompt = FALSE,
tidy = FALSE,
comment = NA,
message = FALSE,
warning = FALSE
)
library(tidyverse)
library(plotly)
```
## S1
`r shiny::tags$i(class = "fa fa-arrow-down",style = "color: rgb(0,166,90)")`
item 3
`r shiny::tags$i(class = "fa fa-arrow-down",style = "color: rgb(0,166,90)")`
item 2
## S2
```{r, echo=F}
data.frame(a=1:10, b=1:10) %>%
plot_ly(x=~a,y=~b)
```
将图标写成<i class="fa fa-arrow-down" style="color: rgb(0,166,90)"></i> 似乎也不起作用。
【问题讨论】:
标签: r r-markdown ioslides