Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
476 views
in Technique[技术] by (71.8m points)

r - RMarkdown: How to change the font color?

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

There doesn't seem to be an option while browsing through the chunk options

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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>.

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

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 extcolor{red}{red}, violets are extcolor{blue}{blue}.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...