# Transliteration in Devanagari

This is a follow up of my previous question.

To get sanskrit in devanagari I type

{\dn brahma.nyaadaaya karmaa.ni sa.nga.m tyaktvaa karoti ya.h | \\\ lipyate na sa


To be precise what command should I use to get the below translation of the above.

brahmaṇy ādhāya karmāṇi sańgaḿ tyaktvā karoti yaḥ lipyate na sa pāpena padma-patram ivāmbhasā

\dnnum command does nothing but exactly copies what ever I have written in English.

-
There is no preprocessor similar to devnag that does what you want, I'm afraid. –  egreg Apr 14 '12 at 21:57

As far as I know, the "devanagari" package does not have support for Roman Transliteration. You should try the outdated, yet capable sanskrit package by Charles Wikner which has full support for Devanagari and Roman Transliteration.

Here is a minimal example

\documentclass{article}
\usepackage{skt}
\setlength\parindent{0pt}
\setlength\parskip{12pt}
\begin{document}
{\Large
{\skt brahma.nyaadaaya karmaa.ni sa"nga.m tyaktvaa karoti ya.h | \\
lipyate na sa paapena padmapatramivaambhasaa }

{\sktx brahma.nyaadaaya karmaa.ni sa"nga.m tyaktvaa karoti ya.h | \\
lipyate na sa paapena padmapatramivaambhasaa }

}
\end{document}


Save the document with the extension .skt. Pre-process the document with the skt preprocessor included with the package and then run it through pdflatex ...

$skt <document>.skt$pdflatex <document>.tex


You should get an output similar to

the skt package along with full documentation can be found at http://www.ctan.org/pkg/sanskrit

NB - The skt pre-processor comes ONLY in source form and you'll have to compile it for your operating system. If you use Windows, you can either use VisualStudio (if you have it) or dowload a lightweight compiler like DJGPP which is only a few megabytes. Compiling the executable from the source file is outiside the purview of this question. If you have a problem with compiling the source, please post another question.

-

In order to transform input such as

{\dn brahma.nyaadaaya karmaa.ni sa.nga.m tyaktvaa karoti ya.h | \\\ lipyate na sa


into Devanagari, the document containing that code must be preprocessed with the devnag program and the result can then be fed to LaTeX.

There is no similar preprocessor for turning that code into a Latin alphabet transliteration of Devanagari.

-

here is one way to get Sanskrit Output. In XeTeX its really eazy, thats why I asked you before, is there a specific need for you to do the transliteration in roman text, the way you have choosen?

\documentclass[a4paper,12pt]{article}
\usepackage[left=0.15in,right=0.15in,top=0.75in,bottom=0.75in]{geometry}
\usepackage{fontspec}

\setmainfont[Script=Devanagari]{Sanskrit 2003}
\begin{document}
प्रजापति समः श्रीमान् धता रिपु निषूदनः | \\
रक्षिता जीवलोकस्य धर्मस्य परि रक्षिता||
\end{document}

-
that doesn't seem to help. My question was using the devnag package –  chandrasekhar Jan 12 '12 at 15:14