# Level 5 headings with {-} have numbering #493

Closed
opened this Issue Nov 28, 2017 · 3 comments

Projects
None yet
2 participants

### zeehio commented Nov 28, 2017

 This small project test_project.zip has an index.rmd like: --- title: "Level 5 without numbers in front?" author: "Sergio Oller" date: "r Sys.Date()" output: pdf_document documentclass: book site: bookdown::bookdown_site description: This is a minimal example --- #### Level4 Hello world #### Level4minus {-} Hello world ##### Level5 Hello world ##### Level5minus {-} This one does not respect the minus!  This is the result after building the PDF: The level 5 minus is always numbered, no matter the {-}. Is there a way to remove the numbering? For now I will just use **Level5minus** instead of a header, but I would rather use a header to avoid page breaks right after it. Thanks for your work in bookdown, I am about to finish writing my PhD thesis using it! 😃
Author

### zeehio commented Nov 29, 2017 • edited

 I was able to trace this back to pandoc jgm/pandoc#3058 All we can do from bookdown would be to use this workaround described in their issue: There is one ugly way to take care of this: setting the secnumdepth to 0 for each of the paragraph and subparagraph, and then resetting it after: \edef\foo{\arabic{secnumdepth}} \setcounter{secnumdepth}{0} \paragraph{AAAA}\label{aaaa} \addcontentsline{toc}{paragraph}{AAAA} \setcounter{secnumdepth}{\foo}  If there is interest I can try to write the patch, but given that it was never merged in pandoc I am not sure it is a good idea to merge it in bookdown.
Member

### yihui commented Nov 29, 2017

 Thanks for the great detective work! I'm not interested in supporting this. I rarely go beyond level 3 myself. If you need to patch the .tex output, you may use the R global option bookdown.post.latex: https://github.com/rstudio/bookdown/releases/tag/v0.4
Author

### zeehio commented Nov 29, 2017

 Thanks! And thanks as well for the post.latex tip!

Closed

Closed