Sample XeTeX/LEDMAC File

I am attaching a sample file, MinimalExample.tex, containing only one verse, for newcomers to experiment with.  To typeset it one needs to have previously downloaded all of the packages listed in the first several lines: ledmac, fancyhdr, xunicode, and SDVerseMG.sty.  The last was kindly made available by Somadeva Vasudeva in order to easily reference variants in the critical apparatus by verse number and pāda, rather than just line number.

One further procedure is necessary to have the convenience of typing the source file as unicode roman, and having the typeset version come out in Devanagari.  For this you need to install TECkit, available from SIL International.  Once you have TECKit, go to Dominik Wujastyk’s blog “Cikitsa” and see this entry.  Some of the links are now dead, but one from Somadeva Vasudeva’s blog “” is here.  Following his instructions, I hope you will be able to successfully compile the sample file.

I should also say that this is meant to work on a Mac, using the Apple font DevanagariMT.  In theory one should be able to use it on any system and simply substitute another unicode Devanāgarī font.  I welcome questions and comments, and I’ll revise the instructions if I have omitted any steps.

5 thoughts on “Sample XeTeX/LEDMAC File

  1. Thank you very much for the all in one excellent post! I am completely ignorant in TeX, LaTeX and XeTeX so what follows might be a stupid question:
    How do I convince the software to “bring up” the ligatures? The output I got in the end is devanaagarii with a lot of virama-s. Not very nice looking. 😉
    I am using XeTeX on Linux, I had to replace “Devanagari MT” font with “Sanskrit 2003”.
    Thank you in advance for the help,

  2. Not a stupid question. If you are getting all the right akṣaras, but only lack the conjuncts, it may be that the Sanskrit 2003 uses a different character to form conjuncts. The problem is probably that the TECkit mapping file is intended to work with the way DevanagariMT forms conjuncts. When I type in DevanagariMT in a word processor, I type virama to negate the short ‘a’ and then I type the next consonant. The font rendering system of Apple automatically matches that with the right conjuct. For example, if I want to type “पद्म” I switch to my Devanagari keyboard and push the keys: “padfma”, the f being for virāma.
    How do you type conjuncts with Sankrit 2003? Can you just type in a word processor or does it require Itranslator to form the conjuncts?
    Sorry I can’t give a specific answer, but I hope this helps understand a bit more of what is going on.

  3. Good, thank you. It is easier on my system to type in the unicode diacritic characters, but many people prefer Kyoto-Harvard. I tried this with my minimal example file and it worked perfectly for the Devanagari MT font, but again failed to produce any conjunct with Sanskrit 2003.

  4. A solution, I hope. Thanks to a comment by Adiere on Somdev’s blog, that the minimal example file correctly forms conjuncts with Sanskrit 2003 font if you add this to the font definition line:
    script=deva; lang=SAN
    Let us know if it works on your end too, Adrian.

Comments are closed.