1

This question is an extension to this one. If I run the following code with LuaLaTeX, I do not get Devanagari numerals in the example's counter. Whereas I do get them with XeLaTeX.

\documentclass{article}
\usepackage{iftex}
\ifXeTeX
\usepackage{polyglossia}
\setdefaultlanguage{marathi}
\setmainfont[Script=Devanagari,Mapping=devanagarinumerals]{Shobhika}
\else
\ifLuaTeX
\usepackage{babel}
\usepackage{fontspec}
\babelprovide[mapdigits,maparabic]{marathi}
\defaultfontfeatures{Renderer=Harfbuzz,Script=Devanagari}
\babelfont{rm}{Shobhika}
\fi
\fi
\usepackage{expex}
\definelabeltype{devanagari}
{labelgen=list,labellist={अ, आ, इ, ई, उ, ऊ, ए, ऐ, ओ, औ, अं, अः},
    labelformat=A.,fullrefformat=XA,labelalign=left,labelwidth=.92em}

\begin{document}
    \lingset{labeltype=devanagari}
    \pex
    \a\begingl
    \gla रामः आम्रफलम् खादति//
    \glb राम आंबा खातो//
    \glft राम आंबा खातो.//
    \endgl
    \a\begingl
    \gla रामः आम्रफलम् खादति//
    \glb राम आंबा खातो//
    \glft राम आंबा खातो.//
    \endgl
    \xe
\end{document}

XeLaTeX changes the numbering but LuaLaTeX doesn't. Why?

PS - Code can be run with both the compilers. When you change the compiler it requires a second run.

1 Answer 1

3

There is a mistake in your code for babel and luatex. It doesn't work because your setup for babel is not equivalent to that of polyglossia. With polyglossia you are setting marathi as the main language, but not with babel. Just make marathi the main language:

\babelprovide[mapdigits, maparabic, main]{marathi}

With this simple fix in your code, the result is exactly the same in both engines: numbers are converted, and the language system for the font is correctly set.

2
  • Oops! It was so simple :P
    – Niranjan
    Jun 13, 2020 at 13:45
  • Thanks for pointing it out
    – Niranjan
    Jun 13, 2020 at 13:45

You must log in to answer this question.

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