MacDevnag is a Mac OS X port of the devnag preprocessor.


MacDevnag is a port to Mac OS X of the devnag command line tool, a preprocessor for the 'Devanagari for TeX' package. The original C program called devnag.c can be found on the CTAN (Comprehensive TeX Archive Network) as part of the velthuis package.

The devnag preprocessor was written by Frans J. Velthuis. Copyright (c) 1991-2016 University of Groningen, The Netherlands. It is now maintained by Zdenek Wagner (

It is designed to preprocess input files containing Sanskrit or Hindi text. In order to write Sanskrit with LaTeX using the velthuis package, you must first prepare an input file using the Velthuis transliteration system, then process this input file through the devnag preprocessor to obtain a TeX file ready for typesetting. Your input file must have a .dn extension (for instance 'myfile.dn'). The file produced by MacDevnag will have the same basename but with a .tex extension ('myfile.tex').

MacDevnag offers a very simple user interface that lets you select a dn file and process it. MacDevnag version 2.0 is based on devnag.c v2.17. It requires Mac OS X version 10.11 or greater.

How to use MacDevnag

There are several methods to choose an input file with MacDevnag: The selected file is displayed in the path control. You can then click on the Process button (or press the ⌘-P keyboard shortcut) to convert your dn file to LaTeX.


MacDevnag is scriptable which means that you can execute it from an AppleScript. It supports a process command which takes a unique text argument corresponding to the full path of the input file.
Typically, the AppleScript syntax is:
tell application ""
    process "/path/to/some/file.dn"
end tell
where you replace /path/to/some/file.dn by the appropriate path.
The application also supports the quit command.

Licence terms

MacDevnag is free software; you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Known problems

Send your comments to <>