Tuesday, October 04, 2011

Simplest Sanskrit XeLaTeX file

Input:

\documentclass{article}
\usepackage{polyglossia}
\setmainfont[Script=Devanagari]{Nakula}

\begin{document}
Your Devanāgarī looks like this:  आसीद्राजा नलो नाम and your romanized stuff looks like this: āsīd rājā nalo nāma.  
\end{document}

Output:






You can get the Nakula font (and its twin, Sahadeva) from John Smith's website, http://bombay.indology.info

2 comments:

  1. Hi Dominik,

    Do you have a tutorial on how to configure devanagari input in ubuntu? I have the keyboard configured to input devanagari (Bolnagri and Wx) but cannot figure out the key combinations to input specific letters. Can you point me to a resource that contains this information?

    Thanks much,
    ravi

    ReplyDelete
    Replies
    1. Sorry, Ravi, no. I use Ubuntu with ibus, and it has Devanagari and standard romanization as standard built-in choices already. Lazy me.
      Best,
      Dominik

      Delete