Asciidoctor pdf - Custom admonition icons

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

Asciidoctor pdf - Custom admonition icons

IlliteratePhD
Is there a way to specify custom admonition icons in the yml file?

Thanks
// Patrik
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor pdf - Custom admonition icons

rockyallen
I don't think it can be done in the yml (though I am happy to be proved wrong). Do it in the Asciidoc source instead by setting attributes icons, iconsdir and icontype.

http://asciidoctor.org/docs/user-manual/#attribute-catalog
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor pdf - Custom admonition icons

abelsromero
In reply to this post by IlliteratePhD
If you mean use alternative icons, you can use some of the included ones: https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#key-prefix-admonition-icon
Make sure you check the third footnote, contains a link to the available icons, check the correspondent .yml for the proper names. In my experience, not all work however, if there's some problem, it will appear in the output.

Otoh, if what you want is add a custom font with custom icons, I don't think it can't be done without messing with the code. You can try replicating the folder/file structure in prawn, but even if this works, I would not recommend it for maintenance sake.
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor pdf - Custom admonition icons

IlliteratePhD
Ok, thanks for the information and the link. I think I understand the options I have then.
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor pdf - Custom admonition icons

mojavelinux
Administrator
To expand on what Abel said, yes, you can use any icon for admonitions that is supported by prawn-icon (https://github.com/jessedoyle/prawn-icon/).

It's possible to add other icon fonts, but it would mean loading some Ruby code that extends prawn-icon. The resolution of the icon is separate from the theme. The theme just passed on this information.

Cheers,

-Dan

On Fri, Aug 18, 2017 at 12:40 AM, IlliteratePhD [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ok, thanks for the information and the link. I think I understand the options I have then.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-pdf-Custom-admonition-icons-tp5850p5853.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