Closed mhaeussermann closed 4 years ago
Sorry about that. The bibtex_generate_author
is still a rather new feature and hasn't seen too much usage from the public. Thanks for letting me know. I've committed a change on the develop branch that I think should fix this issue. Let me know.
Thank you for the quick response! Will test the fix as soon as possible!
I tested the fix and am happy to say that it works like a charm. There's just one small hickup I noticed with names starting with unicode characters. Last names starting with Ö, Č, Š are sorted after Z and not after O, C and S. Maybe using .localeCompare() for sorting might solve this?
Great! Okay, I should have a fix for this soon. I just don't have enough time before work to do all the testing and adding extra options. I'll reply back when I have it all working.
No rush! Thank you for your support and work on the project!
Okay, the sorting should be fixed in develop (755f03b33626e0134719de37105f0ac3923f53d7). I wanted to make sure it could be extendable so I made it fully supports the localeCompare function.
<select class="bibtex_search bibtex_generate_author"
search="author" bibtex_sort_language="sv">
<option value="">Search Author</option>
</select>
<select class="bibtex_search bibtex_generate_title"
search="title" bibtex_sort_options="numeric: true">
<option value="">Search Title</option>
</select>
bibtex_sort_language
can set the language preference.
bibtex_sort_options
supports any option that localeCompare
takes provided in a comma separated list of variable:value
Of course you don't need to set any of these extra attributes if you just want the default behavior.
I can confirm that the sorting does work as expected! Closing the issue now.
I've noticed some issues with the "bibtex_generate_author" feature. When changing the author display format from the default "First Last" to "Last, First Initial", the generated list of authors will output as "First Initial, Last,", sorting by the initial of the first name. In cases with middle names, the list outputs "First Initial, Last, Middle Name(s) Initial(s)".