Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [asciidoc-lang-dev] Extension hooks in Asciidoc

I hesitate to say it, because it makes things even more complex, but substitution could be controlled by a switch in the defined block. Then the author would have control of when (and even whether) to substitute.

J

From: asciidoc-lang-dev <asciidoc-lang-dev-bounces@xxxxxxxxxxx> on behalf of Lex Trotman <exciidoc@xxxxxxxxx>
Sent: Tuesday, March 16, 2021 3:39 PM
To: AsciiDoc developer discussions <asciidoc-lang-dev@xxxxxxxxxxx>
Subject: Re: [asciidoc-lang-dev] Extension hooks in Asciidoc
 


On Tue, 16 Mar 2021 at 15:51, David Jencks <david.a.jencks@xxxxxxxxx> wrote:
Just one question tonight…. what’s an ‘input macro’?  Someone told me about a common LaTex usage and I wrote https://gitlab.com/djencks/asciidoctor-template… Is that the same thing?


Yes, that sort of thing, but perhaps with a defined syntax, eg 

define::some_name[parameter_list]
.
some contents
.
enddefine::[]

some_name::[parameters]

and not necessarily just a single block.

Also questions like use of document attributes (but not ones that are parameters) in the body, are they substituted in the define or after substitution (as yours are) or not allowed (my preference to avoid users complaining about the choice of define or substitution and issues about attributes with the same name being innocently used in the document with no intention of the define using it).

Cheers
Lex

 
thanks!
David Jencks


Back to the top