jgm/pandoc

LaTeX writer sets wrong/outdated locale name for polytonic Greek

ParkerRobb opened this issue · 2 comments

Explain the problem.

When specifying lang: el-polyton in a Markdown document, either in the metadata or in a div or span in the body, the LaTeX writer converts el-polyton to polutonikogreek. This is done by this line in Lang.hs:

| "polyton" `elem` vars = Just "polutonikogreek"

Combined with the default.latex template, Pandoc produces this line in the LaTeX output:

\babelprovide[main,import]{polutonikogreek}

babel no longer recognizes polutonikogreek as a locale, so PDF compilation fails:

Screenshot 2024-04-22 at 20 55 46

According to the babel documentation (p21), babel's locale name for el-polyton is now polytonicgreek. Manually replacing every instance of polutonikogreek with polytonicgreek in the LaTeX file fixes the problem and allows for successful PDF compilation.

Pandoc version?

This is reproducible in the online Pandoc sandbox by entering the following as a Markdown document, and converting to LaTeX using pandoc --from markdown --to latex --standalone --wrap=none --no-highlight:

---
lang: el-polyton
---

I discovered this on my desktop using Pandoc 3.1.12.2.

Changing this was discussed here in the context of #2727 .

jgm commented

I'll change to polytonicgreek.

@adunning looping you in, in case you have further thoughts.