You can't insert a widget into the middle of a filter. But it doesn't 
matter, you don't need it:

<$set name="initial" filter="[{!!title}lowercase[]]">
<$list filter="[tag[glossaire]prefix<initial>!prefix[é]] 
[[tag[glossaire]prefix[é)]]+[sortan[]]">

</$list>
</$set>

In the first part of the filter I exclude é. In the second run, I ONLY 
include é. 


On Tuesday, October 20, 2020 at 3:50:11 PM UTC-7, Jean-Pierre Rivière wrote:
>
> In French, a glossary is as simple as in English except for the letter E 
> where we also some entry starting with É to take into account.
>
> This can be done like this:
>
> <ul>
> <$list 
> filter="[tag[glossaire]prefix<initial>]=[tag[glossaire]prefix[é]]+[sortan[]]"><li><$link/></li>
> </ul>
>
> where initial is a variable containing "e" (my glossary is all lowercase, 
> and each word in the entry has a tiddler tagged "glossaire").
>
> But I want to build my glossary automatically. How can I make a special 
> case for the E letter? My difficulty is to extend my filter (this is the 
> part starting from the = sign). I am open t any way to achieve this.
>
> I have tried to build a string containing 
> "=[tag[glossaire]prefix[é]]+[sortan[]]" and to add it if initial is e, but 
> this does not work as I have written it:
>
> \\define glossy()
> <$set name="initial" filter="[{!!title}lowercase[]]">
> <$set name="special-case" value="=[tag[glossaire]prefix[é]]+[sortan[]]">
>
> <$set name="special" 
> filter="[<initial>compare:string:eq[e]then<special-case>]">
>
> special <$macrocall $name="special"> now defined
>
> <ul>
> <$list filter="[tag[glossaire]prefix<initial>]<$macrocall 
> $name="special"/>">
>    <li><$link/></li>
> </$list>
> </ul>
> </$set>
> </$set>
> </$set>
> \end
>
> When I use <<glossy>> in the "E" tiddler, all I can see is:
>
> special =[tag[glossaire]prefix[é]]+[sortan[]]
>
> and nothing else. the thing printed seems OK but is that what it seems to 
> be? The process clearly seems to be interrupted.
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ae8c8d70-a342-4d72-9577-66e2008739abo%40googlegroups.com.

Reply via email to