Hi,
As I did not suceed to make the LaTeX pIugin work with SublimeText2, I am trying to make a build system for running pdflatex on my LaTeX files.
So far it is correctly running the command pdflatex, but I would need some help for making the regex that would parse the messy log and capture the file and the line of the error.
I read both of the following help pages (that I had a hard time to find, btw)
sublimetext.info/docs/core/build_systems.html
sublimetext.info/docs/reference/ … stems.html
I don’t see how I could make a regex for a pdflatex output.
For a simple sample, with a file Main.tex including a file SubNOTWorking.tex that contains an error, and that includes before the error a file subsubWorking.tex, the ouput looks like that:
This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9)
entering extended mode
(Q:/@Documents/PathGenTechnicalDoc/main.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, afrikaans, ...], loaded.
(Q:\@Documents\PathGenTechnicalDoc\SubNOTWorking.tex
(Q:\@Documents\PathGenTechnicalDoc\SubSubWorking.tex
("C:\Progs32\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Progs32\MiKTeX 2.9\tex\latex\base\size12.clo"))
No file main.aux.
)
! Undefined control sequence.
l.12 \secddtion
{Formulae; inline vs. displayed}
?
! Emergency stop.
l.12 \secddtion
{Formulae; inline vs. displayed}
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on main.log.
[Finished]
For what I understood:
-
A ‘(’ is opened for each compiled file and closed after the compilation of this file is completed.
-
If a file includes several others, the ‘(’ of each are nested.
-
for each error, the file name is not repeated
, and the line starts with l.## with ## being the line number. -
the column is expressed by an “end of line” at the place where the error occured, so it should require to count
the number of characters before the end of line.
As memorizing and counting are two things that regex are not very good at (AFAIK), I guess I should make another program that would wrap the call to pdflatex and modify the output with a command similar to sed or awk, but I hope for someone having a simpler suggestion.
Thanks for this great tool !