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.

···8<····························································

-- http://www.ntg.nl/pipermail/ntg-context/2010/054982.html
local testme = {
    "userdata", "thirddata", "moduledata", "documentdata", "parametersets",
    --"document"
}

for _,item in next, testme do
    local i = _G[item]
    if i then
        print(item, table.serialize(i))
    else
        print(item, "Nope!")
    end
end

-- Comprehensive:
--for _,k in next,table.sortedkeys(_G) do
    --print(k,_G[k])
--end

···8<····························································

(My issue is that I’m testing the lua internals of module code
without having to startup the whole big typesetting environment.
Would be much easier if everything normally accessible from
inside an mkiv session was there as well.)

Thanks for any insights, Philipp

Attachment: pgpI3YyX7CYJI.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
___________________________________________________________________________________

Reply via email to