emo :: ji将不会在针织文档中呈现

时间:2019-09-16 11:26:15

标签: r github r-markdown knitr emoji

我想在我的rmarkdown文档中插入一些emojis

devtools::install_github("hadley/emo")
library(emo)
emo::ji('turtle')
# ?

但是,当我将文档编织成表情符号时,将无法渲染。 在此示例中,块渲染不起作用,但是内联渲染起作用:

    Example for not rendering:

    ``` {r}
    library(emo)
    emo::ji('smile')
    ```

    Inline example:
    `r emo::j('smile')`

enter image description here 但是在这里,内联也不起作用:

<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')`

enter image description here

我更新了我能想到的所有内容(R,Rstudio和所有与降价相关的软件包),但是可惜了。

1 个答案:

答案 0 :(得分:2)

经过数小时的搜索,我发现问题出在我的会话的本机编码上。如this answer中所述,我执行了File-> Encoding with Opening ...并选择了UTF-8,并选择了UTF-8作为将来的默认设置。编织文件-就像一个饰物。