更改R Markdown PDF中章节标题的大小 [英] Change size of section titles in R Markdown PDF
问题描述
是否可以在R Markdown中更改标题文本的字体大小?
Is there a way to change the font size of text of headings in R Markdown?
我知道如何为文章的各部分编号;但是,就格式而言,编号为 1,.,2、3 ...
的节的字体大小为太大.解决方法是,我一直在使用较低级别的标题 ### Introduction
,但是这些标题的编号错误.
I know how to number the sections of the article; however, in terms of formatting, the font size of the sections that are numbered 1., 2., 3...
is too large. As a workaround, I have been using lower-level headers ### Introduction
, but these have the wrong numbering.
这是一个基本示例:
---
output: bookdown::pdf_document2
---
# This is too big
### This is the right size but are labelled as 1.0.1
推荐答案
您可以放置
\usepackage[medium]{titlesec} % or small
在 preamble.tex
中(或者您有特殊的LaTeX命令的地方)与
in preamble.tex
(or where ever you have special LaTeX commands) together with
subparagraph: yes
在YAML标头中(参见此问题).要获得更详细的答案,我们将需要一个最小的工作示例.
in th e YAML headers (c.f. this question). For a more detailed answer we will need a minimal working example.
这篇关于更改R Markdown PDF中章节标题的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!