[texworks] Scripting: Open new file with a specified name

Henrik Skov Midtiby henrikmidtiby at gmail.com
Fri Nov 4 11:38:22 CET 2011


Hi

I would like to make a script that opens a new file and save it with a
specified name.

The following approach does not work
TW.app.newFile(newfilename);

The use case I wan't to handle is the following
A new line with the following content have just been entered
\input{filethatdoesnotexist.tex}
By placing the cursor inside the curly brackets and invoking the
script, texworks should create a new file with the name
"filethatdoesnotexist.tex" in the same directory as the current file.

Any hints?

Best regards,
Henrik


More information about the texworks mailing list