summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-08-26 01:43:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-08-26 01:43:00 +0200
commitde74cbee0bab8051c2c2edb6e8e90dd0f79672f2 (patch)
tree6e7cf8e598de885d27e8080de309cd7b04a03f75 /tex
parent6f938cc8163c3de2abb73b3b90b3c6cb72c369a3 (diff)
downloadcontext-de74cbee0bab8051c2c2edb6e8e90dd0f79672f2.tar.gz
beta 2011.08.26 01:43
Diffstat (limited to 'tex')
-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.pdfbin4091 -> 4089 bytes
-rw-r--r--tex/context/base/context-version.pngbin105302 -> 104744 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/lpdf-fmt.lua2
-rw-r--r--tex/context/base/lxml-tab.lua67
-rw-r--r--tex/context/base/lxml-xml.lua21
-rw-r--r--tex/context/base/pack-rul.mkiv2
-rw-r--r--tex/context/base/s-mod-00.mkiv12
-rw-r--r--tex/context/base/scrn-fld.mkvi2
-rw-r--r--tex/context/base/status-files.pdfbin23872 -> 23870 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin162209 -> 162205 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
15 files changed, 64 insertions, 52 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 5fb5670d0..b6dbba5e0 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{2011.08.23 12:04}
+\newcontextversion{2011.08.26 01:43}
%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 0f5bb0d96..6ee2a3bfb 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{2011.08.23 12:04}
+\newcontextversion{2011.08.26 01:43}
%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/context-version.pdf b/tex/context/base/context-version.pdf
index f53ba87b3..8c927f12b 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 192df98ef..4e9c93bbe 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 4dcb714a5..578783b40 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{2011.08.23 12:04}
+\edef\contextversion{2011.08.26 01:43}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index e2cc12234..433fbb340 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.08.23 12:04}
+\edef\contextversion{2011.08.26 01:43}
%D For those who want to use this:
diff --git a/tex/context/base/lpdf-fmt.lua b/tex/context/base/lpdf-fmt.lua
index 29f2ef5a0..8e118db12 100644
--- a/tex/context/base/lpdf-fmt.lua
+++ b/tex/context/base/lpdf-fmt.lua
@@ -438,7 +438,7 @@ local function handleinternalprofile(s,include)
elseif not channel then
report_backend("error, couldn't resolve channel entry for colorspace '%s'",colorspace)
else
- profile = pdfflushstreamfileobject(fullname,{ N = channel },false) -- uncompressed
+ profile = pdfflushstreamfileobject(fullname,pdfdictionary{ N = channel },false) -- uncompressed
internalprofiles[tag] = profile
if trace_format then
report_backend("including '%s' color profile from '%s'",colorspace,fullname)
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 99c7226a8..1e4601998 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -346,7 +346,7 @@ local predefined_simplified = {
local nofprivates = 0xF0000 -- shared but seldom used
-local privates_u = {
+local privates_u = { -- unescaped
[ [[&]] ] = "&amp;",
[ [["]] ] = "&quot;",
[ [[']] ] = "&apos;",
@@ -457,40 +457,44 @@ local function handle_any_entity(str)
if not a then
a = resolve_predefined and predefined_simplified[str]
if a then
- -- one of the predefined
- elseif type(resolve) == "function" then
- a = resolve(str) or entities[str]
- else
- a = entities[str]
- end
- if a then
- if type(a) == "function" then
- if trace_entities then
- report_xml("expanding entity &%s; (function)",str)
- end
- a = a(str) or ""
- end
- a = lpegmatch(parsedentity,a) or a
if trace_entities then
- report_xml("resolved entity &%s; -> %s (internal)",str,a)
+ report_xml("resolved entity &%s; -> %s (predefined)",str,a)
end
else
- local unknown_any_entity = placeholders.unknown_any_entity
- if unknown_any_entity then
- a = unknown_any_entity(str) or ""
+ if type(resolve) == "function" then
+ a = resolve(str) or entities[str]
+ else
+ a = entities[str]
end
if a then
+ if type(a) == "function" then
+ if trace_entities then
+ report_xml("expanding entity &%s; (function)",str)
+ end
+ a = a(str) or ""
+ end
+ a = lpegmatch(parsedentity,a) or a -- for nested
if trace_entities then
- report_xml("resolved entity &%s; -> %s (external)",str,a)
+ report_xml("resolved entity &%s; -> %s (internal)",str,a)
end
else
- if trace_entities then
- report_xml("keeping entity &%s;",str)
+ local unknown_any_entity = placeholders.unknown_any_entity
+ if unknown_any_entity then
+ a = unknown_any_entity(str) or ""
end
- if str == "" then
- a = "&error;"
+ if a then
+ if trace_entities then
+ report_xml("resolved entity &%s; -> %s (external)",str,a)
+ end
else
- a = "&" .. str .. ";"
+ if trace_entities then
+ report_xml("keeping entity &%s;",str)
+ end
+ if str == "" then
+ a = "&error;"
+ else
+ a = "&" .. str .. ";"
+ end
end
end
end
@@ -632,6 +636,7 @@ 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
@@ -685,6 +690,8 @@ local function xmlconvert(data, settings)
resolve_predefined = true
end
--
+--~ inspect(settings)
+ --
stack, top, at, xmlns, errorstr = { }, { }, { }, { }, nil
acache, hcache, dcache = { }, { }, { } -- not stored
reported_attribute_errors = { }
@@ -745,11 +752,11 @@ local function xmlconvert(data, settings)
if errorstr and errorstr ~= "" then
result.error = true
end
-strip, utfize, resolve, resolve_predefined = nil, nil, nil, nil
-unify_predefined, cleanup, entities = nil, nil, nil
-stack, top, at, xmlns, errorstr = nil, nil, nil, nil, nil
-acache, hcache, dcache = nil, nil, nil
-reported_attribute_errors, mt, errorhandler = nil, nil, nil
+ strip, utfize, resolve, resolve_predefined = nil, nil, nil, nil
+ unify_predefined, cleanup, entities = nil, nil, nil
+ stack, top, at, xmlns, errorstr = nil, nil, nil, nil, nil
+ acache, hcache, dcache = nil, nil, nil
+ reported_attribute_errors, mt, errorhandler = nil, nil, nil
return result
end
diff --git a/tex/context/base/lxml-xml.lua b/tex/context/base/lxml-xml.lua
index 5012f69e5..05405015d 100644
--- a/tex/context/base/lxml-xml.lua
+++ b/tex/context/base/lxml-xml.lua
@@ -111,10 +111,10 @@ local function chainattribute(collected,arguments) -- todo: optional levels
return ""
end
-local function raw(collected) -- hybrid
+local function raw(collected) -- hybrid (not much different from text so it might go)
if collected then
local e = collected[1] or collected
- return (e and xmlserialize(e)) or "" -- only first as we cannot concat function
+ return e and xmltostring(e) or "" -- only first as we cannot concat function
else
return ""
end
@@ -138,10 +138,15 @@ local xmltexthandler = xmlnewhandlers {
}
local function xmltotext(root)
- if not root then
+ local dt = root.dt
+ if not dt then
return ""
- elseif type(root) == 'string' then
- return root
+ end
+ local nt = #dt -- string or table
+ if nt == 0 then
+ return ""
+ elseif nt == 1 and type(dt[1]) == "string" then
+ return dt[1] -- no escaping of " ' < > &
else
return xmlserialize(root,xmltexthandler) or ""
end
@@ -152,7 +157,7 @@ end
local function text(collected) -- hybrid
if collected then
local e = collected[1] or collected
- return (e and xmltotext(e.dt)) or ""
+ return (e and xmltotext(e)) or ""
else
return ""
end
@@ -300,10 +305,10 @@ function xml.text(id,pattern)
if pattern then
-- return text(xmlfilter(id,pattern))
local collected = xmlfilter(id,pattern)
- return (collected and xmltotext(collected[1].dt)) or ""
+ return (collected and xmltotext(collected[1])) or ""
elseif id then
-- return text(id)
- return xmltotext(id.dt) or ""
+ return xmltotext(id) or ""
else
return ""
end
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv
index c6743117c..97724ff00 100644
--- a/tex/context/base/pack-rul.mkiv
+++ b/tex/context/base/pack-rul.mkiv
@@ -1169,7 +1169,7 @@
%D future extensions.
%D \macros
-%D {\doassigncheckedframeoffset}
+%D {doassigncheckedframeoffset}
%D
%D Offset helper (see menus):
diff --git a/tex/context/base/s-mod-00.mkiv b/tex/context/base/s-mod-00.mkiv
index eadefbe12..3752f85ca 100644
--- a/tex/context/base/s-mod-00.mkiv
+++ b/tex/context/base/s-mod-00.mkiv
@@ -272,7 +272,7 @@
{\EveryPar
{\doglobal\newcounter\NOfMarginLines}}
-\def\dodomargeaanduidingen[#1]#2%
+\unexpanded\def\dodomargeaanduidingen[#1]#2%
{\def\docommand##1%
{\indent\hbox
{\ifx#2\relax
@@ -285,7 +285,7 @@
\endgraf}%
\processcommalist[#1]\docommand}
-\def\margeaanduidingen#1[#2]%
+\unexpanded\def\margeaanduidingen#1[#2]% to be renamed
{\def\domargeaanduidingen##1##2%
{\margintitle[#2]%
{\switchtobodyfont[\v!small]%
@@ -299,13 +299,13 @@
\processcommalist[##2]\index}}%
\dodoublegroupempty\domargeaanduidingen}
-\def\complexmacros{\margeaanduidingen\tex }
-\def\complexextras{\margeaanduidingen\relax}
+\unexpanded\def\complexmacros{\margeaanduidingen\tex }
+\unexpanded\def\complexextras{\margeaanduidingen\relax}
-\def\complexelements
+\unexpanded\def\complexelements
{\margeaanduidingen\someelement}
-\def\someelement#1{\type{<#1>}}
+\unexpanded\def\someelement#1{\type{<#1>}}
\definecomplexorsimpleempty\macros
\definecomplexorsimpleempty\extras
diff --git a/tex/context/base/scrn-fld.mkvi b/tex/context/base/scrn-fld.mkvi
index f25685788..c786f3832 100644
--- a/tex/context/base/scrn-fld.mkvi
+++ b/tex/context/base/scrn-fld.mkvi
@@ -443,7 +443,7 @@
\setupfieldcontentframed[#tag][\s!parent=\??wc,#variant]%
\fi\fi\fi\fi}
-\def\scrn_field_setup_fields[#variant][#totalsettings][#labelsettings][#fieldsettings]
+\def\scrn_field_setup_fields[#variant][#totalsettings][#labelsettings][#fieldsettings]%
{\iffourthargument
\setupfieldtotalframed [\c!alternative={#variant},#totalsettings]%
\setupfieldlabelframed [#labelsettings]%
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 42f71838c..c9d27a01e 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 ab1c683f0..c8d4e573f 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 1fb3259b4..99c22f268 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 : 08/23/11 12:04:56
+-- merge date : 08/26/11 01:43:42
do -- begin closure to overcome local limits and interference