[texworks] Show warnings and overfill boxes

Jonathan Kew jfkthame at googlemail.com
Tue Oct 20 19:12:40 CEST 2009

On 20 Oct 2009, at 17:59, Alain Delmotte wrote:

> Hi!
> Jonathan Kew a écrit :
>> The experimental (v0.3) build includes a proof-of-concept script  
>> that looks for errors in the log and displays them in a summary  
>> format; you can then (double?)click them to go to the source at  
>> that location.
> I did install the new experimental version, both using the .zip file  
> or the installer.
> None provides scripts!! At least I didn't find them!

I expect you've already got a scripts directory in your texworks  
resource folder. Like the other resource/configuration directories,  
you'll need to remove/rename that in order for the default (sample)  
scripts to get installed there on startup.

>> Getting this to be 100% reliable is a difficult problem, though,  
>> because the log output isn't really designed to be machine- 
>> readable, and it's hard to keep track of the current input file  
>> when packages or other macros could also be writing arbitrary text  
>> to the console/log at any time. (I don't believe Alain's Lua script  
>> would be reliable in this regard either.)
> My Lua script opens 3 sub windows (if necessary) in the log area,  
> one for warnings, one for errors and one for badboxes.
> In each any .tex file in a "project" is listed before the errors/bad  
> boxes/warnings arising from it.
> But the version is still 0.1r424!!

Can your script tell the location correctly if an error occurs in the  
main file, *after* a sub-file has been included (in other words, does  
it notice when the included file ends and typesetting continues in the  
main file)? At a glance, I could only see it searching for where a  
file is *entered* but not where it *ends*. This means that (for  
example) if I have a .tex document that starts by including a personal  
file of macros, subsequent errors will be reported as if they occurred  
in the macro file.

>> Running the underlying tex tools with the -file-line-error option  
>> would help somewhat, though it would still not be completely  
>> foolproof. Perhaps I'll try that once the scripting support is more  
>> mature.
> Would it be possible to have instructions on how to use, develop,  
> implement,... scripts?

Eventually..... :)


More information about the texworks mailing list