Skip to content
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

Can we use babel/polyglossia hooks to avoid patching #970

Closed
moewew opened this issue Mar 2, 2020 · 7 comments
Closed

Can we use babel/polyglossia hooks to avoid patching #970

moewew opened this issue Mar 2, 2020 · 7 comments
Milestone

Comments

@moewew
Copy link
Collaborator

moewew commented Mar 2, 2020

See for example https://tex.stackexchange.com/q/529984/35864 (0691351) and Ulrike's comment https://tex.stackexchange.com/questions/529984/document-with-custom-bibliography-driver-compiling-with-babel-3-33-and-biblatex/529993?noredirect=1#comment1341156_529993.

It would be nice if we could avoid patching language selection macros. Maybe we can use existing hooks or ask for new hooks instead. Before I do that I need to understand exactly why we need to patch internal babel/polyglossia commands in the first place.

@jbezos
Copy link

jbezos commented Mar 17, 2020

It would be nice if we could avoid patching language selection macros.

Indeed. There are several hooks in babel. I'm not sure what you need, but if none of the existing hooks is useful for you, I'm willing to add a new one. Please, make a feature request. I'm working on a new version to be release in a few weeks, so I could add it.

@moewew
Copy link
Collaborator Author

moewew commented Mar 17, 2020

I'm not sure what you need, but if none of the existing hooks is useful for you, I'm willing to add a new one. Please, make a feature request. I'm working on a new version to be release in a few weeks, so I could add it.

Great! As I wrote above I'll need some time to figure out what we actually need, but once I've done that I'll be sure to open a feature request.

@moewew
Copy link
Collaborator Author

moewew commented Mar 21, 2020

I opened latex3/babel#55 with what I hope is an accurate description of what we need.

@moewew
Copy link
Collaborator Author

moewew commented Mar 21, 2020

babel hooks were surprisingly easy: 02d5064. (Plus \AddtoBabelHook has been with us for so long that we can just remove the old code without backwards compatibility problems.)

Will have to wait and see if we can get rid of \pretocmd for polyglossia as well.

@plk
Copy link
Owner

plk commented Mar 21, 2020

@moewew - that's very good news - the patching was always a bit messy

@moewew
Copy link
Collaborator Author

moewew commented Apr 4, 2020

There is a real (in the etoolbox sense) and documented hook in polyglossia now so we can avoid \pretocmd now and only need the much simpler \preto.

@moewew moewew added this to the v3.15 milestone Apr 4, 2020
@moewew moewew added the fixedindev Fixed in current DEV version label Apr 4, 2020
moewew added a commit to moewew/biblatex that referenced this issue Jun 26, 2020
switch from beforeextras to afterreset babel hook (ping back to plk#970,
02d5064)
@moewew
Copy link
Collaborator Author

moewew commented Jun 26, 2020

In db0b570 we switch from the beforeextras to the afterreset babel hook. Fingers crossed that everything still works.

@moewew moewew removed the fixedindev Fixed in current DEV version label Aug 31, 2020
@moewew moewew closed this as completed Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants