Compile Latex code using Swift
问题 I wanted to compile a .tex file using Swift. I have the following code: class FileManager { class func compileLatex(#file: String) { let task = NSTask() task.launchPath = "/usr/texbin/latexmk" task.currentDirectoryPath = (NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as! String).stringByAppendingString("/roster") task.arguments = ["-xelatex", file] task.launch() } } However, when calling FileManager.compileLatex(file: "latex.tex") I get the error 'launch