latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
124 stars 34 forks source link

locale Greek documentation fixes #220

Closed gmilde closed 1 year ago

gmilde commented 1 year ago

The documentation in https://latex3.github.io/babel/guides/locale-greek.html has some inaccuracies.

greek.ldf supports ancient Greek since version 1.9 (2014-07-20).

Please make clear the hint It is advisable, as in the example, to load explicitly the font encoding (the greek style does it if necessary, but in a non-standard way). is only valid for 8-bit TeX. Loading LGR with XeTeX/LuaTeX is not recommended.

Loading Greek "as ini", does not activate the fix for Greek UPPERCASE, where accents (except the dialytika) should be dropped. This can be fixed loading the "xgreek" or the "textalpha" packages. It will also be fixed in the LaTeX kernel by the new \MakeUppercase implementation with locales.

jbezos commented 1 year ago

greek.ldf supports ancient Greek since version 1.9 (2014-07-20).

Oops! Sorry for the slip. Documentation reflects the current state (hopefully) and the issue with \MakeUppercase is solved (I was working on it when the new casing mechanism appeared, so I put it aside).

gmilde commented 1 year ago

Documentation reflects the current state (hopefully)

Thank you for the quick fix.

Two suggestions to improve:

Minimal change:

Actually, fontSPEC is required (unless you configure the fonts with Babel which loads then loads fontspec).

Loading fontENC is not required with Xe/LuaTeX, as long as a font supporting the Greek script is configured with fontspec.

However, fontenc can be used with Xe/LuaTeX (if a user does not have a matching OpenType font with Greek support or wants to use the Latin transliteration with XeTeX, say) with some caveats (documented/tested in https://codeberg.org/milde/greek-tex/src/commit/e9f4955768fa0814c7c09bac8dbcd1803a972e65/babel-greek/test-greek-8bitcompat.tex).

Alternative change:

- \usepackage[LGR]{fontenc}
  \usepackage[greek]{babel}

- With pdftex it is advisable, as in the example, to load explicitly the
- font encoding (the greek style does it if necessary, but in a
- non-standard way). With xetex and luatex, fontspec must not be loaded.

With T1 and OT1 pre-loaded, the non-standard way of loading LGR does no longer constitute an exception that warrants extra safeguards requiring special-casing for 8-bit TeX vs. Xe/LuaTeX.