On 08/11/12 05:34, Ashley Mills wrote:
> Hi, 
> 
> As an introduction, I'd just like to say I love asciidoc. Brilliantly
> simple and effective. Now to my problem.
> 
> I would like to set the pygments *cssclass* formatter option
> (see http://pygments.org/docs/formatters/)
> 
> According to
> (http://www.methods.co.nz/asciidoc/source-highlight-filter.html), I can
> use the *args* block attribute in asciidoc to pass arguments to the
> highlighter command-line.
> 
> However, setting the args attribute like so:
> 
> [source,cpp,args=lol]
> ---------------------------------------------
> int test;
> ---------------------------------------------

You need to quote if you use named attribute arguments i.e.
["source","cpp",args="lol"]

See: http://www.methods.co.nz/asciidoc/userguide.html#X21


Cheers, Stuart

> 
> Doesn't do anything to the pygmentize command line (here is some output):
> 
> asciidoc: x.txt: line 7: filtering: pygmentize -f html -l cpp  -O
> encoding=UTF-8
> 
> According to my naive investigation, this is because code-filter.conf
> does not pass the args parameter onwards to code-filter.py:
> 
>>>
> #
> # AsciiDoc code filter configuration file.
> #
> # Documented in code-filter-readme.txt
> #
> 
> [blockdef-listing]
> code-style=template="listingblock",presubs=(),postsubs=("callouts",),posattrs=("style","language"),filter="code-filter.py
> -b {basebackend} -l {language}"
> <<                          
> 
> and code-filter.py has no option to accept arguments to pass on:
> 
>>>
> OPTIONS
>     --help, -h
>         Print this documentation.
>     -b
>         Backend output file format: 'docbook', 'linuxdoc', 'html', 'css'.
>     -l
>         The name of the source code language: 'python', 'ruby', 'c++', 'c'.
>     -t tabsize
>         Expand source tabs to tabsize spaces.
>     --version, -v
>         Print program version number.
> <<
> 
> So I don't see how it could pass on parameters.
> 
> Am I missing something in my understanding of how I'm supposed to pass
> parameters though to the code filter?
> 
> Thanks
> 
> Ashley
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "asciidoc" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asciidoc/-/2shlQombZ_kJ.
> 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.

-- 
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