summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-11-29 17:00:15 +0200
committerMarius <mariausol@gmail.com>2012-11-29 17:00:15 +0200
commit5855e0bf17f2657517a87581aa1f02af0f78b020 (patch)
tree4eaf2e77fffdf58fa993b942f82d5f217a28ba9d /tex
parent20cc4cdb29f371917fc6100ee07dada22187e260 (diff)
downloadcontext-5855e0bf17f2657517a87581aa1f02af0f78b020.tar.gz
beta 2012.11.29 15:40
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/chem-str.lua11
-rw-r--r--tex/context/base/cldf-ini.mkiv14
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4142 -> 4106 bytes
-rw-r--r--tex/context/base/context-version.pngbin40593 -> 40620 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-env.mkiv18
-rw-r--r--tex/context/base/luat-cod.mkiv9
-rw-r--r--tex/context/base/luat-ini.mkiv6
-rw-r--r--tex/context/base/lxml-css.mkiv2
-rw-r--r--tex/context/base/lxml-ini.mkiv2
-rw-r--r--tex/context/base/meta-ini.mkiv17
-rw-r--r--tex/context/base/mlib-ctx.lua4
-rw-r--r--tex/context/base/mlib-pdf.mkiv1
-rw-r--r--tex/context/base/mlib-pps.lua9
-rw-r--r--tex/context/base/mlib-run.lua38
-rw-r--r--tex/context/base/mult-low.lua4
-rw-r--r--tex/context/base/s-abr-01.tex1
-rw-r--r--tex/context/base/s-inf-03.pdfbin0 -> 17034 bytes
-rw-r--r--tex/context/base/status-files.pdfbin24564 -> 24421 bytes
-rw-r--r--tex/context/base/status-lua.log340
-rw-r--r--tex/context/base/status-lua.pdfbin198959 -> 0 bytes
-rw-r--r--tex/context/base/syst-lua.mkiv3
-rw-r--r--tex/context/base/util-sql-users.lua21
-rw-r--r--tex/context/base/x-asciimath.mkiv2
-rw-r--r--tex/context/base/x-calcmath.mkiv2
-rw-r--r--tex/context/base/x-chemml.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
30 files changed, 443 insertions, 73 deletions
diff --git a/tex/context/base/chem-str.lua b/tex/context/base/chem-str.lua
index 0008616ad..c0892329f 100644
--- a/tex/context/base/chem-str.lua
+++ b/tex/context/base/chem-str.lua
@@ -17,7 +17,7 @@ if not modules then modules = { } end modules ['chem-str'] = {
-- alternative output. As a consequence it still used a stepwise graphic construction
-- approach. As we used \TEX\ for parsing, the syntax was more rigid than it is now.
-- This new variant uses a more mathematical and metapostisch approach. In the process
--- more rendering variants have been added and alignment has been automated. As a result
+-- more rendering variants have been added and alignment has been automated.. As a result
-- the current user interface is slightly different from the old one but hopefully users
-- will like the added value.
@@ -41,7 +41,7 @@ local context = context
chemistry = chemistry or { }
local chemistry = chemistry
-chemistry.instance = "metafun" -- "ppchtex"
+chemistry.instance = "chemistry"
chemistry.format = "metafun"
chemistry.structures = 0
@@ -54,7 +54,7 @@ local common_keys = {
rh = "line",
cc = "line",
ccd = "line",
- draw = "line",
+ line = "line",
dash = "line",
arrow = "line",
c = "fixed",
@@ -280,6 +280,7 @@ local pattern =
-- print(lpegmatch(pattern,"RZ13=x")) -- 1 RZ false false table x
local t_initialize = 'if unknown context_chem : input mp-chem.mpiv ; fi ;'
+local t_initialize = 'input mp-chem.mpiv ;'
local t_start_structure = 'chem_start_structure(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s);'
local t_stop_structure = 'chem_stop_structure;'
local t_start_component = 'chem_start_component;'
@@ -488,7 +489,7 @@ function chemistry.start(settings)
local width, height, scale, offset = settings.width or 0, settings.height or 0, settings.scale or "normal", settings.offset or 0
local l, r, t, b = settings.left or 0, settings.right or 0, settings.top or 0, settings.bottom or 0
--
- metacode = { t_initialize } -- no format anyway
+ metacode = { } -- no format anyway
--
if trace_structure then
report_chemistry("scale: %s, width: %s, height: %s, l: %s, r: %s, t: %s, b: %s", scale, width, height, l, r, t, b)
@@ -556,7 +557,7 @@ function chemistry.stop()
if trace_metapost then
report_chemistry("metapost code:\n%s", mpcode)
end
- metapost.graphic(chemistry.instance,chemistry.format,mpcode)
+ metapost.graphic(chemistry.instance,chemistry.format,mpcode,"","",t_initialize)
metacode = nil
end
diff --git a/tex/context/base/cldf-ini.mkiv b/tex/context/base/cldf-ini.mkiv
index 4ad31d81e..77948e058 100644
--- a/tex/context/base/cldf-ini.mkiv
+++ b/tex/context/base/cldf-ini.mkiv
@@ -31,12 +31,14 @@
%D
%D Anyway \unknown\ the following are {\em not} user commands:
-\def\cldf#1{\directlua\zerocount{_cldf_(#1)}} % global (functions)
-\def\cldn#1{\directlua\zerocount{_cldn_(#1)}} % global (nodes)
+% \zerocount removes as it's the default
-\normalprotected\def\cldprocessfile#1{\directlua\zerocount{context.runfile("#1")}}
- \def\cldcontext #1{\directlua\zerocount{context(#1)}}
- \def\cldcommand #1{\directlua\zerocount{context.#1}}
- % \def\cldverbatim #1{\directlua\zerocount{context.verbatim.#1}} % maybe make verbatim global
+\def\cldf#1{\directlua{_cldf_(#1)}} % global (functions)
+\def\cldn#1{\directlua{_cldn_(#1)}} % global (nodes)
+
+\normalprotected\def\cldprocessfile#1{\directlua{context.runfile("#1")}}
+ \def\cldcontext #1{\directlua{context(#1)}}
+ \def\cldcommand #1{\directlua{context.#1}}
+ % \def\cldverbatim #1{\directlua{context.verbatim.#1}} % maybe make verbatim global
\endinput
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 28361c247..096f09649 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.11.27 22:26}
+\newcontextversion{2012.11.29 15:40}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index ecd627942..bbcc09138 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.11.27 22:26}
+\newcontextversion{2012.11.29 15:40}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index d5335d140..4eb4e2f26 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 0645c793b..9775b0fef 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index f4eb035ee..579872eec 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.11.27 22:26}
+\edef\contextversion{2012.11.29 15:40}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 4b20e4fda..7b6493021 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.11.27 22:26}
+\edef\contextversion{2012.11.29 15:40}
%D For those who want to use this:
diff --git a/tex/context/base/core-env.mkiv b/tex/context/base/core-env.mkiv
index 38d3b1b29..e5d7792b3 100644
--- a/tex/context/base/core-env.mkiv
+++ b/tex/context/base/core-env.mkiv
@@ -103,30 +103,36 @@
% user ones
+\let\syst_mode_prefix\relax
+
\unexpanded\def\preventmode{\unprotect\syst_modes_prevent}
\unexpanded\def\enablemode {\unprotect\syst_modes_enable }
\unexpanded\def\disablemode{\unprotect\syst_modes_disable}
+\unexpanded\def\globalpreventmode{\let\syst_mode_prefix\global\unprotect\syst_modes_prevent}
+\unexpanded\def\globalenablemode {\let\syst_mode_prefix\global\unprotect\syst_modes_enable }
+\unexpanded\def\globaldisablemode{\let\syst_mode_prefix\global\unprotect\syst_modes_disable}
+
\let\definemode\disablemode % nicer
-\def\syst_modes_prevent[#1]{\protect\rawprocesscommacommand[#1]\syst_modes_prevent_indeed}
-\def\syst_modes_enable [#1]{\protect\rawprocesscommacommand[#1]\syst_modes_enable_indeed }
-\def\syst_modes_disable[#1]{\protect\rawprocesscommacommand[#1]\syst_modes_disable_indeed}
+\def\syst_modes_prevent[#1]{\protect\rawprocesscommacommand[#1]\syst_modes_prevent_indeed\let\syst_mode_prefix\relax}
+\def\syst_modes_enable [#1]{\protect\rawprocesscommacommand[#1]\syst_modes_enable_indeed \let\syst_mode_prefix\relax}
+\def\syst_modes_disable[#1]{\protect\rawprocesscommacommand[#1]\syst_modes_disable_indeed\let\syst_mode_prefix\relax}
\def\syst_modes_prevent_indeed#1%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
- \csname\??mode#1\endcsname\preventedmode}
+ \syst_mode_prefix\csname\??mode#1\endcsname\preventedmode}
\def\syst_modes_enable_indeed#1% we can speed it up by moving the new outside
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
\ifnum\csname\??mode#1\endcsname=\preventedmode \else
- \csname\??mode#1\endcsname\enabledmode
+ \syst_mode_prefix\csname\??mode#1\endcsname\enabledmode
\fi}
\def\syst_modes_disable_indeed#1%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
\ifnum\csname\??mode#1\endcsname=\preventedmode \else
- \csname\??mode#1\endcsname\disabledmode
+ \syst_mode_prefix\csname\??mode#1\endcsname\disabledmode
\fi}
% handy for mp
diff --git a/tex/context/base/luat-cod.mkiv b/tex/context/base/luat-cod.mkiv
index 9f0f9e6a8..beb631844 100644
--- a/tex/context/base/luat-cod.mkiv
+++ b/tex/context/base/luat-cod.mkiv
@@ -49,15 +49,6 @@
% we can drop the \zerocount as it's default
-% \def\ctxdirectlua {\directlua\zerocount}
-% \def\ctxlatelua {\latelua \zerocount}
-% \def\ctxsprint #1{\directlua\zerocount{tex.sprint(tex.ctxcatcodes,#1)}} % saves tokens
-% \def\ctxwrite #1{\directlua\zerocount{tex.write(#1)}} % saves tokens
-% \def\ctxcommand #1{\directlua\zerocount{commands.#1}} % saves tokens
-% \def\ctxdirectcommand#1{\directlua\zerocount{commands.#1}} % saves tokens
-% \def\ctxlatecommand #1{\latelua \zerocount{commands.#1}} % saves tokens
-% \def\ctxreport #1{\directlua\zerocount{logs.writer[[#1]]}}
-
\let\ctxdirectlua \directlua
\let\ctxlatelua \latelua
\def\ctxsprint #1{\directlua{tex.sprint(tex.ctxcatcodes,#1)}} % saves tokens
diff --git a/tex/context/base/luat-ini.mkiv b/tex/context/base/luat-ini.mkiv
index 094c4ee53..8ce5e80fd 100644
--- a/tex/context/base/luat-ini.mkiv
+++ b/tex/context/base/luat-ini.mkiv
@@ -40,7 +40,7 @@
\luat_start_lua_indeed}
\def\luat_start_lua_indeed#1\stoplua
- {\normalexpanded{\endgroup\noexpand\directlua\zerocount{#1}}}
+ {\normalexpanded{\endgroup\noexpand\directlua{#1}}} % \zerocount is default
\def\luat_start_lua_code
{\begingroup
@@ -49,7 +49,7 @@
\luat_start_lua_code_indeed}
\def\luat_start_lua_code_indeed#1\stopluacode
- {\normalexpanded{\endgroup\noexpand\directlua\zerocount{#1}}}
+ {\normalexpanded{\endgroup\noexpand\directlua{#1}}} % \zerocount is default
%D Some delayed definitions:
@@ -246,6 +246,6 @@
% use \setcatcodetable\luacatcodes instead of \obeyluatokens now.
\def\luat_lua_code
- {\normalexpanded{\endgroup\noexpand\directlua\zerocount\expandafter{\the\scratchtoks}}}
+ {\normalexpanded{\endgroup\noexpand\directlua\expandafter{\the\scratchtoks}}} % \zerocount is default
\protect \endinput
diff --git a/tex/context/base/lxml-css.mkiv b/tex/context/base/lxml-css.mkiv
index 2174874d9..79de85c08 100644
--- a/tex/context/base/lxml-css.mkiv
+++ b/tex/context/base/lxml-css.mkiv
@@ -13,7 +13,7 @@
\registerctxluafile{lxml-css}{1.001}
-\def\ctxmodulecss#1{\directlua\zerocount{moduledata.css.#1}}
+\def\ctxmodulecss#1{\ctxlua{moduledata.css.#1}}
% No stable interface yet.
diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv
index 73cd4be7e..042b22e64 100644
--- a/tex/context/base/lxml-ini.mkiv
+++ b/tex/context/base/lxml-ini.mkiv
@@ -27,7 +27,7 @@
\unprotect % todo \!!bs \!!es where handy (slower)
-\def\ctxlxml #1{\directlua\zerocount{lxml.#1}}
+\def\ctxlxml #1{\ctxlua{lxml.#1}}
\def\xmlmain #1{\ctxlxml{main("#1")}}
\def\xmlmatch #1{\ctxlxml{match("#1")}}
diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv
index d0045fe14..d023193e9 100644
--- a/tex/context/base/meta-ini.mkiv
+++ b/tex/context/base/meta-ini.mkiv
@@ -67,7 +67,7 @@
\unexpanded\def\startMPinclusions
{\dosingleempty\meta_start_inclusions}
-\def\meta_start_inclusions[#1]#2\stopMPinclusions
+\def\meta_start_inclusions[#1]#2\ stopMPinclusions
{\edef\m_meta_option{#1}%
\ifx\m_meta_option\!!plustoken \else
\global\t_meta_userinclusions\emptytoks
@@ -158,8 +158,10 @@
{\ifconditional\c_meta_include_extensions
\the\t_meta_extensions;%
\the\t_meta_userinclusions;%
- \fi
- \the\t_meta_instance;}
+ \fi}
+
+\def\meta_flush_current_instance
+ {\the\t_meta_instance;}
\def\meta_reset_current_preamble
{\ifconditional\c_meta_include_extensions
@@ -213,6 +215,7 @@
\!!bs#1;\!!es,
\!!bs\meta_flush_current_initializations;\!!es,
\!!bs\meta_flush_current_preamble;\!!es,
+ \!!bs\meta_flush_current_instance;\!!es,
"\MPaskedfigure"
)}}%
\meta_process_graphic_stop
@@ -754,9 +757,9 @@
\unexpanded\def\startMPenvironment
{\begingroup
\catcode\endoflineasciicode \ignorecatcode
- \dosingleempty\dostartMPenvironment}
+ \dosingleempty\meta_start_environment}
-\def\dostartMPenvironment[#1]#2\stopMPenvironment
+\def\meta_start_environment[#1]#2\stopMPenvironment
{\endgroup
\edef\m_meta_option{#1}
\ifx\m_meta_option\s!reset
@@ -935,10 +938,6 @@
OverlayLineWidth:=\overlaylinewidth;
%
\m_meta_colo_initializations
-% OverlayLineColor:=\MPcolor{\overlaylinecolor};
-% OverlayColor:=\MPcolor{\overlaycolor};
-% vardef OverlayLineColor=\MPcolor{\overlaylinecolor} enddef;
-% vardef OverlayColor=\MPcolor{\overlaycolor} enddef;
%
BaseLineSkip:=\the\baselineskip;
LineHeight:=\the\baselineskip;
diff --git a/tex/context/base/mlib-ctx.lua b/tex/context/base/mlib-ctx.lua
index a8ef84b80..4b1a5035d 100644
--- a/tex/context/base/mlib-ctx.lua
+++ b/tex/context/base/mlib-ctx.lua
@@ -21,9 +21,9 @@ local metapost = metapost
metapost.defaultformat = "metafun"
-function metapost.graphic(instance,mpsformat,str,initializations,preamble,askedfig)
+function metapost.graphic(instance,mpsformat,str,initializations,preamble,definitions,askedfig)
local mpx = metapost.format(instance,mpsformat or metapost.defaultformat)
- metapost.graphic_base_pass(mpx,str,initializations,preamble,askedfig)
+ metapost.graphic_base_pass(mpx,str,initializations,preamble,definitions,askedfig)
end
function metapost.getclippath(instance,mpsformat,data,initializations,preamble)
diff --git a/tex/context/base/mlib-pdf.mkiv b/tex/context/base/mlib-pdf.mkiv
index 68b4b922a..044c416a2 100644
--- a/tex/context/base/mlib-pdf.mkiv
+++ b/tex/context/base/mlib-pdf.mkiv
@@ -146,6 +146,7 @@
\!!bs#2;\!!es,
\!!bs\meta_flush_current_initializations;\!!es,
\!!bs\meta_flush_current_preamble;\!!es,
+ \!!bs\meta_flush_current_instance\!!es,
"all"
)}}%
\meta_stop_current_graphic
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index 8d8db65ae..dfa475b68 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -462,7 +462,7 @@ local function sxsy(wd,ht,dp) -- helper for text
end
local no_trial_run = "mfun_trial_run := false ;"
-local do_trial_run = "if unknown mfun_trial_run : boolean mfun_trial_run fi ; mfun_trial_run := true ;"
+local do_trial_run = "mfun_trial_run := true ;"
local text_data_template = "mfun_tt_w[%i] := %f ; mfun_tt_h[%i] := %f ; mfun_tt_d[%i] := %f ;"
local do_begin_fig = "; beginfig(1) ; "
local do_end_fig = "; endfig ;"
@@ -512,7 +512,7 @@ local function checkaskedfig(askedfig) -- return askedfig, wrappit
end
end
-function metapost.graphic_base_pass(mpsformat,str,initializations,preamble,askedfig)
+function metapost.graphic_base_pass(mpsformat,str,initializations,preamble,definitions,askedfig)
nofruns = nofruns + 1
local askedfig, wrappit = checkaskedfig(askedfig)
local done_1, done_2, forced_1, forced_2
@@ -524,13 +524,16 @@ function metapost.graphic_base_pass(mpsformat,str,initializations,preamble,asked
end
metapost.intermediate.needed = false
metapost.multipass = false -- no needed here
- current_format, current_graphic, current_initializations = mpsformat, str, initializations or ""
+ current_format = mpsformat
+ current_graphic = str
+ current_initializations = initializations or ""
if metapost.method == 1 or (metapost.method == 2 and (done_1 or done_2)) then
if trace_runs then
report_metapost("first run of job %s (asked: %s)",nofruns,tostring(askedfig))
end
-- first true means: trialrun, second true means: avoid extra run if no multipass
local flushed = metapost.process(mpsformat, {
+ definitions,
preamble,
wrappit and do_begin_fig or "",
do_trial_run,
diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua
index bccca24eb..25e74790a 100644
--- a/tex/context/base/mlib-run.lua
+++ b/tex/context/base/mlib-run.lua
@@ -35,7 +35,8 @@ local concat = table.concat
local emptystring = string.is_empty
local lpegmatch, P = lpeg.match, lpeg.P
-local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end)
+local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end)
+local trace_tracingall = false trackers.register("metapost.tracingall", function(v) trace_tracingall = v end)
local report_metapost = logs.reporter("metapost")
local texerrormessage = logs.texerrormessage
@@ -394,14 +395,34 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
mp_inp[mpx]:write(banner)
mp_log[mpx]:write(banner)
end
- if metapost.collapse and type(data) == "table" then
- if #data > 1 then
- data = concat(data,"\n")
- else
- data = data[1]
+ if type(data) == "table" then
+ -- this hack is needed because the library currently barks on \n\n
+ local n = 0
+ local nofsnippets = #data
+ for i=1,nofsnippets do
+ local d = data[i]
+ if d ~= "" then
+ n = n + 1
+ data[n] = d
+ end
+ end
+ for i=nofsnippets,n+1,-1 do
+ data[i] = nil
end
+ -- and this one because mp cannot handle snippets due to grouping issues
+ if metapost.collapse then
+ if #data > 1 then
+ data = concat(data,"\n")
+ else
+ data = data[1]
+ end
+ end
+ -- end of hacks
end
if type(data) == "table" then
+ if trace_tracingall then
+ mpx:execute("tracingall;")
+ end
for i=1,#data do
local d = data[i]
if d then
@@ -434,8 +455,11 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
end
end
else
+ if trace_tracingall then
+ data = "tracingall;" .. data
+ end
if trace_graphics then
- mp_inp:write(data)
+ mp_inp[mpx]:write(data)
end
starttiming(metapost.exectime)
result = mpx:execute(data)
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index bffdd288f..016229ce1 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -101,7 +101,9 @@ return {
"startTEXpage", "stopTEXpage",
-- "startMPpage", "stopMPpage", -- already catched by nested lexer
--
- "enablemode", "disablemode", "preventmode", "pushmode", "popmode",
+ "enablemode", "disablemode", "preventmode",
+ "globalenablemode", "globaldisablemode", "globalpreventmode",
+ "pushmode", "popmode",
--
"typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix",
--
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 87fb72863..500caa4b3 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -226,6 +226,7 @@
\logo [SGML] {sgml}
\logo [SI] {si}
\logo [SQL] {sql}
+\logo [SSD] {ssd}
\logo [SVG] {svg}
\logo [SWIG] {swig}
\logo [TABLE] {\TaBlE}
diff --git a/tex/context/base/s-inf-03.pdf b/tex/context/base/s-inf-03.pdf
new file mode 100644
index 000000000..dbe3e7b4a
--- /dev/null
+++ b/tex/context/base/s-inf-03.pdf
Binary files differ
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index f10734d6b..56adaaf8b 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log
new file mode 100644
index 000000000..748405629
--- /dev/null
+++ b/tex/context/base/status-lua.log
@@ -0,0 +1,340 @@
+(cont-yes.mkiv
+
+ConTeXt ver: 2012.11.29 15:40 MKIV fmt: 2012.11.29 int: english/english
+
+system > cont-new.mkiv loaded
+(cont-new.mkiv
+system > beware: some patches loaded from cont-new.mkiv
+)
+system > cont-loc.mkiv loaded
+(c:/data/develop/context/sources/cont-loc.mkiv
+system > beware: some patches loaded from cont-loc.mkiv
+)
+system > cont-exp.mkiv loaded
+(c:/data/develop/context/sources/cont-exp.mkiv
+system > beware: some patches loaded from cont-exp.mkiv
+)
+system > files > jobname: s-inf-03, input: s-inf-03.mkiv, result: status-lua.pdf
+fonts > latin modern fonts are not preloaded
+languages > language en is active
+(s-inf-03.mkiv (c:/data/develop/context/sources/type-loc.mkiv) (type-imp-dejavu.mkiv) (type-imp-xits.mkiv (type-imp-texgyre.mkiv)){c:/data/develop/tex-context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
+
+% begin of command line arguments
+%
+% no-parse-first-line = true
+% basepath = c:\\data\\develop\\context\\texmf/tex/context/base
+% script = true
+% result = status-lua.pdf
+% currentrun = 1
+% kindofrun = 1
+% fulljobname = ./s-inf-03.mkiv
+% purgeall = true
+% input = ./s-inf-03.mkiv
+%
+% end of command line arguments
+
+% begin of command line files
+%
+% 1 ./s-inf-03.mkiv
+%
+% end of command line files
+
+ (virtual://buffer.noname.1
+references > unknown reference [][1]
+references > unknown reference [][attributes]
+references > unknown reference [][backends]
+references > unknown reference [][bibtex]
+references > unknown reference [][blobs]
+references > unknown reference [][boolean]
+references > unknown reference [][buffers]
+references > unknown reference [][builders]
+references > unknown reference [][caches]
+references > unknown reference [][callback]
+references > unknown reference [][callbacks]
+references > unknown reference [][catcodes]
+references > unknown reference [][characters]
+references > unknown reference [][chemistry]
+references > unknown reference [][commands]
+references > unknown reference [][containers]
+references > unknown reference [][context]
+references > unknown reference [][converters]
+references > unknown reference [][coroutine]
+references > unknown reference [][ctxrunner]
+references > unknown reference [][debug]
+references > unknown reference [][dir]
+references > unknown reference [][directives]
+references > unknown reference [][document]
+references > unknown reference [][documentdata]
+references > unknown reference [][environment]
+references > unknown reference [][epdf]
+references > unknown reference [][experiments]
+references > unknown reference [][figures]
+references > unknown reference [][file]
+references > unknown reference [][floats]
+references > unknown reference [][font]
+references > unknown reference [][fontloader]
+references > unknown reference [][fonts]
+references > unknown reference [][functions]
+references > unknown reference [][graphics]
+references > unknown reference [][gzip]
+references > unknown reference [][img]
+references > unknown reference [][interactions]
+references > unknown reference [][interfaces]
+references > unknown reference [][io]
+references > unknown reference [][jit]
+references > unknown reference [][job]
+references > unknown reference [][lang]
+references > unknown reference [][languages]
+references > unknown reference [][layouts]
+references > unknown reference [][lfs]
+references > unknown reference [][libraries]
+references > unknown reference [][lmx]
+references > unknown reference [][logs]
+references > unknown reference [][lpdf]
+references > unknown reference [][lpeg]
+references > unknown reference [][ltn12]
+references > unknown reference [][lua]
+references > unknown reference [][luatex]
+references > unknown reference [][lxml]
+references > unknown reference [][math]
+references > unknown reference [][mathematics]
+references > unknown reference [][md5]
+references > unknown reference [][metapost]
+references > unknown reference [][mime]
+references > unknown reference [][moduledata]
+references > unknown reference [][modules]
+references > unknown reference [][mplib]
+references > unknown reference [][noads]
+references > unknown reference [][node]
+references > unknown reference [][nodes]
+references > unknown reference [][number]
+references > unknown reference [][os]
+references > unknown reference [][package]
+references > unknown reference [][pagebuilders]
+references > unknown reference [][parametersets]
+references > unknown reference [][pdf]
+references > unknown reference [][physics]
+references > unknown reference [][profiler]
+references > unknown reference [][regimes]
+references > unknown reference [][resolvers]
+references > unknown reference [][scripts]
+references > unknown reference [][set]
+references > unknown reference [][socket]
+references > unknown reference [][sorters]
+references > unknown reference [][statistics]
+references > unknown reference [][status]
+references > unknown reference [][storage]
+references > unknown reference [][streams]
+references > unknown reference [][string]
+references > unknown reference [][structures]
+references > unknown reference [][table]
+references > unknown reference [][tex]
+references > unknown reference [][texconfig]
+references > unknown reference [][texio]
+references > unknown reference [][token]
+references > unknown reference [][tokens]
+references > unknown reference [][tracers]
+references > unknown reference [][trackers]
+references > unknown reference [][typesetters]
+references > unknown reference [][unicode]
+references > unknown reference [][url]
+references > unknown reference [][utilities]
+references > unknown reference [][vf]
+references > unknown reference [][visualizers]
+references > unknown reference [][xml]
+references > unknown reference [][zip]
+references > unknown reference [][zlib]
+)
+backend > xmp > using file 'lpdf-pdx.xml'
+pages > flushing realpage 1, userpage 1
+! LuaTeX error [string "\directlua "]:99: invalid escape sequence near '"([~#$%%^&{}\'.
+
+system > tex > error on line 352 in file s-inf-03.mkiv: LuaTeX error ...
+
+342 if not skipglobal[k] and not obsolete[k] and type(v) == "table" and not marked(v) then
+343 if basiclua[k] then show(k,"basic lua",sameglobal[k],basiclua[k],v,builtin[k],"darkred", false,false,true)
+344 elseif extralua[k] then show(k,"extra lua",sameglobal[k],extralua[k],v,builtin[k],"darkred", false,false,true)
+345 elseif basictex[k] then show(k,"basic tex",sameglobal[k],basictex[k],v,builtin[k],"darkred", false,false,true)
+346 elseif extratex[k] then show(k,"extra tex",sameglobal[k],extratex[k],v,builtin[k],"darkred", false,false,true)
+347 else show(k,"context", sameglobal[k],false, v,builtin[k],"darkyellow",false,false,true)
+348 end
+349 end
+350 end
+351
+352 >> \stopluacode
+353
+354 \stoptext
+355
+
+<inserted text> ...rue) end end end }
+
+\luat_start_lua_code_indeed ...nd \directlua {#1}}
+
+l.352 \stopluacode
+
+?
+ ) )<c:/data/develop/tex-context/tex/texmf/fonts/truetype/public/dejavu/DejaVuSansMono-Bold.ttf>
+
+system > files > start used files
+
+used files > 1: filename=cont-yes.mkiv | foundname=cont-yes.mkiv | usedmethod=direct
+used files > 2: filename=cont-new.mkiv | foundname=cont-new.mkiv | usedmethod=direct
+used files > 3: filename=cont-loc.mkiv | filetype=tex | foundname=c:/data/develop/context/sources/cont-loc.mkiv | usedmethod=filesystem
+used files > 4: filename=cont-exp.mkiv | filetype=tex | foundname=c:/data/develop/context/sources/cont-exp.mkiv | usedmethod=filesystem
+used files > 5: filename=lang-us.lua | filetype=lua | foundname=c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/lang-us.lua | usedmethod=database
+used files > 6: filename=s-inf-03.mkiv | foundname=s-inf-03.mkiv | usedmethod=direct
+used files > 7: filename=type-loc.mkiv | filetype=tex | foundname=c:/data/develop/context/sources/type-loc.mkiv | usedmethod=filesystem
+used files > 8: filename=type-imp-dejavu.mkiv | foundname=type-imp-dejavu.mkiv | usedmethod=direct
+used files > 9: filename=type-imp-xits.mkiv | foundname=type-imp-xits.mkiv | usedmethod=direct
+used files > 10: filename=type-imp-texgyre.mkiv | foundname=type-imp-texgyre.mkiv | usedmethod=direct
+used files > 11: filename=xits-math.lfg | filetype=tex | foundname=c:/data/develop/context/sources/xits-math.lfg | usedmethod=filesystem
+used files > 12: filename=DejaVuSerif.ttf | filetype=ttf | format=ttf | foundname=c:/data/develop/tex-context/tex/texmf/fonts/truetype/public/dejavu/DejaVuSerif.ttf | usedmethod=database
+used files > 13: filename=xits-math.otf | filetype=otf | format=otf | foundname=c:/data/develop/tex-context/tex/texmf/fonts/opentype/public/xits/xits-math.otf | usedmethod=database
+used files > 14: filename=DejaVuSansMono.ttf | filetype=ttf | format=ttf | foundname=c:/data/develop/tex-context/tex/texmf/fonts/truetype/public/dejavu/DejaVuSansMono.ttf | usedmethod=database
+used files > 15: filename=mkiv-base.map | filetype=map | format=map | foundname=c:/data/develop/tex-context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map | usedmethod=database
+used files > 16: filename=DejaVuSansMono-Bold.ttf | filetype=ttf | format=ttf | foundname=c:/data/develop/tex-context/tex/texmf/fonts/truetype/public/dejavu/DejaVuSansMono-Bold.ttf | usedmethod=database
+used files > 17: filename=lpdf-pdx.xml | foundname=lpdf-pdx.xml | usedmethod=direct
+
+system > files > stop used files
+
+
+system > structure > start used structure
+
+used structure > text: s-inf-03
+
+system > structure > stop used structure
+
+
+references > start problematic references
+
+unknown > 1: [][1]
+unknown > 1: [][attributes]
+unknown > 1: [][backends]
+unknown > 1: [][bibtex]
+unknown > 1: [][blobs]
+unknown > 1: [][boolean]
+unknown > 1: [][buffers]
+unknown > 1: [][builders]
+unknown > 1: [][caches]
+unknown > 1: [][callback]
+unknown > 1: [][callbacks]
+unknown > 1: [][catcodes]
+unknown > 1: [][characters]
+unknown > 1: [][chemistry]
+unknown > 1: [][commands]
+unknown > 1: [][containers]
+unknown > 1: [][context]
+unknown > 1: [][converters]
+unknown > 1: [][coroutine]
+unknown > 1: [][ctxrunner]
+unknown > 1: [][debug]
+unknown > 1: [][dir]
+unknown > 1: [][directives]
+unknown > 1: [][document]
+unknown > 1: [][documentdata]
+unknown > 1: [][environment]
+unknown > 1: [][epdf]
+unknown > 1: [][experiments]
+unknown > 1: [][figures]
+unknown > 1: [][file]
+unknown > 1: [][floats]
+unknown > 1: [][font]
+unknown > 1: [][fontloader]
+unknown > 1: [][fonts]
+unknown > 1: [][functions]
+unknown > 1: [][graphics]
+unknown > 1: [][gzip]
+unknown > 1: [][img]
+unknown > 1: [][interactions]
+unknown > 1: [][interfaces]
+unknown > 1: [][io]
+unknown > 1: [][jit]
+unknown > 1: [][job]
+unknown > 1: [][lang]
+unknown > 1: [][languages]
+unknown > 1: [][layouts]
+unknown > 1: [][lfs]
+unknown > 1: [][libraries]
+unknown > 1: [][lmx]
+unknown > 1: [][logs]
+unknown > 1: [][lpdf]
+unknown > 1: [][lpeg]
+unknown > 1: [][ltn12]
+unknown > 1: [][lua]
+unknown > 1: [][luatex]
+unknown > 1: [][lxml]
+unknown > 1: [][math]
+unknown > 1: [][mathematics]
+unknown > 1: [][md5]
+unknown > 1: [][metapost]
+unknown > 1: [][mime]
+unknown > 1: [][moduledata]
+unknown > 1: [][modules]
+unknown > 1: [][mplib]
+unknown > 1: [][noads]
+unknown > 1: [][node]
+unknown > 1: [][nodes]
+unknown > 1: [][number]
+unknown > 1: [][os]
+unknown > 1: [][package]
+unknown > 1: [][pagebuilders]
+unknown > 1: [][parametersets]
+unknown > 1: [][pdf]
+unknown > 1: [][physics]
+unknown > 1: [][profiler]
+unknown > 1: [][regimes]
+unknown > 1: [][resolvers]
+unknown > 1: [][scripts]
+unknown > 1: [][set]
+unknown > 1: [][socket]
+unknown > 1: [][sorters]
+unknown > 1: [][statistics]
+unknown > 1: [][status]
+unknown > 1: [][storage]
+unknown > 1: [][streams]
+unknown > 1: [][string]
+unknown > 1: [][structures]
+unknown > 1: [][table]
+unknown > 1: [][tex]
+unknown > 1: [][texconfig]
+unknown > 1: [][texio]
+unknown > 1: [][token]
+unknown > 1: [][tokens]
+unknown > 1: [][tracers]
+unknown > 1: [][trackers]
+unknown > 1: [][typesetters]
+unknown > 1: [][unicode]
+unknown > 1: [][url]
+unknown > 1: [][utilities]
+unknown > 1: [][vf]
+unknown > 1: [][visualizers]
+unknown > 1: [][xml]
+unknown > 1: [][zip]
+unknown > 1: [][zlib]
+
+references > stop problematic references
+
+
+mkiv lua stats > used config file - selfautoparent:/texmf-local/web2c/texmfcnf.lua;selfautoparent:/texmf/web2c/texmfcnf.lua
+mkiv lua stats > used cache path - c:/data/develop/tex-context/tex/texmf-cache/luatex-cache/context/764bd4e1ce0f004ab3cec90018f8b80a
+mkiv lua stats > resource resolver - loadtime 0.016 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 17 found files, scanned paths:
+mkiv lua stats > stored bytecode data - 314 modules (0.141 sec), 67 tables (0.000 sec), 381 chunks (0.141 sec)
+mkiv lua stats > cleaned up reserved nodes - 55 nodes, 10 lists of 442
+mkiv lua stats > node memory usage - 4 glue, 4 penalty, 15 attribute, 31 glue_spec, 5 attribute_list
+mkiv lua stats > node list callback tasks - 6 unique task lists, 5 instances (re)created, 38 calls
+mkiv lua stats > used backend - pdf (backend for directly generating pdf output)
+mkiv lua stats > loaded patterns - en::2
+mkiv lua stats > jobdata time - 0.000 seconds saving, 0.000 seconds loading
+mkiv lua stats > callbacks - 430 direct, 1339 indirect, 1769 total
+mkiv lua stats > lxml preparation time - 0.000 seconds, 0 nodes, 13 lpath calls, 0 cached calls
+mkiv lua stats > interactive elements - 1 references, 1 destinations
+mkiv lua stats > result saved in file - status-lua.pdf.pdf, compresslevel 3, objectcompreslevel 3
+mkiv lua stats > loaded fonts - 4 files: xits-math.otf dejavusansmono-bold.ttf dejavusansmono.ttf dejavuserif.ttf
+mkiv lua stats > fonts load time - 0.468 seconds
+mkiv lua stats > pdf annotations - 1 embedded, 1 unique
+mkiv lua stats > cross referencing - 105 identified, 104 unknown
+mkiv lua stats > luatex banner - this is luatexjit, version beta-0.71.0-2012112719 (rev 4465)
+mkiv lua stats > control sequences - 36095 of 65536 + 100000
+mkiv lua stats > current memory usage - 30 MB (ctx: 0 MB)
+mkiv lua stats > runtime - 140.887 seconds, 1 processed pages, 1 shipped pages, 0.007 pages/second
+
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
deleted file mode 100644
index 0e30809ce..000000000
--- a/tex/context/base/status-lua.pdf
+++ /dev/null
Binary files differ
diff --git a/tex/context/base/syst-lua.mkiv b/tex/context/base/syst-lua.mkiv
index 004655b74..bca6ab3a2 100644
--- a/tex/context/base/syst-lua.mkiv
+++ b/tex/context/base/syst-lua.mkiv
@@ -37,8 +37,7 @@
% a handy helper (we can probably omit the tex.ctxcatcodes here as nowadays we seldom
% change the regime at the tex end
-%def\luaexpr#1{\ctxlua {context(tostring(#1))}}
-\def\luaexpr#1{\directlua\zerocount{context(tostring(#1))}} % wrap in global function ?
+\def\luaexpr#1{\ctxlua{context(tostring(#1))}}
% helpers:
diff --git a/tex/context/base/util-sql-users.lua b/tex/context/base/util-sql-users.lua
index f6845062f..4bf5057b5 100644
--- a/tex/context/base/util-sql-users.lua
+++ b/tex/context/base/util-sql-users.lua
@@ -208,13 +208,13 @@ local template =[[
`theme`,
`data`
) VALUES (
- '%name%',
+ '%[name]%',
'%password%',
'%group%',
'%enabled%',
- '%email%',
- '%address%',
- '%theme%',
+ '%[email]%',
+ '%[address]%',
+ '%[theme]%',
'%[data]%'
) ;
]]
@@ -305,8 +305,9 @@ local template =[[
`password` = '%password%',
`group` = '%group%',
`enabled` = '%enabled%',
- `email` = '%email%',
- `address` = '%address%',
+ `email` = '%[email]%',
+ `address` = '%[address]%',
+ `theme` = '%[theme]%',
`data` = '%[data]%'
WHERE
`id` = '%id%'
@@ -315,13 +316,15 @@ local template =[[
function users.save(db,id,specification)
- if not tonumber(id) then
+ id = tonumber(id)
+
+ if not id then
return
end
local user = getbyid(db,id)
- if user.id ~= id then
+ if tonumber(user.id) ~= id then
return
end
@@ -333,8 +336,6 @@ function users.save(db,id,specification)
local theme = specification.theme == nil and user.theme or specification.theme
local data = specification.data == nil and user.data or specification.data
--- table.print(data)
-
db.execute {
template = template,
variables = {
diff --git a/tex/context/base/x-asciimath.mkiv b/tex/context/base/x-asciimath.mkiv
index ea6d5c3fa..b555115ff 100644
--- a/tex/context/base/x-asciimath.mkiv
+++ b/tex/context/base/x-asciimath.mkiv
@@ -15,7 +15,7 @@
\registerctxluafile{x-asciimath}{}
-\def\ctxmoduleasciimath#1{\directlua\zerocount{moduledata.asciimath.#1}}
+\def\ctxmoduleasciimath#1{\ctxlua{moduledata.asciimath.#1}}
%D The following code is not officially supported and is only meant
%D for the Math4All project.
diff --git a/tex/context/base/x-calcmath.mkiv b/tex/context/base/x-calcmath.mkiv
index ce4f95ad2..dda88bb3e 100644
--- a/tex/context/base/x-calcmath.mkiv
+++ b/tex/context/base/x-calcmath.mkiv
@@ -15,7 +15,7 @@
\registerctxluafile{x-calcmath}{}
-\def\ctxmodulecalcmath#1{\directlua\zerocount{moduledata.calcmath.#1}}
+\def\ctxmodulecalcmath#1{\ctxlua{moduledata.calcmath.#1}}
%D Interface:
diff --git a/tex/context/base/x-chemml.mkiv b/tex/context/base/x-chemml.mkiv
index 99a371107..bb9065921 100644
--- a/tex/context/base/x-chemml.mkiv
+++ b/tex/context/base/x-chemml.mkiv
@@ -17,7 +17,7 @@
\registerctxluafile{x-chemml}{}
-\def\ctxmodulechemml#1{\directlua\zerocount{moduledata.chemml.#1}}
+\def\ctxmodulechemml#1{\ctxlua{moduledata.chemml.#1}}
%D The following code assumes a load||flush approach to \XML.
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6763356ed..02358414c 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 11/27/12 22:26:08
+-- merge date : 11/29/12 15:40:31
do -- begin closure to overcome local limits and interference