Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
paapena padmapatramivaambhasa}

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.

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

3 Answers 3

In order to transform input such as

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

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.

share|improve this answer

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

output of the above sample

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.

share|improve this answer

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} 
share|improve this answer
    
that doesn't seem to help. My question was using the devnag package –  chandrasekhar Jan 12 '12 at 15:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.