如何突出显示 xaringan 中的单个单词或代码选择而不是整行?
在下面的示例中,我只想突出显示管道运算符%>%
而不是整行。
---
output:
xaringan::moon_reader:
css: [default]
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
```{r setup, include=F}
library(magrittr)
```
Highlight Whole Line (not what I need)
```{r, eval=F}
iris %>% #<<
summary()
```
Highlight Whole Line 2 (also not what I need)
```{r, eval=F}
{{ iris %>% }}
summary()
```
Highlight Pipe only (What I would need, doesnt work)
```{r, eval=F}
iris {{ %>% }}
summary()
```
Highlight Pipe only html-mark (doesnt work, as expected)
```{r, eval=F}
iris <mark>%>%</mark>
summary()
```
任何帮助表示赞赏。