I'm new to LaTeX and I'm trying to learn it. It is very interesting. I have to type a lot of documents that contain Devnagari text, more precisely Nepali Language. How can I type it using LaTeX, so that I could make beautiful document in my own language?
-
12I recommend using XeTeX. Have a look at: Getting Started to XeTeX for Devanagari.– Stefan Kottwitz ♦Commented Dec 29, 2011 at 18:04
-
1Please let us know by a comment if the answers in the linked question solved your question too. We would close this question as a duplicate then.– Stefan Kottwitz ♦Commented Dec 29, 2011 at 18:37
-
Still looking for the solution - it would have been nice if we could natively write Nepali in tex studio without going to Sanskrit and translate it.– SL4566Commented Aug 3, 2021 at 1:08
2 Answers
You could use Charles Wikner's Sanskrit package, available from CTAN. With this package, you would enter transliterated text and it would be converted into Devanagari (it does ligatures properly if I remember correctly).
The documentation is in the file sktdoc.ps.
edit: in Debian and Ubuntu, the same package used to be available with the name "latex-sanskrit
", but was removed from the archives (I don't know the reason)
-
Stefan Kottwitz's answer (xelatex) in the comments above is better - you can type directly in Devanagari and don't have to do intermediate transliteration through the Latin script.– SameerCommented Nov 17, 2014 at 8:55
-
Some people actually need to type the transliteration -- it's used by western Sanskrit scholars, for example.– JayCommented Nov 17, 2014 at 10:54
-
1Of course, transliteration would be better for western Sanskrit scholars. But here the question refers to "my own language", so I am assuming typing directly in Devanagari would be more convenient.– SameerCommented Nov 20, 2014 at 19:42
babel
provides partial support for Nepali in XeTeX and LuaTeX, but you may need to supply the captions yourself. An example for LuaTeX is (I've used a Windows font, but you can select another font of your choice):
\documentclass{book}
\usepackage[nepali, provide=*]{babel}
\babelprovide[mapdigits]{nepali}
\babelfont{rm}[Renderer=Harfbuzz]{Sanskrit Text}
\setlocalecaption{nepali}{chapter}{अध्याय}
\begin{document}
\chapter{नेपाल}
नेपाल (आधिकारिक नाम: सङ्घीय लोकतान्त्रिक गणतन्त्र नेपाल) दक्षिण एशियाली
भूपरिवेष्ठित हिमाली राष्ट्र हो। नेपालको पूर्वी सीमाना मेची नदी देखि
पश्चिमी सीमाना महाकाली नदीसम्मको औसत लम्बाइ ८८५ किलोमिटर छ।
\end{document}