0

{\dn m\?r\? mAtA aOr EptA ko smEp\0t.

The above code is working fine in my system well. But I don't know all the devanagari Transliteration. May I get the complete list of all devanagari Transliteration to write all the possible conjunction, alphabet, punctuation marks etc. I seen in many devanagari Transliteration format but none of them are working in my system. So can anyone suggest me the exact Transliteration for devanagari?

Ingmar
  • 6,690
  • 5
  • 26
  • 47
  • 2
    Welcome to TeX.SX! Please help us help you by providing a bit more information about your code. There are many different possibilities how to write Devanagari script using (La)TeX. I assume that you use the devanagari package. There is a manual for this package on CTAN (https://ctan.org/pkg/devanagari) which also includes a lot of information about the required input and the respective output of the different characters. – Jasper Habicht Jul 28 '21 at 09:07
  • Related: https://tex.stackexchange.com/questions/597535/how-to-generate-transliteration-of-bengali-word – Steven B. Segletes Jul 28 '21 at 09:10
  • Related: https://tex.stackexchange.com/questions/408326/using-devanagri-package-in-latex/408336#408336 – Cicada Jul 28 '21 at 10:02
  • Thanks Jasper Habicht. I have user manual for devanagari, but my system doesn't give proper results for the given symbol/ alphabet in devanagari. I using devanagari package but I don't know it's version. The format for devanagari I specified in problem is only giving right appearance, if I get it's full pattern my problem will get solve. I checked for different transliteration of devanagari but no one matches. Not only that there are also very few query, example similar to my problem. – Vyom Shastri Jul 29 '21 at 11:12
  • 1
    See also https://tex.stackexchange.com/questions/606594/i-want-to-write-devanagari-using-english-text-all-the-possible-letters-of-hindi/609125#609125 where I made a simpler-to-type velthuis-like transliteration scheme using modern toolchain of lualatex and unicode, therefore completely bypassing need to rely on and reconstruct dn method from 1991. – Cicada Aug 01 '21 at 06:17

1 Answers1

2

See the linked questions in the comments.

The exact transliteration scheme will depend on the package(s)/code being used.

For Velthuis transliteration and IAST transliteration etc under devanagari package, you may possibly look for the .map files on your system, and see the Unicode values, to-and-from (<>) - although that will be time-consuming to trace, glyph by glyph, codepoint by codepoint.

In the meantime, you can do your own transliteration method using expl3 replace function, if you have the fonts to display the deva (like Shobika, Noto Serif Devanagari, Nirmala UI, etc), and if you can run fontspec package to handle the fonts (run in xelatex; or in lualatex with Renderer=HarfBuzz font option).

Example: a \devats{} can be defined:

devats command

The core command is:

\tl_replace_all:Nnn \l_myts_tl   { #1 }   { #2}

"replace_command token_list_variable {from_string} {to_string}"

You can change the transliteration scheme to use different names/characters in the "from_string" part, if you want (e.g., typing anu instead of anudatta), but remember the general rule when doing replace: that longest strings must be replaced before shorter ones. See the MWE.

MWE

\documentclass{article}
\usepackage{xcolor}
\usepackage{fontspec}
\usepackage{multicol}
\usepackage{graphicx}

\setmainfont{Noto Serif}

\newfontfamily\fdeva[Colour=blue, Script=Devanagari, Renderer=HarfBuzz]{Noto Serif Devanagari} %=====

%------------------------------- print and run #1 \ExplSyntaxOn \tl_new:N \l_my_tl \tl_new:N \l_myts_tl

\NewDocumentCommand{\cdr}{ m }{% \tl_set:Nn \l_my_tl { #1 } { \ttfamily\color{blue} \detokenize{#1} }

\enspace $\mapsto$ \enspace

\tl_use:N \l_my_tl }%

%----- Typing shortcut \newcommand\scdvts[2]{% \tl_replace_all:Nnn \l_myts_tl { #1 } { #2} } %=== \newcommand\dodevatransts{% % \tl_replace_all:Nnn \l_myts_tl { // } { ሴ} \tl_replace_all:Nnn \l_myts_tl { / } { } % \scdvts { dcandrabvirama } { ꣴ } \scdvts { candrabvirama } { ꣳ } \scdvts { candabspace } { ꣲ } \scdvts { candrabinv } { ऀ } \scdvts { cmavagraha } { ꣱ } \scdvts { cbavagraha } { ꣷ } \scdvts { anusvara } { ं } \scdvts { ecandra- } { ऍ } \scdvts { ocandra- } { ऑ } \scdvts { avagraha } { ऽ } \scdvts { anudatta } { ॒ } \scdvts { eecandra } { ॕ } \scdvts { pushpika } { ꣸ } \scdvts { candrab } { ँ } \scdvts { visarga } { ः } \scdvts { ecandra } { ॅ } \scdvts { ocandra } { ॉ } \scdvts { acandra } { ॲ } \scdvts { siddham } { ꣼ } \scdvts { virama } { ् } \scdvts { eprish } { ॎ } \scdvts { udatta } { ॑ } \scdvts { abbrev } { ॰ } \scdvts { yheavy } { ॺ } \scdvts { filler } { ꣹ } \scdvts { jainom } { ꣽ } \scdvts { nukta } { ़ } \scdvts { grave } { ॓ } \scdvts { acute } { ॔ } \scdvts { caret } { ꣺ } \scdvts { dddh } { ड़ } \scdvts { ooe- } { ॴ } \scdvts { uue- } { ॷ } \scdvts { cmvi } { ꣰ } \scdvts { head } { ꣻ } \scdvts { aa- } { आ } \scdvts { ii- } { ई } \scdvts { uu- } { ऊ } \scdvts { ai- } { ऐ } \scdvts { au- } { औ } \scdvts { tth } { ठ } \scdvts { ddh } { ढ } \scdvts { nnn } { ऩ } \scdvts { lll } { ऴ } \scdvts { ooe } { ऻ } \scdvts { rr= } { ॄ } \scdvts { uue } { ॗ } \scdvts { khh } { ख़ } \scdvts { ghh } { ग़ } \scdvts { rr- } { ॠ } \scdvts { ll- } { ॡ } \scdvts { ll= } { ॣ } \scdvts { dot } { ॱ } \scdvts { oe- } { ॳ } \scdvts { aw- } { ॵ } \scdvts { ue- } { ॶ } \scdvts { dda } { ॸ } \scdvts { ddd } { ॾ } \scdvts { cma } { ꣪ } \scdvts { cmu } { ꣫ } \scdvts { cmk } { ꣬ } \scdvts { cmn } { ꣭ } \scdvts { cmp } { ꣮ } \scdvts { cmr } { ꣯ } \scdvts { cb2 } { ꣵ } \scdvts { cb3 } { ꣶ } \scdvts { ay- } { ꣿ } \scdvts { a= } { ऄ } \scdvts { a- } { अ } \scdvts { i- } { इ } \scdvts { u- } { उ } \scdvts { r- } { ऋ } \scdvts { l- } { ऌ } \scdvts { e= } { ऎ } \scdvts { e- } { ए } \scdvts { o= } { ऒ } \scdvts { o- } { ओ } \scdvts { kh } { ख } \scdvts { gh } { घ } \scdvts { ng } { ङ } \scdvts { ch } { छ } \scdvts { jh } { झ } \scdvts { ny } { ञ } \scdvts { tt } { ट } \scdvts { dd } { ड } \scdvts { nn } { ण } \scdvts { th } { थ } \scdvts { dh } { ध } \scdvts { ph } { फ } \scdvts { bh } { भ } \scdvts { rr } { ऱ } \scdvts { ll } { ळ } \scdvts { sh } { श } \scdvts { ss } { ष } \scdvts { oe } { ऺ } \scdvts { aa } { ा } \scdvts { ii } { ी } \scdvts { uu } { ू } \scdvts { r= } { ृ } \scdvts { e. } { ॆ } \scdvts { ai } { ै } \scdvts { o. } { ॊ } \scdvts { au } { ौ } \scdvts { aw } { ॏ } \scdvts { om } { ॐ } \scdvts { ue } { ॖ } \scdvts { rh } { ढ़ } \scdvts { yy } { य़ } \scdvts { l= } { ॢ } \scdvts { || } { ॥ } \scdvts { zh } { ॹ } \scdvts { gg } { ॻ } \scdvts { jj } { ॼ } \scdvts { gs } { ॽ } \scdvts { bb } { ॿ } \scdvts { c0 } { ꣠ } \scdvts { c1 } { ꣡ } \scdvts { c2 } { ꣢ } \scdvts { c3 } { ꣣ } \scdvts { c4 } { ꣤ } \scdvts { c5 } { ꣥ } \scdvts { c6 } { ꣦ } \scdvts { c7 } { ꣧ } \scdvts { c8 } { ꣨ } \scdvts { c9 } { ꣩ } \scdvts { ay } { ꣾ } \scdvts { k } { क } \scdvts { g } { ग } \scdvts { c } { च } \scdvts { j } { ज } \scdvts { t } { त } \scdvts { d } { द } \scdvts { n } { न } \scdvts { p } { प } \scdvts { b } { ब } \scdvts { m } { म } \scdvts { y } { य } \scdvts { r } { र } \scdvts { l } { ल } \scdvts { v } { व } \scdvts { s } { स } \scdvts { h } { ह } \scdvts { i } { ि } \scdvts { u } { ु } \scdvts { e } { े } \scdvts { o } { ो } \scdvts { q } { क़ } \scdvts { z } { ज़ } \scdvts { f } { फ़ } \scdvts { | } { । } \scdvts { 0 } { ০ } \scdvts { 1 } { ১ } \scdvts { 2 } { ২ } \scdvts { 3 } { ৩ } \scdvts { 4 } { ৪ } \scdvts { 5 } { ৫ } \scdvts { 6 } { ৬ } \scdvts { 7 } { ৭ } \scdvts { 8 } { ৮ } \scdvts { 9 } { ৯ } % \tl_replace_all:Nnn \l_myts_tl { ሴ} { / } \tl_replace_all:Nnn \l_myts_tl { a } { } }

%===== \NewDocumentCommand { \devats } { m } { \devatransts {#1} } \NewDocumentCommand { \devatransts } { m } {% \tl_set:Nn \l_myts_tl { #1 } \dodevatransts \tl_use:N \l_myts_tl }

%---- Environments

\NewDocumentEnvironment{devatranstse}{ O{\fdeva} +b } { #1 \tl_set:Nn \l_myts_tl { #2 } \dodevatransts \tl_use:N \l_myts_tl } { }

\ExplSyntaxOff

\newcommand\dv[1]{\noindent\cdr{\devats{#1}}\par}

\begin{document}

\section{Sample}

\subsection{Typing Shortcuts}

{\fdeva \begin{multicols}{2} \dv{candrabinv} \dv{candrab} \dv{anusvara} \dv{visarga} \dv{a=} \dv{a-} \dv{aa-} \dv{i-} \dv{ii-} \dv{u-} \dv{uu-} \dv{r-} \dv{l-} \dv{ecandra-} \dv{e=} \dv{e-} \dv{ai-} \dv{ocandra-} \dv{o=} \dv{o-} \dv{au-} \dv{k} \dv{kh} \dv{g} \dv{gh} \dv{ng} \dv{c} \dv{ch} \dv{j} \dv{jh} \dv{ny} \dv{tt} \dv{tth} \dv{dd} \dv{ddh} \dv{nn} \dv{t} \dv{th} \dv{d} \dv{dh} \dv{n} \dv{nnn} \dv{p} \dv{ph} \dv{b} \dv{bh} \dv{m} \dv{y} \dv{r} \dv{rr} \dv{l} \dv{ll} \dv{lll} \dv{v} \dv{sh} \dv{ss} \dv{s} \dv{h} \dv{oe} \dv{ooe} \dv{nukta} \dv{avagraha} \dv{aa} \dv{i} \dv{ii} \dv{u} \dv{uu} \dv{r=} \dv{rr=} \dv{ecandra} \dv{e.} \dv{e} \dv{ai} \dv{ocandra} \dv{o.} \dv{o} \dv{au} \dv{virama} \dv{eprish} \dv{aw} \dv{om} \dv{udatta} \dv{anudatta} \dv{grave} \dv{acute} \dv{eecandra} \dv{ue} \dv{uue} \dv{q} \dv{khh} \dv{ghh} \dv{z} \dv{dddh} \dv{rh} \dv{f} \dv{yy} \dv{rr-} \dv{ll-} \dv{l=} \dv{ll=} \dv{|} \dv{||} \dv{0} \dv{1} \dv{2} \dv{3} \dv{4} \dv{5} \dv{6} \dv{7} \dv{8} \dv{9} \dv{abbrev} \dv{dot} \dv{acandra} \dv{oe-} \dv{ooe-} \dv{aw-} \dv{ue-} \dv{uue-} \dv{dda} \dv{zh} \dv{yheavy} \dv{gg} \dv{jj} \dv{gs} \dv{ddd} \dv{bb} \dv{c0} \dv{c1} \dv{c2} \dv{c3} \dv{c4} \dv{c5} \dv{c6} \dv{c7} \dv{c8} \dv{c9} \dv{cma} \dv{cmu} \dv{cmk} \dv{cmn} \dv{cmp} \dv{cmr} \dv{cmvi} \dv{cmavagraha} \dv{candabspace} \dv{candrabvirama} \dv{dcandrabvirama} \dv{cb2} \dv{cb3} \dv{cbavagraha} \dv{pushpika} \dv{filler} \dv{caret} \dv{head} \dv{siddham} \dv{jainom} \dv{ay} \dv{ay-} \end{multicols} }

\section{Environments}

\noindent devatranstse:

\begin{devatranstse} klmn

/k/l/m/n \end{devatranstse}

\section{Usage} {\fdeva

\Large {\fdeva \devats{devanagari}}

{\fdeva \devats{kulviramabananas}}

\begin{multicols}{2} {\fdeva \dv{m} \dv{ma} \dv{maa} \dv{mi} \dv{mii} \dv{mu} \dv{muu} \dv{mr=} \dv{mrr=} \dv{ml=} \dv{mll=} \dv{me.} \dv{me} \dv{mai} \dv{mo.} \dv{mo} \dv{mau} \dv{moe} \dv{mooe} \dv{macandra} \dv{mecandra} \dv{meecandra} \dv{mocandra} \dv{meprish} \dv{maw} \dv{mue} \dv{muue} \dv{mudatta} \dv{manudatta} \dv{mgrave} \dv{macute} \dv{mnukta} \dv{mdot} \dv{mc0/mc1/mc2} \dv{mc3/mc4} \dv{mc5/mc6} \dv{mc7/mc8/mc9} \dv{mcma/mcmu} \dv{mcmk/mcmn} \dv{mcmp/mcmr} \dv{mcmvi} \dv{mcmavagraha} } \end{multicols}

\end{document}

Cicada
  • 10,129