%D \module
%D   [       file=metatex,
%D        version=2008.10.10,
%D          title=\METATEX,
%D       subtitle=\METATEX\ Format Generation,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright=Hans Hagen / \CONTEXT\ Development Team]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This format is just a minimal layer on top of the \LUATEX\
%D engine and will not provide high level functionality. It can
%D be used as basis for dedicated (specialized) macro packages.
%D
%D A format is generated with the command;
%D
%D \starttyping
%D luatools --make --compile metatex
%D \stoptyping
%D
%D Remark: this is far from complete. We will gradually add
%D more. Also, it's not yet clean what exactly will be part
%D of it. This is a prelude to a configureable macro package.

\catcode`\{=1 \catcode`\}=2 \catcode`\#=6

\edef\metatexformat {\jobname}
\edef\metatexversion{2007.04.03 13:01}

\let\fmtname   \metatexformat
\let\fmtversion\metatexversion

\ifx\normalinput\undefined \let\normalinput\input \fi

\def\loadcorefile#1{\normalinput#1\relax}

\loadcorefile{syst-ini.tex}  % some basic commands and allocations that are expected down the line
\loadcorefile{syst-pln.tex}  % plain tex initializations of internal registers (no further code)

\loadcorefile{luat-cod.tex}  %
\loadcorefile{luat-bas.tex}  %
\loadcorefile{luat-lib.tex}  %

% needs stripping:

\loadcorefile{catc-ini.mkiv} % catcode table management
\loadcorefile{catc-act.tex}  % active character definition mechanisms
\loadcorefile{catc-def.tex}  % some generic catcode tables
\loadcorefile{catc-ctx.tex}  % a couple of context specific tables but expected by later modules
\loadcorefile{catc-sym.tex}  % some definitions related to \letter<tokens>

% helpers, maybe less

\loadcorefile{syst-aux.tex}  % a whole lot of auxiliary macros
%loadcorefile{syst-lua.tex}  % some helpers using lua instead
%loadcorefile{syst-con.mkiv} % some rather basic conversions
%loadcorefile{syst-fnt.mkiv}
%loadcorefile{syst-str.mkiv}
%loadcorefile{syst-rtp.mkiv}

% not needed

% \loadmarkfile{supp-fil}
% \loadmarkfile{supp-dir}

% characters

\loadcorefile{char-utf.tex}
\loadcorefile{char-ini.tex}
\loadcorefile{char-enc.tex} % \registerctxluafile{char-enc}{1.001}

% nodes

\loadcorefile{node-ini.tex}
%loadcorefile{node-fin.tex}
%loadcorefile{node-par.tex}

% attributes, not needed:

%loadcorefile{attr-ini.tex}

% regimes

% \loadcorefile{regi-ini.mkiv}
% \loadcorefile{regi-syn.tex}

% languages

% fonts

% \loadcorefile{enco-ini.mkiv}
% \loadcorefile{hand-ini.mkiv}

\registerctxluafile{font-ini}{1.001}

\registerctxluafile{node-fnt}{1.001}

\registerctxluafile{font-enc}{1.001}
\registerctxluafile{font-map}{1.001}
\registerctxluafile{font-syn}{1.001}
\registerctxluafile{font-tfm}{1.001}
\registerctxluafile{font-afm}{1.001}
\registerctxluafile{font-cid}{1.001}
\registerctxluafile{font-ott}{1.001}
\registerctxluafile{font-otf}{1.001}
\registerctxluafile{font-otb}{1.001}
\registerctxluafile{font-otn}{1.001}
\registerctxluafile{font-ota}{1.001}
\registerctxluafile{font-otp}{1.001}
\registerctxluafile{font-otc}{1.001}
%registerctxluafile{font-vf} {1.001}
\registerctxluafile{font-def}{1.001}
%registerctxluafile{font-ctx}{1.001}
\registerctxluafile{font-xtx}{1.001}
%registerctxluafile{font-fbk}{1.001}
%registerctxluafile{font-ext}{1.001}
\registerctxluafile{font-pat}{1.001}
%registerctxluafile{font-chk}{1.001}

%registerctxluafile{math-ini}{1.001}
%registerctxluafile{math-dim}{1.001}
%registerctxluafile{math-ent}{1.001}
%registerctxluafile{math-ext}{1.001}
%registerctxluafile{math-vfu}{1.001}
%registerctxluafile{math-map}{1.001}
%registerctxluafile{math-noa}{1.001}

\registerctxluafile{task-ini}{1.001}

%registerctxluafile{l-xml}{1.001} % needed for font database

% plain

%loadcorefile{syst-stp.tex} % stripped plain

% why not ...

\pdfoutput\plusone

% done

\errorstopmode \dump \endinput
