[tw5] Re: glossary with diacritics

2020-10-27 Thread Jean-Pierre Rivière
I don't ee the point of prefix[e]!prefix[é] because é won't be incorporated 
by prefix[e].

Also, the second run is not working because of two glitches: 1) [[ instead 
of [ at the beginning and [é) instead of [é].

Thanks again.

Le lundi 26 octobre 2020 à 18:36:02 UTC+1, Mark S. a écrit :

> 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!prefix[é]] 
> [[tag[glossaire]prefix[é)]]+[sortan[]]">
>
> 
> 
>
> 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:
>>
>> 
>> <$list 
>> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
>> 
>>
>> 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="[compare:string:eq[e]then]">
>>
>> special <$macrocall $name="special"> now defined
>>
>> 
>> <$list filter="[tag[glossaire]prefix]<$macrocall 
>> $name="special"/>">
>><$link/>
>> 
>> 
>> 
>> 
>> 
>> \end
>>
>> When I use <> 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/b2d3a78a-599c-4500-bf7d-6b96268b20a2n%40googlegroups.com.


Re: [tw5] Re: glossary with diacritics

2020-10-27 Thread Xavier Cazin
Duh, sortan[] !!!

Thanks for the reminder, Mark

-- Xavier.


On Mon, Oct 26, 2020 at 6:36 PM 'Mark S.' via TiddlyWiki <
tiddlywiki@googlegroups.com> wrote:

> 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!prefix[é]]
> [[tag[glossaire]prefix[é)]]+[sortan[]]">
>
> 
> 
>
> 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:
>>
>> 
>> <$list
>> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
>> 
>>
>> 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="[compare:string:eq[e]then]">
>>
>> special <$macrocall $name="special"> now defined
>>
>> 
>> <$list filter="[tag[glossaire]prefix]<$macrocall
>> $name="special"/>">
>><$link/>
>> 
>> 
>> 
>> 
>> 
>> \end
>>
>> When I use <> 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
> 
> .
>

-- 
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/CADeSwYN7xnVwVxYdx%3DTiLMYFOq17f-2_H%3DKDDqX37X1QZRCJ9A%40mail.gmail.com.


[tw5] Re: glossary with diacritics

2020-10-26 Thread 'Mark S.' via TiddlyWiki
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!prefix[é]] 
[[tag[glossaire]prefix[é)]]+[sortan[]]">




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:
>
> 
> <$list 
> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
> 
>
> 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="[compare:string:eq[e]then]">
>
> special <$macrocall $name="special"> now defined
>
> 
> <$list filter="[tag[glossaire]prefix]<$macrocall 
> $name="special"/>">
><$link/>
> 
> 
> 
> 
> 
> \end
>
> When I use <> 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.


Re: [tw5] Re: glossary with diacritics

2020-10-26 Thread Jean-Pierre Rivière
£Hi!

Thank you, this one is functionnal. BTW, I was already in 5.1.23-prerelease.

But how can I get the doc form this new trim operator?

Le samedi 24 octobre 2020 à 08:58:18 UTC+2, Xavier a écrit :

> Hi Jean-Pierre,
>
> If you don't mind using the TiddlyWiki prerelease, I suggest the brand new 
> subsort filter operator as well as the newly parametrised trim operator:
>
> \define glossaryLetter()
> 
> <$vars initial={{{ [lowercase[]] }}}>
> <$vars initial_regexp={{{ [compare:string:eq[e]] 
> +[then[(e|é)]elseaddprefix[^]] }}}>
> <$vars tail_filter="[trim:prefix[e]trim:prefix[é]]">
> <$list filter="[tag[glossaire]regexp] 
> +[sortsub]">
> <$link/>
> 
> 
> 
> 
> 
> \end
>
> Cheers,
> -- Xavier
>
>
> On Thu, Oct 22, 2020 at 11:50 PM Jean-Pierre Rivière <
> jn.pierr...@gmail.com> wrote:
>
>> I have not been able to achieve what I wanted in this case with 
>> subfilter, but I've been successul with regexp. So I post it here.
>>
>> \define glossaryLetter()
>> <$set name="initial" filter="[{!!title}lowercase[]]">
>> <$set name="others" filter="[compare:string:eq[e]then[é]]">
>> <$wikify name="pattern" text="""(?i)^([(]([^)]+[)] )?)?[<$macrocall 
>> $name="initial"/><$macrocall $name="others"/>]""" output="text">
>> 
>> <$list filter="[tag[glossaire]regexp]"><$link/>
>> 
>> 
>> \end
>>
>> used in a tag name "E" or 3B" for instance. I finally decided to 
>> hard-code the "e" case. It's simpler and yet I have retain what I would get 
>> if I used a dictionary so that the rest of the code would not be affected 
>> if I change my mind. Note that with regular expression I can now handle 
>> entry like "(really good) song for folk guitar" at both r or s (my choice 
>> to have it at both and not only at s) but this one is not sorted 
>> accordingly (would require a sorting function, not sure I can do it without 
>> js and it only concern one tiddler so far).
>>
>> I would really appreciate a solution with subfilter.
>> Le jeudi 22 octobre 2020 à 18:57:26 UTC+2, Jean-Pierre Rivière a écrit :
>>
>>> Hi Xavier!
>>>
>>> I've already used subfilter. As I used it and understood it, it is of 
>>> use as a substitude for mapping within filters. But yes, I can map an array 
>>> of just one element. I did not think of that.
>>>
>>> As for dictionnary, I was already planning its use. But to mark "é" as a 
>>> co-letter for "e", nothing more. But from there, my problem is to build 
>>> dynamically the filter for each letter and especially for "e".
>>>
>>> Subfilter allow writing something like 
>>>
>>> subfilter prefix[e]
>>>
>>> but not something like 
>>>
>>> subfilter 
>>>
>>> And since there is no filter that could have conditional filter (we can 
>>> only have conditional strings with "then" and "else"), I cannot see where 
>>> subfilter may help me.
>>>
>>> So I looked for another way: using "regexp" instead of "prefix". Where I 
>>> would use "regexp" where re is "^[eé]" or "^[a]" for instance. But it 
>>> doesn''t work, as I get all the titles, and not only the one beginning with 
>>> "e" or "é". See my code for use within "E" tiddler below:
>>>
>>> \define glossy()
>>> <$set name="initial" filter="[{!!title}lowercase[]]">
>>> <$set name="others" value="é">
>>> <$set name="pattern" value="^[<><>]">
>>> filter <>
>>> 
>>> <$list filter="[tag[glossaire]regexp] 
>>> +[sortan[]]"><$link/>
>>> 
>>> 
>>> \end
>>>
>>> <>
>>>
>>> with the control of "others", I'll be able to achieve my goal. But I 
>>> have difficulty with regexp (but not with regular expressions per se) which 
>>> I shall address in another topic.
>>>
>>>
>>>
>>> Le mercredi 21 octobre 2020 à 13:23:56 UTC+2, Xavier a écrit :
>>>
 Hi Jean-Pierre,

 I was about to point you to dictionaries 
  and suggest that you use 
 getindex <>, but now I'm 
 not sure if I understand your issue correctly. One sure thing however: you 
 cannot insert a filter string like <> 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 
  operator.

 Cheers,
 -- Xavier


 On Wed, Oct 21, 2020 at 11:35 AM Jean-Pierre Rivière <
 jn.pierr...@gmail.com> 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=<>/>
>
> 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 

Re: [tw5] Re: glossary with diacritics

2020-10-24 Thread Xavier Cazin
Hi Jean-Pierre,

If you don't mind using the TiddlyWiki prerelease, I suggest the brand new
subsort filter operator as well as the newly parametrised trim operator:

\define glossaryLetter()

<$vars initial={{{ [lowercase[]] }}}>
<$vars initial_regexp={{{ [compare:string:eq[e]]
+[then[(e|é)]elseaddprefix[^]] }}}>
<$vars tail_filter="[trim:prefix[e]trim:prefix[é]]">
<$list filter="[tag[glossaire]regexp]
+[sortsub]">
<$link/>





\end

Cheers,
-- Xavier


On Thu, Oct 22, 2020 at 11:50 PM Jean-Pierre Rivière <
jn.pierre.rivi...@gmail.com> wrote:

> I have not been able to achieve what I wanted in this case with subfilter,
> but I've been successul with regexp. So I post it here.
>
> \define glossaryLetter()
> <$set name="initial" filter="[{!!title}lowercase[]]">
> <$set name="others" filter="[compare:string:eq[e]then[é]]">
> <$wikify name="pattern" text="""(?i)^([(]([^)]+[)] )?)?[<$macrocall
> $name="initial"/><$macrocall $name="others"/>]""" output="text">
> 
> <$list filter="[tag[glossaire]regexp]"><$link/>
> 
> 
> \end
>
> used in a tag name "E" or 3B" for instance. I finally decided to hard-code
> the "e" case. It's simpler and yet I have retain what I would get if I used
> a dictionary so that the rest of the code would not be affected if I change
> my mind. Note that with regular expression I can now handle entry like
> "(really good) song for folk guitar" at both r or s (my choice to have it
> at both and not only at s) but this one is not sorted accordingly (would
> require a sorting function, not sure I can do it without js and it only
> concern one tiddler so far).
>
> I would really appreciate a solution with subfilter.
> Le jeudi 22 octobre 2020 à 18:57:26 UTC+2, Jean-Pierre Rivière a écrit :
>
>> Hi Xavier!
>>
>> I've already used subfilter. As I used it and understood it, it is of use
>> as a substitude for mapping within filters. But yes, I can map an array of
>> just one element. I did not think of that.
>>
>> As for dictionnary, I was already planning its use. But to mark "é" as a
>> co-letter for "e", nothing more. But from there, my problem is to build
>> dynamically the filter for each letter and especially for "e".
>>
>> Subfilter allow writing something like
>>
>> subfilter prefix[e]
>>
>> but not something like
>>
>> subfilter 
>>
>> And since there is no filter that could have conditional filter (we can
>> only have conditional strings with "then" and "else"), I cannot see where
>> subfilter may help me.
>>
>> So I looked for another way: using "regexp" instead of "prefix". Where I
>> would use "regexp" where re is "^[eé]" or "^[a]" for instance. But it
>> doesn''t work, as I get all the titles, and not only the one beginning with
>> "e" or "é". See my code for use within "E" tiddler below:
>>
>> \define glossy()
>> <$set name="initial" filter="[{!!title}lowercase[]]">
>> <$set name="others" value="é">
>> <$set name="pattern" value="^[<><>]">
>> filter <>
>> 
>> <$list filter="[tag[glossaire]regexp]
>> +[sortan[]]"><$link/>
>> 
>> 
>> \end
>>
>> <>
>>
>> with the control of "others", I'll be able to achieve my goal. But I have
>> difficulty with regexp (but not with regular expressions per se) which I
>> shall address in another topic.
>>
>>
>>
>> Le mercredi 21 octobre 2020 à 13:23:56 UTC+2, Xavier a écrit :
>>
>>> Hi Jean-Pierre,
>>>
>>> I was about to point you to dictionaries
>>>  and suggest that you use
>>> getindex <>, but now I'm
>>> not sure if I understand your issue correctly. One sure thing however: you
>>> cannot insert a filter string like <> 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
>>>  operator.
>>>
>>> Cheers,
>>> -- Xavier
>>>
>>>
>>> On Wed, Oct 21, 2020 at 11:35 AM Jean-Pierre Rivière <
>>> jn.pierr...@gmail.com> 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=<>/>

 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="[compare:string:eq[e]]">

 <$list
 filter="[tag[glossaire]prefix][tag[glossaire]prefix[é]]+[sortan[]]">

 for all the other letter, that is only:

 $list filter="[tag[glossaire]prefix]"/>

 (it seems I don't need sorting then. Is that a coincidence or is it a
 general truth?)

 What I coded:

 \define glossy()

Re: [tw5] Re: glossary with diacritics

2020-10-22 Thread Jean-Pierre Rivière
I have not been able to achieve what I wanted in this case with subfilter, 
but I've been successul with regexp. So I post it here.

\define glossaryLetter()
<$set name="initial" filter="[{!!title}lowercase[]]">
<$set name="others" filter="[compare:string:eq[e]then[é]]">
<$wikify name="pattern" text="""(?i)^([(]([^)]+[)] )?)?[<$macrocall 
$name="initial"/><$macrocall $name="others"/>]""" output="text">

<$list filter="[tag[glossaire]regexp]"><$link/>


\end

used in a tag name "E" or 3B" for instance. I finally decided to hard-code 
the "e" case. It's simpler and yet I have retain what I would get if I used 
a dictionary so that the rest of the code would not be affected if I change 
my mind. Note that with regular expression I can now handle entry like 
"(really good) song for folk guitar" at both r or s (my choice to have it 
at both and not only at s) but this one is not sorted accordingly (would 
require a sorting function, not sure I can do it without js and it only 
concern one tiddler so far).

I would really appreciate a solution with subfilter.
Le jeudi 22 octobre 2020 à 18:57:26 UTC+2, Jean-Pierre Rivière a écrit :

