[XeTeX] [EXT] polyglossia sanskrit and numerals

Stefan Solbrig stefan.solbrig at ur.de
Tue Dec 2 10:27:20 CET 2025


Bonjour,

> Bonjour,
> 
> I recently came across an issue with polyglossia and sanskrit: when you put
> \setdefaultlanguage{sanskrit} a "\requirepackage{devanagaridigits} is called which turns numbers in devanagari scipt.
> 
> Is there a way to avoid (or correct) this ie. I want to be able to get numerals in latin script even if the text script is in devanagari.

You can change this via an option to polyglossia:

\setmainlanguage[numerals=western]{sanskrit}
or
\setmainlanguage[numerals=devanagari]{sanskrit}

> Thank you.
> 
> PS1- What is the difference between \setdefaultlanguage{sanskrit} and \setmainlanguage{sanskrit}

None, they are copies. You will find the following line in polyglossia.sty:

\DeclareCommandCopy \setmainlanguage \setdefaultlanguage


> PS2- Where can we see all the dependencies of a command ie. be aware that  \setdefaultlanguage{sanskrit} will require devanagaridigits for instance.... I discovered this problem thanks to an error message

use xelatex (or xetex) with the -recorder option. This (and also in other tex engines) will produce a  *.fls file that lists all included files. Compare the *.fls files before and after you added a command/option.

best wishes,
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20251202/4a053607/attachment.htm>


More information about the XeTeX mailing list.