How to Use Nomencl for Nomenclature with LaTeXTools in Sublime Text 3

nomencl is a package for making nomenclature in LaTeX. I use it a lot for my papers. If you use LaTeX on Sublime Text with LaTeXTools, as I described in How to Use LaTeX on Mac, you have to do some extra configurations to make it work.

Here is the simple methods. Just follow the following steps:

  1. Open Terminal
  2. Type in open -e .latexmkrc. The command will open the .latexmkrc file with TextEdit.

    open -e .latexmkrc
    cd ~/
    touch .latexmkrc
  3. In the .latexmkrc editor, paste in the following code:

    # Custom dependency and function for nomencl package
    add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
    sub makenlo2nls {
    system( "makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"" );
    }

Then, you are good to go.

That is it.
Cheers!

Reference:
How to make nomencl work?