HC,
A Few related points
A New tag exists SystemTag: $:/tags/Macro/View
You can use import variables to bring macro definitions into a tiddler
rather than the tags/macro
I backup my macro writing with a field macro-macroname containing the
syntax, on tiddlers where I define them
<<macroname [filter]>> where filter defaults to [all[current]]>>
I have a list that shows the macos and their syntax
In my documentation I like to present the macrocall version as well
especially if it may be needed.
<$macrocall $name=macroname filter={{!!filter-field}} />
If a template needs to act on a specific tiddler you can use the
{{tiddlername||templatename}} format, but this is often just as well
serviced by a viewtemplate item. Although I have reused this as
{{parameter||templatename}} where the parameter becomes currentTiddler in
the template, and of course there is {{||templatename}}
There are so many ways to achieve something similar that I think the best
approach is that it is ultimately self documenting. For this reason I would
be less likely to use transclusion and more likely to use macros except
where I have built a "work horse".
For example I have created a template called {{||$:/autotags}} which uses
the currentTiddler to create a tag name $:/tags/*currentTiddler *that
transcludes all tiddlers tagged $:/tags/*currentTiddler * that is, it
remains an active transclusion, but a transclusion none the less.
Ie curly braces tend to represent transclusions, macro's tend not to, just
macros. It can reduce the complex for the memory.
I hope this help informs your thinking
Regards
Tony
On Friday, April 24, 2020 at 4:41:57 PM UTC+10, HC Haase wrote:
>
> Thanks for the input
>
> I think Mario have a good point. I have seen (and adopted) Mohammad put
> documentation of the macro after the /end. This makes it much easier to
> reuse the code.
>
> --example of macro doc--
>
>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6a307bed-97ca-4268-969b-2d828d8ffab3%40googlegroups.com.