summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-08-14 17:00:15 +0300
committerMarius <mariausol@gmail.com>2013-08-14 17:00:15 +0300
commitcda726c49288251852fc9e41e0fd71805ebad3ae (patch)
tree2c2172bd917690f371e2a289e1ee217e074c0d99 /tex
parent37dde1469604535dfceeb5587e0b3639c200d2f0 (diff)
downloadcontext-cda726c49288251852fc9e41e0fd71805ebad3ae.tar.gz
beta 2013.08.14 15:25
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-help.lmx79
-rw-r--r--tex/context/base/context-version.pdfbin4100 -> 4110 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-fil.mkii4
-rw-r--r--tex/context/base/font-col.lua72
-rw-r--r--tex/context/base/font-ini.mkvi3
-rw-r--r--tex/context/base/status-files.pdfbin24684 -> 24705 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/context/base/trac-lmx.lua5
-rw-r--r--tex/context/base/trac-log.lua120
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
12 files changed, 178 insertions, 113 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 93735e540..05cf26443 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.08.11 20:23}
+\newcontextversion{2013.08.14 15:25}
%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-help.lmx b/tex/context/base/context-help.lmx
index 140493915..cf4f73a61 100644
--- a/tex/context/base/context-help.lmx
+++ b/tex/context/base/context-help.lmx
@@ -24,44 +24,41 @@
<?lmx-include context.css ?>
</style>
<style type="text/css">
- <!--
-#main-left {
- position: absolute;
- left: 0% ;
- top: 0% ;
- right: 0% ;
- bottom: 0% ;
- z-index: 2 ;
- width: 75% ;
- height: 100% ;
- padding: 0% ;
- margin: 0% ;
- overflow: auto ;
- border-style: none ;
- border-width: 0 ;
- background-color: <?lua pv('color-background-main-left')?> ;
-}
-#main-right {
- position: absolute;
- left: 75% ;
- top: 0% ;
- right: 0% ;
- bottom: 0% ;
- z-index: 2 ;
- width: 25% ;
- height: 100% ;
- padding: 0% ;
- margin: 0% ;
- overflow: auto ;
- border-style: none ;
- border-width: 0 ;
- background-color: <?lua pv('color-background-main-right')?> ;
-}
-#main-common-settings {
- padding: 1em ;
-}
-
- -->
+ #main-left {
+ position: absolute;
+ left: 0% ;
+ top: 0% ;
+ right: 0% ;
+ bottom: 0% ;
+ z-index: 2 ;
+ width: 75% ;
+ height: 100% ;
+ padding: 0% ;
+ margin: 0% ;
+ overflow: auto ;
+ border-style: none ;
+ border-width: 0 ;
+ background-color: <?lua pv('color-background-main-left')?> ;
+ }
+ #main-right {
+ position: absolute;
+ left: 75% ;
+ top: 0% ;
+ right: 0% ;
+ bottom: 0% ;
+ z-index: 2 ;
+ width: 25% ;
+ height: 100% ;
+ padding: 0% ;
+ margin: 0% ;
+ overflow: auto ;
+ border-style: none ;
+ border-width: 0 ;
+ background-color: <?lua pv('color-background-main-right')?> ;
+ }
+ #main-common-settings {
+ padding: 1em ;
+ }
</style>
</head>
<body>
@@ -75,13 +72,13 @@
<?lua pv('interfaces') ?>
</div></div></div></div></div></div></div>
<div id="main"><div id='main-settings'>
- <div id="main-right"><div id="main-common-settings">
- <?lua pv('names') ?>
- </div></div>
<div id="main-left"><div id="main-common-settings">
<h1><?lua pv('maintitle') ?></h1>
<?lua pv('maintext') ?>
</div></div>
+ <div id="main-right"><div id="main-common-settings">
+ <?lua pv('names') ?>
+ </div></div>
</div></div>
<div id="bottom"><div id="bottom-one"><div id="bottom-two">
<?lua pv('extra') ?>
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 125257c7a..14018b171 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.mkiv b/tex/context/base/context.mkiv
index 9fe4e4230..c4690e79f 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.08.11 20:23}
+\edef\contextversion{2013.08.14 15:25}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/core-fil.mkii b/tex/context/base/core-fil.mkii
index 6b0d8caf5..16daf7bf6 100644
--- a/tex/context/base/core-fil.mkii
+++ b/tex/context/base/core-fil.mkii
@@ -348,6 +348,10 @@
\setupexternalresources
[url=]
+%D Goodie:
+
+\unexpanded\def\continueifinputfile#1{\doifnotfile{#1}{\endinput}}
+
%D This module will be perfected / changed / weeded.
\protect \endinput
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua
index 853e0f56c..e18dfaf91 100644
--- a/tex/context/base/font-col.lua
+++ b/tex/context/base/font-col.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['font-col'] = {
}
-- possible optimization: delayed initialization of vectors
+-- we should also share equal vectors (math)
local context, commands, trackers, logs = context, commands, trackers, logs
local node, nodes, fonts, characters = node, nodes, fonts, characters
@@ -101,8 +102,22 @@ function collections.define(name,font,ranges,details)
end
end
end
- details.font, details.start, details.stop = font, start, stop
- d[#d+1] = fastcopy(details)
+ local offset = details.offset
+ if type(offset) == "string" then
+ local start = characters.getrange(offset)
+ offset = start or false
+ else
+ offset = tonumber(offset) or false
+ end
+ d[#d+1] = {
+ font = font,
+ start = start,
+ stop = stop,
+ offset = offset,
+ rscale = tonumber (details.rscale) or 1,
+ force = toboolean(details.force,true),
+ check = toboolean(details.check,true),
+ }
end
end
end
@@ -117,50 +132,57 @@ function collections.registermain(name)
list[#list+1] = last
end
+-- check: when true, only set when present in font
+-- force: when false, then not set when already set
+
function collections.clonevector(name)
statistics.starttiming(fonts)
- local d = definitions[name]
- local t = { }
if trace_collecting then
report_fonts("processing collection %a",name)
end
- for i=1,#d do
- local f = d[i]
- local id = list[i]
- local start, stop = f.start, f.stop
+ local definitions = definitions[name]
+ local vector = { }
+ vectors[current] = vector
+ for i=1,#definitions do
+ local definition = definitions[i]
+ local name = definition.font
+ local start = definition.start
+ local stop = definition.stop
+ local check = definition.check
+ local force = definition.force
+ local offset = definition.offset or start
+ local remap = definition.remap
+ local cloneid = list[i]
+ local oldchars = fontdata[current].characters
+ local newchars = fontdata[cloneid].characters
if trace_collecting then
- report_fonts("remapping font %a to %a for range %U - %U",current,id,start,stop)
+ report_fonts("remapping font %a to %a for range %U - %U",current,cloneid,start,stop)
end
- local check = toboolean(f.check or "false",true)
- local force = toboolean(f.force or "true",true)
- local remap = f.remap or nil
- -- check: when true, only set when present in font
- -- force: when false, then not set when already set
- local oldchars = fontdata[current].characters
- local newchars = fontdata[id].characters
if check then
- for i=start,stop do
- if newchars[i] and (force or (not t[i] and not oldchars[i])) then
+ for unicode = start, stop do
+ local unic = unicode + offset - start
+ if not newchars[unicode] then
+ -- not in font
+ elseif force or (not vector[unic] and not oldchars[unic]) then
if remap then
- t[i] = { id, remap[i] }
+ vector[unic] = { cloneid, remap[unicode] }
else
- t[i] = id
+ vector[unic] = cloneid
end
end
end
else
- for i=start,stop do
- if force or (not t[i] and not oldchars[i]) then
+ for unicode = start, stop do
+ if force or (not vector[unic] and not oldchars[unic]) then
if remap then
- t[i] = { id, remap[i] }
+ vector[unic] = { cloneid, remap[unicode] }
else
- t[i] = id
+ vector[unic] = cloneid
end
end
end
end
end
- vectors[current] = t
if trace_collecting then
report_fonts("activating collection %a for font %a",name,current)
end
diff --git a/tex/context/base/font-ini.mkvi b/tex/context/base/font-ini.mkvi
index 5f7aaa92f..768fea070 100644
--- a/tex/context/base/font-ini.mkvi
+++ b/tex/context/base/font-ini.mkvi
@@ -1708,6 +1708,7 @@
\let\defaultfontstyle \s!rm
\let\defaultfontalternative\s!tf
\let\defaultfontsize \empty
+\let\defaultfontface \!!zerocount
%D So far for synchronisation. (We can inline the following macros.)
@@ -2228,6 +2229,7 @@
\unexpanded\def\fullrestoreglobalbodyfont
{\let\fontsize\defaultfontsize
\let\fontbody\defaultfontbody
+ \let\fontface\defaultfontface
\currentxfontsize\zerocount
\let\fontclass\globalfontclass
\font_basics_switch_points\normalizedglobalbodyfontsize
@@ -2241,6 +2243,7 @@
\unexpanded\def\partialrestoreglobalbodyfont
{\let\fontsize\defaultfontsize
\let\fontbody\defaultfontbody
+ \let\fontface\defaultfontface
\currentxfontsize\zerocount
\redoconvertfont
\tf
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 89c95cbff..52f60f3c3 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.log b/tex/context/base/status-lua.log
index ca1929218..12431a4bd 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.08.11 20:23 MKIV beta fmt: 2013.8.11 int: english/english
+ConTeXt ver: 2013.08.14 15:25 MKIV beta fmt: 2013.8.14 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/context/base/trac-lmx.lua b/tex/context/base/trac-lmx.lua
index 18c7f6020..41d930536 100644
--- a/tex/context/base/trac-lmx.lua
+++ b/tex/context/base/trac-lmx.lua
@@ -430,7 +430,7 @@ local optionalspaces = whitespace^0
local dquote = P('"')
-local begincomment = P("<!--")
+local begincomment = P("<!--") -- only makes sense when we in intercept pre|script|style
local endcomment = P("-->")
local beginembedxml = P("<?")
@@ -505,7 +505,8 @@ local resolvecss = ((beginembedcss * P("lmx-resolve") * optionalspaces) / ""
* ((Carg(1) * C(argumentcss)) / getdefinition)
* gobbledendcss
-local pattern_1 = Cs((commentxml + includexml + includecss + P(1))^0) -- get rid of xml comments asap
+----- pattern_1 = Cs((commentxml + includexml + includecss + P(1))^0) -- get rid of xml comments asap .. not good enough: embedded css and script is in <!-- .. also <pre>
+local pattern_1 = Cs((includexml + includecss + P(1))^0)
local pattern_2 = Cs((definexml + resolvexml + definecss + resolvecss + P(1))^0)
local pattern_3 = Cs((luacodexml + luacodecss + othercode)^0)
diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua
index 4ef50f5f4..b3204358f 100644
--- a/tex/context/base/trac-log.lua
+++ b/tex/context/base/trac-log.lua
@@ -130,7 +130,7 @@ setmetatableindex(logs, function(t,k) t[k] = ignore ; return ignore end)
local report, subreport, status, settarget, setformats, settranslations
-local direct, subdirect, writer, pushtarget, poptarget, setlogfile
+local direct, subdirect, writer, pushtarget, poptarget, setlogfile, settimedlog, setprocessor, setformatters
if tex and (tex.jobname or tex.formatname) then
@@ -153,8 +153,8 @@ if tex and (tex.jobname or tex.formatname) then
write_nl(target,"\n")
end
- local f_one = formatters["%-15s > %s\n"]
- local f_two = formatters["%-15s >\n"]
+ local report_yes = formatters["%-15s > %s\n"]
+ local report_nop = formatters["%-15s >\n"]
-- we can use formatters but best check for % then because for simple messages
-- we con't want this overhead for single messages (not that there are that
@@ -162,71 +162,71 @@ if tex and (tex.jobname or tex.formatname) then
report = function(a,b,c,...)
if c then
- write_nl(target,f_one(translations[a],formatters[formats[b]](c,...)))
+ write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
- write_nl(target,f_one(translations[a],formats[b]))
+ write_nl(target,report_yes(translations[a],formats[b]))
elseif a then
- write_nl(target,f_two(translations[a]))
+ write_nl(target,report_nop(translations[a]))
else
write_nl(target,"\n")
end
end
- local f_one = formatters["%-15s > %s"]
- local f_two = formatters["%-15s >"]
+ local direct_yes = formatters["%-15s > %s"]
+ local direct_nop = formatters["%-15s >"]
direct = function(a,b,c,...)
if c then
- return f_one(translations[a],formatters[formats[b]](c,...))
+ return direct_yes(translations[a],formatters[formats[b]](c,...))
elseif b then
- return f_one(translations[a],formats[b])
+ return direct_yes(translations[a],formats[b])
elseif a then
- return f_two(translations[a])
+ return direct_nop(translations[a])
else
return ""
end
end
- local f_one = formatters["%-15s > %s > %s\n"]
- local f_two = formatters["%-15s > %s >\n"]
+ local subreport_yes = formatters["%-15s > %s > %s\n"]
+ local subreport_nop = formatters["%-15s > %s >\n"]
subreport = function(a,s,b,c,...)
if c then
- write_nl(target,f_one(translations[a],translations[s],formatters[formats[b]](c,...)))
+ write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
elseif b then
- write_nl(target,f_one(translations[a],translations[s],formats[b]))
+ write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
elseif a then
- write_nl(target,f_two(translations[a],translations[s]))
+ write_nl(target,subreport_nop(translations[a],translations[s]))
else
write_nl(target,"\n")
end
end
- local f_one = formatters["%-15s > %s > %s"]
- local f_two = formatters["%-15s > %s >"]
+ local subdirect_yes = formatters["%-15s > %s > %s"]
+ local subdirect_nop = formatters["%-15s > %s >"]
subdirect = function(a,s,b,c,...)
if c then
- return f_one(translations[a],translations[s],formatters[formats[b]](c,...))
+ return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
elseif b then
- return f_one(translations[a],translations[s],formats[b])
+ return subdirect_yes(translations[a],translations[s],formats[b])
elseif a then
- return f_two(translations[a],translations[s])
+ return subdirect_nop(translations[a],translations[s])
else
return ""
end
end
- local f_one = formatters["%-15s : %s\n"]
- local f_two = formatters["%-15s :\n"]
+ local status_yes = formatters["%-15s : %s\n"]
+ local status_nop = formatters["%-15s :\n"]
status = function(a,b,c,...)
if c then
- write_nl(target,f_one(translations[a],formatters[formats[b]](c,...)))
+ write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
- write_nl(target,f_one(translations[a],formats[b]))
+ write_nl(target,status_yes(translations[a],formats[b]))
elseif a then
- write_nl(target,f_two(translations[a]))
+ write_nl(target,status_nop(translations[a]))
else
write_nl(target,"\n")
end
@@ -271,6 +271,26 @@ if tex and (tex.jobname or tex.formatname) then
translations = t
end
+ setprocessor = function(f)
+ local writeline = write_nl
+ write_nl = function(target,...)
+ writeline(target,f(...))
+ end
+ end
+
+ setformatters = function(f)
+ report_yes = f.report_yes or report_yes
+ report_nop = f.report_nop or report_nop
+ subreport_yes = f.subreport_yes or subreport_yes
+ subreport_nop = f.subreport_nop or subreport_nop
+ direct_yes = f.direct_yes or direct_yes
+ direct_nop = f.direct_nop or direct_nop
+ subdirect_yes = f.subdirect_yes or subdirect_yes
+ subdirect_nop = f.subdirect_nop or subdirect_nop
+ status_yes = f.status_yes or status_yes
+ status_nop = f.status_nop or status_nop
+ end
+
setlogfile = ignore
settimedlog = ignore
@@ -286,46 +306,46 @@ else
write_nl("\n")
end
- local f_one = formatters["%-15s | %s"]
- local f_two = formatters["%-15s |"]
+ local report_yes = formatters["%-15s | %s"]
+ local report_nop = formatters["%-15s |"]
report = function(a,b,c,...)
if c then
- write_nl(f_one(a,formatters[b](c,...)))
+ write_nl(report_yes(a,formatters[b](c,...)))
elseif b then
- write_nl(f_one(a,b))
+ write_nl(report_yes(a,b))
elseif a then
- write_nl(f_two(a))
+ write_nl(report_nop(a))
else
write_nl("")
end
end
- local f_one = formatters["%-15s | %s | %s"]
- local f_two = formatters["%-15s | %s |"]
+ local subreport_yes = formatters["%-15s | %s | %s"]
+ local subreport_nop = formatters["%-15s | %s |"]
subreport = function(a,sub,b,c,...)
if c then
- write_nl(f_one(a,sub,formatters[b](c,...)))
+ write_nl(subreport_yes(a,sub,formatters[b](c,...)))
elseif b then
- write_nl(f_one(a,sub,b))
+ write_nl(subreport_yes(a,sub,b))
elseif a then
- write_nl(f_two(a,sub))
+ write_nl(subreport_nop(a,sub))
else
write_nl("")
end
end
- local f_one = formatters["%-15s : %s\n"]
- local f_two = formatters["%-15s :\n"]
+ local status_yes = formatters["%-15s : %s\n"]
+ local status_nop = formatters["%-15s :\n"]
status = function(a,b,c,...) -- not to be used in lua anyway
if c then
- write_nl(f_one(a,formatters[b](c,...)))
+ write_nl(status_yes(a,formatters[b](c,...)))
elseif b then
- write_nl(f_one(a,b)) -- b can have %'s
+ write_nl(status_yes(a,b)) -- b can have %'s
elseif a then
- write_nl(f_two(a))
+ write_nl(status_nop(a))
else
write_nl("\n")
end
@@ -340,6 +360,22 @@ else
setformats = ignore
settranslations = ignore
+ setprocessor = function(f)
+ local writeline = write_nl
+ write_nl = function(s)
+ writeline(f(s))
+ end
+ end
+
+ setformatters = function(f)
+ report_yes = f.report_yes or report_yes
+ report_nop = f.report_nop or report_nop
+ subreport_yes = f.subreport_yes or subreport_yes
+ subreport_nop = f.subreport_nop or subreport_nop
+ status_yes = f.status_yes or status_yes
+ status_nop = f.status_nop or status_nop
+ end
+
setlogfile = function(name,keepopen)
if name and name ~= "" then
local localtime = os.localtime
@@ -384,6 +420,8 @@ logs.settranslations = settranslations
logs.setlogfile = setlogfile
logs.settimedlog = settimedlog
+logs.setprocessor = setprocessor
+logs.setformatters = setformatters
logs.direct = direct
logs.subdirect = subdirect
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index ae02ce928..94706d3e9 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/11/13 20:23:33
+-- merge date : 08/14/13 15:25:17
do -- begin closure to overcome local limits and interference