[XeTeX] How to Convert Devanagari (sanskrit) text to Telugu Text

Neal Delmonico ndelmonico at sbcglobal.net
Wed Oct 26 20:38:35 CEST 2011


Hi AK,

After you redefine them so that they produce Telugu instead of Bengali,  
you place them in your TeX directory and run mktexlsr.

I keep mine in a subdirectory under:

/usr/local/texlive/2011/texmf-dist/fonts/misc/xelatex/fontmappings/

Then in the header of your document you put something like:

\newfontfamily\bengalifont[Script=Bengali, Mapping=RomBen]{Code2000}
\newcommand{\ben}[1]{{\bengalifont{#1}}}

Only yours will define a Telugu font and mapping.  Something like:

\newfontfamily\telugufont[Script=Telugu, Mapping=RomTelugu]{Code2000}
\newcommand{\tel}[1]{{\telugufont{#1}}}

Then wherever you want Sanskrit in Telugu script you bracket your text  
with:


\tel{

\begin{verse}

\large
vrajendranandanatvena suṣṭhu niṣṭhāmupeyayuḥ|\\
yāsāṃ bhāvasya sā mudrā sadbhaktairapi durgamā|| 4||

\normalsize
yathā lalitamādhave (6.14)

gopīnāṃ paśupendranandanajuṣo bhāvasya kastāṃ kṛtī\\
vijñātuṃ kṣamate durūhapadavīsañcāriṇaḥ prakriyām |\\
āviṣkurvati vaiṣṇavīmapi tanuṃ tasminbhujairjiṣṇubhir\\
yāsāṃ hanta caturbhiradbhutaruciṃ rāgodayaḥ kuñcati|| 5||

\large
bhujācatuṣṭayaṃ kvāpi narmaṇā darśayannapi|\\
vṛndāvaneśvarīpremṇā dvibhujaḥ kriyate hariḥ|| 6||

\normalsize
yathā

rāsārambhavidhau nilīya vasatā kuñje mṛgākṣīgaṇair\\
dṛṣṭaṃ gopayituṃ svamuddhuradhiyā yā suṣṭhu sandarśitā |\\
rādhāyāḥ praṇayasya hanta mahimā yasya śriyā rakṣituṃ\\
sā śakyā prabhaviṣṇunāpi hariṇā nāsīccaturbāhutā|| 7||

\end{verse}

}

Run your document through xeLaTex and viola! you should have the above  
Sanskrit text in Telugu script.

This at any rate is how it works for me.  It is easy for me to begin with  
Romanized transliteration.  From that I can easily go to Devanagari and  
now Bengali.  The same thing can be done starting with Devanagari instead  
of the translit, if that is the way you best enter and work with text.

Hope this helps.

Neal

On Wed, 26 Oct 2011 13:05:45 -0500, A u <akupadhyayula at gmail.com> wrote:

> Neal,
> Thanks for showing how to map the keys.
> Pardon my ignorance but how would I use these two files in my TeX file  
> to do
> the conversion. Do I need to have any software other than XeTeX?
>
>
> On Wed, Oct 26, 2011 at 11:47 AM, Neal Delmonico
> <ndelmonico at sbcglobal.net>wrote:
>
>> Greetings All,
>>
>> Here is a map and tec file that I made up in relatively short time
>> converting Roman unicode transliteration into Bengali.  I basically  
>> used the
>> RomDev map as the basis of my changes.   I thought I would experiment  
>> with
>> this based on Zdenek's recommendation for creating such a map.  After a  
>> few
>> adjustments, it seems to work pretty well.  Bengali uses the same  
>> character
>> for ba and va.  So I had to adjust the map for that.  There are several
>> remaining problems.  Several of the Bengali-specific characters did not  
>> come
>> through and I am not sure how to address that.  In this schema they need
>> some form of Roman transliteration to convert them into.  I am not sure  
>> if
>> there is a settled form of Bengali transliteration.
>>
>> Also there are two "ya" characters in Bengali.  One is the soft ya  
>> which is
>> pronounced like the ya in Sanskrit and the other is the hard ya which is
>> pronounced like ja.  Using straight replacement of unicode codes gets  
>> one
>> the hard ya.  Obviously, to represent Sanskrit in Bengali script one  
>> needs
>> the soft ya.  When I replace the hard ya with the soft ya in the map the
>> consonant conjuncts using ya stop working.  They must be built around  
>> the
>> hard ya.  I am not sure how to change this.  Something probably has to  
>> be
>> added to the map, but I am not sure what or where.
>>
>> I include the map and the tec and a sample of the output.
>>
>> Best wishes,
>>
>> Neal
>>
>>
>> On Tue, 25 Oct 2011 18:10:51 -0500, Zdenek Wagner  
>> <zdenek.wagner at gmail.com>
>> wrote:
>>
>>  2011/10/25 A u <akupadhyayula at gmail.com>:
>>>
>>>> I have a text like this, I typed using XeLatex. I want to change this
>>>> below
>>>> text to Telugu font.
>>>> तपः स्वाध्याय निरताम् तपस्वी वाग्विदाम् वरम् | \\
>>>>
>>>> नारदम् परिपप्रच्छ वाल्मीकिः मुनि पुंगवम् || १-१-१
>>>>
>>>>  You need a map containing something like:
>>>
>>> LHSName "Devanagari"
>>> RHSName "Telugu"
>>> LHSDescription "Devanagari script"
>>> RHSDescription "Telugu script"
>>> Version "1"
>>> Contact "author's contacn"
>>>
>>> pass(Unicode)
>>>
>>> U+0901 > U+0C01
>>> U+0902 > U+0C02
>>> ...
>>> U+096F > U+0C6F
>>>
>>> Then compile the file by teckit_compile. See the TECkit manual.
>>>
>>>  regards
>>>>
>>>> Aku
>>>>
>>>> On Tue, Oct 25, 2011 at 9:34 AM, Tirumurti Vasudevan
>>>> <drtvasudevan at gmail.com> wrote:
>>>>
>>>>>
>>>>> well, i am a newbie myself and dont understand your problem. could  
>>>>> you
>>>>> send a sample file?
>>>>> you want a transliteration, right?
>>>>> copy paste the text portions in the converter, get it converted.
>>>>> copy paste the sanskrit tex file into new file, replace the text
>>>>> portion,
>>>>> redefine the script and font settings, save.
>>>>> done.
>>>>>
>>>>> On Tue, Oct 25, 2011 at 6:08 PM, A u <akupadhyayula at gmail.com> wrote:
>>>>>
>>>>>>
>>>>>> Tirumurti Thanks for the link, but I have a tex file that I want to
>>>>>> convert to Telugu how can I do that
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://www.swaminathar.org/
>>>>> http://aanmikamforyouth.**blogspot.com/<http://aanmikamforyouth.blogspot.com/>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------**--------------------
>>>>> Subscriptions, Archive, and List information, etc.:
>>>>>  http://tug.org/mailman/**listinfo/xetex<http://tug.org/mailman/listinfo/xetex>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------**--------------------
>>>> Subscriptions, Archive, and List information, etc.:
>>>>  http://tug.org/mailman/**listinfo/xetex<http://tug.org/mailman/listinfo/xetex>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>>  http://tug.org/mailman/listinfo/xetex
>>
>>


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/



More information about the XeTeX mailing list