Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi all,
I'm using the Gradle AsciiDoctor plugin to generate my documentation, and I use the prettify plugin to do syntax highlighting (because it's one of the few plugins which doesn't Scala highlighting). However, when generating a PDF, the highlighting doesn't work, and all my text is black. It's not the biggest problem, but I was wondering if it was possible to fix this. Even if it's partial highlighting, like certain keywords, it would already be an improvement over 'just plain text' highlighting. Thanks, Erik |
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
|
Erik, AsciidoctorJ PDF supports two syntax highlighters, CodeRay and Rouge. That's one less than Asciidoctor PDF because the pygments.rb gem doesn't work on JRuby (or we can't figure it out), taking Pygments off the table. Rouge is the better choice between the two. It's modeled after Pygments and supports most of the languages that Pygments supports, including Scala. (It's also reasonable to extend). To enable it, install the rouge gem: $ gem install rouge Then set the source-highlighter attribute to "rouge". ifdef::backend-pdf[] :source-highlighter: rouge endif::[] However, that won't work until AsciidoctorJ PDF 1.5.0-alpha.9 is released, which I'm working on right now. I'll make sure to bundle the rouge gem so you don't have to worry about installing it. You'll just have to wait a few days. Cheers, -Dan On Thu, Jul 30, 2015 at 6:37 AM, bodiam [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi all, ... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Dan,
Super, thanks for that. I'll change the highlighter to Rouge then, and I'll wait for alpha.9 for that. Also, maybe nice to know, is that I just published this: http://jworks.nl/2015/07/31/getting-started-with-asciidoctor/ It will be (hopefully) the first in a series of posts. Greets, Erik |
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
|
Erik, I'll be releasing Asciidoctor PDF 1.5.0.alpha.9 this weekend, hopefully with a quick turn around on AsciidoctorJ PDF to follow. I filed an issue to bundle Rouge so it can be used out of the box. See https://github.com/asciidoctor/asciidoctorj/issues/368 Thanks for writing that post about Asciidoctor & Gradle! I look forward to the rest of the series! Cheers, -Dan On Fri, Jul 31, 2015 at 9:29 AM, bodiam [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi Dan, Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |