On 2011-02-16 <23:59:15>, Hans Hagen wrote:
> On 16-2-2011 11:44, Philipp Gesang wrote:
> >Hi all,
> >
> >I noticed that although mtxrun preloads some of the context libs
> >that doesn’t cover everything available during an ordinary mkiv
> >run. What would be the canonical way to load additional libs
> >like “luat-ini”&c. on demand? “environment.loadluafile()”? Can
> >this be configured globally? Is it wise to mess with “own.libs”
> >in mtxrun?
> >
> >Example: This snippet checks the global env for some tables.
> >“mtxrun --script” doesn’t find any while some of them are there
> >when processed as cld.
>
> something
>
> dofile(resolvers.findfile("yourfile.lua"))
>
> but keep in mind that most of the mkiv code depends on other code
> and often they depend on functionality that is only available when
> we're in luatex mode and not in texlua modeIn this case there were two deps. I extracted the order in which the libs are loaded by context and put it on the wiki. This isn’t a *real* dependency tree but still it can be of help when troubleshooting similar issues. <http://wiki.contextgarden.net/Running_Lua_Code_Externally#Standard_library_loading_order> Thanks for the pointer, Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
pgpwsUeIgagqq.pgp
Description: PGP signature
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___________________________________________________________________________________
