Ah, in the previous post I used ab as the prefix, use below which is what
you want criterion as prefix.
Or more simpler

\define countCrit(crit) <$count filter="[<__crit__>addprefix[criterion
]tagging[]]"/>



On Tue, Oct 6, 2020 at 7:22 PM Atronoush Parsi <[email protected]> wrote:

> Try this
>
> \define  countCrit (rTag)
> <$vars cTag={{{ [<__rTag__>addprefix[criterion   ]] }}}>
> <$count filter="[tag<cTag>]"/>
> </$vars>
> \end
>
>
> Or more simpler
>
> \define countCrit(crit) <$count filter="[<__crit__>addprefix[ab
> ]tagging[]]"/>
>
> On Tue, Oct 6, 2020 at 6:58 PM Jean-Pierre Rivière <
> [email protected]> wrote:
>
>> I have to filter tiddler with tags names of the form "criterion 2.4",
>> "criterion 10.1", etc...
>>
>> I have devised a simple macro:
>>
>> \define countCrit(crit) <$count filter="[tag[$crit$]]"/>
>>
>> which is call like <<countCrit "criterion 4.2">>
>>
>> But repeating "criterion" is tedious and could make error. what I'd like
>> is to have
>>
>> <<counting 4.2>>
>>
>> which would itself call <<countCrit "criterion 4.2">> for me. Or make the
>> computation by itself (I tried both ways).
>>
>> But I cannot be successfull on transforming 4.2 into "criterion 4.2" for
>> this purpose.
>>
>> Getting the string seems easy, for instance using the addprefix operator.
>> But the whole filter has a syntax error.
>>
>> My code:
>>
>> \define counting(ref) <$count filter="[tag[ [$ref$] +[addprefix[critère
>> ]] ]]"/>
>>
>> used as <<counting "1.3">>.
>>
>> Is there a tool for checking filter syntax and help getting it right?
>> The .operator-example macro of the doc is of limited use for that. It just
>> help making tries but when all your tries are wrong without your knowing
>> why...
>>
>>
>> --
>> 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/0c9b34a1-3e08-44ab-a53f-6f6fbe7b5a65n%40googlegroups.com
>> <https://groups.google.com/d/msgid/tiddlywiki/0c9b34a1-3e08-44ab-a53f-6f6fbe7b5a65n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CAKHVXmoG6%2BOsEE6yE6XdJXUHn9wshnMgZ%2B_xv-HsyhNvX8WxAw%40mail.gmail.com.

Reply via email to