summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/buff-ver.mkiv3
-rw-r--r--tex/context/base/colo-hex.mkiv2
-rw-r--r--tex/context/base/cont-log.tex3
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/l-string.lua10
-rw-r--r--tex/context/base/lang-ita.tex4
-rw-r--r--tex/context/base/lpdf-ini.lua10
-rw-r--r--tex/context/base/lpdf-mis.lua15
-rw-r--r--tex/context/base/lxml-ini.lua205
-rw-r--r--tex/context/base/lxml-pth.lua8
-rw-r--r--tex/context/base/scrn-nav.mkiv2
-rw-r--r--tex/context/base/x-fo.tex38
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua12
14 files changed, 183 insertions, 133 deletions
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index 1e37dd626..54764a82c 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -881,7 +881,8 @@
{\doiflocfileelse{#1}
{\firstoftwoarguments}
{\doifinputfileelse{#1}
- {\def\readfilename{\pathplusfile\filepath{#1}}\firstoftwoarguments} % messy, looks wrong too
+% {\def\readfilename{\pathplusfile\filepath{#1}}\firstoftwoarguments} % messy, looks wrong too
+ {\def\readfilename{#1}\firstoftwoarguments} % messy, looks wrong too
{\secondoftwoarguments}}}
\def\dodotypefile[#1][#2]#3%
diff --git a/tex/context/base/colo-hex.mkiv b/tex/context/base/colo-hex.mkiv
index dd8e03938..d626a39d1 100644
--- a/tex/context/base/colo-hex.mkiv
+++ b/tex/context/base/colo-hex.mkiv
@@ -23,4 +23,6 @@
% fill (point 0 of p -- point 3 of p -- point 2 of p --cycle) withcolor \MPcolor{hextestcolor} ; % top left part
% \stopMPpage
+\def\checkhexcolor[#1]{\doifcolorelse{#1}\donothing{\definecolor[#1][h=#1]}} % is this ok?
+
\endinput
diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex
index a22c1d2c4..2d1b9875e 100644
--- a/tex/context/base/cont-log.tex
+++ b/tex/context/base/cont-log.tex
@@ -89,7 +89,7 @@
\kern-.11em\TeX}
\def\AMSswitch#1%
- {$\fam2\ifdim\bodyfontsize>1.1em\scriptstyle\fi#1$}
+ {$\cal\ifdim\bodyfontsize>1.1em\scriptstyle\fi#1$}
\unexpanded\def\AmSTeX
{\AMSswitch A%
@@ -210,6 +210,7 @@
\unexpanded\def\TABLE {\TaBlE}
\unexpanded\def\AMSTEX {\AmSTeX}
\unexpanded\def\LAMSTEX {\LamSTeX}
+\unexpanded\def\INRSTEX {inrs\TeX}
%D And this is how they show up: \TeX, \MetaFont, \MetaPost,
%D \PiCTeX, \TaBlE, \ConTeXt, \PPCHTeX, \AmSTeX, \LaTeX,
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 4d99eec1f..6f305f989 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2009.08.26 01:43}
+\newcontextversion{2009.08.28 14:44}
%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.tex b/tex/context/base/context.tex
index 63ba86f3d..add7d037e 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2009.08.26 01:43}
+\edef\contextversion{2009.08.28 14:44}
%D For those who want to use this:
diff --git a/tex/context/base/l-string.lua b/tex/context/base/l-string.lua
index 655214d1a..faee66c54 100644
--- a/tex/context/base/l-string.lua
+++ b/tex/context/base/l-string.lua
@@ -46,6 +46,14 @@ function string:unquote()
return (gsub(self,"^([\"\'])(.*)%1$","%2"))
end
+--~ function string:unquote()
+--~ if find(self,"^[\'\"]") then
+--~ return self:sub(2,-2)
+--~ else
+--~ return self
+--~ end
+--~ end
+
function string:quote() -- we could use format("%q")
return '"' .. self:unquote() .. '"'
end
@@ -72,7 +80,7 @@ function string:strip()
end
function string:is_empty()
- return not find(find,"%S")
+ return not find(self,"%S")
end
function string:enhance(pattern,action)
diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex
index dd4e04461..48b3bf242 100644
--- a/tex/context/base/lang-ita.tex
+++ b/tex/context/base/lang-ita.tex
@@ -266,8 +266,8 @@
\setuplabeltext [\s!ro] [\v!graphic=Graficul ]
\setuplabeltext [\s!fr] [\v!chapter=]
-\setuplabeltext [\s!es] [\v!chapter=Cap\'\itulo]
-\setuplabeltext [\s!ca] [\v!chapter=Cap\'\itol]
+\setuplabeltext [\s!es] [\v!chapter=Cap\'\i tulo]
+\setuplabeltext [\s!ca] [\v!chapter=Cap\'\i tol]
\setuplabeltext [\s!it] [\v!chapter=]
\setuplabeltext [\s!la] [\v!chapter=]
\setuplabeltext [\s!pt] [\v!chapter=]
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index 05c718af2..6d1936c2f 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -170,7 +170,15 @@ local tostring_z = function() return "null" end
local tostring_t = function() return "true" end
local tostring_f = function() return "false" end
local tostring_r = function(t) return t[1] .. " 0 R" end
-local tostring_v = function(t) return concat(t[1],"") end
+
+local tostring_v = function(t)
+ local s = t[1]
+ if type(s) == "table" then
+ return concat(s,"")
+ else
+ return s
+ end
+end
local function value_x(t) return t end -- the call is experimental
local function value_s(t,key) return t[1] end -- the call is experimental
diff --git a/tex/context/base/lpdf-mis.lua b/tex/context/base/lpdf-mis.lua
index 87a11eff7..c852fb2d3 100644
--- a/tex/context/base/lpdf-mis.lua
+++ b/tex/context/base/lpdf-mis.lua
@@ -34,6 +34,7 @@ local pdfboolean = lpdf.boolean
local pdfconstant = lpdf.constant
local pdfreference = lpdf.reference
local pdfunicode = lpdf.unicode
+local pdfverbose = lpdf.verbose
local pdfstring = lpdf.string
local pdfreserveobj = pdf.reserveobj
@@ -249,15 +250,21 @@ local function documentspecification()
end
end
+-- temp hack: the mediabox is not under our control and has a precision of 4 digits
+
local factor = number.dimenfactors.bp
+local function boxvalue(n) -- we could share them
+ return pdfverbose(format("%0.4f",factor * n))
+end
+
local function pagespecification()
local pageheight = tex.pdfpageheight
local box = pdfarray { -- can be cached
- factor * (leftoffset),
- factor * (pageheight-topoffset-height),
- factor * (width-leftoffset),
- factor * (pageheight-topoffset),
+ boxvalue(leftoffset),
+ boxvalue(pageheight-topoffset-height),
+ boxvalue(width-leftoffset),
+ boxvalue(pageheight-topoffset),
}
lpdf.addtopageattributes("CropBox",box) -- mandate for rendering
lpdf.addtopageattributes("TrimBox",box) -- mandate for pdf/x
diff --git a/tex/context/base/lxml-ini.lua b/tex/context/base/lxml-ini.lua
index 38c3b461a..31068e27b 100644
--- a/tex/context/base/lxml-ini.lua
+++ b/tex/context/base/lxml-ini.lua
@@ -7,10 +7,12 @@ if not modules then modules = { } end modules ['lxml-ini'] = {
}
local utf = unicode.utf8
+local tex = tex or {}
local texsprint, texprint, texwrite, utfchar = tex.sprint or print, tex.print or print, tex.write or print, utf.char
-local format, concat, insert, remove = string.format, table.concat, table.insert, table.remove
-local type, next, tonumber = type, next, tonumber
+local concat, insert, remove, gsub, find = table.concat, table.insert, table.remove
+local format, sub, gsub, find = string.format, string.sub, string.gsub, string.find
+local type, next, tonumber, tostring = type, next, tonumber, tostring
local ctxcatcodes = tex.ctxcatcodes
local texcatcodes = tex.texcatcodes
@@ -66,16 +68,20 @@ document.xml = document.xml or { }
-- todo: loaded and myself per document so that we can garbage collect buffers
-lxml = lxml or { }
-lxml.loaded = { }
-lxml.myself = { }
-lxml.n = 0
+lxml = lxml or { }
+lxml.loaded = { }
+lxml.paths = { }
+lxml.myself = { }
+lxml.noffiles = 0
+lxml.nofconverted = 0
+lxml.nofindices = 0
local loaded = lxml.loaded
+local paths = lxml.paths
local myself = lxml.myself
local stack = lxml.stack
-lxml.self = myself -- be backward compatible for a while
+--~ lxml.self = myself -- be backward compatible for a while
--~ local function get_id(id)
--~ return (type(id) == "table" and id) or loaded[id] or myself[tonumber(id)] -- no need for tonumber if we pass without ""
@@ -340,8 +346,8 @@ do
local function toverbatim(str)
if beforecommand then texsprint(texcatcodes,beforecommand,"{}") end
-- todo: add this to capture
- str = str:gsub("^[ \t]+[\n\r]+","")
- str = str:gsub("[ \t\n\r]+$","")
+ str = gsub(str,"^[ \t]+[\n\r]+","")
+ str = gsub(str,"[ \t\n\r]+$","")
capture:match(str)
if aftercommand then texsprint(texcatcodes,aftercommand,"{}") end
end
@@ -415,26 +421,35 @@ xml.originalload = xml.originalload or xml.load
local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
+--~ function xml.load(filename)
+--~ lxml.noffiles = lxml.noffiles + 1
+--~ starttiming(xml)
+--~ local xmldata = xml.convert((filename and resolvers.loadtexfile(filename)) or "")
+--~ stoptiming(xml)
+--~ return xmldata
+--~ end
+
function xml.load(filename)
- lxml.n = lxml.n + 1
+ lxml.noffiles = lxml.noffiles + 1
+ lxml.nofconverted = lxml.nofconverted + 1
starttiming(xml)
- local xmldata = xml.convert((filename and resolvers.loadtexfile(filename)) or "")
+ local ok, data = resolvers.loadbinfile(filename)
+ local xmldata = xml.convert((ok and data) or "")
stoptiming(xml)
return xmldata
end
function lxml.load(id,filename)
- lxml.n = lxml.n + 1
filename = commands.preparedfile(filename)
if trace_loading then
commands.writestatus("lxml","loading file '%s' as '%s'",filename,id)
end
- loaded[id] = xml.load(filename)
- return loaded[id], filename
+ local root = xml.load(filename)
+ loaded[id], paths[id]= root, filename
+ return root, filename
end
function lxml.register(id,xmltable)
- lxml.n = lxml.n + 1
loaded[id] = xmltable
return xmltable
end
@@ -444,9 +459,14 @@ function lxml.include(id,pattern,attribute,recurse)
xml.include(get_id(id),pattern,attribute,recurse,function(filename)
if filename then
filename = commands.preparedfile(filename)
+if file.dirname(filename) == "" then
+ filename = file.join(file.dirname(paths[currentdocument]),filename)
+end
if trace_loading then
commands.writestatus("lxml","including file: %s",filename)
end
+ lxml.noffiles = lxml.noffiles + 1
+ lxml.nofconverted = lxml.nofconverted + 1
return resolvers.loadtexfile(filename) or ""
else
return ""
@@ -560,9 +580,9 @@ end
function lxml.stripped(id,pattern,nolines)
local str = xmlcontent(get_id(id),pattern) or ""
- str = str:gsub("^%s*(.-)%s*$","%1")
+ str = gsub(str,"^%s*(.-)%s*$","%1")
if nolines then
- str = str:gsub("%s+"," ")
+ str = gsub(str,"%s+"," ")
end
xmlsprint(str)
end
@@ -575,21 +595,6 @@ function lxml.flush(id)
end
end
---~ function lxml.strip(id,flush)
---~ local dt = get_id(id).dt
---~ local str = dt[1]
---~ if type(str) == "string" then
---~ dt[1] = str:gsub("^ *","")
---~ end
---~ str = dt[#dt]
---~ if type(str) == "string" then
---~ dt[#dt] = str:gsub(" *$","")
---~ end
---~ if flush then
---~ xmlsprint(dt)
---~ end
---~ end
-
function lxml.direct(id)
xmlsprint(get_id(id))
end
@@ -815,7 +820,10 @@ end
local function command(root,pattern,cmd) -- met zonder ''
- cmd = cmd:gsub("^([\'\"])(.-)%1$", "%2")
+--~ cmd = gsub(cmd,"^([\'\"])(.-)%1$", "%2")
+ if find(cmd,"^[\'\"]") then
+ cmd = sub(cmd,2,-2)
+ end
traverse(root, lpath(pattern), function(r,d,k)
-- this can become pretty large
local m = (d and d[k]) or r -- brrr this r, maybe away
@@ -921,7 +929,7 @@ function lxml.directives.handle_setup(category,root,attribute,element)
setup = setup[category]
end
if setup then
- texsprint(ctxcatcodes,format("\\directsetup{%s}",setup:gsub('%*',value)))
+ texsprint(ctxcatcodes,format("\\directsetup{%s}",gsub(setup,'%*',value)))
end
end
end
@@ -932,6 +940,7 @@ function xml.getbuffer(name) -- we need to make sure that commands are processed
if not name or name == "" then
name = tex.jobname
end
+ lxml.nofconverted = lxml.nofconverted + 1
xml.tostring(xml.convert(concat(buffers.data[name] or {},"")))
end
@@ -940,6 +949,7 @@ function lxml.loadbuffer(id,name)
name = tex.jobname
end
starttiming(xml)
+ lxml.nofconverted = lxml.nofconverted + 1
loaded[id] = xml.convert(buffers.collect(name or id,"\n"))
stoptiming(xml)
return loaded[id], name or id
@@ -947,6 +957,7 @@ end
function lxml.loaddata(id,str)
starttiming(xml)
+ lxml.nofconverted = lxml.nofconverted + 1
loaded[id] = xml.convert(str or "")
stoptiming(xml)
return loaded[id], id
@@ -964,7 +975,7 @@ lxml.set_cdata()
local traced = { }
function lxml.trace_text_entities(str)
- return str:gsub("&(.-);",function(s)
+ return gsub(str,"&(.-);",function(s)
traced[s] = (traced[s] or 0) + 1
return "["..s.."]"
end)
@@ -1183,16 +1194,20 @@ end
-- rather new, indexed storage (backward refs), maybe i will merge this
-function lxml.addindex(name,check_sum)
+function lxml.addindex(name,check_sum,force)
local root = get_id(name)
- if root and not root.index then -- weird, only called once
- local index, maxindex, check = { }, 0, { }
+ if root and (not root.index or force) then -- weird, only called once
+ local index, maxindex, check = root.index or { }, root.maxindex or 0, root.check or { }
+ local n = 0
local function nest(root)
local dt = root.dt
- maxindex = maxindex + 1
- root.ix = maxindex -- no needed if we don't want to test (extend)
- check[maxindex] = root.tg
- index[maxindex] = root
+ if not root.ix then
+ maxindex = maxindex + 1
+ root.ix = maxindex
+ check[maxindex] = root.tg
+ index[maxindex] = root
+ n = n + 1
+ end
if dt then
for k=1,#dt do
local dk = dt[k]
@@ -1203,69 +1218,63 @@ function lxml.addindex(name,check_sum)
end
end
nest(root)
+ lxml.nofindices = lxml.nofindices + n
--
if type(name) ~= "string" then
name = "unknown"
end
- --
- if check_sum then
- local tag = format("lxml:%s:checksum",name)
- local oldchecksum = jobvariables.collected[tag]
- local newchecksum = md5.HEX(concat(check,".")) -- maybe no "." needed
- jobvariables.tobesaved[tag] = newchecksum
- --
- if oldchecksum and oldchecksum ~= "" and oldchecksum ~= newchecksum then
- root.index = { }
- root.maxindex = 0
- root.checksum = newchecksum
- commands.writestatus("lxml",format("checksum mismatch for %s (extra run needed)",tostring(name)))
- else
- root.index = index
- root.maxindex = maxindex
- root.checksum = newchecksum
- commands.writestatus("lxml",format("checksum match for %s: %s",tostring(name),newchecksum))
- end
- else
+ -- todo: checksum at the end, when tuo saved
+--~ if root.checksum then
+--~ -- extension mode
+--~ root.index = index
+--~ root.maxindex = maxindex
+--~ commands.writestatus("lxml",format("checksum adapted for %s",tostring(name)))
+--~ elseif check_sum then
+--~ local tag = format("lxml:%s:checksum",name)
+--~ local oldchecksum = jobvariables.collected[tag]
+--~ local newchecksum = md5.HEX(concat(check,".")) -- maybe no "." needed
+--~ jobvariables.tobesaved[tag] = newchecksum
+--~ --
+--~ if oldchecksum and oldchecksum ~= "" and oldchecksum ~= newchecksum then
+--~ root.index = { }
+--~ root.maxindex = 0
+--~ root.checksum = newchecksum
+--~ commands.writestatus("lxml",format("checksum mismatch for %s (extra run needed)",tostring(name)))
+--~ else
+--~ root.index = index
+--~ root.maxindex = maxindex
+--~ root.checksum = newchecksum
+--~ commands.writestatus("lxml",format("checksum match for %s: %s",tostring(name),newchecksum))
+--~ end
+--~ else
root.index = index
root.maxindex = maxindex
+--~ end
+ if trace_access then
+ commands.writestatus("lxml",format("%s loaded, %s index entries",tostring(name),maxindex))
end
end
end
+local include= lxml.include
+
+function lxml.include(id,...)
+ include(id,...)
+ lxml.addindex(currentdocument,false,true)
+end
+
-- we can share the index
function lxml.checkindex(name)
local root = get_id(name)
---~ if root then
---~ local index = root.index
---~ if not index then
---~ lxml.addindex(name,jobvariables.collected[tag])
---~ index = root.index
---~ end
---~ return index
---~ end
- return root.index
+ return (root and root.index) or 0
end
function lxml.withindex(name,n,command)
---~ local index = lxml.checkindex(name)
---~ if index then
---~ local root = index[n]
---~ if root then
- -- lxml.command ...
---~ local m = #myself + 1
---~ myself[m] = root
---~ texsprint(ctxcatcodes,format("\\xmlsetup{%i}{%s}",m,command))
- texsprint(ctxcatcodes,format("\\xmlsetup{%s::%s}{%s}",name,n,command))
---~ end
---~ end
+ texsprint(ctxcatcodes,format("\\xmlsetup{%s::%s}{%s}",name,n,command))
end
function lxml.getindex(name,n)
---~ local index = lxml.checkindex(name)
---~ if index then
---~ texwrite(myself[n].ix or 0)
---~ end
texsprint(ctxcatcodes,format("%s::%s",name,n))
end
@@ -1290,19 +1299,29 @@ function lxml.doifelseempty(id,pattern) commands.doifelse(isempty(get_id(id),pat
-- status info
statistics.register("xml load time", function()
- local n = lxml.n
- if n > 0 then
- local stats = xml.statistics()
- return format("%s seconds, lpath calls: %s, cached calls: %s", statistics.elapsedtime(xml), stats.lpathcalls, stats.lpathcached)
+ local noffiles, nofconverted = lxml.noffiles, lxml.nofconverted
+ if noffiles > 0 or nofconverted > 0 then
+ return format("%s seconds, %s files, %s converted", statistics.elapsedtime(xml), noffiles, nofconverted)
else
return nil
end
end)
-statistics.register("lxml load time", function()
- local n = #lxml.self
- if n > 0 then
- return format("%s seconds preparation, backreferences: %i", statistics.elapsedtime(lxml),n)
+--~ statistics.register("lxml preparation time", function()
+--~ local n = #lxml.self
+--~ if n > 0 then
+--~ local stats = xml.statistics()
+--~ return format("%s seconds, %s backreferences, %s lpath calls, %s cached calls", statistics.elapsedtime(xml), n, stats.lpathcalls, stats.lpathcached)
+--~ else
+--~ return nil
+--~ end
+--~ end)
+
+statistics.register("lxml preparation time", function()
+ local noffiles, nofconverted = lxml.noffiles, lxml.nofconverted
+ if noffiles > 0 or nofconverted > 0 then
+ local stats = xml.statistics()
+ return format("%s seconds, %s nodes, %s lpath calls, %s cached calls", statistics.elapsedtime(lxml), lxml.nofindices, stats.lpathcalls, stats.lpathcached)
else
return nil
end
diff --git a/tex/context/base/lxml-pth.lua b/tex/context/base/lxml-pth.lua
index b1afc8d64..ef7f0213e 100644
--- a/tex/context/base/lxml-pth.lua
+++ b/tex/context/base/lxml-pth.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['lxml-pth'] = {
local concat, remove, insert = table.concat, table.remove, table.insert
local type, next, tonumber, tostring, setmetatable, loadstring = type, next, tonumber, tostring, setmetatable, loadstring
-local format, lower, gmatch, gsub, find = string.format, string.lower, string.gmatch, string.gsub, string.find
+local format, lower, gmatch, gsub, find, rep = string.format, string.lower, string.gmatch, string.gsub, string.find, string.rep
--[[ldx--
<p>This module can be used stand alone but also inside <l n='mkiv'/> in
@@ -890,7 +890,8 @@ function xml.filters.attribute(root,pattern,arguments)
local rt, dt, dk
traverse(root, lpath(pattern), function(r,d,k) rt, dt, dk = r, d, k return true end)
local ekat = (dt and dt[dk] and dt[dk].at) or (rt and rt.at)
- return (ekat and (ekat[arguments] or ekat[gsub(arguments,"^([\"\'])(.*)%1$","%2")])) or ""
+ -- return (ekat and (ekat[arguments] or ekat[gsub(arguments,"^([\"\'])(.*)%1$","%2")])) or ""
+ return (ekat and (ekat[arguments] or (find(arguments,"^[\'\"]") and ekat[sub(arguments,2,-2)]))) or ""
end
function xml.filters.text(root,pattern,arguments) -- ?? why index, tostring slow
@@ -1301,7 +1302,6 @@ function xml.strip_whitespace(root, pattern, nolines) -- strips all leading and
for i=1,#dkdt do
local str = dkdt[i]
if type(str) == "string" then
-
if str == "" then
-- stripped
else
@@ -1436,7 +1436,7 @@ end
function xml.strip_leading_spaces(dk,d,k) -- cosmetic, for manual
if d and k and d[k-1] and type(d[k-1]) == "string" then
local s = d[k-1]:match("\n(%s+)")
- xml.gsub(dk,"\n"..string.rep(" ",#s),"\n")
+ xml.gsub(dk,"\n"..rep(" ",#s),"\n")
end
end
diff --git a/tex/context/base/scrn-nav.mkiv b/tex/context/base/scrn-nav.mkiv
index 6b21a9e95..3eaed3812 100644
--- a/tex/context/base/scrn-nav.mkiv
+++ b/tex/context/base/scrn-nav.mkiv
@@ -79,7 +79,7 @@
\def\synchronizebackendidentity
{\ctxlua{backends.codeinjections.setupidentity{
title = \!!bs\@@iatitle\!!es,
- subtitle = \!!bs\@@iasubtitle\!!es,
+ subject = \!!bs\@@iasubtitle\!!es,
author = \!!bs\@@iaauthor\!!es,
creator = \!!bs ConTeXt - \contextversion\!!es,
date = \!!bs\@@iadate\!!es,
diff --git a/tex/context/base/x-fo.tex b/tex/context/base/x-fo.tex
index 395ec7eb3..b2b0b59f9 100644
--- a/tex/context/base/x-fo.tex
+++ b/tex/context/base/x-fo.tex
@@ -1091,7 +1091,6 @@ leader-pattern-width=12pt,
\checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-top-color}{}]
\checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-left-color}{}]
\checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-right-color}{}]
-
\checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{background-color}{}]
\checkFOposition{fo:region-\currentcommalistitem}{background}
@@ -2379,6 +2378,10 @@ leader-pattern-width=12pt,
{\beginXMLelement}
{\directsetup{fo:inline:process}\endXMLelement}
+\defineXMLsingular
+ [fo:inline]
+ {}
+
% baseline-shift: baseline sub super % dimen inherit
\chardef\isolatedwordsmode=1
@@ -2387,10 +2390,10 @@ leader-pattern-width=12pt,
\def\shiftedword{\raise\wordshiftamount\hbox}
-\def\shiftedwords#1{\processisolatedwords{#1}\shiftedword}
-\def\normalwords #1{\processisolatedwords{#1}\hbox}
-\def\highwords #1{\processisolatedwords{#1}\high}
-\def\lowwords #1{\processisolatedwords{#1}\low}
+\long\def\shiftedwords#1{\processisolatedwords{#1}\shiftedword}
+\long\def\normalwords #1{\processisolatedwords{#1}\hbox}
+\long\def\highwords #1{\processisolatedwords{#1}\high}
+\long\def\lowwords #1{\processisolatedwords{#1}\low}
\mapXMLvalue {fo:baseline-shift} {baseline} {\normalwords}
\mapXMLvalue {fo:baseline-shift} {sub} {\lowwords}
@@ -2617,8 +2620,8 @@ leader-pattern-width=12pt,
alignment-baseline=,
baseline-shift=,
dominant-baseline=,
-% text-depth=,
-% text-altitude=,
+ % text-depth=,
+ % text-altitude=,
keep-with-next=,
keep-with-previous=,
letter-spacing=,
@@ -2636,16 +2639,13 @@ leader-pattern-width=12pt,
\startsetups fo:leader:process
-% \tracebackXMLattribute{leader-pattern-width}
-
- \strut \leaders
-
-% \edefXMLinh \FOlepatwd {leader-pattern-width}
+ %tracebackXMLattribute{leader-pattern-width}
+ \strut \leaders
+ %edefXMLinh \FOlepatwd {leader-pattern-width}
\hbox to \XMLinh{leader-pattern-width}
{\hss\XMLval{fo:leader-pattern}{\XMLinh{leader-pattern}}{\hfill}\hss}
-
- \hfill \strut
+ \hfill \strut
\stopsetups
@@ -2702,7 +2702,7 @@ leader-pattern-width=12pt,
\defineconversion[1][\numbers]
-\def\handleFOformat#1#2%
+\long\def\handleFOformat#1#2%
{\defconvertedargument\ascii{#2}%
\doifconversiondefinedelse\ascii{\convertnumber\ascii{#1}}{#2}}
@@ -3541,7 +3541,7 @@ text-indent=0pt, % yes
\unprotect
-\def\noFOchecks#1\od{}
+\long\def\noFOchecks#1\od{}
\def\FOassignskip#1#2#3%
{\edef\!!stringa{\XMLpar{#1}{#2}\empty}%
@@ -3747,8 +3747,6 @@ text-indent=0pt, % yes
% we can get crap like: 10pt/1.5 bold "Times Roman" ; i'm really puzzled why an
% otherwise rather verbose coding occasionally packs attributes; a design flaw
-\unprotect
-
\newtoks\FOfonttoks
\def\checkFOfontSS#1'{}
@@ -3835,8 +3833,6 @@ text-indent=0pt, % yes
\appendtoks \flushFOreferences \to \everypar
\appendtoks \flushFOreferences \to \neverypar % check !
-\protect
-
%D Graphics: static frames
\startMPinclusions
@@ -3997,7 +3993,7 @@ text-indent=0pt, % yes
\stopXMLcompiling
-\protect \endinput
+\endinput
% we can follow two approaches: set the attributes global, using
%
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 38fe3078b..3fc613fb8 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua
--- merge date : 08/26/09 01:45:51
+-- merge date : 08/28/09 14:46:34
do -- begin closure to overcome local limits and interference
@@ -52,6 +52,14 @@ function string:unquote()
return (gsub(self,"^([\"\'])(.*)%1$","%2"))
end
+--~ function string:unquote()
+--~ if find(self,"^[\'\"]") then
+--~ return self:sub(2,-2)
+--~ else
+--~ return self
+--~ end
+--~ end
+
function string:quote() -- we could use format("%q")
return '"' .. self:unquote() .. '"'
end
@@ -78,7 +86,7 @@ function string:strip()
end
function string:is_empty()
- return not find(find,"%S")
+ return not find(self,"%S")
end
function string:enhance(pattern,action)