Re: Asciidoctor pdf - Custom admonition icons
Posted by
mojavelinux on
Aug 06, 2019; 7:30pm
URL: https://discuss.asciidoctor.org/Asciidoctor-pdf-Custom-admonition-icons-tp5850p7047.html
If you want to customize the icon for NOTE, for example, here's a theme file you can use:
extends: default
admonition:
icon:
note:
name: far-question-circle
(It's no longer necessary to modify the default theme file. You can simply extend it).
Cheers,
-Dan
On Tue, Aug 6, 2019 at 12:00 PM be.wood [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
I am trying to figure out the correct theme for the PDF output. I have successfully edited my custom admonition block extension for HTML output, but I am having trouble figuring out exactly how to make the theme.yml file so PDF output can match the custom admonition of the HTML.
I tried to follow the information here: https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/9
but when I try to create a separate template, I am getting error messages. I don't have a problem just editing the default template either, but when I tried to do that by adding this into the admonition section:
icon:
question:
name: fas-question
stroke_color: 871452
size: 24
(question is just my filler for now), I get errors in the output stating this:
asciidoctor: DEBUG: sample.adoc: line 5: unknown style for example block: QUESTION
(line 5 is line with the ==== after the [QUESTION] of the sample file).
I have tried adding it to a custom style, but was having trouble figuring out how to call it, and when I thought I did, I got a lot more errors since the only thing in it was the admonition block, so I went back to editing the default (again, this is fine for my purposes), but always get this or some other error message.
I am at a loss as to how to edit the default template (or create my own and to call it since that isn't clear either) so I can define the new admonition styles.
--