{{ message }}

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

Closed
opened this issue Nov 28, 2017 · 4 comments
Closed

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

opened this issue Nov 28, 2017 · 4 comments

### 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! 😃 The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.

### 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.

### 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

### zeehio commented Nov 29, 2017

 Thanks! And thanks as well for the post.latex tip!
closed this Nov 29, 2017
mentioned this issue Jan 18, 2018
mentioned this issue Jan 18, 2018

### github-actions bot commented Nov 6, 2020

 This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
bot locked as resolved and limited conversation to collaborators Nov 6, 2020