[texworks] Scripting root file behaviour
Henrik Skov Midtiby
henrikmidtiby at gmail.com
Tue Apr 10 20:18:08 CEST 2012
I think you can activate the compilation of the current document with
TW.target.typeset();
Something similar should be available for all the open documents [1]
TW.app.getOpenWindows()
The idea is to get the window of the main document and trigger the
compilation from there.
There might be a better solution somewhere, but I have no knowledge of it (yet).
Best regards,
Henrik
[1] http://twscript.paulanorman.com/docs/html/TexWorksQtScripting.html?target.html
On 9 April 2012 23:36, Thomas Fehige <thomas at fehige.de> wrote:
> Hello,
>
> I'm trying to get the behaviour in TeXWorks that WinEdt offers with their
> application-wide "main file" setting. There, the root file is set (or
> un-set) once by the user and then, no matter which file you are working on,
> the typesetting command will either run the "main file" or, if none is set,
> the file in the present window.
>
> I've managed to set a global variable to contain the present file name and
> to retrieve that file name. I guess I'd also manage to save it when TW
> closes and load it again at the next start. But I have no clue how I can
> access/change the file name that is sent to the typesetting program. Any
> hints?
>
> Thank you all -- Thomas
More information about the texworks
mailing list