[texworks] A request about lpeg
st.loeffler at gmail.com
Tue Dec 23 15:46:35 CET 2014
On 16.12.2014 23:37, Christophe Devalland wrote:
> it's nice to provide lua scripts inside texworks but it would be great
> to be able to use the lpeg library (a parsing expression grammars for
> lua) in lua scripts.
Good to hear that Lua is actually used ;).
> On linux there is no problem because texworks-lua scripts use the lua
> installed by the user.
> On windows, the lua interpreter is included in texworks executable
> during compilation but without lpeg. Would it be possible you compile
> the next version with lpeg inside ? Many windows users tell me they
> can't use my package because of this library missing.
Generally, I don't want to compile in (too many) modules because it
somewhat contradicts the idea of modules (i.e., something that you can
plug in and out depending on what you need). Also, it increases the
download size with something that is probably not used by a majority of
That said, lpeg seems like a very general and useful extension in the
context of an editor such as TeXworks (providing text parsing
functionality). Therefore, I changed the build process for Lua to now
use dlls. This again somewhat contradicts the idea of having everything
in a single exe file to avoid "dll hell", but seemed the only (easy)
way. lpeg is not included by default, but a suitable dll can be
downloaded from Google Drive
> Lua 5.2 Modules). Just drop the dll in the same directory as
TeXworks.exe and lua52.dll and it should work.
Note that it should in principle be possible to use other modules as
well, but I don't know exactly about the possible compatibility issues
(e.g., does it need to be compiled with the same compiler? Does it need
to be the same Lua version?). I tried briefly with some precompiled Lua
5.1 libraries I got off the internet which caused Tw to crash.
Future Windows builds (i.e., later than r1390) should all use the new
More information about the texworks