Hi Jean-Pierre, I was about to point you to dictionaries <https://tiddlywiki.com/#DictionaryTiddlers> and suggest that you use getindex <https://tiddlywiki.com/#getindex%20Operator><>, but now I'm not sure if I understand your issue correctly. One sure thing however: you cannot insert a filter string like <<special-case>> into an existing filter expression by simply referencing the string variable. This is the main reason of the errors you get. Instead, you need to use the subfilter <https://tiddlywiki.com/#subfilter%20Operator> operator.
Cheers, -- Xavier On Wed, Oct 21, 2020 at 11:35 AM Jean-Pierre Rivière < [email protected]> wrote: > Hi Tones, > > My problem is not so much the order of the letter as of now. However, your > input may well serve me. > > Non, my real concerne is that I am not successfull in getting a special > filter for e, even though I already have this special case ready. I'm > unable to connect it dynamically. > > I have seen in an other thread that I can do things like <$sort > filter=<<my-filter>>/> > > So today I tried to build the complete filter. But I've not been sucessful > at that. My attempt: > > first, the filter I need for e (here within a list widget):<$set > name="special" filter="[<initial>compare:string:eq[e]<special-case>]"> > > <$list > filter="[tag[glossaire]prefix<initial>][tag[glossaire]prefix[é]]+[sortan[]]"> > > for all the other letter, that is only: > > $list filter="[tag[glossaire]prefix<initial>]"/> > > (it seems I don't need sorting then. Is that a coincidence or is it a > general truth?) > > What I coded: > > \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]<special-case>]"> > > special <<special>> now defined > > <$set name="ext-filter" value="[tag[glossaire]prefix<initial>]<$macrocall > $name=special>>"> > > ext-filter <<ext-filter>> ready > > <ul> > <$list filter=<<ext-filter>>> > <li><$link/></li> > </$list> > </ul> > </$set> > </$set> > </$set> > \end > > My results: > > special =[tag[glossaire]prefix[é]]+[sortan[]] now defined > > ext-filter [tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]] > ready > > en-tête de colonne ou de ligne > ensemble de pages > environnement maîtrisé > <$macrocall > $name=special>> > > If I omit the double quotes arount the filter value in setting ext-filter, > I'm getting a grammar error (no big surprise!)/ > > Le mercredi 21 octobre 2020 à 01:08:50 UTC+2, TW Tones a écrit : > >> Other "half baked" ideas, >> >> >> - é list-before or list-after e >> - On tiddlywiki.com see the >> <<tag "Order Operators <https://tiddlywiki.com/#Order%20Operators>">> >> >> >> Regards >> Tones >> >> On Wednesday, 21 October 2020 10:06:13 UTC+11, TW Tones wrote: >>> >>> Jean-Pierre, >>> >>> Just a quick idea not thought through >>> >>> In the pre-release there is the sortby operator. >>> >>> Perhaps having a sort macro >>> \define sorter() A a B b C c D d E é e .... >>> Then sortby<sorter> >>> >>> You may need to split[] the letters to obtain the first letter etc. >>> >>> Regards Tones >>> >>> >>> On Wednesday, 21 October 2020 09:50:11 UTC+11, 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/1f645183-dce9-4a0c-9679-4b33f7d27cf3n%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/1f645183-dce9-4a0c-9679-4b33f7d27cf3n%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/CADeSwYOu339KNrj4Mkvz8oEenQRsdd%2BO-UmvBi5fwkutq4FbsA%40mail.gmail.com.

