Lex, All,
On 2014-09-06 09:24 +1000, Lex Trotman spake thusly:
> On 6 September 2014 06:19, Yann E. MORIN <[email protected]> wrote:
> > Hello!
> >
> > I'm trying to use the aafigure filter:
> > - https://code.google.com/p/asciidoc-aafigure-filter/
> >
> > The plugin works, in that the aafigure input in my asciidoc
> > is rendered into an SVG file, and included in the HTML output
> > (as an <img...> tag, of course).
> >
> > However, it seems I am unable to understand how to pass
> > options/arguments/parameters to the filter.
> >
> > Here is (part of) my asciidoc input:
> >
> > [aafigure,,format="png"]
>
> You need quotes around *all* parameters if you put quotes around any
> values, see
> http://wiki.asciidoc-aafigure-filter.googlecode.com/hg/asciidoc-aafigure-readme.html.
OK, thanks. I missed that (stupid me).
However, the options are still not passed to the filter:
["aafigure",format="png",options="textual"]
----
oooo
----
Should just generate a run of four 'o' characters, but still the
aafigure filter is not passed the 'textual' option.
Here is a strace log:
strace -ff -o strace/a2x.log -s 4096 -- a2x --xsltproc-opts \
"--stringparam toc.section.depth 1" -f xhtml -d book \
-L -r images -D manual manual.txt --asciidoc-opts="" -v
Then I can see:
$ grep -E 'execve\(.*aafig' strace/*'
strace/a2x.log.24398:execve("/bin/sh", ["/bin/sh", "-c",
"\"/usr/bin/python\"
\"/home/ymorin/dev/buildroot/br.config/docs/filters/aafigure/aafig2img.py\"
-v -o \"/home/ymorin/dev/buildroot/br.config/docs/manual/manual__1.png\"
-Fpng -"], [/* 85 vars */]) = 0
The filter is in:
./filter/aafigure/aafigure-filter.conf
./filter/aafigure/aafig2img.py
and has:
[aafigure-filter-style]
aafigure-style=template="aafigure-block",subs=(),posattrs=("style","target"),
filter='aafig2img.py [.....] {textual-option? --textual} [.....] -'
[.....] is me eliding all the other options...
Now I tried with the single-option, and quoting all the parameters:
["aafigure",format="png","textual-option"]
----
oooo
----
Now asciidoc whines:
asciidoc: ERROR: ug-concepts.txt: line 39: illegal style name: "aafigure"
Ditto if I unquote the single option:
["aafigure",format="png",textual-option]
----
oooo
----
asciidoc: ERROR: ug-concepts.txt: line 39: illegal style name: "aafigure"
And now, if I put the option on its own line:
["aafigure",format="png"]
[options="textual"]
----
oooo
----
Again, the textual option is not passed to the aafigure filter (as seen
in an strace log.)
So, let's try with the single-option form, now:
["aafigure",format="png"]
["textual-option"]
----
oooo
----
asciidoc: WARNING: ug-concepts.txt: line 40: missing style:
[blockdef-listing]: textual-option
Without quoting it, same warning.
What am I missing again?
BTW, using asciidoc 8.6.9, on Ubuntu 14.04.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.