[texworks] My Lua script doesn't find lpeg library
Christophe Devalland
christophe.devalland at gmail.com
Sat May 24 15:13:44 CEST 2014
2014-05-23 23:09 GMT+00:00 Reinhard Kotucha <reinhard.kotucha at web.de>:
> It shouldn't be necessary to install an external Lua.
Great !
> Doesn't TeXworks use texlua? The latter has lpeg compiled-in. And I
> strongly recommend to use texlua due to its built-in modules and extensions.
>
I have TexLive 2013 with texworks bundled.
I tried my lua script with the texlive texlua and it's OK, no problem with
require lpeg.
I don't know what lua interpreter Texworks uses.
How can I set it to texlua ?
But I need texworks API too : TW.xxx must work.
> Can you provide a minimal example which allows developers to reproduce
> the problem?
yes, I give you a "pb_lpeg.lua" to put in texworks/scripts directory.
(Don't forget to activate script langages in preferences). Call this script
and you have an error to load lpeg.
--[[TeXworksScript
Title: pb lpeg
Shortcut: F9
Description: Pb lpeg
Author: Christophe Devalland
Version: 1
Date: 2014-05-01
Script-Type: standalone
Context: TeXDocument
]]
local txt = TW.target.selection
local lpeg = require "lpeg"
> The TeXworks version number might be helpful too.
>
v 0.4.5 r.1280 (Official).
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20140524/0eaf8ccb/attachment.html>
More information about the texworks
mailing list