This question on StackOverflow asks for a very specialized addition to bookdown to support the Hungarian language: rather than \ref in LaTeX, it needs \aref from the babel-magyar package (or something like that), because Hungarian has special grammatical rules for dealing with numbers.
I wrote a tiny package that monkey-patches bookdown when loaded to support @aref as well as @ref. It's a pretty fragile solution, because as soon as bookdown updates one of the patched functions, my package will also need an update. I could submit a PR to incorporate the code into the main bookdown, but I suspect there aren't really that many Hungarian users, and I doubt if the bookdown authors want to support this. And there are a lot of languages, so there are probably other specialized patches that others would want.
So what would be a good strategy for going forward with this?
This question on StackOverflow asks for a very specialized addition to
bookdownto support the Hungarian language: rather than\refin LaTeX, it needs\areffrom thebabel-magyarpackage (or something like that), because Hungarian has special grammatical rules for dealing with numbers.I wrote a tiny package that monkey-patches bookdown when loaded to support
@arefas well as@ref. It's a pretty fragile solution, because as soon asbookdownupdates one of the patched functions, my package will also need an update. I could submit a PR to incorporate the code into the mainbookdown, but I suspect there aren't really that many Hungarian users, and I doubt if thebookdownauthors want to support this. And there are a lot of languages, so there are probably other specialized patches that others would want.So what would be a good strategy for going forward with this?