\define mymacro(c:variable_for_color) <span style="color:variable_for_color"/>
\define spanmac(text) <span style="color:$(myColor)$;">$text$</span>\end
\define mymacro(c:"", text) <$list filter="[enlist[$c$ $(vc)$]limit[1]]" variable=myColor><<spanmac """$text$""">></$list>\end
<$vars vc="red" >
;Test one, no color sent:<<mymacro text:"Hi, I am red!">>
;Test two:<<mymacro c:blue text:"Hi, I am blue!">></$vars>
\define myhelper(h) <span style="color:$h$"/>
\define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<$c$>>/>
<$set name="variable_for_color" value="blue">
a <<mymacro>> b
</$set>
<p>
a <span style="color:blue"></span> b
</p>
<$set name="variable_for_color" value="blue">a <<mymacro>> b
c <<mymacro red>> d</$set>
<p>
a <span style="color:blue"></span> b
c <span style="color:"></span> d
</p>
h=<<$c$>>
\define myhelper(h) <span style="color:$h$"/>
\define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<$c$>>/>
<$set name="variable_for_color" value="blue">
a <<mymacro>> b
</$set>
<$set name="red" value="red">
c <<mymacro red>> d
</$set>
<p>
a <span style="color:blue"></span> b
</p><p>
c <span style="color:red"></span> d
</p>
<p>
tag.Best
Mohammad
you and others are often referring to symantic, can you share a definition if possible. The term clashes in my mind with philosophy and natural languages use of the word.
Thanks
Tony
<aside>
<h4>Epcot Center</h4>
<p>The Epcot Center is a theme park in Disney World, Florida.</p>
</aside>
<div class="mycls">
<div style="font-size:2em">Epcot Center</div>
<p>The Epcot Center is a theme park in Disney World, Florida.</p>
</div>
This seems in fact to be like plane language and self documenting code. Written to be read, rather than simply demonstrate ones coding skills. Perhaps like basic vs c++
It seems to me with the broad audience tiddlywiki attracts, we should always code sharable material this way.
Thanks for that.
Tony
Also in my request to format variables in the view widget, Jeremy points out plans to introduce a format operator into filters. This will allow variables passed into a filter to return a value in the set widget filter or triple curly braces method after further transformation.
This is clearly indicating the further development of filters such that we can do more with variables including maths.
Regards
Tony
\define mymacro(tiddlername)
<$set name=selected-tiddler value="$tiddlername$" emptyValue=<<currentTiddler>> >
Action: <<selected-tiddler>>
</$set>
\end
<<mymacro>>
<<mymacro "another tiddler">>