[texworks] Lua scripting
jerome.laurens at u-bourgogne.fr
Tue Jun 9 07:31:44 CEST 2009
Scripting is sometimes a good candidate to extend the possibilities of
an application, but care must be taken to provide a good API for that
In particular, gathering all the scripts in one script menu is not a
good idea if the scripts become numerous.
The example given by Hartmut is typically something that should not
appear in a script menu.
More precisely, the parsing of the output log file should be
automatically initiated once the typesetting process has successfully
In short, there should be an "engine" which only purpose is to typeset
the current document with latex or texexec or whatsoever and analyze
the output for possible errors.
In case of an error, a visible signal should be sent to the user (like
the red traffic light in textures™).
There also can be a tiny stop icon in front of each line where an
error occurred, and when you click or roll over this icon, the reason
appears in a small note window.
Eventually a check box in some preference pane could allow to suppress
the parsing of the log.
Extending TeXWorks with scripts is nothing but a plugin design.
Unfortunately, scripts won't do everything and other sorts of plugins
For example, configuration files used in syntax coloring are also
There should be a unique plugin design to render installation/
The user is not a configure/make fan.
Finally, lua is powerful but dangerous. TeXWorks should launch scripts
in a safe environment to avoid viruses and other kinds of malware.
More information about the texworks