How to use <<__param__>> in Tiddlywiki? What is the correct syntax and use

47 views
Skip to first unread message

Mohammad

unread,
Nov 24, 2018, 9:13:55 AM11/24/18
to tiddl...@googlegroups.com
I want to know if the below syntax and usages of <<__param__>> is valid in TW.

\define mymac(param)
 <$reveal type="nomatch" default="Empty" text=<<__param__>> >
    <div class="card">$param$</div>
 </$reveal>
\end


Actually my question is the valid syntax for using <<__param__>>.

How about this?

\define mymac(param)
 <$reveal type="nomatch" default="Empty" text=<<__param__>> >
    <div class="card"><<__param__>> </div>
 </$reveal>
\end


Mohammad

Jeremy Ruston

unread,
Nov 24, 2018, 9:21:36 AM11/24/18
to tiddl...@googlegroups.com
Hi Mohammad

On 24 Nov 2018, at 14:13, Mohammad <mohammad...@gmail.com> wrote:

I want to know if the below syntax and usages of <<__param__>> is valid in TW.

\define mymac(param)
 <$reveal type="nomatch" default="Empty" text=<<__param__>> >
    <div class="card">$param$</div>
 </$reveal>
</div>
\end


Actually my question is the valid syntax for using <<__param__>>.

How about this?

\define mymac(param)
 <$reveal type="nomatch" default="Empty" text=<<__param__>> >
    <div class="card"><<__param__>> </div>
 </$reveal>
</div>
\end


All your examples are valid. The key to understanding the double underscore syntax is to remember that it turns a parameter name into a variable name. Thus __param__ is valid anywhere that a variable name is valid.

Best wishes

Jeremy.



Mohammad

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fde75388-d764-4cfe-b5d4-8afe522e3679%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohammad

unread,
Nov 24, 2018, 9:27:16 AM11/24/18
to TiddlyWiki
Many thanks Jeremy!

Actually I am starting using it to make sure I can send any complex combination of content to this macro!


Best
Mohammad
Reply all
Reply to author
Forward
0 new messages