Please remove all occurrences of {1} in the filename. </strong></p> '''.format(filename, problematic_characters.group(0))) # Run the command passed on the command line or modified by preferences elif command == 'latexmk': engine_options = construct_engine_options(typesetting_directives, tm_engine_options, synctex) write_latexmkrc(engine, engine_options, '/tmp/latexmkrc') latexmkrc_path = "{}/config/latexmkrc".format(tm_bundle_support) command = "latexmk -pdf{} -f -r /tmp/latexmkrc -r {} {}".format( 'ps' if engine == 'latex' else '', shellquote(latexmkrc_path), shellquote(filename)) process = Popen(command, shell=True, stdout=PIPE, stdin=PIPE, stderr=STDOUT, close_fds=True, universal_newlines=True) command_parser = LaTexMkParser(process.stdout, verbose, filename) status = command_parser.parse_stream() update_marks(cache_filename, command_parser.marks) fatal_error, number_errors, number_warnings = status tex_status = process.wait() remove("/tmp/latexmkrc") if tm_autoview and number_errors < 1 and not suppress_viewer: viewer_status = run_viewer( viewer, filepath, pdffile_path, number_errors > 1 or number_warnings > 0 and tm_preferences['latexKeepLogWin'], 'pdfsync' in packages or synctex, line_number) number_runs = command_parser.number_runs elif command == 'bibtex': use_biber = exists('{}.bcf'.format(file_without_suffix)) status = (run_biber(file_without_suffix) if use_biber else
with open(cachefile, 'rb') as storage: typesetting_data = load(storage) messages = typesetting_data['messages'] notification_token = None except: # Fail silently exit(0) else: # Depending on the error the tex engine might return a log file in a # different encoding. for encoding in encodings: try: texparser = LaTexMkParser(open(logfile, encoding=encoding), verbose=False, filename=texfile) texparser.parse_stream() break except UnicodeDecodeError: continue # Sort marks by line number marks = sorted(texparser.marks, key=lambda marks: marks[1]) update_marks(cachefile, marks) messages = [ "{:<7} {}:{} — {}".format(severity.upper(), basename(filename), line, message) for (filename, line, severity, message) in marks ] if not messages: messages = [ "Could not find any messages containing line information.", "Please take a look at the log file {}.latexmk.log ".format(
engine_options = construct_engine_options(typesetting_directives, tm_engine_options, synctex) write_latexmkrc(engine, engine_options, '/tmp/latexmkrc') latexmkrc_path = "{}/config/latexmkrc".format(tm_bundle_support) command = "latexmk -pdf{} -f -r /tmp/latexmkrc -r {} {}".format( 'ps' if engine == 'latex' else '', shellquote(latexmkrc_path), shellquote(filename)) process = Popen(command, shell=True, stdout=PIPE, stdin=PIPE, stderr=STDOUT, close_fds=True, universal_newlines=True) command_parser = LaTexMkParser(process.stdout, verbose, filename) status = command_parser.parse_stream() update_marks(cache_filename, command_parser.marks) fatal_error, number_errors, number_warnings = status tex_status = process.wait() remove("/tmp/latexmkrc") if tm_autoview and number_errors < 1 and not suppress_viewer: viewer_status = run_viewer( viewer, filepath, pdffile_path, number_errors > 1 or number_warnings > 0 and tm_preferences['latexKeepLogWin'], 'pdfsync' in packages or synctex, line_number) number_runs = command_parser.number_runs elif command == 'bibtex': use_biber = exists('{}.bcf'.format(file_without_suffix)) status = (run_biber(file_without_suffix) if use_biber else run_bibtex(file_without_suffix))
# Try to read from cache with open(cachefile, 'rb') as storage: typesetting_data = load(storage) messages = typesetting_data['messages'] notification_token = None except: # Fail silently exit(0) else: # Depending on the error the tex engine might return a log file in a # different encoding. for encoding in encodings: try: texparser = LaTexMkParser(open(logfile, encoding=encoding), verbose=False, filename=texfile) texparser.parse_stream() break except UnicodeDecodeError: continue # Sort marks by line number marks = sorted(texparser.marks, key=lambda marks: marks[1]) update_marks(cachefile, marks) messages = ["{:<7} {}:{} — {}".format(severity.upper(), basename(filename), line, message) for (filename, line, severity, message) in marks] if not messages: messages = [ "Could not find any messages containing line information.", "Please take a look at the log file {}.latexmk.log ".format( basename(arguments.file)) + "to find the source of the problem."]