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 prefrences ā†’ Browse Packages ā†’ LaTeXYZā†’supportā†’Default.sublime-keymap
  • Comment out the full file. This step is necessary because otherwise LaTeXYZ would interfere with normal working of LaTeXtools.


Question on Stack overflow