TransWikia.com

How can I use wxLua in LuaLaTeX on Windows?

TeX - LaTeX Asked by SLx64 on April 5, 2021

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.

documentclass{article}
directlua{require("simpleui.lua")}
usepackage{color}

begin{document}
  {Hugecolor{ChoicewxRadioBox} Test!}
end{document}

Error:

enter image description here

simpleui.lua:

require("wx")

frame = nil

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

function main()
  frame = wx.wxFrame(wx.NULL,
                     wx.wxID_ANY,
                     "Erstellen Sie Ihr PDF-Dokument mit LuaTeX",
                     wx.wxDefaultPosition,
                     wx.wxSize(185, 85),
                     wx.wxDEFAULT_FRAME_STYLE)
  local panel = wx.wxPanel(frame, wx.wxID_ANY)
  local choices = {"blue", "red", "green"}
  local radioBox = wx.wxRadioBox(panel,
                                 wx.wxID_ANY,
                                 "Farbe",
                                 wx.wxDefaultPosition,
                                 wx.wxDefaultSize,
                                 choices, 1,wx.wxRA_SPECIFY_ROWS)
  frame:Connect(wx.wxID_ANY,
                wx.wxEVT_COMMAND_RADIOBOX_SELECTED,
                HandleEvents)
  frame:Show(true)
end

main()

wx.wxGetApp():MainLoop()

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:

http://www.dante.de/events/Archiv/dante2012/Programm/Vortraege/vortrag-meigen.pdf

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

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP