macro definition

37 views
Skip to first unread message

Bob Jansen

unread,
Sep 17, 2020, 2:47:22 AM9/17/20
to TiddlyWiki
Can I define more than one macro in a tiddler and have them all available by tagging the tiddler with $:/tags/Macro or does it have to be one macro definition per tiddler?

bobj

Felicia Crow

unread,
Sep 17, 2020, 3:24:58 AM9/17/20
to TiddlyWiki
Hi,

yes as long as all the macros are defined at the beginning of the tiddler. Empty lines to seperate the individual tiddlers work, but everything else in between will trip tiddlywiki up and won't let it recognize the \define following.

Regards,
Felicia

TW Tones

unread,
Sep 17, 2020, 6:10:01 AM9/17/20
to TiddlyWiki
Also,

An empty define of the form
\define name()
\end

or

\define name()

\end
Will cause problems

However
\define note() Note in macros
\define note()
Some notes
\end
Thus redefining, is the best option for in line comments.

Also there is now a new tag

The system tag $:/tags/Macro/View marks macros that are only made available within the main view templates and the preview panel.

Content after the last define is ignored when macros are accesses due to a tag

Regards
Tones
Reply all
Reply to author
Forward
0 new messages