[texworks] QT-Script support broken?

Jonathan Kew jfkthame at googlemail.com
Sun Jan 10 00:33:52 CET 2010


On 9 Jan 2010, at 13:26, Stefan Löffler wrote:

> Hi Peter,
> 
> On 2010-01-09 13:56, Peter Wüsten wrote:
>> either one of the last 20 revisions or so has broken QT-script
>> support, or I have unknowingly done something stupid: Jonathan's "Make
>> Emphasized" doesn't get executed anymore;
>> 
>> Is it a bug, or have I forgotten to set some newly introduced flag?
> 
> Neither of these. What has happened is that the name of two variables
> has changed:
> target -> TWTarget
> app -> TWApp
> 
> See the comments to issue 27
> (http://code.google.com/p/texworks/issues/detail?id=27) for more
> details. In particular, I've updated Jonathan's scripts
> (http://code.google.com/p/texworks/issues/detail?id=27#c24).
> 
> Before you rush ahead and put a lot of work into changing all scripts,
> I'd like to caution you that the names may change again soon (see
> http://code.google.com/p/texworks/issues/detail?id=27#c25 for details).
> Then, the names will most likely be
> target -> TW.target
> app -> TW.app.

Just to follow up on this - I have made these changes today, so the code now in the repository provides a single "TW" global to the script, with the three properties TW.target, TW.app, and TW.result (for scripts such as the LaTeX Errors hook that need to return a result to the application).

(The example scripts in the repository have been updated to use this syntax, but copies in an existing scripts folder will not be automatically updated.)

JK




More information about the texworks mailing list