Closed agdamsbo closed 1 year ago
So apparently, I was only one additional search away. Here is the solution from StackOverflow
By adding the following option to _extention/acronyms/sorting_acronyms.lua
, I get the desired behavior:
-- Sort acronyms by their shortname, in case insensitive alphabetical order.
sorting_strategies["alphabetical_case"] = function(acronym1, acronym2)
-- TODO: check that this works with UTF-8 characters
return acronym1.shortname:upper() < acronym2.shortname:upper()
end
Hello,
Thank you for using acronyms!
This would be indeed a fine addition. I do not currently have time to implement the corresponding tests and write the documentation, but your solution should work as-is. I will add this feature to the master branch in a few days.
Hello,
Thank you for using acronyms!
This would be indeed a fine addition. I do not currently have time to implement the corresponding tests and write the documentation, but your solution should work as-is. I will add this feature to the master branch in a few days.
Yeah, I would have liked to create a PR when writing the last comment, but ran out og time.
Ok, so I had a go at the PR as #5 . Documentation is missing though, but the bigger issue may be a good naming for this sorting option. My suggestion is a little lengthy.
Many thanks for the PR! You made my job a lot easier. I took the liberty of changing a bit your commits (renaming the option, fixing the test case, adding description to a commit). Unfortunately, I could not push these new commits back to the PR, so I created a new branch instead (case-insensitive). Everything seems to work, so I think I will just close your PR, merge the branch back to master, and release a new version.
Thank you again for both the idea, and the implementation/test case!
Cool. Thank you for the work.
Hi. This is a great extension!
I am using the extension as part of a report. I want to sort acronyms/glossaries and ignore if the start letter is capital or not. Is this possible?
Below is a try at illustrating the case:
The desired output would be to have to loa order like this: aA H iQt Qt
but the current sorting order is the following: H Qt aA iQt
Makes sense? Presume it's something with the lua sorting, that I don't get?