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

Wrong babel name: "farsi" should be "persian" #8944

Closed
frederik-elwert opened this issue Jul 7, 2023 · 0 comments
Closed

Wrong babel name: "farsi" should be "persian" #8944

frederik-elwert opened this issue Jul 7, 2023 · 0 comments
Labels

Comments

@frederik-elwert
Copy link
Contributor

Explain the problem.

I have a Markdown file with Persian text that I want to convert into PDF using LuaLaTeX:

# Persian (Farsi)

::: { lang="fa" }

> فرغ من تسوید هذه المجلّدة الداعي لصاحبها أینما کان محمود بن عليّ بن محمّد \| ابن عليّ الوندکلي وهي قریة من إحدی قری قاسان حماها الله من طوارق \| الحدثان في أوائل ربیع الأوّل من شهور سنة ثمان عشر وسبعمائة \| وقد کتب من نسخة سقیمة کثیرة التصحیفات قلیلة التصحیحات \| والکاتب في أیدي الزمان أسیر و في قید الهوان کسیر \| ومع ذلك لا یقدر علی إدراك معانیها وإبدال ألفاظها وقد \| استمسك بالعروة الوثقی أعني ألطاف المولی أن یبلّ (؟) عليّ \| ذیل الإغماض وإلّا فاقض ما أنت قاض فإنّه قد بلغت نفسي \| بأقصی غایة جهدها ولا یکلّف الله نفساً إلّا وسعها \| وصلّی الله علی خیر الأخیار محمّد وصحبه الأبرار.

:::

This is the command and output:

$ pandoc -o minimal.pdf --pdf-engine lualatex minimal.md 
Error producing PDF.
! Package babel Error: There is no ini file for the requested language
(babel)                (: farsi). Perhaps you misspelled it or your
(babel)                installation is not complete..

See the babel package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.49 \babelprovide[import]{farsi}

The problem seems to be that babel uses the name persian instead of farsi. When I export a .tex file and modify that, I can solve the issue by changing this line to \babelprovide[import]{persian} (and correspondingly \begin{otherlanguage}{persian}) and running lualatex on that modified file.

I guess the required fix would simply be to change this line into

    fromIso "fa"  = Just "persian"

(Very recently, in May 2023, farsi was actually added as an alias for persian in babel, but this change is not yet widely available, so using persian still seems the right thing to do.)

Pandoc version?
What version of pandoc are you using, on what OS? (If it's not the latest release, please try with the latest release before reporting the issue.)

Pandoc 3.1.4 on Ubuntu 22.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant