Skip to content

Commit ef86e75

Browse files
committed
Added linux configuration and fix for ctypes exception.
1 parent 2d9e29c commit ef86e75

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

LaTeX.sublime-build

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,33 @@
9797

9898
// DO NOT MESS WITH THE FOLLOWING!!!
9999
"file_regex": "^((?:.:)?[^:\n\r]*):([0-9]+):?([0-9]+)?:? (.*)$"
100+
},
101+
102+
"linux":
103+
{
104+
// Linux texification settings
105+
// -------------------------
106+
// Personalize this, IF you know what you are doing!
107+
// e.g. change 'pdflatex...' to 'xelatex...'
108+
// Refer to the documentation for latexmk
109+
//
110+
// Note: do NOT include $file or similar!!!
111+
// Only configure the compilation parameters you need, MINUS the
112+
// actual file to be compiled
113+
//
114+
// By default, latexmk is told to use pdflatex, with synctex on for
115+
// backward/forward search, forcing compilation (e.g. even if no bib file is found)
116+
// and producing pdf rather than dvi output
117+
"cmd": ["latexmk",
118+
"-e", "\\$pdflatex = 'pdflatex %O -synctex=1 %S'",
119+
"-f", "-pdf"],
120+
121+
// Paths to TeX binaries; needed as GUI apps do not inherit
122+
// the profile. MUST EXPLICITLY PRE/APPEND $PATH!
123+
// This is preconfigured for MacTeX (2009 and up I guess)
124+
"path": "$PATH:/usr/texbin",
125+
126+
// DO NOT MESS WITH THE FOLLOWING!!!
127+
"file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)"
100128
}
101129
}

makePDF.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sublime, sublime_plugin
2-
import sys, os, os.path, platform, threading, functools, ctypes
2+
import sys, os, os.path, platform, threading, functools
33
import subprocess
44
import types
55
import re
@@ -379,6 +379,8 @@ def run(self, cmd="", file_regex="", path=""):
379379
self.encoding = "UTF-8"
380380
elif s == "Windows":
381381
self.encoding = getOEMCP()
382+
elif s == "Linux":
383+
self.encoding = "UTF-8"
382384
else:
383385
sublime.error_message("Platform as yet unsupported. Sorry!")
384386
return

0 commit comments

Comments
 (0)