How to get devanagari numerals in xetex
or latex
– especially in enumerate environment?
I can use unicode to write devanagari text but I am unable to get devenagari numerals in section numbers, enumerate environment, etc.
Here is the basic code I am using:
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{hindi}
\setotherlanguage{english}
\setmainfont[Script=Devanagari]{Nakula}
\begin{document}
\section{Section Heading}
देवनागरी
Same English Text
१ २ ३ ४ ५ ६ ७ ८ ९ ०
\begin{enumerate}
\item This is first
\item देवनागरी
\end{enumerate}
\end{document}
And I am compiling using xetex (default set-up on Ubuntu 12.04).
Best Answer
There's currently no interface for changing all numerals to Devanagari ones. However you can define your own:
A more risky approach is to change the meaning of
\@arabic
(the internal command that represents counter with arabic digits):This would spare you from redefining all needed counter representations, but may break packages that rely on
\@arabic
.