2017-12-22 20 views
2

私はrmarkdownで原稿を書いています。rmarkdownのあるセクション番号

私はすべてのセクションに番号をしたい場合は、この

--- 
title: "My Report" 
output: 
    html_document: 
    number_sections: true 
--- 

Automatically number sections in RMarkdown

を参照してくださいしかし、私の文書は

のように見えるので、私は、いくつかのセクションに番号をしたいように、私はYAMLを使用することができます

要約
1.はじめに
2.方法
3.結果
参照

これを行うにはとにかくはありますか?

+1

つかいます [ '#References { - }'](http://pandoc.org/MANUAL.html#header-identifiers)です。 – r2evans

答えて

2

PandocUser Guideより、ヘッダーに.unnumbered属性を追加します。これは使用して行われる:

# My header {.unnumbered} 

又は例えば

# My header {-} 

ショートカットは、以下の文書を使用して

--- 
title: "My Report" 
output: 
    html_document: 
    number_sections: true 
--- 

# Abstract {-} 

# Introduction 

# Methods 

# Results 

# References {-} 

生成HTMLをレンダリングとして:

enter image description here

関連する問題