summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-01-10 01:04:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-01-10 01:04:00 +0100
commitde9b101fa556fa74bf531774293a6913705ff5db (patch)
treee48121c15597451bdfde13ad761c765a20315b52 /tex
parentbd5eb4cc78b64e8e905fe9dce7ed1007f4282996 (diff)
downloadcontext-de9b101fa556fa74bf531774293a6913705ff5db.tar.gz
beta 2013.01.10 01:04
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/attr-mkr.lua28
-rw-r--r--tex/context/base/attr-mkr.mkiv25
-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.mkii2
-rw-r--r--tex/context/base/context.mkiv3
-rw-r--r--tex/context/base/lxml-lpt.lua2
-rw-r--r--tex/context/base/lxml-tab.lua13
-rw-r--r--tex/context/base/mult-def.mkiv1
-rw-r--r--tex/context/base/status-files.pdfbin24783 -> 24749 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin208094 -> 208079 bytes
-rw-r--r--tex/context/base/status-mkiv.lua18
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
13 files changed, 87 insertions, 11 deletions
diff --git a/tex/context/base/attr-mkr.lua b/tex/context/base/attr-mkr.lua
new file mode 100644
index 000000000..c809d53a9
--- /dev/null
+++ b/tex/context/base/attr-mkr.lua
@@ -0,0 +1,28 @@
+if not modules then modules = { } end modules ['attr-mkr'] = {
+ version = 1.001,
+ comment = "companion to attr-mkr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local has_attribute = node.has_attribute
+
+local markers = nodes.markers or { }
+nodes.markers = markers
+
+local cache = { }
+local numbers = attributes.numbers
+local unknown = attributes.private("marker:unknown")
+
+table.setmetatableindex(cache,function(t,k)
+ local k = "marker:" .. k
+ local v = numbers[k] or unknown
+ t[k] = v
+ return v
+end)
+
+function markers.get(n,name)
+ local a = cache[name]
+ return a and has_attribute(n,a) or nil
+end
diff --git a/tex/context/base/attr-mkr.mkiv b/tex/context/base/attr-mkr.mkiv
new file mode 100644
index 000000000..c8818ebae
--- /dev/null
+++ b/tex/context/base/attr-mkr.mkiv
@@ -0,0 +1,25 @@
+%D \module
+%D [ file=attr-mkr,
+%D version=2013.01.09,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Markers,
+%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.
+
+\writestatus{loading}{ConTeXt Attribute Macros / Markers}
+
+\unprotect
+
+\registerctxluafile{attr-mkr}{1.001}
+
+\unexpanded\def\definemarker [#1]{\defineattribute[\s!marker:#1]}
+\unexpanded\def\setmarker [#1]#2[#3]{\dosetattribute{\s!marker:#1}{#3}}
+\unexpanded\def\resetmarker [#1]{\dogetattribute{\s!marker:#1}}
+ \def\boxmarker #1#2{attr \numexpr\dogetattributeid{\s!marker:#1}\numexpr \numexpr#2\relax}
+
+\protect \endinput
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 6886f69f6..0ced751ef 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{2013.01.09 10:51}
+\newcontextversion{2013.01.10 01:04}
%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 39ae9a61a..f6097bdf4 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.01.09 10:51}
+\newcontextversion{2013.01.10 01:04}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 3bd028c60..b2e6fa6ed 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{2013.01.09 10:51}
+\edef\contextversion{2013.01.10 01:04}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index f86564fd3..97b71f5a4 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.01.09 10:51}
+\edef\contextversion{2013.01.10 01:04}
%D For those who want to use this:
@@ -145,6 +145,7 @@
\loadmarkfile{attr-lay}
\loadmarkfile{attr-neg}
\loadmarkfile{attr-eff}
+\loadmarkfile{attr-mkr}
\loadmarkfile{trac-tex}
\loadmarkfile{trac-deb} % will move up
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index 4e84930f1..875b6bb96 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -1244,7 +1244,7 @@ finalizers.tex["function"] = dofunction
expressions.text = function(e,n)
local rdt = e.__p__.dt
- return (rdt and rdt[n]) or ""
+ return rdt and rdt[n] or ""
end
expressions.name = function(e,n) -- ns + tg
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 04b4192c0..3fdf6d8ff 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -1253,16 +1253,19 @@ function xml.parent(root)
end
function xml.body(root)
- return (root.ri and root.dt[root.ri]) or root -- not ok yet
+ return root.ri and root.dt[root.ri] or root -- not ok yet
end
function xml.name(root)
if not root then
return ""
- elseif root.ns == "" then
- return root.tg
+ end
+ local ns = root.ns
+ local tg = root.tg
+ if ns == "" then
+ return tg
else
- return root.ns .. ":" .. root.tg
+ return ns .. ":" .. tg
end
end
@@ -1292,7 +1295,7 @@ dt[k] = xml.assign(root) or xml.assign(dt,k,root)
function xml.assign(dt,k,root)
if dt and k then
- dt[k] = (type(root) == "table" and xml.body(root)) or root
+ dt[k] = type(root) == "table" and xml.body(root) or root
return dt[k]
else
return xml.body(root)
diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv
index eb4624ee8..f339e3632 100644
--- a/tex/context/base/mult-def.mkiv
+++ b/tex/context/base/mult-def.mkiv
@@ -72,6 +72,7 @@
\def\s!italics {italics}
\def\s!integral {integral}
\def\s!insert {insert} % maybe insertclass
+\def\s!marker {marker}
\def\s!double {double}
\def\s!decimal {decimal}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 1b26e3ffb..29bcc4b27 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 6dc10dffc..de709d451 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua
index adc393f5c..e2e61f8bc 100644
--- a/tex/context/base/status-mkiv.lua
+++ b/tex/context/base/status-mkiv.lua
@@ -333,6 +333,12 @@ return {
},
{
category = "mkiv",
+ filename = "attr-mkr",
+ loading = "always",
+ status = "okay",
+ },
+ {
+ category = "mkiv",
comment = "code might move from here",
filename = "core-ini",
loading = "always",
@@ -1800,6 +1806,12 @@ return {
status = "okay",
},
{
+ category = "mkvi",
+ filename = "math-stc",
+ loading = "always",
+ status = "okay",
+ },
+ {
category = "mkiv",
comment = "at least for the moment",
filename = "math-frc",
@@ -2533,6 +2545,12 @@ return {
},
{
category = "lua",
+ filename = "attr-mkr",
+ loading = "attr-mkr",
+ status = "okay",
+ },
+ {
+ category = "lua",
comment = "experimental code, maybe some will move elsewhere",
filename = "back-exp",
loading = "back-exp",
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c17f6bfc0..828169554 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 : 01/09/13 10:51:50
+-- merge date : 01/10/13 01:04:42
do -- begin closure to overcome local limits and interference