r - How to make part of rmarkdown document without section numbering? -


i have rmarkdown document (.rmd) want knit pdf document. number_sections has been put 'yes' , toc 'true'. how can add appendix sections appear in table of contents don't have section number?

here example .rmd code. how can let appendix , appendix b numberless sections , let them appear in table of contents @ same time?

--- title: "test" author: "test test" geometry: margin=1in output:   pdf_document:     keep_tex: yes     latex_engine: xelatex     number_sections: yes     toc: yes     toc_depth: 3 header-includes: - \usepackage[dutch]{babel} - \usepackage{fancyhdr} - \pagestyle{fancy} - \fancyfoot[le,ro]{this fancy foot} - \usepackage{dcolumn} - \usepackage{here} - \usepackage{longtable} - \usepackage{caption} - \captionsetup{skip=2pt,labelsep=space,justification=justified,singlelinecheck=off} subtitle: test test test fontsize: 12pt --- # start  # second  ```{r results="asis",eval=true,echo=false,message=false, error=false, warning=false, comment = na,fig.height=4} cat("and here r") ```  # appendix  # appandix b 

just add {-} after section name. thus, appendices, should like:

# appendix {-}  # appendix b {-} 

for more details, see this section of docs.


result:

enter image description here


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -