By "redirects" I assume you meant links? Yes, I could have added it with a 
few more minutes. 

Actually, the easiest way to deal with the situation is to create a 
"sortby", "caption", or "descriptoin" field. That field could in turn be 
populated by a button that you would activate whenever you want to see a 
"report" of your titles.This not only covers the "obvious" situations where 
a title starts with A/An/The, but others where you might want it to sort by 
something entirely different. Like you might want to sort "Suicide is 
Painless" as "M.A.S.H. Theme song". 

I don't think a sort-without-articles is a standard tool in most 
programming APIs. So you might as well find a good solution and settle in.

On Friday, March 20, 2020 at 10:47:31 AM UTC-7, PS wrote:

> Thanks, everyone, for responding. I struggle with the more technical side 
> of TiddlyWiki, but so far wrangling it has felt worthwhile. Good to know 
> that I should steer clear of list-before/-after for this purpose. I was 
> looking for any tool that might do the job and am not clear on best 
> practice.
>
> Mark, I'm intrigued by your post as a beginner and will have to take some 
> time to figure out what each part actually does. It certainly reminds me 
> that I should learn how to use regular expressions. Avoiding "===" is not a 
> problem! And then I suppose one could set up redirects like Wikipedia has 
> to send the missing Bell Jar tiddler on to The Bell Jar? (Or transclusion?) 
> My issue, though, is that I wish one thing could be used for sorting (Bell 
> Jar) and another returned for display (The Bell Jar). Displaying "Bell Jar" 
> is functionally pretty similar to naming the tiddler "Bell Jar" when it 
> comes to all my lists.
>
> Mat, your post was deleted as I was responding, but here was what I had 
> typed: Mat, that's an interesting solution! But I can't seem to get it to 
> work? It actually seems to do the inverse--it sorts as if the "The" was 
> present, but displays "Bell Jar". For example, I tested just a small 
> selection of titles, two with an initial "The", and the resulting list 
> appeared in this order: Bag of Bones, Beatrix, Tales from Earthsea, Bell 
> Jar, Tempest, Treasure Island. (Am I using the filter incorrectly? My 
> filter was just based on a temporary tag, so all it is, is 
> filter="[tag[book1]]".)
>
> I'm willing to accept that perhaps TiddlyWiki doesn't yet have the 
> functionality I want, but either way, I appreciate the look at different 
> ways to problem-solve.
>
> Also, would it be worthwhile to join Github and chime in with some support 
> for the feature on that thread? I don't know if it's meant mostly for 
> technical suggestions and solutions, or if a simple confirmation that 
> another person would find such a feature useful is... useful.
>
> On Friday, March 20, 2020 at 11:28:29 AM UTC-5, Mark S. wrote:
>>
>> This can do it for standard A/An/The and as long as you don't mind that 
>> no title can have === in it. You can pick some other unique set of 
>> characters if you're careful.
>>
>>
>> \define titleprep()
>> <$vars lb="[[" rb="]]">
>> <$list filter="[tag[mysort]]" >
>> <$list filter=
>> "[all[current]splitregexp[^The\s]splitregexp[^A\s]splitregexp[^An\s]!is[blank]]"
>>  
>> variable="fixedtitle">
>> <<lb>><<fixedtitle>>===<<currentTiddler>><<rb>><br/>
>> </$list>
>> </$list>
>> </$vars>
>> \end
>>
>> <$wikify text=<<titleprep>> name=sortedtitles>
>> <$list filter="[enlist<sortedtitles>sort[]splitregexp[===.*]]">
>>
>> </$list>
>> </$wikify>
>>
>> Here's my example of before and after (screenshot should show here) :
>>
>>
>>
>>
>>
>> On Friday, March 20, 2020 at 7:46:39 AM UTC-7, PS wrote:
>>>
>>> Is there a good way to use the list-before or list-after field to allow 
>>> sorting of tiddlers that ignores a/an/the at the beginning of titles?
>>>
>>> For example, I was thinking the way it worked would allow you to put 
>>> "Bell Jar" for the list-after field of a tiddler called "The Bell Jar", and 
>>> then as long as I didn't specify sort[title], it would put The Bell Jar in 
>>> place after the imaginary tiddler "Bell Jar" and sort anything without one 
>>> of those fields in the straightforward alphabetic way. But it turns out 
>>> that the tiddler in list-after or list-before has to actually exist, I 
>>> guess? At least, it only works if, say, I tell it to list after "Bag of 
>>> Bones", which does exist. But what if I make a tiddler called Beatrix, 
>>> which ought to be in between? Now I have to remember to go back into The 
>>> Bell Jar and update the sorting again, which could get very tedious and is 
>>> prone to error.
>>>
>>> Please tell me there's a good way to handle sorting with a/an/the, even 
>>> a different method, short of going the old route of tacking the offending 
>>> article back on to the end!
>>>
>>> Right now, the only other thing I can think of is creating a new field 
>>> on every single tiddler I'd want to sort as an alternate title field to use 
>>> when sorting, and I'd rather avoid that.
>>>
>>

-- 
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/fcd4d36d-3623-476c-9ae4-9998b9dc45dd%40googlegroups.com.

Reply via email to