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

LaTeX template: babel changes. #10596

Merged
merged 1 commit into from
Feb 9, 2025
Merged

LaTeX template: babel changes. #10596

merged 1 commit into from
Feb 9, 2025

Conversation

jgm
Copy link
Owner

@jgm jgm commented Feb 5, 2025

Closes #8283.

  • Add babel languages to global options.
  • Remove languages in \usepackage{babel}.
  • Remove \babelprovide commands.
  • Add babeloptions variable.

The LaTeX writer will give a default babeloptions that makes sense given the main language. If the main language is not well supported in "traditional" babel (i.e., via an .ldx file) then provide=* will be added to the babel package options, which will load the .ini file.

This should give better results for the mostly European languages that are supported by .ldx files, while working about the same as current pandoc for other languages.

Untested and perhaps not working without manually setting babeloptions: main language English, secondary language Arabic.

Credit to @mxpiotrowski for the template changes.

@jgm jgm force-pushed the issue8283 branch 4 times, most recently from f7eb226 to aa1dd4b Compare February 8, 2025 18:44
Previously we used the `.ini` files for every language, but
for European languages these tend to provide inferior results
to the `.ldf` files used by classic Babel. Currently Babel
documentation recommends using the classic system for European
languages written in Latin and Cyrillic scripts and Vietnamese.
So the LaTeX writer and template now follow this guidance.

Main languages in the list of languages with good "classic" support
are added to global documentclass options and will be automatically
handled by Babel using the `.ldf` files.

If the main language is not in this list, the `babeloptions` variable
will be set to `provide=*`, which will cause support to be loaded from
the `.ini` file rather than an `.ldf`. So, for example, setting
`-V babeloptions=''` with a polytonic Greek document will cause the
`.ldf` support to be used instead of the `.ini`.

The default setting of this variable can be overwritten, but in most
cases the default should give good results.

Closes #8283.
@jgm jgm merged commit 9be0963 into main Feb 9, 2025
12 of 25 checks passed
@jgm jgm deleted the issue8283 branch February 9, 2025 00:51
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

Successfully merging this pull request may close these issues.

french typography rules not respected
1 participant