[texworks] Scripts: Hooks

Paul A Norman paul.a.norman at gmail.com
Sun Oct 31 11:11:11 CET 2010


Should add that searching through    TeXDocument.cpp    I have found
these and they all work.

newFile
newFromTemplate
loadFile
AfterTypeset

Is there any way of setting more than one hook for a  script like...

// Script-Type: hook
// Hook: newFile, newFromTemplate

As newFile and newFromTemplate will often be appropriate i.e one or
the other may require the same script. I can see that I can simply
replicate the script with a different hook, but just want to try and
simplify management of it.

Paul


On 31 October 2010 22:42, Paul A Norman <paul.a.norman at gmail.com> wrote:
> Hi,
>
> Searched Wiki  but could find little on hooks yet.
> By looking into existing scripts noticed these available hooks:
>
> LoadFile
> AfterTypeset
>
> Is there one for ApplicationStart at all please?
>
> Header for script file should have this in its preamble? (replace
> LoadFile as appropriate):
>
> // Script-Type: hook
> // Hook: LoadFile
>
> Are there any other requirements / or options for the Script
> header/preamble please?
>
> TIA
> Paul
>



More information about the texworks mailing list