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

Overriding hyphenation rules #226

Closed
greleigh opened this issue Mar 17, 2023 · 1 comment
Closed

Overriding hyphenation rules #226

greleigh opened this issue Mar 17, 2023 · 1 comment

Comments

@greleigh
Copy link

greleigh commented Mar 17, 2023

I believe this is more of an issue with documentation, though I found great confusion in the way babel handles/ignores overrides through \babelprovide.

Example in case. Main language should be UKenglish but with USenglish hyphenations (UKenglish hyphenation rules are for “Oxford” English and are far from common British English but that’s another matter).

Expected solution based on https://latex3.github.io/babel/guides/using-babelprovide-to-modify-or-extend-locales.html would be

\documentclass{minimal}
\usepackage[UKenglish]{babel}
\babelprovide[hyphenrules=USenglish]{UKenglish} % or
% \babelprovide[hyphenrules=english]{UKenglish} % or even
% \babelprovide[hyphenrules=USenglish,main]{UKenglish}
\showhyphens{versatile acknowledge} % gives ver-sat-ile ac-know-ledge

Working solution is to load babel with nil language and set UKenglish as main language:

\documentclass{minimal}
\usepackage{babel} % load `nil` language
\babelprovide[import,hyphenrules=USenglish,main]{UKenglish} % option `import` provides \today etc.
\showhyphens{versatile acknowledge} % gives ver-sa-tile ac-knowl-edge

I could find no comparable documentation in the babel.pdf (version 3.86) for setting hyphenation patterns.

@jbezos
Copy link
Contributor

jbezos commented Mar 17, 2023

I think it’s related to #122 (comment).

@jbezos jbezos closed this as completed in ddc8fc5 Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants