------------------------------------------------
Bibtex.sublime-build
{ "cmd": ["bibtex", "$file_base_name"], "path": "$PATH:/usr/texbin:/usr/local/bin", "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)", "selector": "text.tex.latex" }
------------------------------------------------
CleanLatexFiles.sublime-build
{ "cmd": ["latexmk", "-C", "$file"], "path": "$PATH:/usr/texbin:/usr/local/bin", "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)", "selector": "text.tex.latex" }
------------------------------------------------
Default (OSX).sublime-keymap
[ // Run bibtex { "keys": ["super+shift+b"], "command": "run_latex_build", "args": { "build_system": "Packages/User/Bibtex.sublime-build", "reset_to": "Packages/LaTeXTools/LaTeX.sublime-build" }, "context": [ { "key": "selector", "operator": "equal", "operand": "text.tex.latex" } ] }, // Clean up LaTeX auxiliary files. { "keys": ["super+shift+c"], "command": "run_latex_build", "args": { "build_system": "Packages/User/CleanLatexFiles.sublime-build", "reset_to": "Packages/LaTeXTools/LaTeX.sublime-build" }, "context": [ { "key": "selector", "operator": "equal", "operand": "text.tex.latex" } ] } ]
------------------------------------------------
run_latex_build.py
import sublime import sublime_plugin class RunLatexBuildCommand(sublime_plugin.WindowCommand): def run(self, build_system, reset_to): self.window.run_command( "set_build_system", {"file": build_system } ) self.window.run_command( "build" ) self.window.run_command( "set_build_system", {"file": reset_to})
------------------------------------------------
See also:
http://www.latex-community.org/forum/vi ... 12&t=22763