In my LaTeX document, I want to add Urdu, Arabic and Hindi characters. I have successfully added Arabic and Urdu text like this:
\setmainlanguage{english}
\setotherlanguage{urdu}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1, Path=font/]{Scheherazade-R.ttf}
\newfontfamily\urdufont[Script=Urdu,Scale=1, Path=font/]{jameel_noori_nastaleeq.ttf}
In my document, I put Urdu and Arabic characters like this:
\texturdu{ایک سو تئیس}
\textarabic{١}
This works perfectly. Problem is that after searching a lot, I am unable to find a proper soultion for Hindi (Devangari). I have tried almost every solution found on TX.SX but non of them worked for me. Below are the solutions which I tried:
- Solution that is mentioned in link.
here is the code:
\documentclass{report}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{sanskrit}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\newfontfamily\devanagarifont[Scale=MatchUppercase]{Devanagari MT}
\newfontfamily\devtransl[Mapping=DevRom]{Times New Roman}
\begin{document}
bollywood or \foreignlanguage{sanskrit}{बॉलीवुड}
\end{document}
- The solution mentioned in link.
here is the code:
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{sanskrit} %% or other languages
\newfontfamily\devanagarifont[Script=Devanagari]{Lohit Devanagari}
\begin{document}
The main text is in English, and you can add sanskrit quote...
\begin{sanskrit}
सर्वधर्मान् परित्यज्य मामेकं शरणं व्र्ज
अहं त्वां सर्वपापेभ्यो मोक्षयिष्यामि मा शुचः
\end{sanskrit}
\end{document}\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{sanskrit} %% or other languages
\newfontfamily\devanagarifont[Script=Devanagari]{Lohit Devanagari}
\begin{document}
The main text is in English, and you can add sanskrit quote...
\begin{sanskrit}
सर्वधर्मान् परित्यज्य मामेकं शरणं व्र्ज
अहं त्वां सर्वपापेभ्यो मोक्षयिष्यामि मा शुचः
\end{sanskrit}
\end{document}
- I also tried to use solution in link but did not work either.
The only thing that work is using package devangari that works like this:
\documentclass{article}
\usepackage{devanagari}
\begin{document}
{\dn di"saa}
\end{document}
The problem is that when I use devagari package, my references in bibiliography starts distorting. Normally my references appears like this.
But when I add use devangari package, my references starts appearing like this.

and with this, page title "Bibliography" also disappears from document. Kindly tell me how can I add Hindi text in my document.
Note: I am using xelatex and biber.

