Hi Stefan
Variables and macros are indeed the same thing. Macros are just variables
that have their parameters substituted before use.
The invocation syntax is based on the following principles for the
attributes of HTML elements and widgets:
"text" or 'text' - passed as a literal value
{{text reference}} - transcludes a text reference
<<macro>> - transcludes a variable or macro invocation.
http://tiddlywiki.com/#HTML%20in%20WikiText
So, curly braces are used as delimiters to indicate transclusion, and angle
brackets are used as delimiters to indicate variable/macro invocation.
> Assuming that there is no other feature where this documentation could be
valuable I would put a new section like "Variables, Parameters,
Subsitutions" into "Macros in WikiText".
Contributions are very welcome, thank you.
Best wishes
Jeremy
On Mon, Oct 13, 2014 at 12:40 PM, <[email protected]> wrote:
> Hi Jeremy,
>
> On Wednesday, October 8, 2014 7:40:34 PM UTC+2, Jeremy Ruston wrote:
>
>
>>
>>
>>> What would be the best place to add documentation? The "WidgetVariables"
>>> tiddler for instances is empty.
>>>
>>
>> Perhaps "Macros in WikiText"?
>>
>>
> Hm. Maybe it's just idiosyncratic but as a user who is learning to write
> markup based macros (writing the JS code looks straightforward to me) I am
> confused because I am missing a summary of the involved concepts and the
> syntax to access and use the different entities. Also I don't think it's
> easy to grasp that macros, variables and paramters share a common JS
> namespace - that is, without looking at the <<debugvariables>> output -,
> but the syntax for accessing all of these entities is different and
> depending on the context. For instance, the "official" syntax for passing
> variables (or whatever entity) to a widget seems to be "param=<<stuff>>",
> which I find odd because it isn't clear to me why the macro call syntax is
> used in this manner. Especially that the qoutes are missing around the
> macro call and that it does't work if you put them there. Of course I can
> make myself familiar with the JS code responsible for these features - but
> this is a lot of work since I may know nothing about the internal structure
> of the code.
>
> On the other hand I may not have found the bits of documentation where
> these things are explained.
>
> Assuming that there is no other feature where this documentation could be
> valuable I would put a new section like "Variables, Parameters,
> Subsitutions" into "Macros in WikiText".
>
> Best,
> Stefan
>
--
Jeremy Ruston
mailto:[email protected]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.