> Hi Xavier!
>
> I've already used subfilter. As I used it and understood it, it is of use 
> as a substitude for mapping within filters. But yes, I can map an array of 
> just one element. I did not think of that.
>
> As for dictionnary, I was already planning its use. But to mark "é" as a 
> co-letter for "e", nothing more. But from there, my problem is to build 
> dynamically the filter for each letter and especially for "e".
>
> Subfilter allow writing something like 
>
> subfilter prefix[e]
>
> but not something like 
>
> subfilter 
>
> And since there is no filter that could have conditional filter (we can 
> only have conditional strings with "then" and "else"), I cannot see where 
> subfilter may help me.
>
> So I looked for another way: using "regexp" instead of "prefix". Where I 
> would use "regexp" where re is "^[eé]" or "^[a]" for instance. But it 
> doesn''t work, as I get all the titles, and not only the one beginning with 
> "e" or "é". See my code for use within "E" tiddler below:
>
> \define glossy()
> <$set name="initial" filter="[{!!title}lowercase[]]">
> <$set name="others" value="é">
> <$set name="pattern" value="^[<><>]">
> filter <>
> 
> <$list filter="[tag[glossaire]regexp] 
> +[sortan[]]"><$link/>
> 
> 
> \end
>
> <>
>
> with the control of "others", I'll be able to achieve my goal. But I have 
> difficulty with regexp (but not with regular expressions per se) which I 
> shall address in another topic.
>
>
>
> Le mercredi 21 octobre 2020 à 13:23:56 UTC+2, Xavier a écrit :
>
>> Hi Jean-Pierre,
>>
>> I was about to point you to dictionaries 
>>  and suggest that you use 
>> getindex <>, but now I'm 
>> not sure if I understand your issue correctly. One sure thing however: you 
>> cannot insert a filter string like <> 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 
>>  operator.
>>
>> Cheers,
>> -- Xavier
>>
>>
>> On Wed, Oct 21, 2020 at 11:35 AM Jean-Pierre Rivière <
>> jn.pierr...@gmail.com> 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=<>/>
>>>
>>> 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="[compare:string:eq[e]]">
>>>
>>> <$list 
>>> filter="[tag[glossaire]prefix][tag[glossaire]prefix[é]]+[sortan[]]">
>>>
>>> for all the other letter, that is only:
>>>
>>> $list filter="[tag[glossaire]prefix]"/>
>>>
>>> (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="[compare:string:eq[e]]">
>>>
>>> special <> now defined
>>>
>>> <$set name="ext-filter" 
>>> value="[tag[glossaire]prefix]<$macrocall $name=special>>">
>>>
>>> ext-filter <> ready
>>>
>>> 
>>> <$list filter=<>>
>>><$link/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> \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
>>> 

Re: [tw5] Re: glossary with diacritics

2020-10-22 Thread Jean-Pierre Rivière
Hi Xavier!

I've already used subfilter. As I used it and understood it, it is of use 
as a substitude for mapping within filters. But yes, I can map an array of 
just one element. I did not think of that.

As for dictionnary, I was already planning its use. But to mark "é" as a 
co-letter for "e", nothing more. But from there, my problem is to build 
dynamically the filter for each letter and especially for "e".

Subfilter allow writing something like 

subfilter prefix[e]

but not something like 

subfilter 

And since there is no filter that could have conditional filter (we can 
only have conditional strings with "then" and "else"), I cannot see where 
subfilter may help me.

So I looked for another way: using "regexp" instead of "prefix". Where I 
would use "regexp" where re is "^[eé]" or "^[a]" for instance. But it 
doesn''t work, as I get all the titles, and not only the one beginning with 
"e" or "é". See my code for use within "E" tiddler below:

\define glossy()
<$set name="initial" filter="[{!!title}lowercase[]]">
<$set name="others" value="é">
<$set name="pattern" value="^[<><>]">
filter <>

<$list filter="[tag[glossaire]regexp] 
+[sortan[]]"><$link/>


\end

<>

with the control of "others", I'll be able to achieve my goal. But I have 
difficulty with regexp (but not with regular expressions per se) which I 
shall address in another topic.



Le mercredi 21 octobre 2020 à 13:23:56 UTC+2, Xavier a écrit :

> Hi Jean-Pierre,
>
> I was about to point you to dictionaries 
>  and suggest that you use 
> getindex <>, but now I'm not 
> sure if I understand your issue correctly. One sure thing however: you 
> cannot insert a filter string like <> 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 
>  operator.
>
> Cheers,
> -- Xavier
>
>
> On Wed, Oct 21, 2020 at 11:35 AM Jean-Pierre Rivière <
> jn.pierr...@gmail.com> 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=<>/>
>>
>> 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="[compare:string:eq[e]]">
>>
>> <$list 
>> filter="[tag[glossaire]prefix][tag[glossaire]prefix[é]]+[sortan[]]">
>>
>> for all the other letter, that is only:
>>
>> $list filter="[tag[glossaire]prefix]"/>
>>
>> (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="[compare:string:eq[e]]">
>>
>> special <> now defined
>>
>> <$set name="ext-filter" value="[tag[glossaire]prefix]<$macrocall 
>> $name=special>>">
>>
>> ext-filter <> ready
>>
>> 
>> <$list filter=<>>
>><$link/>
>> 
>> 
>> 
>> 
>> 
>> \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 
>>>">>
>>>
>>>
>>> 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

 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:
>
> 
> <$list 
> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
> 

Re: [tw5] Re: glossary with diacritics

2020-10-21 Thread Xavier Cazin
Hi Jean-Pierre,

I was about to point you to dictionaries
 and suggest that you use
getindex <>, but now I'm not
sure if I understand your issue correctly. One sure thing however: you
cannot insert a filter string like <> 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
 operator.

Cheers,
-- Xavier


On Wed, Oct 21, 2020 at 11:35 AM Jean-Pierre Rivière <
jn.pierre.rivi...@gmail.com> 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=<>/>
>
> 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="[compare:string:eq[e]]">
>
> <$list
> filter="[tag[glossaire]prefix][tag[glossaire]prefix[é]]+[sortan[]]">
>
> for all the other letter, that is only:
>
> $list filter="[tag[glossaire]prefix]"/>
>
> (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="[compare:string:eq[e]]">
>
> special <> now defined
>
> <$set name="ext-filter" value="[tag[glossaire]prefix]<$macrocall
> $name=special>>">
>
> ext-filter <> ready
>
> 
> <$list filter=<>>
><$link/>
> 
> 
> 
> 
> 
> \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
>>">>
>>
>>
>> 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
>>>
>>> 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:

 
 <$list
 filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
 

 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="[compare:string:eq[e]then]">

 special <$macrocall $name="special"> now defined

 
 <$list filter="[tag[glossaire]prefix]<$macrocall
 $name="special"/>">
<$link/>
 
 
 
 
 
 \end

 When I use <> 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
> 

[tw5] Re: glossary with diacritics

2020-10-21 Thread Jean-Pierre Rivière
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=<>/>

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="[compare:string:eq[e]]">

<$list 
filter="[tag[glossaire]prefix][tag[glossaire]prefix[é]]+[sortan[]]">

for all the other letter, that is only:

$list filter="[tag[glossaire]prefix]"/>

(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="[compare:string:eq[e]]">

special <> now defined

<$set name="ext-filter" value="[tag[glossaire]prefix]<$macrocall 
$name=special>>">

ext-filter <> ready


<$list filter=<>>
   <$link/>





\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 
>">>
>
>
> 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
>>
>> 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:
>>>
>>> 
>>> <$list 
>>> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
>>> 
>>>
>>> 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="[compare:string:eq[e]then]">
>>>
>>> special <$macrocall $name="special"> now defined
>>>
>>> 
>>> <$list filter="[tag[glossaire]prefix]<$macrocall 
>>> $name="special"/>">
>>><$link/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> \end
>>>
>>> When I use <> 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/1f645183-dce9-4a0c-9679-4b33f7d27cf3n%40googlegroups.com.


[tw5] Re: glossary with diacritics

2020-10-20 Thread TW Tones
Other "half baked" ideas,


   - é list-before or list-after e
   - On tiddlywiki.com see the 
   ">>
   
   
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
>
> 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:
>>
>> 
>> <$list 
>> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
>> 
>>
>> 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="[compare:string:eq[e]then]">
>>
>> special <$macrocall $name="special"> now defined
>>
>> 
>> <$list filter="[tag[glossaire]prefix]<$macrocall 
>> $name="special"/>">
>><$link/>
>> 
>> 
>> 
>> 
>> 
>> \end
>>
>> When I use <> 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/1f04f517-ed60-47b8-a655-17d5746fba16o%40googlegroups.com.


[tw5] Re: glossary with diacritics

2020-10-20 Thread TW Tones
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

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:
>
> 
> <$list 
> filter="[tag[glossaire]prefix]=[tag[glossaire]prefix[é]]+[sortan[]]"><$link/>
> 
>
> 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="[compare:string:eq[e]then]">
>
> special <$macrocall $name="special"> now defined
>
> 
> <$list filter="[tag[glossaire]prefix]<$macrocall 
> $name="special"/>">
><$link/>
> 
> 
> 
> 
> 
> \end
>
> When I use <> 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/a8f00a7b-b573-44d6-9a4f-c071d1cb57d6o%40googlegroups.com.