AG

February 13, 2022by Dr Abhinav Gupta

Previewing math equations in Sublime with custom commands.

The following latex package will allow you to do so.

The problem

When working on a LaTeX project in sublime, if I have defined custom commands with the \newcommand command, then the math preview of LaTeXTools fails to preview them in sublime. I would like to have the full preview of the equations with custom commands in sublime itself.

The solution

  • Install the package LaTeXYZ.

  • GoTo user prefrences of LaTeXYZ and set the following command to true.

    {"auto_set_preview_math_template_preamble": true}
    
  • GoTo prefrencesBrowse PackagesLaTeXYZsupportDefault.sublime-keymap

  • Comment out the full file. This step is necessary because otherwise LaTeXYZ would interfere with normal working of LaTeXtools.

Reference

Question on Stack overflow