asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.14k stars 500 forks source link

Allow to avoid rendering chapter / section numbering in running content #2084

Closed odrotbohm closed 2 years ago

odrotbohm commented 2 years ago

Using the chapter-title variables in the definition of the content for running content includes the chapter's number, if numbering is activated. This looks a bit odd, especially on the verso pages, on which the chapter number usually follows the page number (see below). I would appreciate if there was a variable that'd allow referring to the sole chapter, section etc. title.

Screenshot 2022-04-26 at 14 06 56
odrotbohm commented 2 years ago

1373 looks related and seems to imply that unless I explicitly use chapter-number I shouldn't see the number rendered, but I actually do, despite my configuration being set to content: '*{page-number}* | {chapter-title}'

mojavelinux commented 2 years ago

Using the chapter-title variables in the definition of the content for running content includes the chapter's number, if numbering is activated.

This can be controlled in the theme using the title-style key.

footer:
  title-style: basic

The basic value does not include the numeral (which is chapter-numeral, not chapter-number).

https://github.com/asciidoctor/asciidoctor-pdf/issues/1373 looks related and seems to imply that unless I explicitly use chapter-number I shouldn't see the number rendered, but I actually do

That's because we later changed it according to #1044 (in response to your request ;)).

odrotbohm commented 2 years ago

That does the trick. Thanks, Dan!

Sometimes the documentation of the properties is a little light on what the values actually mean, especially when it's enums. I couldn't really guess how document would differ from toc in this case here, let alone that basic would strip the section number. Does it make sense to add a few words here?

Other than that, feel free to close as invalid as this already works as suggested.

mojavelinux commented 2 years ago

We're on the same page about the documentation. That's why we are totally reworking it so it can be republished in a less terse form on docs.asciidoctor.org. The relaunch of the docs will go live with the 2.0.0 release, and it will give us a lot more space to get into the details of what keys and other switches do.

mojavelinux commented 2 years ago

I've communicated to our resident docs writer to add a dedicated explanation for this key ;)