\define h(txt) <mark>$txt$</mark><<h text to highlight>>
\define h(txt) <mark>"$txt$"</mark>
\define h(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10)
<$vars un="__">
<mark>
<$list filter="t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 +[addprefix<un>addsuffix<un>getvariable[]]" variable="myvar">
<<myvar>>
</$list>
</mark>
</$vars>
\end
\define h(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10) <mark>$t1$ $t2$ $t3$ etc </mark>
Sure, but then you have to construct a new substitution variable for each argument. With this approach, you can just copy the parameters into the filter.
\define h(txt) <mark>$txt$</mark>
\define hvar() <mark>$(text)$</mark>
\define hfield(fieldname) <mark>{{!!$fieldname$}}</mark>
<<h text to highlight>>
<<h "text in quotes">>
<<h 'text in single quotes'>>
<<h """text in triple quotes""">>
<<h txt:"text as named parameter">>
<$macrocall $name=h txt="text as named parameter in macrocall"/>
<<h """
This allows even sentences
to be passed across<br>
multiple lines in one parameter
""">>
<$macrocall $name=h
txt="text as named parameter in macrocall"/>
<<hfield caption>>
<$set name=text value="Text in a specific variable name">
<<hvar>>
</$set>
I have a feeling the range operator should be usable here but not sure how.
\define h(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10)
<$vars un="__">
<mark>
<$list filter="[range[10]] +[addprefix[t]addprefix<un>addsuffix<un>getvariable[]]" variable="myvar">
<<myvar>>
</$list>
</mark>
</$vars>
\end
Mark,Nifty code. I still think it should be trivial for the macro code to provide an all params parameter? Then it could be enlisted.