Changes

Jump to navigation Jump to search
4,503 bytes added ,  10:38, 29 January 2011
anything I forgot?
=Introduction=
[[Mark IV|MkIV]] is the current branch of the ''Context'' typesetting
environment.
As its underlying engine is supposed to be ''Luatex'', MkIV is to
a large extent implemented in ''Lua'', as opposed to the legacy MkII
which was written for Pdftex and Xetex as target engines.

As of now, documentation on the Lua guts of Context is somewhat
rare.
The definite guide is still the source code itself which,
unfortunately, tends to be undercommented in many places.
This portal-like wiki page is meant to gather links to existing
documentation on Lua programming for Context/Luatex.

=Documentation Links=
==General==
* ''Recommended reading'': current [http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf Luatex manual]];
* Luatex [http://tug.org/pipermail/luatex/ mailing list];
* Metalink to all [[:Category:Lua|Lua]] topics;
* Some additional pointers may be found browsing [[:Category:LuaTeX|Luatex]].

==Programming==
* [[Programming_in_LuaTeX|Introduction]] to Context’s interface to Lua;
* official [http://www.lua.org/docs.html Lua docs];
* [[cld|Context Lua Documents]].

==ConTeXt Lua Extensions==
Context MkIV extends the vanilla Lua libraries by some very
useful functionality.
This pertains mostly to stuff people tend to implement over and
over again because it is provided by default with other scripting
languages.
Thus, before you reimplement, say, a string stripping function
for the thousandth time – have a look at these files:

{|cellpadding="10" style="border:2px solid #addeff"
! style="background:#addeff;" | File !! Content
<!--|--->
<!--|[[source:l-aux.lua]] || only intermediary-->
|-
|[[source:l-boolean.lua|l-boolean.lua]]|| <tt>toboolean()</tt> &ndash; equivalent of <tt>tonumber()</tt> and <tt>tostring()</tt>;
|-
|[[source:l-dimen.lua|l-dimen.lua]] || Tex dimensions (accessible as ''number.*'' namespace);
|-
|[[source:l-dir.lua|l-dir.lua]] || directory handling (globbing &c., namespace: ''dir.*'');
|-
|[[source:l-file.lua|l-file.lua]] || filesystem related functions (namespace: ''file.*'');
|-
|[[source:l-io.lua|l-io.lua]] || [[Extensions_to_the_Lua_I/O_library|file/stream handling]];
|-
|[[source:l-lpeg.lua|l-lpeg.lua]] || [[String_Manipulation#l-lpeg.lua|pattern helpers]];
|-
|[[source:l-math.lua|l-math.lua]] || extra functions for the Lua ''math'' library;
|-
|[[source:l-md5.lua|l-md5.lua]] || checksum comparison, loading and saving;
|-
|[[source:l-number.lua|l-number.lua]] || additions to the ''number.*'' namespace &ndash; bitset handling;
|-
|[[source:l-os.lua|l-os.lua]] || additions to the ''os.*'' library, platform initialization;
|-
|[[source:l-pdfview.lua|l-pdfview.lua]]|| <tt>--autopdf</tt> handling of ''mtxrun'';
|-
|[[source:l-set.lua|l-set.lua]] || set handling (''set.*'' namespace);
|-
|[[source:l-string.lua|l-string.lua]] || [[String_Manipulation#l-string.lua|string manipulation]];
|-
|[[source:l-table.lua|l-table.lua]] || [[table manipulation]];
|-
|[[source:l-unicode.lua|l-unicode.lua]]|| extensions to the ''sln-unicode'' lib, converters for character encodings;
|-
|[[source:l-url.lua|l-url.lua]] || URI matching (namespace: ''url.*''; also a nice tutorial on lpeg).
<!--|[[source:l-utils.lua|l-utils.lua]] || only intermediary-->
<!--|[[source:l-xml.lua|l-xml.lua]] || only intermediary-->
|+ style="font-style:italic; font-size:83.3333%;" | Lua Library Extensions.
|}

=Further Links=
Places worth a visit when hunting for answers.
==General==
* http://www.luatex.org &ndash; the Luatex homepage;
* http://www.lua.org &ndash; the Lua homepage;
* http://www.ntg.nl/pipermail/ntg-context/ &ndash; the Context list archives;
* http://lua-users.org/lists/lua-l &ndash; ''lua-l'', the Lua list;
* http://tex.stackexchange.com &ndash; some Questions might be answered here;
* '''[DE]''' http://www.luatex.de &ndash; Patrick’s blog.

==Luatex Libs==
* http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html &ndash; Roberto’s ''lpeg''-page;
* http://www.keplerproject.org/luazip/ &ndash; Luazip;
* http://keplerproject.github.com/luafilesystem/ &ndash; Luafs;
* http://www.keplerproject.org/md5/ &ndash; Lua-md5;
* http://w3.impa.br/~diego/software/luasocket/ &ndash; LuaSocket.

==Miscellanea==
* Context may please everyone, but still it can’t hurt to occasionally visit the [http://news.gmane.org/gmane.comp.tex.lualatex.devel lualatex mailing list].

[[Category:Lua]]
[[Category:LuaTeX]]

<!-- vim:fo=cot:tw=65:sw=2:ts=2 -->
188

edits

Navigation menu