View Single Post
Old 02-21-2023, 08:31 AM   #9
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
Quote:
Originally Posted by Phssthpok View Post
Thanks. All of the above has led me to use author_sort as a basis (which I have already set up to turn the likes of "Walter M. Miller, Jr" and "Gardner Dozois (ed.)" into "Miller Jr, Walter M." and "Dozois, Gardner").

So the final result is this:

(having found out the hard way that the separating commas need spaces around them -- a comma without spaces seems to be treated as part of the name, and if there is a trailing space it is removed).
This is quite surprising to me. You're using author_sort which means you are specifically starting out with Lastname, Firstname. Then you swap around the comma? Aren't you just manually putting them back into Firstname Lastname? If I understand list_re properly, this will also DROP any authors who do not have a comma in their names (which can happen even in author_sort mode – consider mononym authors such as “Ęsop” for instance).

Did you try out the second suggestion from my comment above, using list_join() and re()? If so then what was insufficient about it? (Also, as you can see from my original example, only the trailing space is needed. The commas do not require a space in front.)

Last edited by isarl; 02-21-2023 at 08:39 AM.
isarl is offline   Reply With Quote