summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-05-31 23:40:49 +0300
committerMarius <mariausol@gmail.com>2013-05-31 23:40:49 +0300
commit9a194c86a8d31ce7f07712961e5ec72023a00823 (patch)
treef5a34823fdacf9be583a3f63faa14b39177759bd
parentcc1c43092378e4bb53255c8aa165a6063f829c33 (diff)
downloadcontext-9a194c86a8d31ce7f07712961e5ec72023a00823.tar.gz
beta 2013.05.31 21:57
-rw-r--r--metapost/context/base/mp-grap.mpiv107
-rw-r--r--scripts/context/lua/mtxrun.lua8
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua8
-rw-r--r--scripts/context/stubs/unix/mtxrun8
-rw-r--r--tex/context/base/anch-pos.lua4
-rw-r--r--tex/context/base/attr-lay.mkiv5
-rw-r--r--tex/context/base/cldf-ini.lua38
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/cont-new.tmp83
-rw-r--r--tex/context/base/context-version.pdfbin4111 -> 4108 bytes
-rw-r--r--tex/context/base/context.mkiv4
-rw-r--r--tex/context/base/context.tmp513
-rw-r--r--tex/context/base/font-ctx.lua6
-rw-r--r--tex/context/base/font-otf.lua3
-rw-r--r--tex/context/base/font-pre.mkiv4
-rw-r--r--tex/context/base/lxml-tab.lua3
-rw-r--r--tex/context/base/m-graph.mkiv9
-rw-r--r--tex/context/base/mtx-context-xml.tex75
-rw-r--r--tex/context/base/page-mix.lua10
-rw-r--r--tex/context/base/s-fonts-features.mkiv2
-rw-r--r--tex/context/base/s-fonts-goodies.mkiv2
-rw-r--r--tex/context/base/s-fonts-missing.lua16
-rw-r--r--tex/context/base/s-fonts-missing.mkiv2
-rw-r--r--tex/context/base/s-fonts-shapes.mkiv2
-rw-r--r--tex/context/base/s-fonts-tables.mkiv2
-rw-r--r--tex/context/base/s-fonts-vectors.mkiv2
-rw-r--r--tex/context/base/s-sql-tables.mkiv2
-rw-r--r--tex/context/base/spac-ali.mkiv14
-rw-r--r--tex/context/base/status-files.pdfbin24734 -> 24657 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin212009 -> 212047 bytes
-rw-r--r--tex/context/base/tabl-tbl.mkiv11
-rw-r--r--tex/context/base/x-set-12.mkiv13
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua5
33 files changed, 251 insertions, 712 deletions
diff --git a/metapost/context/base/mp-grap.mpiv b/metapost/context/base/mp-grap.mpiv
index a6a4e21e8..00a4d12cb 100644
--- a/metapost/context/base/mp-grap.mpiv
+++ b/metapost/context/base/mp-grap.mpiv
@@ -67,37 +67,52 @@ fi
input string.mp
% Private version of a few marith macros, fixed for double math...
+newinternal Mzero; Mzero := -16384; % Anything at least this small is treated as zero
newinternal mlogten ; mlogten := mlog(10) ;
+newinternal singleinfinity ; singleinfinity := 2**128 ;
newinternal doubleinfinity ; doubleinfinity := 2**1024 ;
% Note that we get arithmetic overflows if we set to -doubleinfinity below.
+% (but "only on odd days"...)
% Safely convert a number to mlog form, trapping zero.
vardef graph_mlog primary x =
- if unknown x: whatever elseif x=0: -.5doubleinfinity else: mlog(abs x) fi
+ if unknown x: whatever
+ elseif x=0: Mzero
+ else: mlog(abs x) fi
enddef ;
vardef graph_exp primary x =
- if unknown x: whatever else: mexp(x) fi
+ if unknown x: whatever
+ elseif x<=Mzero: 0
+ else: mexp(x) fi
enddef ;
% and add the following for utility/completeness
% (replacing the definitions in mp-tool.mpiv).
vardef logten primary x =
- if unknown x: whatever elseif x=0: -.5doubleinfinity else: mlog(abs x)/mlog(10) fi
+ if unknown x: whatever
+ elseif x=0: Mzero
+ else: mlog(abs x)/mlog(10) fi
enddef ;
vardef ln primary x =
- if unknown x: whatever elseif x=0: -.5doubleinfinity else: mlog(abs x)/256 fi
+ if unknown x: whatever
+ elseif x=0: Mzero
+ else: mlog(abs x)/256 fi
enddef ;
vardef exp primary x =
- if unknown x: whatever else: (mexp 256)**x fi
+ if unknown x: whatever
+ elseif x<= Mzero: 0
+ else: (mexp 256)**x fi
enddef ;
vardef powten primary x =
- if unknown x: whatever else: 10**x fi
+ if unknown x: whatever
+ elseif x<= Mzero: 0
+ else: 10**x fi
enddef ;
% Convert x from mlog form into a pair whose xpart gives a mantissa and whose
% ypart gives a power of ten.
vardef graph_Meform(expr x) =
- if x<=-doubleinfinity : origin
+ if x<=Mzero : origin
else :
save e, m ; e=floor(x/mlogten)-3; m := mexp(x-e*mlogten) ;
if abs m<1000 : m := m*10 ; e := e-1 ; elseif abs m>=10000 : m := m/10 ; e := e+1 ; fi
@@ -242,12 +257,13 @@ def graph_with_pen_and_color(expr q) =
fi
enddef ;
-% Add picture component q to picture @# and change part p to tp, where p is
-% something from q that needs coordinate transformation. The type of p is pair
-% or path.
+% Add picture component q to picture @# and change part p to tp,
+% where p is something from q that needs coordinate transformation.
+% The type of p is pair or path.
% Pair o is the value of p that makes tp (0,0). This implements the trick
-% whereby using 1 instead of 0 for th the width or height or the setbounds path
+% whereby using 1 instead of 0 for the width or height or the setbounds path
% for a label picture suppresses shifting in x or y.
+%
%vardef graph_picture_conversion@#(expr q, o)(text tp) =
% save p ;
% if stroked q :
@@ -259,34 +275,37 @@ enddef ;
% else :
% interim truecorners :=0 ;
% pair p ; p=llcorner q;
-% if urcorner q<>p : p :=p+graph_coordinate_multiplication(o-p,urcorner q-p) ; fi
+% if urcorner q<>p : p := p + graph_coordinate_multiplication(o-p,urcorner q-p) ; fi
% addto @# also q shifted ((tp)-llcorner q) ;
% fi
%enddef ;
-% TH : new version from code found at sarovar tracker. This makes
-% grdaw clip the result to the window defined with setrange
+%
+% This new version makes gdraw clip the result to the window defined with setrange
vardef graph_picture_conversion@#(expr q, o)(text tp) =
- save p, tp_geclipt ;
- picture tp_geclipt ; tp_geclipt :=nullpicture;
+ save p ;
+ save do_clip, tp_clipped ; boolean do_clip ; do_clip := true ;
+ picture tp_clipped ; tp_clipped := nullpicture;
if stroked q :
path p ; p=pathpart q;
- %%% --- SDV added
- addto tp_geclipt doublepath tp graph_with_pen_and_color(q) dashed dashpart q ;
- clip tp_geclipt to origin--(xpart Z_.graph_dimensions,0)--Z_.graph_dimensions--(0, ypart Z_.graph_dimensions)--cycle ;
- addto @# also tp_geclipt ;
- %%%
- %%% --- SDV deleted
- %%addto @# doublepath tp graph_with_pen_and_color(q) dashed dashpart q ;
- %%%
+ addto tp_clipped doublepath tp graph_with_pen_and_color(q) dashed dashpart q ;
+ %draw bbox tp_clipped withcolor red ;
elseif filled q :
path p ; p=pathpart q;
- addto @# contour tp graph_with_pen_and_color(q) ;
+ addto tp_clipped contour tp graph_with_pen_and_color(q) ;
+ %draw bbox tp_clipped withcolor green ;
else :
- interim truecorners :=0 ;
+ if (urcorner q<>llcorner q) : do_clip := false ; fi % Do not clip the axis labels;
+ interim truecorners := 0 ;
pair p ; p=llcorner q;
- if urcorner q<>p : p :=p+graph_coordinate_multiplication(o-p,urcorner q-p) ; fi
- addto @# also q shifted ((tp)-llcorner q) ;
+ if urcorner q<>p : p := p + graph_coordinate_multiplication(o-p,urcorner q-p) ; fi
+ addto tp_clipped also q shifted ((tp)-llcorner q) ;
+ %draw bbox tp_clipped withcolor if do_clip : cyan else : blue fi ;
+ fi
+ if do_clip :
+ clip tp_clipped to origin--(xpart Z_.graph_dimensions,0)--Z_.graph_dimensions--
+ (0,ypart Z_.graph_dimensions)--cycle ;
fi
+ addto @# also tp_clipped ;
enddef ;
def graph_coordinate_multiplication(expr a,b) = (xpart a*xpart b, ypart a*ypart b) enddef ;
@@ -335,7 +354,7 @@ vardef graph_set_bounds@#(expr l, h) =
graph_clear_bounds@# ;
if @#graph_coordinate_type>0 :
@#low = if unknown l :
- whatever
+ whatever
else :
if abs @#graph_coordinate_type=log : graph_mlog fi if string l : scantokens fi l
fi ;
@@ -345,7 +364,7 @@ vardef graph_set_bounds@#(expr l, h) =
if abs @#graph_coordinate_type=log : graph_mlog fi if string h : scantokens fi h
fi ;
else :
- -@#high = if unknown l :
+ -@#high = if unknown l :
whatever
else :
if abs @#graph_coordinate_type=log : graph_mlog fi if string l : scantokens fi l
@@ -549,7 +568,7 @@ def graph_withlist text t_ = t_ ; graph_post_draw; enddef;
def plot expr p =
if known graph_plot_picture :
withpen nullpen
- hide (graph_plot_picture :=image(
+ hide (graph_plot_picture := image(
if bounded p : for q within p : graph_addto_currentpicture q endfor % Save memory
else : graph_addto_currentpicture p
fi graph_setbounds origin..cycle))
@@ -887,7 +906,7 @@ def auto suffix $ =
if graph_select_exponent_mark.graph_exponent :
graph_generate_exponents(graph_exponent,
graph_comma graph_factor_and_exponent_to_string(1,e))
- else :
+ else :
graph_scan_mark(graph_select_mark, graph_modified_lower, graph_modified_higher,
graph_comma graph_factor_and_exponent_to_string(m,e))
fi
@@ -1073,6 +1092,7 @@ def downtriangles(expr f) = plotsymbol(13,f) enddef ;
def lefttriangles(expr f) = plotsymbol(33,f) enddef ;
def righttriangles(expr f) = plotsymbol(23,f) enddef ;
+% f (fill) is color, numeric or boolean, otherwise background.
def plotsymbol(expr n, f) text t =
if known graph_shape[n] :
image(
@@ -1082,14 +1102,21 @@ def plotsymbol(expr n, f) text t =
fg := if color colorpart pic : colorpart pic else : black fi ;
save p ; path p ; p = graph_shape[n] scaled graph_shapesize ;
draw p withcolor bg withpen currentpen scaled 2 ; % halo
- if cycle p : fill p withcolor
- if color f and known f :
- f
- elseif numeric f and known f :
- f[bg,fg]
- else :
- bg
- fi ;
+ if cycle p :
+ fill p withcolor
+ if known f :
+ if color f :
+ f
+ elseif numeric f :
+ f[bg,fg]
+ elseif boolean f and f :
+ fg
+ else
+ bg
+ fi
+ else :
+ bg
+ fi ;
fi
draw p withpen currentpen _op_ t ;
)
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index d07dfc9a7..77bcf6a87 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -8298,7 +8298,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 42495, stripped down to: 26647
+-- original size: 42418, stripped down to: 26560
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -8309,6 +8309,7 @@ if not modules then modules={} end modules ['lxml-tab']={
}
local trace_entities=false trackers.register("xml.entities",function(v) trace_entities=v end)
local report_xml=logs and logs.reporter("xml","core") or function(...) print(string.format(...)) end
+lpeg.setmaxstack(1000)
xml=xml or {}
local xml=xml
local concat,remove,insert=table.concat,table.remove,table.insert
@@ -8728,7 +8729,6 @@ local publicdoctype=doctypename*somespace*P("PUBLIC")*somespace*value*somespace*
local systemdoctype=doctypename*somespace*P("SYSTEM")*somespace*value*somespace*doctypeset
local simpledoctype=(1-close)^1
local somedoctype=C((somespace*(publicdoctype+systemdoctype+definitiondoctype+simpledoctype)*optionalspace)^0)
-local somedoctype=C((somespace*(publicdoctype+systemdoctype+definitiondoctype+simpledoctype)*optionalspace)^0)
local instruction=(spacing*begininstruction*someinstruction*endinstruction)/function(...) add_special("@pi@",...) end
local comment=(spacing*begincomment*somecomment*endcomment )/function(...) add_special("@cm@",...) end
local cdata=(spacing*begincdata*somecdata*endcdata )/function(...) add_special("@cd@",...) end
@@ -16096,8 +16096,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 670212
--- stripped bytes : 245255
+-- original bytes : 670135
+-- stripped bytes : 245265
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index d07dfc9a7..77bcf6a87 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -8298,7 +8298,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 42495, stripped down to: 26647
+-- original size: 42418, stripped down to: 26560
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -8309,6 +8309,7 @@ if not modules then modules={} end modules ['lxml-tab']={
}
local trace_entities=false trackers.register("xml.entities",function(v) trace_entities=v end)
local report_xml=logs and logs.reporter("xml","core") or function(...) print(string.format(...)) end
+lpeg.setmaxstack(1000)
xml=xml or {}
local xml=xml
local concat,remove,insert=table.concat,table.remove,table.insert
@@ -8728,7 +8729,6 @@ local publicdoctype=doctypename*somespace*P("PUBLIC")*somespace*value*somespace*
local systemdoctype=doctypename*somespace*P("SYSTEM")*somespace*value*somespace*doctypeset
local simpledoctype=(1-close)^1
local somedoctype=C((somespace*(publicdoctype+systemdoctype+definitiondoctype+simpledoctype)*optionalspace)^0)
-local somedoctype=C((somespace*(publicdoctype+systemdoctype+definitiondoctype+simpledoctype)*optionalspace)^0)
local instruction=(spacing*begininstruction*someinstruction*endinstruction)/function(...) add_special("@pi@",...) end
local comment=(spacing*begincomment*somecomment*endcomment )/function(...) add_special("@cm@",...) end
local cdata=(spacing*begincdata*somecdata*endcdata )/function(...) add_special("@cd@",...) end
@@ -16096,8 +16096,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 670212
--- stripped bytes : 245255
+-- original bytes : 670135
+-- stripped bytes : 245265
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index d07dfc9a7..77bcf6a87 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -8298,7 +8298,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 42495, stripped down to: 26647
+-- original size: 42418, stripped down to: 26560
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -8309,6 +8309,7 @@ if not modules then modules={} end modules ['lxml-tab']={
}
local trace_entities=false trackers.register("xml.entities",function(v) trace_entities=v end)
local report_xml=logs and logs.reporter("xml","core") or function(...) print(string.format(...)) end
+lpeg.setmaxstack(1000)
xml=xml or {}
local xml=xml
local concat,remove,insert=table.concat,table.remove,table.insert
@@ -8728,7 +8729,6 @@ local publicdoctype=doctypename*somespace*P("PUBLIC")*somespace*value*somespace*
local systemdoctype=doctypename*somespace*P("SYSTEM")*somespace*value*somespace*doctypeset
local simpledoctype=(1-close)^1
local somedoctype=C((somespace*(publicdoctype+systemdoctype+definitiondoctype+simpledoctype)*optionalspace)^0)
-local somedoctype=C((somespace*(publicdoctype+systemdoctype+definitiondoctype+simpledoctype)*optionalspace)^0)
local instruction=(spacing*begininstruction*someinstruction*endinstruction)/function(...) add_special("@pi@",...) end
local comment=(spacing*begincomment*somecomment*endcomment )/function(...) add_special("@cm@",...) end
local cdata=(spacing*begincdata*somecdata*endcdata )/function(...) add_special("@cd@",...) end
@@ -16096,8 +16096,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 670212
--- stripped bytes : 245255
+-- original bytes : 670135
+-- stripped bytes : 245265
-- end library merge
diff --git a/tex/context/base/anch-pos.lua b/tex/context/base/anch-pos.lua
index 2697cecf4..5f46ee5dd 100644
--- a/tex/context/base/anch-pos.lua
+++ b/tex/context/base/anch-pos.lua
@@ -291,7 +291,7 @@ function jobpositions.e_col(tag)
column = columns[#columns]
end
-function commands.bcolumn(tag,register)
+function commands.bcolumn(tag,register) -- name will change
insert(columns,tag)
column = tag
if register then
@@ -299,7 +299,7 @@ function commands.bcolumn(tag,register)
end
end
-function commands.ecolumn(register)
+function commands.ecolumn(register) -- name will change
if register then
context(new_latelua(f_e_column()))
end
diff --git a/tex/context/base/attr-lay.mkiv b/tex/context/base/attr-lay.mkiv
index 9c9c3318e..d4aae3060 100644
--- a/tex/context/base/attr-lay.mkiv
+++ b/tex/context/base/attr-lay.mkiv
@@ -98,8 +98,11 @@
\let\setlayoutcomponentattribute \attr_layoutcomponent_set
\let\resetlayoutcomponentattribute\attr_layoutcomponent_reset}
+\unexpanded\def\attr_layoutcomponent_cleanup
+ {\ctxcommand{cleanuplayers()}}
+
\appendtoks
- \ctxcommand{cleanuplayers()}%
+ \attr_layoutcomponent_cleanup
\to \everyshipout
\protect \endinput
diff --git a/tex/context/base/cldf-ini.lua b/tex/context/base/cldf-ini.lua
index 4a7d9f025..2272c05ea 100644
--- a/tex/context/base/cldf-ini.lua
+++ b/tex/context/base/cldf-ini.lua
@@ -903,28 +903,36 @@ setmetatable(nested, { __index = indexer, __call = caller } )
-- verbatim
-local verbatim = { } context.verbatim = verbatim
+function context.newindexer(catcodes)
+ local handler = { }
+
+ local function indexer(parent,k)
+ local command = context[k]
+ local f = function(...)
+ local savedcatcodes = contentcatcodes
+ contentcatcodes = catcodes
+ command(...)
+ contentcatcodes = savedcatcodes
+ end
+ parent[k] = f
+ return f
+ end
-local function indexer(parent,k)
- local command = context[k]
- local f = function(...)
+ local function caller(parent,...)
local savedcatcodes = contentcatcodes
- contentcatcodes = vrbcatcodes
- command(...)
+ contentcatcodes = catcodes
+ defaultcaller(parent,...)
contentcatcodes = savedcatcodes
end
- parent[k] = f
- return f
-end
-local function caller(parent,...)
- local savedcatcodes = contentcatcodes
- contentcatcodes = vrbcatcodes
- defaultcaller(parent,...)
- contentcatcodes = savedcatcodes
+ setmetatable(handler, { __index = indexer, __call = caller } )
+
+ return handler
end
-setmetatable(verbatim, { __index = indexer, __call = caller } )
+context.verbatim = context.newindexer(vrbcatcodes)
+context.puretext = context.newindexer(txtcatcodes)
+-------.protected = context.newindexer(prtcatcodes)
-- formatted
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 7f241e357..24b56997e 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{2013.05.28 00:36}
+\newcontextversion{2013.05.31 21:57}
%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/cont-new.tmp b/tex/context/base/cont-new.tmp
deleted file mode 100644
index 5d4fcd60a..000000000
--- a/tex/context/base/cont-new.tmp
+++ /dev/null
@@ -1,83 +0,0 @@
-%D \module
-%D [ file=cont-new,
-%D version=1995.10.10,
-%D title=\CONTEXT\ Miscellaneous Macros,
-%D subtitle=New Macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \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.
-
-\newcontextversion{2013.05.28 00:34}
-
-%D This file is loaded at runtime, thereby providing an excellent place for
-%D hacks, patches, extensions and new features.
-
-\unprotect
-
-% \writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
-
-% \attribute152\zerocount : marks ... lots of sweeps so best early in list
-
-%D Maybe:
-
-\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
-\unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}
-
-%D Maybe:
-
-% \startluacode
-% function context.loadfile(filename)
-% context(string.strip(io.loaddata(resolvers.findfile(filename))))
-% end
-% \stopluacode
-%
-% \edef\tufte{\cldcommand{loadfile("tufte.tex")}}
-
-%D Needs some work:
-
-\unexpanded\def\startgridcorrection
- {\dosingleempty\spac_grid_correction_start}
-
-\def\spac_grid_correction_start[#1]%
- {\ifgridsnapping
- \snaptogrid[#1]\vbox\bgroup
- \else
- \startbaselinecorrection
- \fi}
-
-\unexpanded\def\stopgridcorrection
- {\ifgridsnapping
- \egroup
- \else
- \stopbaselinecorrection
- \fi}
-
-\unexpanded\def\checkgridsnapping
- {\lineskip\ifgridsnapping\zeropoint\else\normallineskip\fi}
-
-%D Probably obsolete:
-
-\unexpanded\def\startcolumnmakeup % don't change
- {\bgroup
- \getrawnoflines\textheight % raw as we cna have topskip
- \setbox\scratchbox\vbox to \dimexpr\noflines\lineheight-\lineheight+\topskip\relax
- \bgroup
- \forgetall}
-
-\unexpanded\def\stopcolumnmakeup
- {\egroup
- \dp\scratchbox\zeropoint
- \wd\scratchbox\textwidth
- \box\scratchbox
- \egroup
- \page_otr_command_synchronize_hsize}
-
-%D Till we fixed all styles:
-
-\let\\=\crlf
-
-\protect \endinput
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 1c70a39fc..f5dd71f5f 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.mkiv b/tex/context/base/context.mkiv
index eaa431122..168179f8a 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,8 +25,8 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.05.28 00:36}
-\edef\contextkind {current}
+\edef\contextversion{2013.05.31 21:57}
+\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/context.tmp b/tex/context/base/context.tmp
deleted file mode 100644
index 7976b4641..000000000
--- a/tex/context/base/context.tmp
+++ /dev/null
@@ -1,513 +0,0 @@
-%D \module
-%D [ file=context,
-%D version=2008.28.10, % 1995.10.10,
-%D title=\CONTEXT,
-%D subtitle=\CONTEXT\ Format Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \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.
-
-\catcode`\{=1 \catcode`\}=2 \catcode`\#=6
-
-%D From the next string (which is set by the script that assembles the
-%D distribution) later on we will calculate a number that can be used
-%D by use modules to identify the feature level. Starting with version
-%D 2004.8.30 the low level interface is english. Watch out and adapt
-%D your styles an modules.
-
-% \everypar{\writestatus{!!!!}{some spurious input in line \the\inputlineno}\wait}
-
-%D The order of loading will change when all modules have been cleaned
-%D up and the dependencies are more consistent.
-
-\edef\contextformat {\jobname}
-\edef\contextversion{2013.05.28 00:34}
-\edef\contextkind {beta}
-
-%D For those who want to use this:
-
-\let\fmtname \contextformat
-\let\fmtversion\contextversion
-
-%D Loading:
-
-\edef\mksuffix {mkiv}
-\edef\contextmark{MKIV}
-
-\ifx\normalinput\undefined \let\normalinput\input \fi
-
-\def\loadcorefile#1{\normalinput#1\relax}
-\def\loadmarkfile#1{\normalinput#1.\mksuffix\relax}
-\def\loadmkiifile#1{}
-\def\loadmkivfile#1{\normalinput#1.mkiv\relax}
-\def\loadmkvifile#1{\normalinput#1.mkvi\relax}
-
-%D First we load the system modules. These implement a lot of
-%D manipulation macros. We start with setting up some basic \TEX\
-%D machinery.
-
-\loadmarkfile{syst-ini}
-
-%D Some checking (more primitives are now defined):
-
-\ifdefined\defaultinterface \else \def\defaultinterface {english} \fi
-%ifdefined\messageinterface \else \let\messageinterface \defaultinterface \fi
-\ifdefined\defaultlanguagetag \else \def\defaultlanguagetag{en} \fi
-
-%D We just quit if new functionality is expected.
-
-\ifnum\luatexversion<70 % also change message
- \writestatus{!!!!}{Your luatex binary is too old, you need at least version 0.70!}
- \expandafter\end
-\fi
-
-%D There is only this way to pass the version info to \LUA\ (currently). Hm, we could
-%D now put it into the environment.
-
-\newtoks\contextversiontoks \contextversiontoks\expandafter{\contextversion}
-\newtoks\contextkindtoks \contextkindtoks \expandafter{\contextkind}
-
-% \normaleverypar{\wait} % uncomment for test of funny injections
-
-%D Now the more fundamental code gets defined.
-
-\loadmarkfile{norm-ctx}
-\loadmarkfile{syst-pln}
-\loadmarkfile{syst-mes}
-
-\loadmarkfile{luat-cod}
-\loadmarkfile{luat-bas}
-\loadmarkfile{luat-lib}
-
-\loadmarkfile{catc-ini}
-\loadmarkfile{catc-act}
-\loadmarkfile{catc-def}
-\loadmarkfile{catc-ctx}
-\loadmarkfile{catc-sym}
-
-\loadmarkfile{cldf-ini}
-
-% From here on we have \unexpanded being \normalprotected, as we already had
-% \unexpanded long before etex came around.
-
-\loadmarkfile{syst-aux}
-\loadmarkfile{syst-lua}
-\loadmarkfile{syst-con}
-
-\loadmarkfile{syst-fnt}
-\loadmarkfile{syst-rtp}
-
-\loadmkvifile{file-ini}
-\loadmkvifile{file-res}
-\loadmkvifile{file-lib}
-
-\loadmarkfile{supp-dir}
-
-\loadmarkfile{char-ini}
-\loadmarkfile{char-utf}
-\loadmarkfile{char-act}
-
-\loadmarkfile{mult-ini}
-\loadmarkfile{mult-sys}
-\loadmarkfile{mult-aux}
-\loadmarkfile{mult-def}
-\loadmarkfile{mult-chk}
-%loadmarkfile{mult-aux} % moved up
-\loadmkvifile{mult-dim}
-
-\loadmarkfile{cldf-int} % interface
-
-\loadmarkfile{luat-ini}
-
-\loadmarkfile{toks-ini}
-
-\loadmarkfile{attr-ini}
-
-\loadmarkfile{core-ini}
-\loadmarkfile{core-env}
-
-\loadmarkfile{layo-ini}
-
-\loadmarkfile{node-ini}
-
-\loadmarkfile{cldf-bas} % basics / depends on nodes
-
-\loadmarkfile{node-fin}
-\loadmarkfile{node-mig}
-\loadmarkfile{typo-bld} % par builders
-%loadmarkfile{node-pag}
-
-\loadmarkfile{back-ini}
-
-\loadmarkfile{attr-col}
-\loadmarkfile{attr-lay}
-\loadmarkfile{attr-neg}
-\loadmarkfile{attr-eff}
-\loadmarkfile{attr-mkr}
-
-\loadmarkfile{trac-tex}
-\loadmarkfile{trac-deb} % will move up
-\loadmarkfile{trac-ctx} % maybe move up
-
-%loadmarkfile{blob-ini} % not to be used, we only use a helper
-
-\loadmarkfile{supp-box}
-
-%loadmarkfile{supp-vis} % replaced by trac-vis
-%loadmarkfile{supp-fun} % mostly replaced
-
-\loadmarkfile{supp-ran}
-\loadmarkfile{supp-mat}
-\loadmarkfile{spac-cha}
-%loadmarkfile{supp-num} % obsolete
-
-\loadmarkfile{typo-ini}
-
-\loadmkvifile{file-syn}
-\loadmkvifile{file-mod}
-
-\loadmarkfile{core-con}
-
-\loadmarkfile{cont-fil}
-
-\loadmarkfile{regi-ini}
-\loadmarkfile{enco-ini}
-\loadmarkfile{hand-ini}
-
-\loadmarkfile{lang-ini}
-\loadmarkfile{lang-lab}
-
-\loadmarkfile{unic-ini}
-
-\loadmarkfile{core-uti}
-\loadmarkfile{core-two}
-\loadmarkfile{core-dat}
-
-\loadmarkfile{colo-ini}
-\loadmarkfile{colo-grp} % optional
-\loadmarkfile{colo-ext}
-
-\loadmarkfile{node-bck} % overloads anch-pgr (experimental and undocumented)
-
-\loadmarkfile{pack-cut} % leftovers from trac-vis
-
-\loadmarkfile{lang-mis}
-\loadmarkfile{lang-url}
-\loadmarkfile{lang-def}
-
-\loadmkvifile{file-job} % why so late?
-
-\loadmarkfile{symb-ini} % brrr depends on fonts
-
-\loadmarkfile{sort-ini}
-
-\loadmkvifile{pack-mis}
-\loadmarkfile{pack-rul}
-\loadmarkfile{pack-mrl}
-\loadmkvifile{pack-bck}
-\loadmarkfile{pack-fen}
-
-\loadmarkfile{lxml-ini}
-\loadmarkfile{lxml-sor}
-
-\loadmkvifile{typo-prc}
-
-\loadmkvifile{strc-ini}
-\loadmarkfile{strc-tag}
-\loadmarkfile{strc-doc}
-\loadmarkfile{strc-num}
-\loadmarkfile{strc-mar}
-\loadmarkfile{strc-sbe}
-\loadmkvifile{strc-lst}
-\loadmarkfile{strc-sec}
-\loadmarkfile{strc-pag} % hm, depends on core-num
-\loadmarkfile{strc-ren}
-\loadmarkfile{strc-xml}
-\loadmarkfile{strc-def} % might happen later
-\loadmkvifile{strc-ref}
-\loadmarkfile{strc-reg}
-\loadmkvifile{strc-lev} % experiment
-
-\loadmarkfile{spac-ali}
-\loadmarkfile{spac-hor}
-\loadmarkfile{spac-flr}
-\loadmarkfile{spac-ver}
-\loadmarkfile{spac-lin}
-\loadmarkfile{spac-pag}
-\loadmarkfile{spac-par}
-%loadmarkfile{spac-adj} % no longer needed
-\loadmarkfile{spac-def}
-\loadmarkfile{spac-grd}
-
-\loadmarkfile{anch-pos}
-
-\loadmkvifile{scrn-ini}
-\loadmkvifile{scrn-ref}
-
-\loadmarkfile{pack-obj}
-
-\loadmkvifile{strc-itm}
-
-\loadmkvifile{strc-con}
-\loadmkvifile{strc-des}
-\loadmkvifile{strc-enu}
-
-\loadmarkfile{strc-ind}
-\loadmarkfile{strc-lab}
-\loadmarkfile{strc-syn}
-
-\loadmarkfile{core-sys}
-
-\loadmarkfile{page-var}
-\loadmkvifile{page-otr}
-\loadmarkfile{page-ini}
-\loadmarkfile{page-ins}
-\loadmarkfile{page-fac}
-\loadmarkfile{page-brk}
-\loadmarkfile{page-col}
-\loadmarkfile{page-inf}
-\loadmarkfile{page-grd}
-\loadmarkfile{page-flt}
-\loadmarkfile{page-bck}
-\loadmarkfile{page-not}
-\loadmarkfile{page-one}
-\loadmarkfile{page-lay}
-\loadmkvifile{page-box}
-\loadmkvifile{page-txt}
-\loadmarkfile{page-sid} % when
-
-\loadmkvifile{strc-flt}
-
-\loadmarkfile{page-pst}
-\loadmkvifile{page-mbk}
-\loadmarkfile{page-mul} % partly overloaded
-\loadmarkfile{page-mix} % new
-\loadmarkfile{page-set}
-\loadmarkfile{pack-lyr}
-\loadmarkfile{pack-pos}
-\loadmkvifile{page-mak}
-
-\loadmarkfile{page-lin}
-\loadmarkfile{page-par}
-\loadmarkfile{typo-pag}
-\loadmarkfile{typo-mar}
-\loadmarkfile{typo-itm}
-
-\loadmarkfile{buff-ini}
-\loadmarkfile{buff-ver}
-\loadmkvifile{buff-par}
-
-\loadmarkfile{buff-imp-tex} % optional as also runtime if not loaded
-\loadmarkfile{buff-imp-mp} % optional as also runtime if not loaded
-\loadmarkfile{buff-imp-lua} % optional as also runtime if not loaded
-\loadmarkfile{buff-imp-xml} % optional as also runtime if not loaded
-
-\loadmarkfile{buff-imp-parsed-xml} % optional
-%loadmarkfile{buff-imp-parsed-lua} % optional
-
-\loadmarkfile{strc-blk}
-
-\loadmarkfile{page-imp}
-\loadmkvifile{page-sel} % optional
-\loadmkvifile{page-inj} % optional
-
-\loadmkvifile{scrn-pag}
-\loadmkvifile{scrn-wid}
-\loadmkvifile{scrn-but}
-\loadmkvifile{scrn-bar}
-
-\loadmarkfile{page-com} % optional (after scrn-pag)
-
-\loadmarkfile{strc-bkm} % bookmarks
-
-\loadmarkfile{tabl-com}
-\loadmarkfile{tabl-pln}
-
-\loadmarkfile{tabl-tab} % thrd-tab stripped and merged
-
-\loadmarkfile{tabl-tbl}
-\loadmarkfile{tabl-ntb}
-\loadmarkfile{tabl-nte}
-\loadmarkfile{tabl-ltb}
-\loadmarkfile{tabl-tsp}
-\loadmkvifile{tabl-xtb}
-\loadmarkfile{tabl-mis}
-
-\loadmarkfile{java-ini}
-
-\loadmkvifile{scrn-fld}
-\loadmkvifile{scrn-hlp}
-
-\loadmarkfile{char-enc} % will move up
-
-\loadmkvifile{font-lib} % way too late
-\loadmkvifile{font-fil}
-\loadmkvifile{font-var}
-\loadmkvifile{font-fea}
-\loadmkvifile{font-mat}
-\loadmkvifile{font-ini}
-\loadmkvifile{font-sym}
-\loadmkvifile{font-sty}
-\loadmkvifile{font-set}
-\loadmkvifile{font-emp}
-\loadmarkfile{font-pre}
-\loadmarkfile{font-unk}
-\loadmarkfile{font-tra}
-\loadmarkfile{font-chk}
-\loadmarkfile{font-uni}
-\loadmkvifile{font-col}
-\loadmkvifile{font-gds}
-\loadmkvifile{font-aux}
-
-\loadmarkfile{typo-lan}
-
-\loadmarkfile{lxml-css}
-
-\loadmarkfile{spac-chr} % depends on fonts
-
-\loadmarkfile{blob-ini} % not to be used, we only use a helper
-
-\loadmarkfile{trac-vis}
-\loadmarkfile{trac-jus}
-
-\loadmarkfile{typo-cln}
-\loadmarkfile{typo-spa}
-\loadmarkfile{typo-krn}
-\loadmkvifile{typo-itc}
-\loadmarkfile{typo-dir}
-\loadmarkfile{typo-brk}
-\loadmarkfile{typo-cap}
-\loadmarkfile{typo-dig}
-\loadmarkfile{typo-rep}
-\loadmkvifile{typo-txt}
-\loadmarkfile{typo-par}
-
-\loadmkvifile{type-ini}
-\loadmarkfile{type-set}
-
-\loadmarkfile{scrp-ini}
-
-\loadmarkfile{lang-wrd} % can be optional (discussion with mm sideeffect)
-%loadmarkfile{lang-rep} % can be optional (bt 2013 side effect)
-
-\loadmarkfile{prop-ini} % only for downward compatibility
-
-\loadmarkfile{mlib-ctx}
-
-\loadmarkfile{meta-ini}
-\loadmarkfile{meta-tex}
-\loadmarkfile{meta-fun}
-\loadmarkfile{meta-pag}
-\loadmarkfile{meta-grd}
-
-\loadmarkfile{page-mrk} % depends on mp
-
-\loadmarkfile{page-flw}
-\loadmarkfile{page-spr}
-\loadmarkfile{page-plg}
-\loadmarkfile{page-str}
-
-\loadmarkfile{anch-pgr} % can be moved up (nicer for dependencies)
-\loadmkvifile{anch-bck}
-\loadmarkfile{anch-tab} % overloads tabl-tbl
-\loadmarkfile{anch-bar}
-%loadmarkfile{anch-snc} % when needed this one will be redone
-
-\loadmarkfile{math-ini}
-\loadmarkfile{math-pln}
-\loadmarkfile{math-for}
-\loadmarkfile{math-def}
-\loadmarkfile{math-ali}
-%loadmarkfile{math-arr}
-\loadmkvifile{math-stc}
-\loadmarkfile{math-frc}
-\loadmarkfile{math-mis}
-\loadmarkfile{math-scr}
-\loadmarkfile{math-int}
-\loadmarkfile{math-del}
-\loadmarkfile{math-fen}
-\loadmarkfile{math-inl}
-\loadmarkfile{math-dis}
-%loadmarkfile{math-lan}
-
-\loadmarkfile{phys-dim}
-
-\loadmarkfile{strc-mat}
-
-\loadmarkfile{chem-ini}
-\loadmarkfile{chem-str}
-
-\loadmarkfile{typo-scr}
-
-\loadmarkfile{node-rul}
-\loadmkvifile{font-sol} % font solutions
-
-\loadmkvifile{strc-not}
-\loadmkvifile{strc-lnt}
-
-\loadmarkfile{pack-com}
-\loadmarkfile{typo-del}
-
-\loadmarkfile{grph-trf}
-\loadmarkfile{grph-inc}
-\loadmarkfile{grph-fig}
-\loadmarkfile{grph-raw}
-
-\loadmarkfile{pack-box}
-\loadmarkfile{pack-bar}
-\loadmarkfile{page-app}
-\loadmarkfile{meta-fig}
-
-\loadmarkfile{lang-spa} % will become obsolete
-
-\loadmarkfile{bibl-bib}
-\loadmarkfile{bibl-tra}
-
-%loadmarkfile{x-xtag} % no longer preloaded
-
-\loadmarkfile{meta-xml}
-
-\loadmarkfile{cont-log}
-
-\loadmarkfile{task-ini}
-
-\loadmarkfile{cldf-ver} % verbatim, this can come late
-\loadmarkfile{cldf-com} % commands, this can come late
-
-\loadmarkfile{core-ctx} % this order might change but we need to check depedencies / move to another namespace
-
-\loadmarkfile{core-def}
-
-%usemodule[x][res-04] % xml resource libraries
-%usemodule[x][res-08] % rlx runtime conversion
-%usemodule[x][res-12] % rli external indentification
-
-% now we hook in backend code (needs checking)
-
-\loadmarkfile{back-pdf} % actually, this one should load the next three using document.arguments.backend
-\loadmarkfile{mlib-pdf}
-\loadmarkfile{mlib-pps}
-\loadmarkfile{meta-pdf}
-\loadmarkfile{grph-epd}
-
-\loadmarkfile{back-exp}
-
-\setupcurrentlanguage[\defaultlanguagetag]
-
-\prependtoks
- \ctxlua{statistics.starttiming(statistics)}%
-\to \everyjob
-
-\appendtoks
- \ctxlua{statistics.stoptiming(statistics)}%
-\to \everyjob
-
-\appendtoks
- \ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkiv","\contextkind")}% can become automatic
-\to \everydump
-
-\errorstopmode \dump \endinput
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 2583c6520..63d10d007 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -1646,13 +1646,13 @@ local hows = {
["="] = "replace",
}
-function commands.feature(how,parent,name,font)
- if not how then
+function commands.feature(how,parent,name,font) -- 0/1 test temporary for testing
+ if not how or how == 0 then
if trace_features and texattribute[0] ~= 0 then
report_cummulative("font %!font:name!, reset",fontdata[font or true])
end
texattribute[0] = 0
- elseif how == true then
+ elseif how == true or how == 1 then
local hash = "feature > " .. parent
local done = cache[hash]
if trace_features and done then
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index c1f2f14fc..401de4bda 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -1934,8 +1934,9 @@ local function copytotfm(data,cache_id)
local units = metadata.units_per_em or 1000
--
if units == 0 then -- catch bugs in fonts
- units = 1000
+ units = 1000 -- maybe 2000 when ttf
metadata.units_per_em = 1000
+ report_otf("changing %a units to %a",0,units)
end
--
parameters.slant = 0
diff --git a/tex/context/base/font-pre.mkiv b/tex/context/base/font-pre.mkiv
index b03abed7d..ef3694c2b 100644
--- a/tex/context/base/font-pre.mkiv
+++ b/tex/context/base/font-pre.mkiv
@@ -523,7 +523,7 @@
%D
%D For tracing purposes we define:
-\definefont[tinyfont][Mono at 1ex]
+\definefont[tinyfont][dejavusansmono at 1ex]
%D \macros
%D {infofont}
@@ -535,7 +535,7 @@
\let\infofont\relax % satisfy dep checker
-\definefont [infofont] [Mono at 6pt] % todo \the\everybodyfont
+\definefont[infofont][dejavusansmono at 6pt] % todo \the\everybodyfont
\protect \endinput
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 2bb5844fc..9d2266886 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -34,6 +34,8 @@ as the current variant was written when <l n='lpeg'/> showed up and it's easier
build tables in one go.</p>
--ldx]]--
+lpeg.setmaxstack(1000) -- deeply nested xml files
+
xml = xml or { }
local xml = xml
@@ -627,7 +629,6 @@ local publicdoctype = doctypename * somespace * P("PUBLIC") * somespace * val
local systemdoctype = doctypename * somespace * P("SYSTEM") * somespace * value * somespace * doctypeset
local simpledoctype = (1-close)^1 -- * balanced^0
local somedoctype = C((somespace * (publicdoctype + systemdoctype + definitiondoctype + simpledoctype) * optionalspace)^0)
-local somedoctype = C((somespace * (publicdoctype + systemdoctype + definitiondoctype + simpledoctype) * optionalspace)^0)
local instruction = (spacing * begininstruction * someinstruction * endinstruction) / function(...) add_special("@pi@",...) end
local comment = (spacing * begincomment * somecomment * endcomment ) / function(...) add_special("@cm@",...) end
diff --git a/tex/context/base/m-graph.mkiv b/tex/context/base/m-graph.mkiv
index c15262cac..e99921c43 100644
--- a/tex/context/base/m-graph.mkiv
+++ b/tex/context/base/m-graph.mkiv
@@ -64,14 +64,7 @@
\c!method=\s!double]
\startMPdefinitions{graph}
- if unknown context_grap: input "mp-grap.mpiv" ; fi ;
-\stopMPdefinitions
-
-% For backwards compatibility (for the moment), also load the graph macros in
-% the standard MP instance (scaled integer):
-
-\startMPdefinitions
- if unknown context_grap: input "mp-grap.mpiv" ; fi ;
+ if unknown context_grap : input mp-grap.mpiv ; fi ;
\stopMPdefinitions
\protect
diff --git a/tex/context/base/mtx-context-xml.tex b/tex/context/base/mtx-context-xml.tex
new file mode 100644
index 000000000..63b1d6e9e
--- /dev/null
+++ b/tex/context/base/mtx-context-xml.tex
@@ -0,0 +1,75 @@
+%D \module
+%D [ file=mtx-context-xml,
+%D version=2013.05.30,
+%D title=\CONTEXT\ Extra Trickry,
+%D subtitle=Analyzing XML files,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \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.
+
+% This module replaces mkii analyzers.
+
+% begin help
+%
+% usage: context --extra=xml [options] list-of-files
+%
+% --analyze : show elements and characters
+% --topspace=dimension : distance above first line
+% --backspace=dimension : distance before left margin
+% --bodyfont=list : additional bodyfont settings
+% --paperformat=spec : paper*print or paperxprint
+%
+% end help
+
+\input mtx-context-common.tex
+
+\setupbodyfont
+ [dejavu,11pt,tt,\getdocumentargument{bodyfont}]
+
+\setuptyping
+ [lines=yes]
+
+\setuplayout
+ [header=0cm,
+ footer=1.5cm,
+ topspace=\getdocumentargumentdefault{topspace}{1.5cm},
+ backspace=\getdocumentargumentdefault{backspace}{1.5cm},
+ width=middle,
+ height=middle]
+
+\setuppapersize
+ [\getdocumentargument{paperformat_paper}]
+ [\getdocumentargument{paperformat_print}]
+
+\usemodule[xml-analyzers]
+
+\starttext
+
+\startluacode
+ local pattern = document.arguments.pattern
+ local files = document.files
+
+ if pattern then
+ files = dir.glob(pattern)
+ context.setupfootertexts( { pattern }, { "pagenumber" })
+ else
+ context.setupfootertexts( { table.concat(files," ") }, { "pagenumber" })
+ end
+
+ if #files > 0 then
+ if document.arguments.analyze then
+ moduledata.xml.analyzers.structure (files)
+ moduledata.xml.analyzers.characters(files)
+ else
+ context("no action given")
+ end
+ else
+ context("no files given")
+ end
+\stopluacode
+
+\stoptext
diff --git a/tex/context/base/page-mix.lua b/tex/context/base/page-mix.lua
index cf0094787..f265ac8f9 100644
--- a/tex/context/base/page-mix.lua
+++ b/tex/context/base/page-mix.lua
@@ -282,7 +282,6 @@ local function setsplit(specification) -- a rather large function
if column == nofcolumns then
column = 0 -- nicer in trace
rest = head
- -- lasthead = head
return false, 0
else
local skipped
@@ -290,7 +289,6 @@ local function setsplit(specification) -- a rather large function
result = results[column]
current, skipped = discardtopglue(current,discarded)
head = current
- -- lasthead = head
return true, skipped
end
end
@@ -324,7 +322,7 @@ local function setsplit(specification) -- a rather large function
while current do
local id = current.id
local nxt = current.next
-local lastcolumn = column
+ local lastcolumn = column
if id == hlist_code or id == vlist_code then
line = line + 1
local nxtid = nxt and nxt.id
@@ -417,9 +415,9 @@ local lastcolumn = column
-- club and widow and such i.e. resulting penalties (if we care)
end
end
-if lastcolumn == column then
- nxt = current.next -- can have changed
-end
+ if current then -- lastcolumn == column then
+ nxt = current.next -- can have changed
+ end
if nxt then
current = nxt
elseif head == lasthead then
diff --git a/tex/context/base/s-fonts-features.mkiv b/tex/context/base/s-fonts-features.mkiv
index 8982f7347..b81b53a71 100644
--- a/tex/context/base/s-fonts-features.mkiv
+++ b/tex/context/base/s-fonts-features.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\startmodule[s-fonts-features]
+\startmodule[fonts-features]
\registerctxluafile{s-fonts-features}{}
diff --git a/tex/context/base/s-fonts-goodies.mkiv b/tex/context/base/s-fonts-goodies.mkiv
index f07081825..e596507af 100644
--- a/tex/context/base/s-fonts-goodies.mkiv
+++ b/tex/context/base/s-fonts-goodies.mkiv
@@ -13,7 +13,7 @@
%D More tables will follow here as we have many more goodies by now.
-\startmodule[s-fonts-goodies]
+\startmodule[fonts-goodies]
\registerctxluafile{s-fonts-goodies}{}
diff --git a/tex/context/base/s-fonts-missing.lua b/tex/context/base/s-fonts-missing.lua
index 829fed45f..9a75676a9 100644
--- a/tex/context/base/s-fonts-missing.lua
+++ b/tex/context/base/s-fonts-missing.lua
@@ -14,17 +14,12 @@ local function legend(id)
local privates = c.properties.privates
if privates then
local categories = table.swapped(fonts.loggers.category_to_placeholder)
- -- context.starttabulate { "|l|c|c|l|" }
- context.starttabulate { "|l|c|l|" }
+ context.starttabulate { "|c|l|" }
context.HL()
context.NC()
- context.bold("name")
- context.NC()
context.bold("symbol")
context.NC()
- -- context.bold("node")
- -- context.NC()
- context.bold("category")
+ context.bold("name")
context.NC()
context.NR()
context.HL()
@@ -32,15 +27,10 @@ local function legend(id)
local tag = characters.categorytags[categories[k]]
if tag and tag ~= "" then
context.NC()
- context(k)
- context.NC()
context.dontleavehmode()
context.char(v)
context.NC()
- -- context.dontleavehmode()
- -- commands.getprivatechar(k)
- -- context.NC()
- context(string.lower(tag))
+ context(k)
context.NC()
context.NR()
end
diff --git a/tex/context/base/s-fonts-missing.mkiv b/tex/context/base/s-fonts-missing.mkiv
index 6acef819e..c566f4995 100644
--- a/tex/context/base/s-fonts-missing.mkiv
+++ b/tex/context/base/s-fonts-missing.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\startmodule[s-fonts-missing]
+\startmodule[fonts-missing]
\registerctxluafile{s-fonts-missing}{}
diff --git a/tex/context/base/s-fonts-shapes.mkiv b/tex/context/base/s-fonts-shapes.mkiv
index 56e3d80a7..f8eb8ffdd 100644
--- a/tex/context/base/s-fonts-shapes.mkiv
+++ b/tex/context/base/s-fonts-shapes.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\startmodule[s-fonts-shapes]
+\startmodule[fonts-shapes]
\registerctxluafile{s-fonts-shapes}{}
diff --git a/tex/context/base/s-fonts-tables.mkiv b/tex/context/base/s-fonts-tables.mkiv
index 98f9052ca..e962f952d 100644
--- a/tex/context/base/s-fonts-tables.mkiv
+++ b/tex/context/base/s-fonts-tables.mkiv
@@ -13,7 +13,7 @@
% todo: make a mtxrun --script font <name> option
-\startmodule[s-fonts-tables]
+\startmodule[fonts-tables]
\registerctxluafile{s-fonts-tables}{}
diff --git a/tex/context/base/s-fonts-vectors.mkiv b/tex/context/base/s-fonts-vectors.mkiv
index 371a30cc5..2605fe964 100644
--- a/tex/context/base/s-fonts-vectors.mkiv
+++ b/tex/context/base/s-fonts-vectors.mkiv
@@ -13,7 +13,7 @@
%D This code is used in the \MKIV\ fonts manual.
-\startmodule[s-fonts-vectors]
+\startmodule[fonts-vectors]
\registerctxluafile{s-fonts-vectors}{}
diff --git a/tex/context/base/s-sql-tables.mkiv b/tex/context/base/s-sql-tables.mkiv
index 6f507e8b5..122570874 100644
--- a/tex/context/base/s-sql-tables.mkiv
+++ b/tex/context/base/s-sql-tables.mkiv
@@ -13,7 +13,7 @@
% for the moment no helpers
-\startmodule[s-sql-tables]
+\startmodule[sql-tables]
\registerctxluafile{s-sql-tables}{}
diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv
index 0f9b21186..65792e966 100644
--- a/tex/context/base/spac-ali.mkiv
+++ b/tex/context/base/spac-ali.mkiv
@@ -553,6 +553,20 @@
\fi
\raggedcommand}
+% experiment
+
+\unexpanded\def\spac_align_use_later#1%
+ {\begingroup
+ \edef\m_spac_align_asked{#1}%
+ \expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache\m_spac_align_asked\endcsname
+ \ifx\raggedcommand\relax
+ \spac_align_add_to_cache
+ \fi
+ \endgroup}
+
+\unexpanded\def\spac_align_use_now#1%
+ {\csname\??alignmentnormalcache#1\endcsname}
+
% The keywords:
\unexpanded\def\installalign#1#2% beware: commands must be unexpandable!
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 097fe5a2d..996b7ae13 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.pdf b/tex/context/base/status-lua.pdf
index f727ca843..6a18ef05b 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/tabl-tbl.mkiv b/tex/context/base/tabl-tbl.mkiv
index 2fa8c4805..8bc0624e6 100644
--- a/tex/context/base/tabl-tbl.mkiv
+++ b/tex/context/base/tabl-tbl.mkiv
@@ -48,6 +48,7 @@
% p p(dimen) of automatisch als alleen p
% w column width
% f font#1
+% A {alignmentoptions}
% B bold
% I italic
% S slanted
@@ -458,6 +459,9 @@
\bgroup % we cannot combine the if because a cell may have only one ##
\tabl_tabulate_hook_b
\c_tabl_tabulate_align\constantnumber\c_tabl_tabulate_align % needed in tag passing
+ \ifx\m_tabl_tabulate_alignment\empty \else
+ \spac_align_use_now{\m_tabl_tabulate_alignment}%
+ \fi
\noexpand\dostarttagged\noexpand\t!tabulatecell\noexpand\empty
\noexpand\dotagtabulatecell
\noexpand#1%
@@ -554,6 +558,7 @@
\installtabulatepreambleoption{d}{\t_tabl_tabulate_settings\expandafter{\the\t_tabl_tabulate_settings\fixedspaces}%
\tabl_tabulate_set_preamble}
\installtabulatepreambleoption{ }{\tabl_tabulate_set_preamble}
+\installtabulatepreambleoption{A}{\tabl_tabulate_set_alignment}
% We no longer deal with '~' here but map it onto 'd' instead. Of course
% we could prefix a key with \type {\meaning} instead, which works ok (and
@@ -643,6 +648,11 @@
\c_tabl_tabulate_modus\zerocount
\tabl_tabulate_pickup_width}
+\def\tabl_tabulate_set_alignment#1%
+ {\edef\m_tabl_tabulate_alignment{#1}%
+ \spac_align_use_later\m_tabl_tabulate_alignment
+ \tabl_tabulate_set_preamble}
+
\def\tabl_tabulate_set_paragraph
{\doifnextparenthesiselse
{\c_tabl_tabulate_modus\plusone
@@ -743,6 +753,7 @@
\t_tabl_tabulate_emath\emptytoks
\t_tabl_tabulate_font\emptytoks
\t_tabl_tabulate_settings\emptytoks
+ \global\let\m_tabl_tabulate_alignment\empty
\global\let\m_tabl_tabulate_color\empty
\global\let\m_tabl_tabulate_text_color\empty
\global\let\m_tabl_tabulate_vrule_color\empty
diff --git a/tex/context/base/x-set-12.mkiv b/tex/context/base/x-set-12.mkiv
index bfeb0ab54..6590bfe9e 100644
--- a/tex/context/base/x-set-12.mkiv
+++ b/tex/context/base/x-set-12.mkiv
@@ -12,6 +12,19 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% included loading overhead
+%
+% 2.55 / 2.40 (luatex)
+% 1.90 / 1.80 (luajittex)
+
+% \newif\ifcachedcommand
+% \newif\ifcalledcommand
+%
+% \cachedcommandtrue
+% \calledcommandtrue
+%
+% \usemodule[speedtest]
+
\usemodule[set-11]
\unprotect
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index cf5862ca9..aa3b3958b 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 : 05/28/13 00:34:00
+-- merge date : 05/31/13 21:57:24
do -- begin closure to overcome local limits and interference
@@ -6718,8 +6718,9 @@ local function copytotfm(data,cache_id)
local fullname=metadata.fullname or fontname
local units=metadata.units_per_em or 1000
if units==0 then
- units=1000
+ units=1000
metadata.units_per_em=1000
+ report_otf("changing %a units to %a",0,units)
end
parameters.slant=0
parameters.space=spaceunits