Here's a version that will highlight up to ten words. Just make appropriate 
adjustments to the macro definition and the filter to make it work for as 
many words as you think you'll need.

\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





On Tuesday, April 14, 2020 at 1:19:35 PM UTC-7, Dave wrote:
>
> Here's a simple macro for highlighting text:
> \define h(txt) <mark>$txt$</mark>
> <<h text to highlight>>
>
>
> but the way I have it, it just shows "text" highlighted.
>
> If I do this <<h 'text to highlight,>> then it works fine.
>
>
> But, seeing as I'm *super lazy*, I was wondering if there's a way to 
> change the macro itself to accept all the text sent to is as one blob
>
> I tried
>  \define h(txt) <mark>"$txt$"</mark>
> but it just showed "text" (with yellow highlight)
>
> Any ideas?
>
> Thanks,
> - Dave
>
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9727cb69-9cd0-465a-8ae7-6805bd0bc034%40googlegroups.com.

Reply via email to