On 10/9/2024 6:11 PM, Bruce Horrocks wrote:
On 9 Oct 2024, at 16:29, Thomas Meyer
wrote: Hello Hans and Otared,
thank you for your answers. Context can run Lua. The output then ends up somewhere in the console output between the other specifications. LuaLaTeX can execute Lua. The output is then the only one in the console. Console output was not what I wanted. However, I was naive enough to hope that the output would be in TeXShop, but that only works with pdf I think. So I am still a little helpless.
If the output went into TeXShop then it would overwrite your Lua program.
If you mean have the output go to a file and have TeXShop open that file then maybe just configure TeXShop with an “engine” that runs Lua and sends the output to a .out or .txt file. If you then open the file in a separate TeXShop window, maybe it picks up changes as they happen and displays them? (I haven’t checked for TeXShop but many programming editors can.)
I don’t think ConTeXt can run Lua without the output going to the console along with all the initialisation messages. However there is a `lua` command line app to run lua porgrams available from www.lua.org which you could install and use instead.
If you want the samelua feature sas in context, just mtxrun --script foo.lua is the way to go. (To be sure I cheched if i have lua installed at all and it's some version from 2000; i always use mtxrun because after all luametatex is also a regular lua interpreter) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------