bookdown / Bookdown.Bookdown

Core libraries for Bookdown generation.
http://bookdown.io
MIT License
81 stars 11 forks source link

Any option to disable rendering of heading numbers? #47

Closed nasko closed 7 years ago

nasko commented 8 years ago

Sorry for submitting an issue for this, but I couldn't think of any other way to ask - is there any way to configure the headings to not be rendered with their respective numbers?

I browsed the default templates and figured that by using my own version of toc.php I could render the TOC entries without numbers, but what about the inline headings - those rendered in the page content?

sandrokeil commented 7 years ago

@nasko Currently we have no option available for that. For a quick workaround, you can define your own HeadingsProces class and override the addHeading() method. Take a look at this config file.

BTW it's on the TODO list if you want to contribute. :smile:

Maybe we can write a CommonMark BlockRenderer for the headings to make this extensible/configureable. /cc @tobiju @pmjones

codeliner commented 7 years ago

Fixed by #56, right?

sandrokeil commented 7 years ago

Yes, it can be disabled by adding this option to the bookdown.json.

{
  "numbering": false
}
BruceKendall commented 7 years ago

I am trying to apply this as a user -- where does the bookdown.json file live? I tried putting it (with the above text) in the directory with my Rmd files, but it had no impact.

I'm using version 0.3.17 from CRAN.

jakejohns commented 7 years ago

@BruceKendall I believe you're looking for the R project: https://github.com/rstudio/bookdown

sandrokeil commented 7 years ago

@BruceKendall I don't know what you mean with

I'm using version 0.3.17 from CRAN.

But you find an example here.

BruceKendall commented 7 years ago

My mistake - I am in fact looking for the R project and didn't realize this was something different (google search led me to this thread...)

Apologies for the distraction!