-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose a function in Lua to generate identifiers/sort keys from UTF8 text #9591
Comments
I think that's a bit too specific and hence out of scope, especially the "remove accents" part. See this StackOverflow Q&A for a hack to generate auto-identifiers from text. |
Addendum: you might like sluaggo, it was even written specifically with pandoc Lua filters in mind. |
Thanks @tarleb for the hints. I also found issue #6415 that's related to what I'm working on. There @jgm cites his unicode-collation library, which is used in pandoc for citeproc. Though not strictly related to generating sort keys, a |
I'll note that we do have |
I need a function similar to the one that computes auto identifiers.
I need it for Lua filters/writers.
It should:
convert text to lowercase (this is already available in Lua thanks to
pandoc.text
remove accents from letters: "àéü" => "aeu"
convert multiple non-alphanumeric chars to one space or "-", or "_": "foo (11/12), bar" => "foo-11-12-bar"
In particular, I need it to automatically generate sort keys for indices.
The text was updated successfully, but these errors were encountered: