summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/colo-ini.mkiv6
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context-base.lmx4
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/l-io.lua2
-rw-r--r--tex/context/base/l-os.lua37
-rw-r--r--tex/context/base/lpdf-ini.lua8
-rw-r--r--tex/context/base/lpdf-xmp.lua19
-rw-r--r--tex/context/base/lxml-tab.lua8
-rw-r--r--tex/context/base/mlib-run.lua2
-rw-r--r--tex/context/base/node-rul.mkiv2
-rw-r--r--tex/context/base/strc-itm.mkiv2
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua4
13 files changed, 50 insertions, 48 deletions
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv
index 68636a23c..3804c6799 100644
--- a/tex/context/base/colo-ini.mkiv
+++ b/tex/context/base/colo-ini.mkiv
@@ -168,9 +168,9 @@
\unexpanded\def\pushcolor[#1]%
{\global\advance\currentcolornesting\plusone
\expandafter\edef\csname\??cl:s:\number\currentcolornesting\endcsname
- {\attribute\colormodelattribute \the\colormodelattribute
- \attribute\colorattribute \the\colorattribute
- \attribute\transparencyattribute\the\transparencyattribute
+ {\attribute\colormodelattribute \the\attribute\colormodelattribute
+ \attribute\colorattribute \the\attribute\colorattribute
+ \attribute\transparencyattribute\the\attribute\transparencyattribute
\space}% stack
\doactivatecolor{#1}}
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 0ffa84f19..40ca60100 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.12.13 23:27}
+\newcontextversion{2009.12.14 22:32}
%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-base.lmx b/tex/context/base/context-base.lmx
index e84202cb3..a6781e4f6 100644
--- a/tex/context/base/context-base.lmx
+++ b/tex/context/base/context-base.lmx
@@ -63,9 +63,7 @@
</div>
<div id="main">
<div id='main-settings'>
- <div class='title'>
- <?lua pv('maintext') ?>
- </div>
+ <?lua pv('maintext') ?>
</div>
</div>
</body>
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index d6a4d6897..55c87b5bb 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.12.13 23:27}
+\edef\contextversion{2009.12.14 22:32}
%D For those who want to use this:
diff --git a/tex/context/base/l-io.lua b/tex/context/base/l-io.lua
index a77edb107..0d0357039 100644
--- a/tex/context/base/l-io.lua
+++ b/tex/context/base/l-io.lua
@@ -35,7 +35,7 @@ function io.savedata(filename,data,joiner)
elseif type(data) == "function" then
data(f)
else
- f:write(data)
+ f:write(data or "")
end
f:close()
return true
diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua
index dcf8d3e95..81fb1e2be 100644
--- a/tex/context/base/l-os.lua
+++ b/tex/context/base/l-os.lua
@@ -10,7 +10,13 @@ local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
function os.resultof(command)
- return io.popen(command,"r"):read("*all")
+ local handle = io.popen(command,"r")
+ if not handle then
+ -- print("unknown command '".. command .. "' in os.resultof")
+ return ""
+ else
+ return handle:read("*all") or ""
+ end
end
if not os.exec then os.exec = os.execute end
@@ -70,26 +76,6 @@ end
--~ print(os.date("%H:%M:%S",os.gettimeofday()))
--~ print(os.date("%H:%M:%S",os.time()))
-if os.arch then
- -- okay
-elseif os.platform == "windows" then
- os.arch = function()
- local a = os.getenv("PROCESSOR_ARCHITECTURE") or "x86"
- os.arch = function()
- return a
- end
- return a
- end
-else
- os.arch = function()
- local a = os.getenv("PROCESSOR_ARCHITECTURE") or os.resultof("uname -m") or "x86"
- os.arch = function()
- return a
- end
- return a
- end
-end
-
-- no need for function anymore as we have more clever code and helpers now
os.platform = os.name
@@ -105,7 +91,13 @@ if name == "windows" or name == "mswin" or name == "win32" or name == "msdos" th
end
os.libsuffix = 'dll'
else
- local architecture = os.arch()
+ local architecture = os.getenv("HOSTTYPE") or ""
+ if architecture == "" then
+ architecture = os.resultof("uname -m") or ""
+ end
+ if architecture == "" then
+ local architecture = os.resultof("echo $HOSTTYPE")
+ end
if name == "linux" then
if find(architecture,"x86_64") then
os.platform = "linux-64"
@@ -115,7 +107,6 @@ else
os.platform = "linux"
end
elseif name == "macosx" then
- local architecture = os.resultof("echo $HOSTTYPE")
if find(architecture,"i386") then
os.platform = "osx-intel"
elseif find(architecture,"x86_64") then
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index f5cab00c2..526a3a4d2 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -487,9 +487,11 @@ if not pdf.pdfcatalog then
end
-function lpdf.addtocatalog(k,v) catalog[k] = v end
-function lpdf.addtoinfo (k,v) info [k] = v end
-function lpdf.addtonames (k,v) names [k] = v end
+lpdf.protectresources = true
+
+function lpdf.addtocatalog(k,v) if not (lpdf.protectresources and catalog[k]) then catalog[k] = v end end
+function lpdf.addtoinfo (k,v) if not (lpdf.protectresources and info [k]) then info [k] = v end end
+function lpdf.addtonames (k,v) if not (lpdf.protectresources and names [k]) then names [k] = v end end
local r_extgstates, d_extgstates = pdfreserveobj(), pdfdictionary() local p_extgstates = pdfreference(r_extgstates)
local r_colorspaces, d_colorspaces = pdfreserveobj(), pdfdictionary() local p_colorspaces = pdfreference(r_colorspaces)
diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua
index 03f7c0dd4..03527e823 100644
--- a/tex/context/base/lpdf-xmp.lua
+++ b/tex/context/base/lpdf-xmp.lua
@@ -125,11 +125,20 @@ local function flushxmpinfo()
texio.write_nl("log","")
texio.write("log","\n% ",(gsub(blob,"[\r\n]","\n%% ")),"\n")
end
- if true then
- commands.writestatus("system","xmp data not flushed (needs luatex upgrade)")
- else
- lpdf.addtocatalog("Metadata",lpdf.reference(pdf.immediateobj("stream",format(xpacket,packetid,blob),md())))
- end
+ -- if true then
+ -- commands.writestatus("system","xmp data not flushed (needs luatex upgrade)")
+ -- else
+ -- lpdf.addtocatalog("Metadata",lpdf.reference(pdf.immediateobj("stream",format(xpacket,packetid,blob),md())))
+ local r = pdf.obj {
+ immediate = true,
+ compresslevel = 0,
+ type = "stream",
+ string = format(xpacket,packetid,blob),
+ attr = md(),
+ }
+ lpdf.addtocatalog("Metadata",lpdf.reference(r))
+ -- end
+
commands.defrostrandomseed() -- hack
end
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 8bd64890d..f38e5ad89 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -426,13 +426,15 @@ local text_parsed = Cs(((1-open-ampersand)^1 + entity)^1)
local somespace = space^1
local optionalspace = space^0
-local value = (squote * C((1 - squote)^0) * squote) + (dquote * C((1 - dquote)^0) * dquote) -- ampersand and < also invalid in value
+----- value = (squote * C((1 - squote)^0) * squote) + (dquote * C((1 - dquote)^0) * dquote) -- ampersand and < also invalid in value
+local value = (squote * Cs((entity + (1 - squote))^0) * squote) + (dquote * Cs((entity + (1 - dquote))^0) * dquote) -- ampersand and < also invalid in value
local endofattributes = slash * close + close -- recovery of flacky html
local whatever = space * name * optionalspace * equal
local wrongvalue = C(P(1-whatever-close)^1 + P(1-close)^1) / attribute_value_error
------ local wrongvalue = C(P(1-whatever-endofattributes)^1 + P(1-endofattributes)^1) / attribute_value_error
-local wrongvalue = C(P(1-space-endofattributes)^1) / attribute_value_error
+----- wrongvalue = C(P(1-whatever-endofattributes)^1 + P(1-endofattributes)^1) / attribute_value_error
+----- wrongvalue = C(P(1-space-endofattributes)^1) / attribute_value_error
+local wrongvalue = Cs(P(entity + (1-space-endofattributes))^1) / attribute_value_error
local attributevalue = value + wrongvalue
diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua
index fb37d9262..a2026e865 100644
--- a/tex/context/base/mlib-run.lua
+++ b/tex/context/base/mlib-run.lua
@@ -59,7 +59,7 @@ metapost.finder = finder
metapost.parameters = {
hash_size = 100000,
- main_memory = 2000000,
+ main_memory = 2500000,
max_in_open = 50,
param_size = 100000,
}
diff --git a/tex/context/base/node-rul.mkiv b/tex/context/base/node-rul.mkiv
index 0beae198c..f55bd28ec 100644
--- a/tex/context/base/node-rul.mkiv
+++ b/tex/context/base/node-rul.mkiv
@@ -142,7 +142,7 @@
\unexpanded\def\pushbar[#1]%
{\global\advance\currentbarnesting\plusone
\expandafter\edef\csname\??on:s:\number\currentbarnesting\endcsname
- {\attribute\ruledattribute\the\ruledattribute}% stack
+ {\attribute\ruledattribute\the\attribute\ruledattribute}% stack
\dodoruled{#1}}
\unexpanded\def\popbar
diff --git a/tex/context/base/strc-itm.mkiv b/tex/context/base/strc-itm.mkiv
index 1b7443840..bb3a785ce 100644
--- a/tex/context/base/strc-itm.mkiv
+++ b/tex/context/base/strc-itm.mkiv
@@ -1060,7 +1060,7 @@
\def\checkforrepeatedlistitem
{\ifconditional\repeatlistitem
\ifx\currentrepeatstart\empty
- \edef\currentrepeatstart{\the\numexpr\currentitemlevel-1}%
+ \let\currentrepeatstart\currentitemlevel
\fi
\setbox\itemgroupitembox\hbox to \wd\itemgroupitembox{\hskip-\itemgroupaskedwidth\box\itemgroupitembox}% what a hack !
\fi}
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index c03196d1b..b21e5a2d9 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 : 12/13/09 23:30:54
+-- merge date : 12/14/09 22:36:17
do -- begin closure to overcome local limits and interference
@@ -1726,7 +1726,7 @@ function io.savedata(filename,data,joiner)
elseif type(data) == "function" then
data(f)
else
- f:write(data)
+ f:write(data or "")
end
f:close()
return true