Skip to content

Commit

Permalink
Added linux configuration and fix for ctypes exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
dozed committed Oct 8, 2011
1 parent 2d9e29c commit ef86e75
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions LaTeX.sublime-build
Original file line number Diff line number Diff line change
Expand Up @@ -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]*)([^\\.]+)"
}
}
4 changes: 3 additions & 1 deletion makePDF.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ef86e75

Please sign in to comment.