记账中的手动编号

时间:2018-05-10 16:36:15

标签: r-markdown bookdown

是否可以在记事本中控制章节/章节编号?

e.g。

# Introduction {1}
# Theory {14}
# Methods {3}

会在输出中给出以下内容......

1. Introduction
14. Theory
3. Methods

2 个答案:

答案 0 :(得分:0)

我不确定你要做什么:标题末尾的花括号不是为了控制章节编号。您可以将其用于manually assign an ID to a section header

e.g。 # Introduction {#intro}

和/或exclude the header from numbering

e.g。 # Introduction {-}分别在同一时间# Introduction {- #intro}

答案 1 :(得分:0)

很抱歉,您的回答很晚,但是我遇到了同样的问题。

如果您全局关闭编号,则添加行

number_sections: false

bookdown::gitbook:

到您的_output.yml文件中,然后您可以按照自己喜欢的任何方式为章节编号:

# 1. Introduction

# 14. Theory

# 3. Methods

要重复:我的_output.yml文件包含以下几行

bookdown::gitbook:
  number_sections: false
相关问题