Wednesday, May 20, 2009

Devnagari Text Compilation in Kile

Compiling Sanskrit [Devanagari] text in Latex is easy with the Devanagari package that can be found in the Ubuntu repositories. However the input file .dn has to be processesed by the devnag preprocessor which results in the tex file which can be compiled and viewed in your favorite pdf viewer in one click by using the default keyboard shortcut 'Alt + 1' in Kile.

The preprocessing step can be integrated into Kile process by following this simple method so that everything can be a one-click process:

  1. Go to Configure
  2. Create a Tool called SansProcess
  3. In General tab --> Command = devnag
  4. Target = '%S.dn'
  5. In Advanced tab --> Type: Run outside of Kile
  6. Class: Compile
  7. Source Extension: dn
  8. Target Extension: tex
  9. State : Editor
Create another tool called SansBuild
  1. When you create this tool use the QuickBuild tool as its parent so that our Tool can get all those properties at birth.
  2. Add the SansProcess tool that we created to this tool and move it up to the top of the list.
  3. Now all we need to do is to create a keyboard shortcut to access our newly-minted tool easily.
  4. I have used 'Alt + S' on my system.
Enjoy !

Works on Kile 2.0.0 [using KDE 3.5.10]

1 comment:

Swagatika said...

Thanks, your post is helpful! I am following the steps. But I want to know how did you set the shortcut ? And, how did you create an icon for the new compilation tool SansBuild ?