5

I am new to Latex, and rather new to Sanskrit, but would like to be able to combine the two.

[edit] this might solve my issue for Linux/mac users: http://cikitsa.blogspot.ch/2010/07/how-do-i-install-romdev-mapping-for.html

[Final edit: I got it to work, see answer below ...)

     [I will try it on my Linux system, and update this post ...]

[edit] I am using Miktex and TexMaker on windows.

I have followed the following script to get started:

http://cikitsa.blogspot.ch/2013/05/xelatex-for-sanskrit-update.html

and after some time, found and installed all (i think) the necessary packages and fonts, and everything seems to be working, except to

"input in Unicode, using standard scholarly transliteration, and get Devanāgarī generated for us automatically":

Plain Unicode romanisation input, no tricks:
\mangaluni{āsīdrājā nalo nāma vīrsenasuto balī||\par }

which uses, i believe RomDev.map - which i downloaded and placed in the following folder:

C:\Program Files\MiKTeX 2.9\fonts\map

However I get this output: :

enter image description here

using mangaluni, as in the script.

When, the desired result would be only Devanagari script.

Maybe i did not install the RomDev.map file correctly, I simply put it in the map folder, are any other steps necessary, or is there something else that I have done wrong ?

Any tips would be most welcome, thanks in advance !

[edit] PS: if anyone has a link to a good chart of keyboard shortcuts for Sanskrit transliteration, that would also be welcome ... (I've google, but maybe someone has something better than what i have found ...)

badaboum
  • 135
  • Welcome to TeX.SX! I tried with the same fonts and I get the same output. On the other hand, I don't have the RomDev map file. Where did you get it? – egreg Feb 03 '17 at 21:59
  • Hi, and thanks for the welcome ! I got the Romdev.map file from here: https://github.com/somadeva/RomDev – badaboum Feb 03 '17 at 22:09
  • Re your edit, it will depend on your operating system, but most operating systems should have some kind of international keyboard layout which will allow you to add the diacritics. For example my English (UK) keyboard layout has the macron on Alt Gr + Shift + } as a dead key. So if I use Alt Gr + Shift + } and the press a, I will get ā – Au101 Feb 03 '17 at 22:16
  • You might also find it easier to get a simple Devanagari keyboard layout and input the Devanagari directly, but that would require you to write the Devanagari and the transliteration separately – Au101 Feb 03 '17 at 22:17
  • 1
    Just by the way, there is a mistake in the Sanskrit, it should be वीरसेनसुतो (vīrasenasuto) – Au101 Feb 04 '17 at 00:30
  • @Au101 Thanks for the tip, i am googling Devanagari Layouts, but would you have a good link handy – badaboum Feb 04 '17 at 00:59
  • well it really depends on your OS, but if you're on Windows it should definitely have one (the layout may be called "Hindi" (it may not be!) but that wouldn't be a problem. Small change it may be missing, maybe, ॠ or something, but you won't miss that very often :P ) – Au101 Feb 04 '17 at 01:01
  • @Au101, yes i found the ones for Hindi/Sanskrit, but am having more trouble finding one for transliteration with diacrtics, have you found one by any chance ? – badaboum Feb 04 '17 at 01:22

2 Answers2

6

I downloaded RomDev.map from https://github.com/somadeva/RomDev

Then I ran

teckit_compile -u RomDev.map

which produced the file RomDev.tec. In the same working directory, I copied the file from the blog page you're referring to and compiled it, getting, for the relevant part

enter image description here

Then I proceeded to make the files available to the TeX system. With superuser privileges I did (bash shell)

mkdir -p $(kpsewhich -var-value TEXMFLOCAL)/source/xelatex/fontmapping/somadeva
mkdir -p $(kpsewhich -var-value TEXMFLOCAL)/fonts/misc/xetex/fontmapping/somadeva
mv RomDir.map $(kpsewhich -var-value TEXMFLOCAL)/source/xelatex/fontmapping/somadeva
mv RomDir.tec $(kpsewhich -var-value TEXMFLOCAL)/fonts/misc/xetex/fontmapping/somadeva
mktexlsr

The last command is crucial and should not be forgotten. I tested again by running XeLaTeX and the output is the same as before.

Consult Create a local texmf tree in MiKTeX for doing the same within MiKTeX.

egreg
  • 1,121,712
  • Excellent. Now for bonus points, can you translate? ;) – Au101 Feb 03 '17 at 22:53
  • Hello, and thank you for your answer, I am looking into it, but it will take me a while to go through all the steps ... One Point however, I got the part you are describing (point 5) to work on my system, it is, however, the next part that doesn't work (point 6, i.e. romanized transliteration with diacritics into devanagari). – badaboum Feb 03 '17 at 22:53
  • @badaboum I added also point 6 – egreg Feb 03 '17 at 23:21
  • Thanks again, as i am new to this, it is likely that i am not understanding properly. I thought that point item[6] Plain Unicode romanisation input, no tricks: \mangaluni{āsīdrājā nalo nāma vīrsenasuto balī||\par }. \mangaluni{āsīdrājā nalo nāma vīrsenasuto balī||\par } - gives a devanagair output, like in your picture, but with a unicode input. I have also found some tips on the same blog that might help mac and linux (not windows ?) users to install the RomDev.map: http://cikitsa.blogspot.ch/2010/07/how-do-i-install-romdev-mapping-for.html – badaboum Feb 03 '17 at 23:34
  • @badaboum Ooops, forgive me, it's not you who's misunderstanding, it's me who didn't pay close enough attention when scrolling, forgive me for confusing you further – Au101 Feb 03 '17 at 23:36
  • @egreg >> forgive me for confusing you further - Don't wory, not possible :-) – badaboum Feb 03 '17 at 23:50
1

I have solved the issue, it seems. (This is the same answer as above, but for Winodws ...)

I used Teckit on Linux to compile RomDev.map to Romdev.tec (there seems to be a windows version of Teckit, but I didn't use that one, as I would also like to use TexLive with this script on linux), and placed them both in this folder:

C:\Program Files\MiKTeX 2.9\fonts\misc\xetex\fontmapping

I then went to MikTex Settings (Admin), and refreshed the FNDB, and also updated Formats (not sure if both are necessary, I am new to Latex).

And now the script works :-)

badaboum
  • 135