summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-04-28 00:00:18 +0300
committerMarius <mariausol@gmail.com>2013-04-28 00:00:18 +0300
commit7b94bc10110c2642e10f1951d3b161e204829a1c (patch)
tree4c196d16fa77b010198d54185ee280382249cf83 /tex
parentb2d6e3f2d74984616ec498cf03500f608eea37aa (diff)
downloadcontext-7b94bc10110c2642e10f1951d3b161e204829a1c.tar.gz
beta 2013.04.27 22:36
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4134 -> 4127 bytes
-rw-r--r--tex/context/base/context-version.pngbin40309 -> 40464 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-def.lua2
-rw-r--r--tex/context/base/font-otn.lua4
-rw-r--r--tex/context/base/mult-low.lua2
-rw-r--r--tex/context/base/node-inj.lua27
-rw-r--r--tex/context/base/page-lay.mkiv5
-rw-r--r--tex/context/base/status-files.pdfbin24733 -> 24744 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin211433 -> 211486 bytes
-rw-r--r--tex/context/base/syst-aux.mkiv7
-rw-r--r--tex/generic/context/luatex/luatex-basics-gen.lua1
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua41
-rw-r--r--tex/generic/context/luatex/luatex-fonts-syn.lua43
-rw-r--r--tex/generic/context/luatex/luatex-test.tex2
16 files changed, 78 insertions, 60 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 2628ed729..c3d3b77ea 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.04.26 15:13}
+\newcontextversion{2013.04.27 22:36}
%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-version.pdf b/tex/context/base/context-version.pdf
index cbfbbd551..920764a0a 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-version.png b/tex/context/base/context-version.png
index a1b580233..77244b17f 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index b35c8d445..05de832ce 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.04.26 15:13}
+\edef\contextversion{2013.04.27 22:36}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index cb056ff1b..bee02e8dc 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -174,7 +174,7 @@ function resolvers.file(specification)
specification.forced = suffix
specification.name = file.removesuffix(name)
else
- specification.name = name -- cna be resolved
+ specification.name = name -- can be resolved
end
end
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index 36b5c4001..46d64c783 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -1896,7 +1896,6 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
end
else
-- is valid
- -- logprocess("%s: multiple subchains for %s are not yet supported",cref(kind,chainname,chainlookupname),chainlookup and chainlookup.type or "?")
i = i + 1
end
if start then
@@ -2277,6 +2276,9 @@ for s=1,#datasets do
if ok then
success = true
break
+ elseif not start then
+ -- don't ask why ... shouldn't happen
+ break
end
end
else
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index d5848e5c7..de2c69da2 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -232,7 +232,7 @@ return {
--
"wait", "writestatus", "define", "defineexpandable", "redefine",
--
- "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure",
+ "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured",
--
"installcorenamespace",
--
diff --git a/tex/context/base/node-inj.lua b/tex/context/base/node-inj.lua
index 91c5d1414..697370cfb 100644
--- a/tex/context/base/node-inj.lua
+++ b/tex/context/base/node-inj.lua
@@ -356,29 +356,6 @@ function injections.handler(head,where,keep)
if d then
local rlmode = d[3]
--
- -- local k = wx[p]
- -- if rlmode and rlmode >= 0 then
- -- -- new per 2010-10-06, width adapted per 2010-02-03
- -- -- we used to negate the width of marks because in tfm
- -- -- that makes sense but we no longer do that so as a
- -- -- consequence the sign of p.width was changed
- -- -- this is a real mess ... somewhat 'first font that gets
- -- -- tested gets treated best'
- -- if k then
- -- -- brill roman: A\char"0300 (but ugly anyway)
- -- n.xoffset = p.xoffset - p.width + d[1] - k[2] -- was + p.width
- -- else
- -- -- lucida: U\char"032F (default+mark)
- -- n.xoffset = p.xoffset - p.width + d[1] -- 01-05-2011
- -- end
- -- else
- -- if k then -- k[4] ?
- -- n.xoffset = p.xoffset - d[1] - k[2]
- -- else
- -- n.xoffset = p.xoffset - d[1]
- -- end
- -- end
- --
local k = wx[p]
if k then
local x = k[2]
@@ -393,10 +370,11 @@ function injections.handler(head,where,keep)
end
else
if rlmode and rlmode >= 0 then
+ -- okay for husayni
n.xoffset = p.xoffset - p.width + d[1]
else
-- needs checking: is x ok here?
- n.xoffset = p.xoffset - d[1] - x -- x: todo ?
+ n.xoffset = p.xoffset - d[1] - x
end
end
else
@@ -412,6 +390,7 @@ function injections.handler(head,where,keep)
else
n.yoffset = n.yoffset + p.yoffset + d[2]
end
+ --
if nofmarks == 1 then
break
else
diff --git a/tex/context/base/page-lay.mkiv b/tex/context/base/page-lay.mkiv
index bbe60eec5..c0d897522 100644
--- a/tex/context/base/page-lay.mkiv
+++ b/tex/context/base/page-lay.mkiv
@@ -1417,8 +1417,9 @@
\definepapersize [S5] [\c!width=500pt,\c!height=375pt]
\definepapersize [S6] [\c!width=600pt,\c!height=450pt]
\definepapersize [S8] [\c!width=800pt,\c!height=600pt]
-\definepapersize [SW] [\c!width=800pt,\c!height=450pt]
-\definepapersize [SM] [\c!width=720pt,\c!height=450pt]
+\definepapersize [SL] [\c!width=640pt,\c!height=400pt] % low
+\definepapersize [SM] [\c!width=720pt,\c!height=450pt] % medium
+\definepapersize [SW] [\c!width=800pt,\c!height=450pt] % wide
\definepapersize [HD] [\c!width=1920pt,\c!height=1080pt]
\definepapersize [HD+] [\c!width=1920pt,\c!height=1200pt]
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 045dc3eb1..db3a68053 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 3839f0116..5c908c9c1 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 3e0b1629b..6ed0b4fee 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -6292,8 +6292,11 @@
\unexpanded\def\setemeasure#1#2{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
\unexpanded\def\setxmeasure#1#2{\expandafter\xdef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
-\def\measure#1%
- {\the\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
+\def\measure
+ {\the\measured}
+
+\def\measured#1%
+ {\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
% #2 could be omitted, but we want to support spaces
%
diff --git a/tex/generic/context/luatex/luatex-basics-gen.lua b/tex/generic/context/luatex/luatex-basics-gen.lua
index 61f3910eb..590b538fa 100644
--- a/tex/generic/context/luatex/luatex-basics-gen.lua
+++ b/tex/generic/context/luatex/luatex-basics-gen.lua
@@ -205,7 +205,6 @@ end
local function makefullname(path,name)
if path and path ~= "" then
- name = "temp-" .. name -- clash prevention
return file.addsuffix(file.join(path,name),"lua"), file.addsuffix(file.join(path,name),usingjit and "lub" or "luc")
end
end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 0cf2ce466..63f1381ae 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 : 04/26/13 15:13:48
+-- merge date : 04/27/13 22:36:05
do -- begin closure to overcome local limits and interference
@@ -3039,7 +3039,6 @@ function caches.getreadablepaths(category,subcategory)
end
local function makefullname(path,name)
if path and path~="" then
- name="temp-"..name
return file.addsuffix(file.join(path,name),"lua"),file.addsuffix(file.join(path,name),usingjit and "lub" or "luc")
end
end
@@ -4829,22 +4828,35 @@ end
local fonts=fonts
fonts.names=fonts.names or {}
fonts.names.version=1.001
-fonts.names.basename="luatex-fonts-names.lua"
+fonts.names.basename="luatex-fonts-names"
fonts.names.new_to_old={}
fonts.names.old_to_new={}
+fonts.names.cache=containers.define("fonts","data",fonts.names.version,true)
local data,loaded=nil,false
local fileformats={ "lua","tex","other text files" }
+function fonts.names.reportmissingbase()
+ texio.write("<missing font database, run: mtxrun --script fonts --reload --simple>")
+ fonts.names.reportmissingbase=nil
+end
+function fonts.names.reportmissingname()
+ texio.write("<unknown font in database, run: mtxrun --script fonts --reload --simple>")
+ fonts.names.reportmissingname=nil
+end
function fonts.names.resolve(name,sub)
if not loaded then
local basename=fonts.names.basename
if basename and basename~="" then
- for i=1,#fileformats do
- local format=fileformats[i]
- local foundname=resolvers.findfile(basename,format) or ""
- if foundname~="" then
- data=dofile(foundname)
- texio.write("<font database loaded: ",foundname,">")
- break
+ data=containers.read(fonts.names.cache,basename)
+ if not data then
+ basename=file.addsuffix(basename,"lua")
+ for i=1,#fileformats do
+ local format=fileformats[i]
+ local foundname=resolvers.findfile(basename,format) or ""
+ if foundname~="" then
+ data=dofile(foundname)
+ texio.write("<font database loaded: ",foundname,">")
+ break
+ end
end
end
end
@@ -4860,9 +4872,12 @@ function fonts.names.resolve(name,sub)
else
return filename,false
end
- else
+ elseif fonts.names.reportmissingname then
+ fonts.names.reportmissingname()
return name,false
end
+ elseif fonts.names.reportmissingbase then
+ fonts.names.reportmissingbase()
end
end
fonts.names.resolvespec=fonts.names.resolve
@@ -7713,7 +7728,7 @@ function injections.handler(head,where,keep)
if rlmode and rlmode>=0 then
n.xoffset=p.xoffset-p.width+d[1]
else
- n.xoffset=p.xoffset-d[1]-x
+ n.xoffset=p.xoffset-d[1]-x
end
end
else
@@ -10054,6 +10069,8 @@ for s=1,#datasets do
if ok then
success=true
break
+ elseif not start then
+ break
end
end
else
diff --git a/tex/generic/context/luatex/luatex-fonts-syn.lua b/tex/generic/context/luatex/luatex-fonts-syn.lua
index 36a74d0f4..ea6e3cab5 100644
--- a/tex/generic/context/luatex/luatex-fonts-syn.lua
+++ b/tex/generic/context/luatex/luatex-fonts-syn.lua
@@ -23,8 +23,9 @@ end
-- The format of the file is as follows:
--
-- return {
--- ["version"] = 1.001,
--- ["mappings"] = {
+-- ["version"] = 1.001,
+-- ["cache_version"] = 1.001,
+-- ["mappings"] = {
-- ["somettcfontone"] = { "Some TTC Font One", "SomeFontA.ttc", 1 },
-- ["somettcfonttwo"] = { "Some TTC Font Two", "SomeFontA.ttc", 2 },
-- ["somettffont"] = { "Some TTF Font", "SomeFontB.ttf" },
@@ -35,26 +36,41 @@ end
local fonts = fonts
fonts.names = fonts.names or { }
-fonts.names.version = 1.001 -- not the same as in context
-fonts.names.basename = "luatex-fonts-names.lua"
+fonts.names.version = 1.001 -- not the same as in context but matches mtx-fonts --simple
+fonts.names.basename = "luatex-fonts-names"
fonts.names.new_to_old = { }
fonts.names.old_to_new = { }
+fonts.names.cache = containers.define("fonts","data",fonts.names.version,true)
local data, loaded = nil, false
local fileformats = { "lua", "tex", "other text files" }
+function fonts.names.reportmissingbase()
+ texio.write("<missing font database, run: mtxrun --script fonts --reload --simple>")
+ fonts.names.reportmissingbase = nil
+end
+
+function fonts.names.reportmissingname()
+ texio.write("<unknown font in database, run: mtxrun --script fonts --reload --simple>")
+ fonts.names.reportmissingname = nil
+end
+
function fonts.names.resolve(name,sub)
if not loaded then
local basename = fonts.names.basename
if basename and basename ~= "" then
- for i=1,#fileformats do
- local format = fileformats[i]
- local foundname = resolvers.findfile(basename,format) or ""
- if foundname ~= "" then
- data = dofile(foundname)
- texio.write("<font database loaded: ",foundname,">")
- break
+ data = containers.read(fonts.names.cache,basename)
+ if not data then
+ basename = file.addsuffix(basename,"lua")
+ for i=1,#fileformats do
+ local format = fileformats[i]
+ local foundname = resolvers.findfile(basename,format) or ""
+ if foundname ~= "" then
+ data = dofile(foundname)
+ texio.write("<font database loaded: ",foundname,">")
+ break
+ end
end
end
end
@@ -70,9 +86,12 @@ function fonts.names.resolve(name,sub)
else
return filename, false
end
- else
+ elseif fonts.names.reportmissingname then
+ fonts.names.reportmissingname()
return name, false -- fallback to filename
end
+ elseif fonts.names.reportmissingbase then
+ fonts.names.reportmissingbase()
end
end
diff --git a/tex/generic/context/luatex/luatex-test.tex b/tex/generic/context/luatex/luatex-test.tex
index f757445d5..e11106e20 100644
--- a/tex/generic/context/luatex/luatex-test.tex
+++ b/tex/generic/context/luatex/luatex-test.tex
@@ -19,8 +19,6 @@
\pdfoutput=1
-% \directlua{generic_context.caches.compilemethod = "both" } % none luac dump both
-
\font\testa=file:lmroman10-regular at 12pt \testa \input tufte \par
\font\testb=file:lmroman12-regular:+liga; at 24pt \testb effe flink fietsen \par
\font\testc=file:lmroman12-regular:mode=node;+liga; at 24pt \testc effe flink fietsen \par