Hi all,

very frequently I have to write something like the following:

.[codetitle]#{srccaption}# link:{src}/{chap}/{subchap}/coffee05/Coffee.java[[codelink]+coffee05/Coffee.java+]
ifdef::backend-docbook[]
["source","java",args="role=\"code\""]
endif::[]
ifndef::backend-docbook[]
["source","java"]
endif::[]
----
sys::[{ex} Fillable {src}/{chap}/{subchap}/coffee05/Coffee.java]
----
<1> The interface


where {ex} is set to my source-code extractor tool, "Fillable" is the snippet name to be extracted and the other document attributes are set accordingly.

I wonder if it is possible to write a macro to replace all the stuff from above with *one* call, e.g.

source::Coffee.java[Fillable]
<1> The interface

Any hints are welcome!

Actually I'm doing some preprocessing of the asciidoc-file with an awk-based tool: this tool replaces the "pseudo" block-macro call

source::Coffee.java[Fillable]

with the stuff above. It works quite well but has the disadvantage that the line numbers in error/warnings of asciidoc are displaced because more lines are generated.

--
Wilhelm

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