Cool, thanks for the macro example. The reason I wanted pygments is that its
more flexible and easier to customize.

Christian

On Fri, Nov 5, 2010 at 15:03, Phillip Lord <[email protected]>wrote:

>
> I've been doing this with source-highlight, and it seems to work fine.
>
> Incidentally, in case you are interested, I've attached a conf file
> which creates two new macros. If you do
>
> js-button::hello_world.js[]
>
> where hello_world.js contains
>
> alert( "Hello World" );
>
> asciidoc will incorporate the code and a button which runs it.
>
>
>
>
>
>
>
>
>
> Christian Johansen <[email protected]> writes:
> > I'm giving Asciidoc a spin to see if it's a good fit for documenting
> > my JavaScript. Unfortunately, I'm not having any luck with the
> > Pygments highlighter to highlight JavaScript source code, and it is
> > not clear from the docs how I even install this extension.
> >
> > For instance, consider this asciidoc file:
> https://github.com/augustl/sarge/blob/master/doc/api.txt
> >
> > If I try to `asciidoc api.txt` I get a bunch of messages like:
> >
> > asciidoc: WARNING: api.txt: line 21: filter non-zero exit code: source-
> > highlight -f xhtml -s javascript: returned 127
> > asciidoc: WARNING: api.txt: line 21: no output from filter: source-
> > highlight -f xhtml -s javascript
> > /bin/sh: source-highlight: not found
> >
> > Pygments was installed with easy_install pygments, and finished
> > without errors. According to the documentation, I can tell Asciidoc to
> > use this by putting pygments= in my configuration file. My /usr/share/
> > doc/asciidoc/doc/asciidoc.conf now looks like this:
> >
> > #
> > # Customization for AsciiDoc documentation.
> > #
> > [specialwords]
> > ifndef::doctype-manpage[]
> > monospacedwords=(?u)\\?\basciidoc\(1\) (?u)\\?\ba2x\(1\)
> > endif::doctype-manpage[]
> > pygments=
> >
> > No results. I then tried both `asciidoc -a pygments api.txt` and
> > `asciidoc -a pygments= api.txt` but still no luck. I'm unable to
> > locate any documentation for either the pygments plugin(?) or the
> > configuration file, so I'm at a loss here.
> >
> > How can I make this work?
> >
> > Thanks,
> > Christian
>
> --
> Phillip Lord,                           Phone: +44 (0) 191 222 7827
> Lecturer in Bioinformatics,             Email:
> [email protected]
> School of Computing Science,
> http://homepages.cs.ncl.ac.uk/phillip.lord
> Room 914 Claremont Tower,               skype: russet_apples
> Newcastle University,                   msn: [email protected]
> NE1 7RU                                 twitter: phillord
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<asciidoc%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.
>
>
>


-- 
MVH
Christian

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to