[texworks] My Lua script doesn't find lpeg library

Christophe Devalland christophe.devalland at gmail.com
Sun May 25 15:06:26 CEST 2014

2014-05-25 11:48 GMT+02:00 Stefan Löffler <st.loeffler at gmail.com>:

> It worked for me when installing Lua for Windows and subsequently putting
> lpeg.dll into the directory containing TeXworks.exe (this is different from
> Linux, where it worked for me when putting lpeg.so into the directory where
> the script was).

Hi Stefan,
thanks a lot for your clarifications.
For me on Linux, it works 'out of the box'. I didn't have to put lpeg.so in
the script directory.
On windows, I tried to put lua51.dll and lpeg.dll from 'lua for windows' in
the TeXWorks.exe directory and it doesn't work. Idem in the script
directory. But it's the texworks.exe built in texlive and there is a
lua52.dll file in this directory. It's perhaps the same problem you noticed
with Tw 0.5 : built with Lua5.2 in it.
I will try with the TW 0.4.5 official.

> Note, though, that while this worked for Tw 0.4.5 (which was compiled with
> Lua 5.1), it no longer works for recent Tw 0.5 (which is compiled with Lua
> 5.2). The reason for this seems to be that Lua for Windows uses Lua 5.1,
> which apparently is incompatible with Lua 5.2 used in Tw (in my tests, it
> caused Tw to crash).

The good way would be to recompile TW with lpeg in it, isn't it ? It's a
small library ; code is here :
If I have time, I will try to do that with this tutorial :

Would it be possible to include lpeg in the next release of TW windows ? If
it's an unwelcome request, sorry, forget it.
Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20140525/b97c44db/attachment.html>

More information about the texworks mailing list