我想插入几个emojis进入我的 rmarkdown
文档。
devtools::install_github("hadley/emo")
library(emo)
emo::ji('turtle')
# 🐢
但是,当我在表情符号中编织文档时,不会呈现。 在此示例中, block 渲染不起作用,但内联渲染起作用:
Example for not rendering:
``` {r}
library(emo)
emo::ji('smile')
```
Inline example:
`r emo::j('smile')`
<font color='skyblue'>*Hey, you! Marine biologist! I have need of your services!
A sea turtle begins its life amidst great danger, and not very many of them make it to the water. See, I'm working on a big budget movie - think "Saw", but with turtles. Anyway, let's make some realistic numbers of turtles for me to... **keep alive.***</font> `r emo::ji('turtle')`
我已经更新了我能想到的所有内容(R、Rstudio、所有与 markdown 相关的软件包),但是可惜。
最佳答案
经过几个小时的搜索,我发现问题出在我的 session 的 native 编码上。如 this answer 中所述,我执行了 File -> Reopen with Encoding... 并选择了 UTF-8
,并且为了更好地选择 UTF-8
作为将来的默认值。编织锉刀 - 效果非常好。
关于r - emo::ji 不会在针织文档中呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57955843/