控制台预览中的RMarkdown块输出不显示乳胶选项`\ textcolor {}`

问题描述 投票:0回答:1

在Rmarkdown中,我通过写以下代码在乳胶代码中使用\textcolor选项:

$$
\textcolor{red}{This is Red}
$$

编译时将显示This is Red,但为红色。但是,“控制台中的块输出”预览选项不会加载此选项。有人知道快速解决方案吗?我已经附上了它的样子:

enter image description here

latex rstudio r-markdown
1个回答
0
投票

在RStudio的Rmd文档中,可以使用在RStudio的Latex公式块中识别的\color

$$
\color{red}{This is Red}
$$

我知道了

enter image description here

它在pdf文档中也显示为红色。

© www.soinside.com 2019 - 2024. All rights reserved.