Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
20 posts
|
I am using asciidoctor-pdf (Asciidoctor PDF 1.5.0.alpha.14 using Asciidoctor 1.5.5) and would like to configure the styles of the menu command.
Instead of using the default symbol I would like to configure "right single arrow" (→) for HTML and pdf. Is it possible? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
2681 posts
|
Yes. In your case, you probably want: menu: caret_content: ' \u2192 ' For HTML, you'll need to supply a custom template for the inline_menu node. For example, see https://github.com/asciidoctor/asciidoctor-backends/blob/master/slim/html5/inline_menu.html.slim. I would like the caret to be configurable via CSS. I made this possible in the EPUB3 converter. That needs to be backported to the HTML converter. See https://github.com/asciidoctor/asciidoctor-epub3/blob/master/lib/asciidoctor-epub3/converter.rb#L759-L771. Since I wrapped the caret in a span with a class, it's possible to use CSS to hide the default content and use the before or after pseudo selectors to inject replacement content. Cheers, -Dan On Fri, Mar 10, 2017 at 1:17 AM, mariocup [via Asciidoctor :: Discussion] <[hidden email]> wrote: I am using asciidoctor-pdf (Asciidoctor PDF 1.5.0.alpha.14 using Asciidoctor 1.5.5) and would like to configure the styles of the menu command. Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
20 posts
|
Hi Dan,
thanks for the hint. I tried to use in my pdf theme: ``` caret_content: ' \u2192 ' ```` The code ``` :experimental: true ... menu:View[Zoom > Reset] ``` was generating the pdf output View \u2192 Zoom \u2192 Reset I tried to change my yml file to: ``` menu:menu_caret_content: ' & #8594; ' ``` With this change I getting the expected result View → Zoom → Reset. NOTE: You have to remove the space between & and #, but when I write it without the space it will be render automatically in the editor as → |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
2681 posts
|
The string has to be double quoted in order to use Unicode escape codes. The example in the docs is incorrect (and thus fooled me). I'll fix it! Btw, you can see how it's define in the default theme here: -Dan On Sat, Mar 11, 2017 at 12:23 AM, mariocup [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi Dan, ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |