Using a section-specific font in PDF output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using a section-specific font in PDF output

Matthew Darlison
Hi,

I'm using asciidoctor in Ruby on Windows to generate PDF and HTML output and can;t find a solution to the following:

I have a book with ~24 chapters, the last two of which are a list references and a glossary. Since these take up a lot of space, I'd like to set them either in a smaller size of the same font or, since I have it, the same font's condensed variant.

Accordingly, my yaml file contains

bibliography:
  font_family: Frutiger-Condensed
  font_size: 8
glossary:
  font_size: 8
  font_family: Frutiger-Condensed

which the PDF theming guide kind of implies might work (but seems not to).

[small] in the main asciidoc file works for html output but seems not to reach the PDF chain.

Grateful for any and all thoughts on what might work...!

Matthew

PS: I'm blown away by how good asciidoctor as a tool is!
Reply | Threaded
Open this post in threaded view
|

Re: Using a section-specific font in PDF output

mojavelinux
Administrator
Matthew,

It's not currently possible to change the font properties of a special section. It's something we could consider adding. It would just be a matter of wrapping the call to `convert_content_for_block sect` in a `theme_font` block.

Would you consider submitting an issue to the issue tracker at https://github.com/asciidoctor/asciidoctor-pdf/issues?

> [small] in the main asciidoc file works for html output but seems not to reach the PDF chain.

We don't support the small role in the PDF converter. I actually think we shouldn't because it couples content and presentation. We have been discussing custom roles, which would allow you to add meaning to the small role or any other (more appropriately named) role.

Thanks for the compliments about the toolchain. We aim to please!

Cheers,

-Dan

On Sun, Apr 24, 2016 at 11:12 AM, Matthew Darlison [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I'm using asciidoctor in Ruby on Windows to generate PDF and HTML output and can;t find a solution to the following:

I have a book with ~24 chapters, the last two of which are a list references and a glossary. Since these take up a lot of space, I'd like to set them either in a smaller size of the same font or, since I have it, the same font's condensed variant.

Accordingly, my yaml file contains

bibliography:
  font_family: Frutiger-Condensed
  font_size: 8
glossary:
  font_size: 8
  font_family: Frutiger-Condensed

which the PDF theming guide kind of implies might work (but seems not to).

[small] in the main asciidoc file works for html output but seems not to reach the PDF chain.

Grateful for any and all thoughts on what might work...!

Matthew

PS: I'm blown away by how good asciidoctor as a tool is!


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Using-a-section-specific-font-in-PDF-output-tp4650.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen