1

I am facing a weird problem. Files that compiled correctly on earlier versions of TeXLive do not work on TeXLive 2019. The problem seems to be with babel and arabic (or a modified persian).

See this example:

% !TEX TS-program = LuaLaTeX
\documentclass{article}
\usepackage[arabic]{babel}
\begin{document}
سلام.
\end{document}

gives this error:

This is LuaTeX, Version 1.10.0 (TeX Live 2019/W32TeX) 
 restricted system commands enabled.
(./x.tex
LaTeX2e <2018-12-01>

luaotfload | main : initialization completed in 0.235 seconds
(c:/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(c:/texlive/2019/texmf-dist/tex/latex/base/size10.clo))
(c:/texlive/2019/texmf-dist/tex/generic/babel/babel.sty
(c:/texlive/2019/texmf-dist/tex/generic/babel/switch.def)
(c:/texlive/2019/texmf-dist/tex/generic/babel/luababel.def)
(c:/texlive/2019/texmf-dist/tex/latex/arabi/arabic.ldf
(c:/texlive/2019/texmf-dist/tex/generic/babel/babel.def
(c:/texlive/2019/texmf-dist/tex/generic/babel/luababel.def))
Loading the definitions for the LaTeX{} Arabic encoding
(c:/texlive/2019/texmf-dist/tex/latex/arabi/laeenc.def)
Loading the Common definitions for Arabic and Farsi
(c:/texlive/2019/texmf-dist/tex/latex/arabi/arabicore.sty
  Arabi Core switching commands v1.0  2006/01/01   (may still change)  
! String contains an invalid utf-8 sequence.
l.137 \ifcase#1\or 
                 ��������� � \ \or �����������^^@�^^@^^@
? 
3
  • 1
    I have tried with LuaLaTeX from TL 2012 to 2019, always getting the same error message.
    – egreg
    Sep 17, 2019 at 17:28
  • I’d guess the default font used by lualatex doesn’t contain an Arabic script. Sep 17, 2019 at 18:42
  • arabic.ldf is from 2006 and absolutly not usable with lualatex. I don't see why it should ever have been worked with this engine. Sep 17, 2019 at 18:50

1 Answer 1

2

I gess your system use the old method with arabi that works with pdflatex, here how to use babel to write arabic with lualatex

\documentclass{article}
\usepackage[bidi=basic-r]{babel}
\babelprovide[import=ar, main]{arabic}
\babelfont{rm}{Amiri}
\begin{document}
سلام.
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .