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.

Critical Edition Typesetting Notes

This is how my source files currently look. There has been progress.

This is how my source file looked two years ago. What a mess! Luckily the results are the same once you compile the PDF, see below.

For my editing work, I am using XeTeX and ledmac, typeset in TeXshop on my Mac.  XeTeX is a modern incarnation of LaTeX, itself builing on TeX, that lets one type virtually any unicode script or font directly into the source file.  With the help of Somadeva Vasudeva’s handy character mapping converter, one has the advantage of typing transliterated Sanskrit into the source file and still having perfectly rendered devanāgarī on the other end.  I include the above screenshots lightheartedly, but they illustrate an important point: LaTeX may seem hopelessly complicated in the beginning, but it really isn’t; one just needs to master the basic principles.  Eventually, sooner if anyone is interested, I will post a full sample file that beginners can use as a template to typeset their own texts.  I have spoken with colleagues who type their critical apparatuses by hand in Microsoft Word.  The beautiful thing about TeX systems is that they automate almost everything so that the writer can concentrate on writing, or in this case editing.  In the top example, you can see that variant readings are called by the command \var{}.  The command \dn{} is how I tell the program to typeset the enclosed text in devanāgarī (\dnnote{} signaling the footnote sized font), and the commands \P, \prb, and \Dc are telling the program to print my predefined sigla for each manuscript.  This is all automated with keyboard shortcuts, so when I have a variant I copy the word(s) from the main text and paste it into the variant field called up at a moment’s notice with a quick shortcut stroke.  The command \p (lowercase mind you) stands for the end of a pāda, and \v for the end of the verse.  This is all the program needs to label each variant entry with the correct tag: 3c if the variant occurs in the third pāda of the third verse, and so on.  Everything in TeX is customizable, but it does get technical very quickly and I must admit that I do very little experimenting now that I have figured out the basic system.  Perhaps in a few more years I’ll be enough of a TeXpert to write my own fancy code and create that long sought after parallel edition, but now I am content to pick up the small gems offered by more experienced scholars:
Somadeva Vasudeva’s Blog has several useful entries on typesetting issues.
Daniel Stender’s Blog has a special category for LaTeX
John Smith’s programs page
Dirk-Jan Dekker: Typesetting Critical Editions with LaTeX