RMarkdown:如何更改字体颜色? [英] RMarkdown: How to change the font color?

查看:75
本文介绍了RMarkdown:如何更改字体颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 RMarkdown 中有没有办法指定字体颜色?

In RMarkdown is there a way to specify the font color?

浏览块选项时似乎没有选项

推荐答案

@Ben Bolker 提供的链接中给出的答案:

The answer given at the link provided by @Ben Bolker:

Roses are <span style="color:red">red</span>, 
violets are <span style="color:blue">blue</span>.

如果您选择 HTML (ioslides) 作为输出格式就可以了.

does work if you select HTML (ioslides) as the output format.

但是,如果您选择 pdf (beamer) 作为输出格式,则它不起作用.如果要创建 pdf,请使用 LaTeX 语法:

However, it does not work if you select pdf (beamer) as output format. If you want to create a pdf, use LaTeX syntax:

    Roses are \textcolor{red}{red}, violets are \textcolor{blue}{blue}.

这篇关于RMarkdown:如何更改字体颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