From 19719774e5f0a521cb21bc09f26a8f82f4dab56c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 3 Jan 2010 12:54:00 +0100 Subject: beta 2010.01.03 12:54 --- tex/context/base/cont-new.tex | 2 +- tex/context/base/context.tex | 2 +- tex/context/base/font-ini.mkii | 18 ++++++++-------- tex/context/base/grph-inc.lua | 32 ++++++++++++++--------------- tex/generic/context/luatex-fonts-merged.lua | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) (limited to 'tex') diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 0a9052b8e..8f2378a3d 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.31 14:12} +\newcontextversion{2010.01.03 12:54} %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 46cce45a3..b01b64385 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.31 14:12} +\edef\contextversion{2010.01.03 12:54} %D For those who want to use this: diff --git a/tex/context/base/font-ini.mkii b/tex/context/base/font-ini.mkii index 9eb532d70..89fbb5d07 100644 --- a/tex/context/base/font-ini.mkii +++ b/tex/context/base/font-ini.mkii @@ -3248,11 +3248,11 @@ % % newer -\def\os {\mathortext{\fam\purefamily {oldstyle}}{\symbolicfont {OldStyle}}} -\def\frak{\mathortext{\fam\purefamily {fraktur}}{\symbolicfont {Fraktur}}} -\def\goth{\mathortext{\fam\purefamily {gothic}}{\symbolicfont {Gothic}}} -\def\cal {\mathortext{\fam\purefamily{calligraphic}}{\symbolicfont{Calligraphic}}} -\def\bbd {\mathortext{\fam\purefamily {blackboard}}{\symbolicfont {Blackboard}}} +\unexpanded\def\os {\mathortext{\fam\purefamily {oldstyle}}{\symbolicfont {OldStyle}}} +\unexpanded\def\frak{\mathortext{\fam\purefamily {fraktur}}{\symbolicfont {Fraktur}}} +\unexpanded\def\goth{\mathortext{\fam\purefamily {gothic}}{\symbolicfont {Gothic}}} +\unexpanded\def\cal {\mathortext{\fam\purefamily{calligraphic}}{\symbolicfont{Calligraphic}}} +\unexpanded\def\bbd {\mathortext{\fam\purefamily {blackboard}}{\symbolicfont {Blackboard}}} \definefontsynonym [OldStyle] [Serif] \definefontsynonym [Fraktur] [Serif] @@ -3268,10 +3268,10 @@ \ifx\mathtext\undefined \let\mathtext\hbox \fi -\def\fraktur #1{\mathortext\domathtext\donothing{\frak#1}} -\def\gothic #1{\mathortext\domathtext\donothing{\goth#1}} -\def\calligraphic#1{\mathortext\domathtext\donothing{\cal #1}} -\def\blackboard #1{\mathortext\domathtext\donothing{\bbd#1}} +\unexpanded\def\fraktur #1{\mathortext\domathtext\donothing{\frak#1}} +\unexpanded\def\gothic #1{\mathortext\domathtext\donothing{\goth#1}} +\unexpanded\def\calligraphic#1{\mathortext\domathtext\donothing{\cal #1}} +\unexpanded\def\blackboard #1{\mathortext\domathtext\donothing{\bbd#1}} %D Torture test: %D diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua index d605168c8..c6019c2cd 100644 --- a/tex/context/base/grph-inc.lua +++ b/tex/context/base/grph-inc.lua @@ -12,6 +12,8 @@ if not modules then modules = { } end modules ['grph-inc'] = { -- dimensions -- consult rlx +-- figures.boxnumber can go as we now can use names + --[[ The ConTeXt figure inclusion mechanisms are among the oldest code in ConTeXt and evolve dinto a complex whole. One reason is that we @@ -34,7 +36,7 @@ run TeX code from within Lua. Some more functionality will move to Lua. ]]-- local format, lower, find, match, gsub, gmatch = string.format, string.lower, string.find, string.match, string.gsub, string.gmatch -local texsprint = tex.sprint +local texsprint, texbox, texwd, texht, texdp = tex.sprint, tex.box, tex.wd, tex.ht, tex.dp local ctxcatcodes = tex.ctxcatcodes local variables = interfaces.variables @@ -599,23 +601,21 @@ end function figures.done(data) figures.n = figures.n + 1 data = data or figures.current() - local dr, du, ds = data.request, data.used, data.status - ds.width = tex.wd[figures.boxnumber] - ds.height = tex.ht[figures.boxnumber] + local dr, du, ds, nr = data.request, data.used, data.status, figures.boxnumber + ds.width = texwd[nr] + ds.height = texht[nr] ds.xscale = ds.width/(du.width or 1) ds.yscale = ds.height/(du.height or 1) return data end function figures.dummy(data) ---~ data = data or figures.current() ---~ local dr, du, ds = data.request, data.used, data.status ---~ local r = node.new("rule") ---~ r.width = du.width or figures.defaultwidth ---~ r.height = du.height or figures.defaultheight ---~ r.depth = du.depth or figures.defaultdepth ---~ tex.box[figures.boxnumber] = node.hpack(node.write(r)) - texsprint(ctxcatcodes,"\\emptyfoundexternalfigure") + data = data or figures.current() + local dr, du, ds, nr = data.request, data.used, data.status, figures.boxnumber + texbox[nr] = node.new("hlist") + texwd [nr] = du.width or figures.defaultwidth + texht [nr] = du.height or figures.defaultheight + texdp [nr] = du.depth or figures.defaultdepth end -- -- -- generic -- -- -- @@ -676,11 +676,11 @@ function figures.includers.generic(data) figures.used[hash] = figure end if figure then - local n = figures.boxnumber + local nr = figures.boxnumber -- it looks like we have a leak in attributes here .. todo - tex.box[n] = node.hpack(img.node(figure)) - -- tex.box[n] = img.node(figure) -- img.write(figure) -- assigning img.node directly no longer valid - tex.wd[n], tex.ht[n], tex.dp[n] = figure.width, figure.height, 0 -- new, hm, tricky, we need to do that in tex (yet) + texbox[nr] = node.hpack(img.node(figure)) + -- texbox[nr] = img.node(figure) -- img.write(figure) -- assigning img.node directly no longer valid + texwd[nr], texht[nr], texdp[nr] = figure.width, figure.height, 0 -- new, hm, tricky, we need to do that in tex (yet) ds.objectnumber = figure.objnum texsprint(ctxcatcodes,"\\relocateexternalfigure") end diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 9938caedd..6449817db 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/31/09 14:23:09 +-- merge date : 01/03/10 13:02:01 do -- begin closure to overcome local limits and interference -- cgit v1.2.3