New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level 5 headings with {-} have numbering #493

zeehio opened this Issue Nov 28, 2017 · 3 comments


None yet
2 participants
Copy link

zeehio commented Nov 28, 2017

This small project 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! 😃


This comment has been minimized.

Copy link

zeehio commented Nov 29, 2017

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:


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.


This comment has been minimized.

Copy link

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


This comment has been minimized.

Copy link

zeehio commented Nov 29, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment