[texworks] Lua scripting

Hans Hagen pragma at wxs.nl
Thu Jun 11 10:28:38 CEST 2009

Manuel Pégourié-Gonnard wrote:
> Stefan L?ffler a ?crit :
>> Thanks, that's a good start. I'd have to transcode it to the Lua C Api,
>> but that shouldn't be too difficult. And since the scripts are run from
>> only one function I'd only have to code it once.
> You can find an example in luatex's code, eg hide_lua_value() in
> source/texk/web2c/luatexdir/lua/luastuff.c
>> Are there any other critical functions? Like command execution, or
>> something? Network/internet access?
> Here too you can look for inspiration in luatex, section 3.1.3 of the manual say
> that the following function are disabled by default in tex mode:
> library functions
> os      execute exec setenv rename remove tmpdir
> io      popen output tmpfile
> lfs     rmdir mkdir chdir lock touch
> (some of them are not standard Lua functions).

they are *enabled* by default unless --safer is provided on the command 
line; it would be rather pointless to have them disabled by default 
because then we could not enable them (if so, it would not be any 

                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the texworks mailing list