Chapter Title not shown in Header

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Chapter Title not shown in Header

Clemens
Hello,

I encounter the problem, that when creating pdf from my asciidoc file. The chapter title is not shown in the header.

The corresponding code in the yml file looks as follows:

header:
  font_size: $base_font_size
  border_color: dddddd
  border_width: 0.25
  height: $base_line_height_length * 4.0
  line_height: 1
  padding: [$base_line_height_length / 2, 1, 0, 1]
  vertical_align: bottom
  recto:
    right:
      content: image:OS_transparent.png[width=150]
    left:
       content: '{page-number} | {chapter-title}'
  verso:
    left:
      content: image:OptiSense_transparent.png[width=150]
    right:
       content: '{page-number} |  {chapter-title}'


In the output only the page number is shown in the header, as well as the logo. If I use {section-title} instead of {chapter-title} the section title is shown correctly.

What did I do wrong here?
Thank you for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter Title not shown in Header

MattPalermo
I never considered that you could even do this with Asciidoctor. That's interesting. Did you end up finding a solution?

Could this be done with pagination specific CSS?
Reply | Threaded
Open this post in threaded view
|

Re: Chapter Title not shown in Header

mojavelinux
Administrator
In reply to this post by Clemens
Clemens,

Have you set the doctype to book? The chapter-title replacement is only available when the doctype is book.

> If I use {section-title} instead of {chapter-title} the section title is shown correctly.

That's a strong indicator to me that you have not set the doctype to book (and thus the document isn't being parsed as a book). The section-title replacement is always available, whereas the chapter-title is only available in a book (as only a book has chapters).

Cheers,

-Dan

On Mon, Apr 16, 2018 at 2:37 AM, Clemens [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I encounter the problem, that when creating pdf from my asciidoc file. The chapter title is not shown in the header.

The corresponding code in the yml file looks as follows:

header:
  font_size: $base_font_size
  border_color: dddddd
  border_width: 0.25
  height: $base_line_height_length * 4.0
  line_height: 1
  padding: [$base_line_height_length / 2, 1, 0, 1]
  vertical_align: bottom
  recto:
    right:
      content: image:OS_transparent.png[width=150]
    left:
       content: '{page-number} | {chapter-title}'
  verso:
    left:
      content: image:OptiSense_transparent.png[width=150]
    right:
       content: '{page-number} |  {chapter-title}'


In the output only the page number is shown in the header, as well as the logo. If I use {section-title} instead of {chapter-title} the section title is shown correctly.

What did I do wrong here?
Thank you for your help.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Chapter-Title-not-shown-in-Header-tp6243.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Chapter Title not shown in Header

Clemens
Dear Dan,

you were right that solved the problem.

However, another question arose

The header show e.g. "Chapter 7. Name_of_Chapter"

I would like to format it like the following:

"7. Name_of_Chapter"

Where can I do that?

By the way, a great program that you wrote. I convinced my colleagues to switch from Word to Asciidoc for writing documentation.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter Title not shown in Header

Clemens
Found out myself:
chapter-label |Prefix added to chapter titles (i.e., level-1 section titles when doctype is book). (pdf converter only)
Reply | Threaded
Open this post in threaded view
|

Re: Chapter Title not shown in Header

mojavelinux
Administrator
I'm glad you got it sorted out!

 I convinced my colleagues to switch from Word to Asciidoc for writing documentation. 

I cannot tell you how happy that makes me to hear that. Nice work!

Cheers,

-Dan

On Wed, Apr 18, 2018 at 1:52 AM, Clemens [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Found out myself:
chapter-label |Prefix added to chapter titles (i.e., level-1 section titles when doctype is book). (pdf converter only)



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Chapter-Title-not-shown-in-Header-tp6243p6254.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux