Structured LOG files

Shreevatsa R shreevatsa.public at gmail.com
Thu May 9 00:19:26 CEST 2019


One thing that helps is to set max_print_line really high, something like
10000, and leave the line-wrapping to your terminal.

(E.g. in TeX Live one can invoke the program with `max_print_line=10000
pdflatex foo.tex`, or set it permanently with `export max_print_line=10000`
in your shell environment, or add `max_print_line = 10000` in your
`texmf.cnf` file.)

Then in your above example you could always just consistently treat (only)
the line immediately after the overfull/underfull message as the offending
line (and not look for page numbers in that line).

In general, for messages produced by some macro package, it's up to the
package to print with whatever structure it wants.

I guess you could also play some tricks like re-running TeX with and
without certain settings (e.g. setting \hfuzz really high to turn off the
overfull messages) and seeing what changes, to infer what's what.

Beyond that, there's not much you can do with the standard TeX / pdfTeX etc
programs (you'd have to modify the program itself i.e. write a new program
with a new name).



On Wed, 8 May 2019 at 02:43, Paulo Ney de Souza <pauloney at gmail.com> wrote:

> How do-able would be to make TeX write a better (more structured) LOG file?
>
> Take the example down below, where one is trying, for example, to parse
> the LOG file to check which pages have overfulls:
>
> ...
> [44]
> Underfull \hbox (badness 1895) in paragraph at lines 1699--1700
> [] []|\TU/TimesNewRoman(0)/bx/n/10 3.6.2 Conjetura de Birch y
> Swinnerton-Dyer.[
> ] \TU/TimesNewRoman(0)/m/n/10 Hemos definido el regulador
>  []
>
> [45]
> Overfull \hbox (4.49274pt too wide) in paragraph at lines 1718--1719
> []\TU/TimesNewRoman(0)/m/n/10 Gracias a esto último, podemos ahora
> expresar la
> conjetura completa (ver [][][][][]Tate [1995][][]):
>  []
>
> [46] [47] [48]
> Package microtype Info: Loading generic protrusion settings for font family
> (microtype)             `lmtt' (encoding: TU).
> (microtype)             For optimal results, create family-specific
> settings.
> (microtype)             See the microtype manual for details.
>  [49]
> ...
>
>
> It is natural to look for the "[numbers]" after the overfull, but parsing
> for things that happen in between brackets will lead you to believe the
> Overfull in line  1718--1719 is at page "1995".
>
> The "freewheelling" nature of the standard log file -- mixing page-number
> with date and other info make it almost impossible to reliably extract
> reasonable information from long log files, or to parse it automatically.
>
> Paulo Ney
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20190508/9d3a2d8c/attachment.html>


More information about the texhax mailing list