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/0861acb8-6f19-4e52-91a9-9bb649ec3f08%40googlegroups.com.

