On 14/09/10 04:55, Phillip Lord wrote:


I have a couple of questions about extending asciidoc with new macros.
I'm struggling a little with the configuration files.

I've been generating some of my websites with Emacs Muse for a while,
and was thinking of moving to asciidoc, as it's a bit easier to give to
someone else that Emacs.

I'd like to be able to build a macro all of the functionality for which
is in asciidoc, but I can't work out how to do this. Take this page...


http://homepages.cs.ncl.ac.uk/phillip.lord/teaching/modules-09/csc8309/reading_affy_chips.html

Essentially, I have a single macro in this which generates the main
figure. In asciidoc terms, the macro definition converts something like


rinc::reading.r[]

into

[source,R]
----
include::reading_split.r[]
----
(link:reading.r[Complete File])(link:reading.r.Rout[Rout])

which is then further expanded into, HTML. Obviously I want to avoid
typing in the variations of the same filename three times, as this is a
recipe for disaster.

Is this at all possible with asciidoc? I couldn't work out whether this
sort of recursive definition is possible.

I can't think of a soution, did you get any further? Problem is that asciidoc is not a recursive descent compiler, it's basically just a glorified pattern match and replacer.



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.

Reply via email to