[OS X TeX] The metadata is in the log file
jerome.laurens at u-bourgogne.fr
Thu Sep 16 08:57:40 CEST 2004
Le 15 sept. 04, à 20:25, Joachim Kock a écrit :
> Just some more remarks on log file parsing in general ---
> sorry for being long, but I guess it is just because the
> subject interests me...
I took some time to implement smart log parsing in iTeXMac, so let me
add some very practical remarks that may enlight the problem.
>>> On 14 Sep 2004, at 6:26 AM, Joachim Kock wrote:
>>>> Curiously, when scanning the log file for input files, no
> natural language is involved --- it is only a question of
> looking for patterns that look like file names, and in each
> case ask the system if a readable file of that name exists.
The problem with recognising input files in log is mainly balancing the
"(" and ")" chars.
It works rather well but fails when some unbalanced '(' or ')' is
logged out, which really happens, when errors are found (which is the
situation where you really need log parsing).
Of course you can try to identify the situations where this happen but
I am afraid there is no unique regexp to describe them.
All we can hope is defining a limited set of regexps that catch 99% of
BTW, the original method was also scanning the log file for something
like "No pages of output" which is language dependent.
I did not use myself regexp methods (I don't how to use them in a
program), instead I wrote a dedicated parser for iTM.
I guess this might be much more efficient if we all work on regexps and
gather a shared and extensible library of regexps to define the "de
facto" log syntax.
> It is also possible to read off the format and the tex engine
> from the log file, cf. "This is e-TeXk... ... format=latex..."
> but in this case, as you point out there is a lot of dependency
> on the format of the message given by the programme. While
> this happens to work well for etex and pdftex and some other
> standard engines I have no idea of how this looks for more
> exotic engines like ConTeXt, omega, or XeTeX. (By the way,
> if you are reading this and you happen to use any of these
> three formats, I would be grateful if you would send me a
> typical log file!)
I never needed to collect this kind of information because of my
project oriented approach.
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the Macostex-archives