Svenn Are Bjerkem <[email protected]> writes:
> On Sep 22, 5:34 pm, Phillip Lord <[email protected]> wrote:
> I am targeting the docbook backend for dblatex as I want to have pdf,
> but eventually there is supposed to be a wordml file. (shrug)
>
> When having a look at the examples in asciidoc, it hits me that most
> of the filter coding examples are included twice:
> ....
> [whatever-filter]
> ----
> code for whatever-filter
> ----
> ....
>
> [whatever-filter]
> ----
> code for whatever-filter
> ----
>
> The first section to show the ascii code that the user is supposed to
> type into his ascii editor, and the second to render the example. I
> guess this is also the twopass solution to your javascript code?
Sort of. In my case, the code is external, so you get something like
this....
[source]
----
include::javascript/hello_world.js[]
----
js-button::hello_world.js[]
js-button is my own macro, so don't bother looking for it. I had to set
"javascriptdir" as an attribute, because js-button contains an include
macro, and, effectively, you need a full qualified path for this, since
relative paths are relative to the conf file, not the doc source.
I could simplify that to this....
[source]
----
js-include::hello_world.js[]
----
js-button::hello_world.js[]
I could even do....
[source]
----
js-include::hello_world.js[]
----
js-button::[]
by having js-include set an attribute ("last javascript"), and then
js-button::[] use this as a default.
What I could like is:
js-inc-button::hello_world.js[]
I *can* do this, but not easily, even though it expands
straight-forwardly to asciidoc. But, as far as I can tell, there is no
way to write a template that expands to asciidoc which is, itself,
expanded recursively.
> I understand that a user do not want to literally print graphviz
> source code as it is uninteresting in an automata documentation. I
> have problem understanding why it is difficult to do this in one pass
> for those cases where the filter input code _and_ the result is of
> importance to the reader.
You are preaching to the converted. My solution: templates that are
themselves asciidoc -- would I think solve the problem. No idea how hard
this would be to implement.
Phil
--
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.