On 5-6-2010 10:19, Jaroslav Hajtmar wrote:
Hi,
I did a Lua application for ConTeXt, and now I wanted to adapt it to
work even LuaLaTeX.
On what needs to be careful? Compiling by LuaLaTeX specific messages
appear as if the Lua in LuaLaTeX didnt know some Lua commands (i.e.
split, find .... ).

On what needs to be careful generaly when programming applications for
LuaLaTeX?

In context there is quite some lua code that can be used by users for their applications. The l-*.lua files can considered to be more general libraries and most ofthat is unlikely to change (extended for sure). At some point I will make a manual for that. Of course you can always load such modules using 'require'.

Using other context lua code outside context is more tricky as it also assumes the system to be designed in a certain way. I hope to have much if that stable within the next few years. As long as one does not mess with the namespaces not much harm can be done.

I'm not following lualatex dev but i know that it uses some of the font code. The reason that this code can be shared is that it's sort of isolated and specific functionality needed is wrapped up in *-dum.lua modules. Probbably some stripping down will happen to prevent clashes etc. Here the reference is luatex-plain.tex (and luatex-fonts.tex) in the context distribution.

Also, the reverse is also tricky: lualatex speicific code is unlikely to work in context.

BTW, Sharing macro code between context and latex is non trivial either as both are different systems and developed completely independent.

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to