0

I am looking to write the following famous verse of Srimad Bhagavad Gita in Devanagari using XeLaTex:

Karmanye vadhikaraste Ma Phaleshu Kadachana । Ma Karmaphalaheturbhurma Te Sangostvakarmani ।।

I have no idea of how to transcribe English to Devanagari fonts. Thank you.

ems
  • 1
  • "I have no idea of how to transcribe English to Devanagari fonts. Thank you." Well that really has nothing to do with TeX-LaTeX I'm afraid but what the hey – Au101 Apr 08 '17 at 00:29
  • कर्मण्येवाधिकारस्ते मा फलेषु कदाचन। मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि॥४७॥

    Karmaṇy evādhikāras te mā phaleṣu kadācana; Mā karmaphalahetur bhūr mā te saṅgo'stv akarmaṇi.

    – Au101 Apr 08 '17 at 00:29
  • You can use this or this to transliterate into Devanagari script, and you need to have installed a font that supports Devanagari (e.g. Noto Sans Devanagari or Sanskrit 2003 or Chandas), then you can use the answer here. – ShreevatsaR Apr 08 '17 at 04:44

1 Answers1

2

Your best bet is to use the fontspec package to use a suitable Devanagari Unicode font.

\usepackage{fontspec}
\newfontfamily{\SA}[Script=Devanagari]{Sanskrit2003}

It is then simply a matter of putting in the Devanagari. The way you do that is really off-topic here! I used a Devanagari keyboard layout:

\documentclass{article}
\usepackage[parfill]{parskip}

\usepackage{fontspec}
\newfontfamily{\SA}[Script=Devanagari]{Sanskrit2003}

\begin{document}

{\SA कर्मण्येवाधिकारस्ते मा फलेषु कदाचन~। \\
  मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि~॥~४७~॥}

\end{document}

enter image description here

The ~s in the Sanskrit are just non-breaking spaces to make sure that no line is broken before the daṇḍa or the double daṇḍas or anything.

Au101
  • 10,278