summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/lxml-tab.lua6
-rw-r--r--tex/context/base/lxml-tex.lua18
-rw-r--r--tex/context/base/strc-des.mkiv15
-rw-r--r--tex/context/base/strc-lst.lua5
-rw-r--r--tex/context/base/strc-lst.mkiv8
-rw-r--r--tex/context/base/strc-ref.lua9
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
9 files changed, 48 insertions, 19 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index acfa4e391..1ffd5cbd3 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.10.22 23:27}
+\newcontextversion{2009.10.24 16: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 857268890..b822ec308 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.10.22 23:27}
+\edef\contextversion{2009.10.24 16:44}
%D For those who want to use this:
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 88803ab16..97716a1c0 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -347,7 +347,11 @@ local function handle_any_entity(str)
if resolve then
local a = acache[str] -- per instance ! todo
if not a then
- a = entities[str]
+ if type(resolve) == "function" then
+ a = resolve(str) or entities[str]
+ else
+ a = entities[str]
+ end
if a then
if trace_entities then
logs.report("xml","resolved entity &%s; -> %s (internal)",str,a)
diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua
index 843ba704b..fe4a5f3e2 100644
--- a/tex/context/base/lxml-tex.lua
+++ b/tex/context/base/lxml-tex.lua
@@ -328,14 +328,20 @@ function xml.load(filename)
return xmltable
end
-function lxml.convert(data,entities,compress)
+local entities = xml.entities
+
+local function entityconverter(id,str)
+ return entities[str] and "&"..str..";" -- feed back into tex end later
+end
+
+function lxml.convert(id,data,entities,compress)
local settings = { }
if compress and compress == variables.yes then
settings.strip_cm_and_dt = true
end
if entities and entities == variables.yes then
settings.utfize_entities = true
- settings.resolve_entities = true
+ settings.resolve_entities = function (str) return entityconverter(id,str) end
end
return xml.convert(data,settings)
end
@@ -347,7 +353,7 @@ function lxml.load(id,filename,compress,entities)
end
-- local xmltable = xml.load(filename)
local ok, data = resolvers.loadbinfile(filename)
- local xmltable = lxml.convert((ok and data) or "",compress,entities)
+ local xmltable = lxml.convert(id,(ok and data) or "",compress,entities)
lxml.store(id,xmltable,filename)
return xmltable, filename
end
@@ -384,7 +390,7 @@ function xml.getbuffer(name,compress,entities) -- we need to make sure that comm
name = tex.jobname
end
nofconverted = nofconverted + 1
- xmltostring(lxml.convert(concat(buffers.data[name] or {},""),compress,entities))
+ xmltostring(lxml.convert(name,concat(buffers.data[name] or {},""),compress,entities))
end
function lxml.loadbuffer(id,name,compress,entities)
@@ -393,7 +399,7 @@ function lxml.loadbuffer(id,name,compress,entities)
end
starttiming(xml)
nofconverted = nofconverted + 1
- local xmltable = lxml.convert(buffers.collect(name or id,"\n"),compress,entities)
+ local xmltable = lxml.convert(id,buffers.collect(name or id,"\n"),compress,entities)
lxml.store(id,xmltable)
stoptiming(xml)
return xmltable, name or id
@@ -402,7 +408,7 @@ end
function lxml.loaddata(id,str,compress,entities)
starttiming(xml)
nofconverted = nofconverted + 1
- local xmltable = lxml.convert(str or "",compress,entities)
+ local xmltable = lxml.convert(id,str or "",compress,entities)
lxml.store(id,xmltable)
stoptiming(xml)
return xmltable, id
diff --git a/tex/context/base/strc-des.mkiv b/tex/context/base/strc-des.mkiv
index 56462bdd4..a837318cc 100644
--- a/tex/context/base/strc-des.mkiv
+++ b/tex/context/base/strc-des.mkiv
@@ -607,6 +607,13 @@
\def\@@doenumerationhandler#1%
{\strut
+ \iftrialtypesetting \else
+ \begingroup
+ \currentdescriptionsynchronize
+ \dosetattribute{destination}\currentdescriptionattribute % todo, whole text
+ \forcecolorhack
+ \endgroup
+ \fi
\ifconditional\enumerationnumberenabled
\iftrialtypesetting
\doenumerationfullnumber\showdntext{#1}%
@@ -618,10 +625,6 @@
\fi
\else
\doenumerationfullnumber\showdnpuretext{#1}%
- \fi
- \iftrialtypesetting \else
- \currentdescriptionsynchronize
- \dosetattribute{destination}\currentdescriptionattribute % todo
\fi}
\def\doenumerationsavecounter {\savestructurecounter[\currentdescriptionnumber]}
@@ -659,7 +662,8 @@
{\ctxlua{structure.lists.savedtitle("\currentdescriptionmain",\currentdescriptionnumberentry)}}
\def\currentenumerationfullnumber
- {\ctxlua{structure.lists.savednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}}
+% {\ctxlua{structure.lists.savednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}}
+ {\ctxlua{structure.lists.savedprefixednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}}
\def\doenumerationfullnumber#1#2% text, title
{\begingroup
@@ -974,6 +978,7 @@
[\c!location=\v!top,
\c!text=,
\c!way=\v!by\v!text,
+ \c!prefix=\v!no,
\c!prefixconnector=.,
\c!stopper=,
\c!number=\v!yes, % else description
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index 9f15f5e83..df443b60a 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -140,8 +140,13 @@ local function filter_collected(names, criterium, number, collected)
local hash, result, all, detail = { }, { }, not names or names == "" or names == variables.all, nil
if not all then
for s in names:gmatch("[^, ]+") do
+ if trace_lists then
+ logs.report("lists","filtering: %s",s)
+ end
hash[s] = true
end
+ elseif trace_lists then
+ logs.report("lists","filtering all")
end
if criterium == variables.intro then
-- special case, no structure yet
diff --git a/tex/context/base/strc-lst.mkiv b/tex/context/base/strc-lst.mkiv
index 7ac68abc8..fc5fba4f1 100644
--- a/tex/context/base/strc-lst.mkiv
+++ b/tex/context/base/strc-lst.mkiv
@@ -211,8 +211,14 @@
\setvalue{\??li\c!alternative}{\getvalue{\??li\c!alternative b}}
\getvalue{\??li\c!alternative}
+\def\checklistexistence#1%
+ {\ifcsname\??li#1\s!parent\endcsname \else
+ \letvalue{\??li#1\s!parent}\??li
+ \fi}
+
\def\dosetuplist[#1][#2]% slow -)
- {\def\docommand##1{\getparameters[\??li##1][#2]}%
+ {\checklistexistence{#1}%
+ \def\docommand##1{\getparameters[\??li##1][#2]}%
\processcommalist[#1]\docommand}
\def\setuplist
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index fca30dfe4..f702e6b1a 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -195,9 +195,12 @@ local function register_from_lists(collected,derived)
local kind, realpage = m.kind, r.realpage
if kind and realpage then
local d = derived[prefix] if not d then d = { } derived[prefix] = d end
- --~ d[reference] = { kind, i }
- for s in gmatch(reference,"[^,]+") do
- d[s] = { kind, i }
+ local t = { kind, i }
+ for s in gmatch(reference,"[^, ]+") do
+ if trace_referencing then
+ logs.report("referencing","list entry %s provides %s reference '%s' on realpage %s)",i,kind,s,realpage)
+ end
+ d[s] = t -- share them
end
end
end
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index d49fcadf4..ca51a91c1 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 : 10/22/09 23:31:21
+-- merge date : 10/24/09 16:49:06
do -- begin closure to overcome local limits and interference