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 img1 img2 img3>>
What do you think?
I know JS has this capability, see below
Mohammad