Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This post was updated on Mar 06, 2016; 7:05pm.
Hi all,
Prompted by my publishers, I'm making the switch from asciidoc to asciidoctor. I've just tried rendering my book locally, and I have to say the default styles look really good! One thing that doesn't seem to be working is the syntax highlighting of code listings. Any ideas why? ![]() The listing definitely has the <code class=language-python> markup applied, but I can't see anything that would match that in the embedded stylesheet. I'm using the command-line tool I got from "apt-get install asciidoctor". Have also tried manually setting "asciidoctor -a source-highligher=pygments,pygments-css=class" |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Switched to the gem installed version, and then installed
gem install pygments.rb And it worked, if I used "-a source-highlighter=pygments", or added a ":source-highlighter:pygments" directive to the main doc. Coderay also works. Suggestions: 1/ see if you can get coderay or pygments bundled into the debian distro version, 2/ make it clear in the docs that you have to explicitly set the source-highlighter attribute for it to work? |
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
|
On Sun, Mar 6, 2016 at 12:04 PM, hjwp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This should do the trick: $ sudo apt-get install coderay On Fedora, you'd use: $ sudo dnf install rubygem-coderay It's very unlikely that pygments.rb will get packaged because it violates packaging rules and is losing support from GitHub. That's why we're turning our eye towards rouge for the future.
http://asciidoctor.org/docs/user-manual/#source-code-blocks |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
oops, sorry i missed that!
how about adding the suggestion to install coderay in the general "how to install asciidoc" section? almost everyone is using it for things that involve code right? (maybe i'm wrong). thanks for replying! |
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
|
I think this is appropriate entry for the "next steps" section. Something like: "If you are writing software documentation, you'll probably want to install a source highlighter, or learn about how to enable libraries that work on the client side. See ..." Feel free to open an issue at https://github.com/asciidoctor/asciidoctor.org/issues and send a PR. (One of the problems we have right now in general is that there are too many entry points. We're working to resolve that by consolidating pages). -Dan On Sun, Mar 6, 2016 at 12:22 PM, hjwp [via Asciidoctor :: Discussion] <[hidden email]> wrote: oops, sorry i missed that! Dan Allen | @mojavelinux | 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 |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
here ya go! https://github.com/asciidoctor/asciidoctor.org/pull/536
not sure you'll be able to merge it as-is, but hopefully a placeholder to start from |
Free forum by Nabble | Edit this page |