I have some problems using wxLua in LuaLateX.

This works:

lua simpleui.lua

(print instead of tex.print)

But if I try this:

lualatex wx.tex

it doesn't work.


  {\Huge\color{\ChoicewxRadioBox} Test!}


enter image description here



frame = nil

function HandleEvents(event)
  local name = event:GetEventObject():DynamicCast("wxWindow"):GetName()
  print(string.format("\\global\\def\\Choice%s{%s}", name, event:GetString()))

function main()
  frame = wx.wxFrame(wx.NULL,
                     "Erstellen Sie Ihr PDF-Dokument mit LuaTeX",
                     wx.wxSize(185, 85),
  local panel = wx.wxPanel(frame, wx.wxID_ANY)
  local choices = {"blue", "red", "green"}
  local radioBox = wx.wxRadioBox(panel,
                                 choices, 1,wx.wxRA_SPECIFY_ROWS)



The folder contains the following files:

  • lua51.dll
  • lua5.1.dll
  • simpleui.lua
  • wx.tex
  • wx.dll

I am using Lua 5.1 and LuaTeX beta-0.70.2 (MikTeX 2.9).

texlua simpleui.lua doesn't work:

enter image description here

The example is on page 24:


Edit: I was able to compile the wxlua libs on Linux and it works, but i still haven't any solution for windows.

  • 4
    Welcome to TeX.SE! The information you've provided so far is a bit sparse. What does the file simpleui.lua contain, and where is it located? Is wxLua a precompiled library? Which versions of Lua and luatex do you use? – Mico May 18 '14 at 9:09
  • 2
    I can't get wxLua to compile, so just few thoughts. What is the output when you try to run texlua simpleui.lua? This will use same interpreter as lualatex as opposed to lua, which may be different version of interpreter. Also, what about running the gui with lua, generate the document on the fly and call lalatex from here? I have a feeling that it would be easier to maintain. – michal.h21 May 19 '14 at 12:16
  • I can't get wxLua to compile on linux too. ^^ I am going to try the command and add the result to my question. There is no need to run the gui in pure lua, i just want to try, what is possible directly in lualatex. – SLx64 May 19 '14 at 18:44
  • 1
    I have a MacBook and thus can't replicate your Windows-based setup. It looks to me like lua and luatex aren't looking for compiled libraries in the same places. – Mico May 20 '14 at 5:16
  • I've tried VCLua on Windows and got the same error. I can't find the VCLua library or the source for Linux -.- – SLx64 May 20 '14 at 9:11

protected by Community May 11 '17 at 18:44

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Browse other questions tagged or ask your own question.