diff --git a/LaTeX.sublime-build b/LaTeX.sublime-build index e696cdbe..b6046262 100644 --- a/LaTeX.sublime-build +++ b/LaTeX.sublime-build @@ -97,5 +97,33 @@ // DO NOT MESS WITH THE FOLLOWING!!! "file_regex": "^((?:.:)?[^:\n\r]*):([0-9]+):?([0-9]+)?:? (.*)$" + }, + + "linux": + { + // Linux texification settings + // ------------------------- + // Personalize this, IF you know what you are doing! + // e.g. change 'pdflatex...' to 'xelatex...' + // Refer to the documentation for latexmk + // + // Note: do NOT include $file or similar!!! + // Only configure the compilation parameters you need, MINUS the + // actual file to be compiled + // + // By default, latexmk is told to use pdflatex, with synctex on for + // backward/forward search, forcing compilation (e.g. even if no bib file is found) + // and producing pdf rather than dvi output + "cmd": ["latexmk", + "-e", "\\$pdflatex = 'pdflatex %O -synctex=1 %S'", + "-f", "-pdf"], + + // Paths to TeX binaries; needed as GUI apps do not inherit + // the profile. MUST EXPLICITLY PRE/APPEND $PATH! + // This is preconfigured for MacTeX (2009 and up I guess) + "path": "$PATH:/usr/texbin", + + // DO NOT MESS WITH THE FOLLOWING!!! + "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)" } } diff --git a/makePDF.py b/makePDF.py index 5a144267..1e199599 100644 --- a/makePDF.py +++ b/makePDF.py @@ -1,5 +1,5 @@ import sublime, sublime_plugin -import sys, os, os.path, platform, threading, functools, ctypes +import sys, os, os.path, platform, threading, functools import subprocess import types import re @@ -379,6 +379,8 @@ def run(self, cmd="", file_regex="", path=""): self.encoding = "UTF-8" elif s == "Windows": self.encoding = getOEMCP() + elif s == "Linux": + self.encoding = "UTF-8" else: sublime.error_message("Platform as yet unsupported. Sorry!") return