The TW macro can accept the optional parameter! An optional parameter is 
the one you can send its value on macro call or you can ignore and macro 
will use some default value!
My question is can we have a macro with variable number of parameters 
(attributes)

See below macro

\define mypic(caption:"no caption", img)
<figure>
[img[$img$]]
<figcaption 
style="text-align:center;font-weight:700;">$caption$</figcaption>
</figure>
\end

I want to call mypic as below

<<mypic caption img>>

and

<<mypic caption img1 img2 img3>>



What do you think?


I know JS has this capability, see below
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters


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 [email protected].
To post to this group, send email to [email protected].
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/8b38eb35-9525-4867-9bd0-7cbfa6ac36e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to