如何在RMarkdown for Knitr中更改字体大小 [英] How do you change the font size in RMarkdown for Knitr
问题描述
我创建了一个Knitr文档,我想调整不在块中的文本的字体大小.当前看起来太小,想要增加它.
I created a Knitr document and I want to adjust the font size for the text that is NOT in the chunks. It currently appears too small and want to increase it.
目前,我正在写这样的一行:
Currently I am just writing a line like this:
Example text
---------
那会使它变大,但我无法控制字体大小.这是针对HTML文档的
And that will make it larger but I can't control the font size. This is for an HTML document
推荐答案
对于.Rmd文件,您可以使用不同数量的#
字符来影响HTML标头大小,而不是仅带H1和HTML中的H2大小. #语法为您提供H1-H6.请注意,这不是编织问题,而是Markdown的属性.如此处所述,这些内容以以下方式对应:
For .Rmd files, you can affect the HTML header size using different numbers of #
characters, instead of the alternative underlined form which only gives you H1 and H2 sizes in HTML. The # syntax gives you H1 - H6. Note that this is not a knitr issue, bur rather an attribute of Markdown. As explained here, these correspond in the following way:
# H1
## H2
### H3
#### H4
##### H5
###### H6
Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
======
Alt-H2
------
也可以在StackOverflow降价中使用,至少直到H3:
Works in StackOverflow markdown too, at least until H3:
这篇关于如何在RMarkdown for Knitr中更改字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!