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

Update title-page-authors key section to fix example source #2451

Closed tobrien closed 10 months ago

tobrien commented 11 months ago

The source examples in the title-page-authors key section were referencing source that still contained title-page. I've modified the source examples to align with the name of the key.

mojavelinux commented 11 months ago

Although still valid, this is not the correct change. Nesting can happen (almost) any time a key contains a hyphen. In other words, the following two are equivalent:

title-page:
  authors:
    font-color: #ff0000
title-page-authors:
  font-color: #ff0000

However, the former is preferred since it avoids having to repeat the title-page- prefix when defining other keys in that category, such as title and logo. In other words, it's a shorthand.

In fact, even this is valid:

title:
  page:
    authors:
      font:
        color: #ff0000

But this is unnecessarily verbose.

mojavelinux commented 10 months ago

I've added a clarification about this to the docs. See https://docs.asciidoctor.org/pdf-converter/latest/theme/keys/#category-keys