quotes in source block PDF output

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

quotes in source block PDF output

dustypomerleau
Hello - Thanks to everyone who has made Asciidoc possible. I'm really enjoying this way of writing.

I enlarged and bolded a portion of a source block, but I can't seem to escape it properly for Asciidoctor-PDF:

[source, sh, subs = "specialchars, quotes"]
----
normal code
[.big]*large and bold code*
normal code
----

No problems with HTML output, but in Asciidoctor-PDF output it passes the resulting HTML straight through:

normal code
<strong class="big">large and bold code</strong>
normal code

Can someone point me in the right direction? Thanks,

Dusty
Reply | Threaded
Open this post in threaded view
|

Re: quotes in source block PDF output

mojavelinux
Administrator
In Asciidoctor PDF, you cannot use subs on a source block (when the source-highlighter attribute is also set). You can use it on a listing or literal block, but not a source block. The way syntax / source highlighting in done in the PDF converter is fundamentally incompatible with the subs processing. I have yet to find a way around this limitation.

Best,

-Dan

On Thu, Feb 6, 2020 at 11:28 PM dustypomerleau [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello - Thanks to everyone who has made Asciidoc possible. I'm really enjoying this way of writing.

I enlarged and bolded a portion of a source block, but I can't seem to escape it properly for Asciidoctor-PDF:

[source, sh, subs = "specialchars, quotes"]
----
normal code
[.big]*large and bold code*
normal code
----

No problems with HTML output, but in Asciidoctor-PDF output it passes the resulting HTML straight through:

normal code
<strong class="big">large and bold code</strong>
normal code

Can someone point me in the right direction? Thanks,

Dusty


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/quotes-in-source-block-PDF-output-tp7594.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: quotes in source block PDF output

dustypomerleau
Thanks for the quick reply—It hadn't occurred to me to use a literal, which will work in this case.

Cheers,

Dusty

Reply | Threaded
Open this post in threaded view
|

Re: quotes in source block PDF output

mojavelinux
Administrator
Super!

Which reminds me, we need a test for that scenario. I'll add one now.

Best,

-Dan

On Fri, Feb 7, 2020 at 12:14 AM dustypomerleau [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for the quick reply—It hadn't occurred to me to use a literal, which will work in this case.

Cheers,

Dusty




If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/quotes-in-source-block-PDF-output-tp7594p7597.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