summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-09-12 14:44:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-09-12 14:44:00 +0200
commit423febe11aeeb079c8edfde2ea6e66c71709fc2f (patch)
treebbf50d747815d4e255a8d47b7385a24bae9284ee
parent31c85bed04f79cca40e26af118964bd86e8edd16 (diff)
downloadcontext-423febe11aeeb079c8edfde2ea6e66c71709fc2f.tar.gz
beta 2009.09.12 14:44
-rw-r--r--scripts/context/ruby/base/tex.rb5
-rw-r--r--tex/context/base/anch-pos.lua51
-rw-r--r--tex/context/base/bibl-tra.mkii2
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/lpdf-ano.lua40
-rw-r--r--tex/context/base/page-ini.mkiv57
-rw-r--r--tex/context/base/page-txt.mkiv33
-rw-r--r--tex/context/base/strc-flt.mkiv58
-rw-r--r--tex/context/base/strc-ref.lua59
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
11 files changed, 185 insertions, 126 deletions
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index 23db7f1e8..15d69e306 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -680,6 +680,11 @@ class TEX
texformatpath = ''
setvariable('error','no permissions to write')
end
+ if not mpsformats then
+ # we want metafun to be in sync
+ setvariable('mpsformats',defaultmpsformats)
+ mpsformats = validmpsformat(getarrayvariable('mpsformats'))
+ end
else
texformatpath = ''
end
diff --git a/tex/context/base/anch-pos.lua b/tex/context/base/anch-pos.lua
index 2f68f1111..05498212f 100644
--- a/tex/context/base/anch-pos.lua
+++ b/tex/context/base/anch-pos.lua
@@ -12,7 +12,8 @@ can we store much more information in <l n='lua'/> but it's also
more efficient.</p>
--ldx]]--
-local texprint, concat, format = tex.print, table.concat, string.format
+local concat, format = table.concat, string.format
+local texprint, ctxcatcodes = tex.print, tex.ctxcatcodes
jobpositions = jobpositions or { }
jobpositions.collected = jobpositions.collected or { }
@@ -50,30 +51,30 @@ function jobpositions.doifelse(name)
commands.testcase(jobpositions.collected[name] or ptbs[name])
end
-function jobpositions.MPp(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and jpi[1]) or '0' ) end
-function jobpositions.MPx(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and jpi[2]) or '0pt') end
-function jobpositions.MPy(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and jpi[3]) or '0pt') end
-function jobpositions.MPw(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and jpi[4]) or '0pt') end
-function jobpositions.MPh(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and jpi[5]) or '0pt') end
-function jobpositions.MPd(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and jpi[6]) or '0pt') end
+function jobpositions.MPp(id) local jpi = pcol[id] or ptbs[id] texprint(ctxcatcodes,(jpi and jpi[1]) or '0' ) end
+function jobpositions.MPx(id) local jpi = pcol[id] or ptbs[id] texprint(ctxcatcodes,(jpi and jpi[2]) or '0pt') end
+function jobpositions.MPy(id) local jpi = pcol[id] or ptbs[id] texprint(ctxcatcodes,(jpi and jpi[3]) or '0pt') end
+function jobpositions.MPw(id) local jpi = pcol[id] or ptbs[id] texprint(ctxcatcodes,(jpi and jpi[4]) or '0pt') end
+function jobpositions.MPh(id) local jpi = pcol[id] or ptbs[id] texprint(ctxcatcodes,(jpi and jpi[5]) or '0pt') end
+function jobpositions.MPd(id) local jpi = pcol[id] or ptbs[id] texprint(ctxcatcodes,(jpi and jpi[6]) or '0pt') end
function jobpositions.MPx(id)
local jpi = pcol[id] or ptbs[id]
local x = jpi and jpi[2]
if x then
- texprint(format('\\the\\dimexpr %s-%s\\relax',x,dx))
+ texprint(ctxcatcodes,format('\\the\\dimexpr %s-%s\\relax',x,dx))
else
- texprint('0pt')
+ texprint(ctxcatcodes,'0pt')
end
end
function jobpositions.MPy(id)
local jpi = pcol[id] or ptbs[id]
local y = jpi and jpi[3]
if y then
- texprint(format('\\the\\dimexpr %s-%s\\relax',y,dy))
+ texprint(ctxcatcodes,format('\\the\\dimexpr %s-%s\\relax',y,dy))
else
- texprint('0pt')
+ texprint(ctxcatcodes,'0pt')
end
end
@@ -84,56 +85,56 @@ function jobpositions.MPd(id) local jpi = pcol[id] or ptbs[id] texprint((jpi and
function jobpositions.MPxy(id)
local jpi = pcol[id] or ptbs[id]
if jpi then
- texprint(format('(%s-%s,%s-%s)',jpi[2],dx,jpi[3],dy))
+ texprint(ctxcatcodes,format('(%s-%s,%s-%s)',jpi[2],dx,jpi[3],dy))
else
- texprint('(0,0)')
+ texprint(ctxcatcodes,'(0,0)')
end
end
function jobpositions.MPll(id)
local jpi = pcol[id] or ptbs[id]
if jpi then
- texprint(format('(%s-%s,%s-%s-%s)',jpi[2],dx,jpi[3],jpi[6],dy))
+ texprint(ctxcatcodes,format('(%s-%s,%s-%s-%s)',jpi[2],dx,jpi[3],jpi[6],dy))
else
- texprint('(0,0)')
+ texprint(ctxcatcodes,'(0,0)')
end
end
function jobpositions.MPlr(id)
local jpi = pcol[id] or ptbs[id]
if jpi then
- texprint(format('(%s+%s-%s,%s-%s-%s)',jpi[2],jpi[4],dx,jpi[3],jpi[6],dy))
+ texprint(ctxcatcodes,format('(%s+%s-%s,%s-%s-%s)',jpi[2],jpi[4],dx,jpi[3],jpi[6],dy))
else
- texprint('(0,0)')
+ texprint(ctxcatcodes,'(0,0)')
end
end
function jobpositions.MPur(id)
local jpi = pcol[id] or ptbs[id]
if jpi then
- texprint(format('(%s+%s-%s,%s+%s-%s)',jpi[2],jpi[4],dx,jpi[3],jpi[5],dy))
+ texprint(ctxcatcodes,format('(%s+%s-%s,%s+%s-%s)',jpi[2],jpi[4],dx,jpi[3],jpi[5],dy))
else
- texprint('(0,0)')
+ texprint(ctxcatcodes,'(0,0)')
end
end
function jobpositions.MPul(id)
local jpi = pcol[id] or ptbs[id]
if jpi then
- texprint(format('(%s-%s,%s+%s-%s)',jpi[2],dx,jpi[3],jpi[5],dy))
+ texprint(ctxcatcodes,format('(%s-%s,%s+%s-%s)',jpi[2],dx,jpi[3],jpi[5],dy))
else
- texprint('(0,0)')
+ texprint(ctxcatcodes,'(0,0)')
end
end
function jobpositions.MPpos(id)
local jpi = pcol[id] or ptbs[id]
if jpi then
- texprint(concat(jpi,',',1,6))
+ texprint(ctxcatcodes,concat(jpi,',',1,6))
else
- texprint('0,0,0,0,0,0')
+ texprint(ctxcatcodes,'0,0,0,0,0,0')
end
end
function jobpositions.MPplus(id,n,default)
local jpi = pcol[id] or ptbs[id]
- texprint((jpi and jpi[6+n]) or default)
+ texprint(ctxcatcodes,(jpi and jpi[6+n]) or default)
end
function jobpositions.MPrest(id,default)
local jpi = pcol[id] or ptbs[id]
- texprint((jpi and jpi[7] and concat(jpi,",",7,#jpi)) or default)
+ texprint(ctxcatcodes,(jpi and jpi[7] and concat(jpi,",",7,#jpi)) or default)
end
diff --git a/tex/context/base/bibl-tra.mkii b/tex/context/base/bibl-tra.mkii
index 0f7c9b99d..9653f057e 100644
--- a/tex/context/base/bibl-tra.mkii
+++ b/tex/context/base/bibl-tra.mkii
@@ -1183,7 +1183,7 @@
\def\doifbibreferencefoundelse#1%
{\preloadbiblist
\doifdefinedelse{pbdk-#1}
- {\firstiftwoarguments}
+ {\firstoftwoarguments}
{\showmessage\m!publications{5}{#1 is unknown}%
\secondoftwoarguments}}
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 6d028186b..59c58b5d4 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.09.11 18:14}
+\newcontextversion{2009.09.12 14:44}
%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 4c95b9f59..b4765d30d 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.09.11 18:14}
+\edef\contextversion{2009.09.12 14:44}
%D For those who want to use this:
diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua
index f711bf6ce..0bbef0e49 100644
--- a/tex/context/base/lpdf-ano.lua
+++ b/tex/context/base/lpdf-ano.lua
@@ -266,11 +266,12 @@ runners["inner"] = function(var,actions)
end
runners["inner with arguments"] = function(var,actions)
+ logs.report("references","todo: inner with arguments")
return false
end
runners["outer"] = function(var,actions)
- return link(nil,var.o,nil,nil,actions) -- var.o ?
+ return link(nil,var.f,nil,nil,actions) -- var.o ?
end
runners["outer with inner"] = function(var,actions)
@@ -279,10 +280,12 @@ runners["outer with inner"] = function(var,actions)
end
runners["special outer with operation"] = function(var,actions)
- return false
+ local handler = specials[var.special]
+ return handler and handler(var,actions)
end
runners["special outer"] = function(var,actions)
+ logs.report("references","todo: special outer")
return false
end
@@ -292,25 +295,29 @@ runners["special"] = function(var,actions)
end
runners["outer with inner with arguments"] = function(var,actions)
+ logs.report("references","todo: outer with inner with arguments")
return false
end
runners["outer with special and operation and arguments"] = function(var,actions)
+ logs.report("references","todo: outer with special and operation and arguments")
return false
end
runners["outer with special"] = function(var,actions)
+ logs.report("references","todo: outer with special")
return false
end
runners["outer with special and operation"] = function(var,actions)
+ logs.report("references","todo: outer with special and operation")
return false
end
runners["special operation"] = runners["special"]
runners["special operation with arguments"] = runners["special"]
-function specials.internal(var,actions)
+function specials.internal(var,actions) -- better resolve in strc-ref
local i = tonumber(var.operation)
local v = jobreferences.internals[i]
if not v then
@@ -326,15 +333,24 @@ end
specials.i = specials.internal
-function specials.page(var,actions)
- local p = jobreferences.pages[var.operation]
- if type(p) == "function" then
- p = p()
+function specials.page(var,actions) -- better resolve in strc-ref
+ local file = var.f
+ if file then
+ local f = jobreferences.files.data[file]
+ if f then
+ file = f[1] or file
+ end
+ return link(nil,file,nil,p or var.operation,actions)
+ else
+ local p = jobreferences.pages[var.operation]
+ if type(p) == "function" then
+ p = p()
+ end
+ return link(nil,nil,nil,p or var.operation,actions)
end
- return link(nil,nil,nil,p or var.operation,actions)
end
-function specials.url(var,actions)
+function specials.url(var,actions) -- better resolve in strc-ref
local url = var.operation
if url then
local u = jobreferences.urls.data[url]
@@ -350,7 +366,7 @@ function specials.url(var,actions)
return link(url,nil,var.arguments,nil,actions)
end
-function specials.file(var,actions)
+function specials.file(var,actions) -- better resolve in strc-ref
local file = var.operation
if file then
local f = jobreferences.files.data[file]
@@ -361,7 +377,7 @@ function specials.file(var,actions)
return link(nil,file,var.arguments,nil,actions)
end
-function specials.fileorurl(var,actions)
+function specials.fileorurl(var,actions) -- better resolve in strc-ref
local whatever, url, file = var.operation, nil, nil
if whatever then
local w = jobreferences.files.data[whatever]
@@ -382,7 +398,7 @@ function specials.fileorurl(var,actions)
return link(url,file,var.arguments,nil,actions)
end
-function specials.program(var,content)
+function specials.program(var,content) -- better resolve in strc-ref
local program = var.operation
if program then
local p = jobreferences.programs[program]
diff --git a/tex/context/base/page-ini.mkiv b/tex/context/base/page-ini.mkiv
index 913cbf99f..e9d744b19 100644
--- a/tex/context/base/page-ini.mkiv
+++ b/tex/context/base/page-ini.mkiv
@@ -222,17 +222,20 @@
\registerotrcommand\doflushfloats % \def\doflushfloats {\OTRcommand\doflushfloats}
\registerotrcommand\flushfloatbox % \def\flushfloatbox {\OTRcommand\flushfloatbox}
\registerotrcommand\docheckiffloatfits % \def\docheckiffloatfits {\OTRcommand\docheckiffloatfits}
-\registerotrcommand\someherefloat % \def\someherefloat {\OTRcommand\someherefloat}
-\registerotrcommand\somefixdfloat % \def\somefixdfloat {\OTRcommand\somefixdfloat}
-\registerotrcommand\somepagefloat % \def\somepagefloat {\OTRcommand\somepagefloat}
-\registerotrcommand\sometopsfloat % \def\sometopsfloat {\OTRcommand\sometopsfloat}
-\registerotrcommand\somebotsfloat % \def\somebotsfloat {\OTRcommand\somebotsfloat}
-\registerotrcommand\somesidefloat % \def\somesidefloat {\OTRcommand\somesidefloat}
\registerotrcommand\flushsavedfloats % \def\flushsavedfloats {\OTRcommand\flushsavedfloats}
\registerotrcommand\synchronizehsize % \def\synchronizehsize {\OTRcommand\synchronizehsize}
\registerotrcommand\gotonextpage % \def\gotonextpage {\OTRcommand\gotonextpage }
\registerotrcommand\gotonextpageX % \def\gotonextpageX {\OTRcommand\gotonextpageX} % will become obsolete
+% wrong, will be redone
+%
+% \registerotrcommand\someherefloat % \def\someherefloat {\OTRcommand\someherefloat}
+% \registerotrcommand\somefixdfloat % \def\somefixdfloat {\OTRcommand\somefixdfloat}
+% \registerotrcommand\somepagefloat % \def\somepagefloat {\OTRcommand\somepagefloat}
+% \registerotrcommand\sometopsfloat % \def\sometopsfloat {\OTRcommand\sometopsfloat}
+% \registerotrcommand\somebotsfloat % \def\somebotsfloat {\OTRcommand\somebotsfloat}
+% \registerotrcommand\somesidefloat % \def\somesidefloat {\OTRcommand\somesidefloat}
+
% beter een \installotr#1 met #1 = macro en auto test
\newif \iftraceotr
@@ -704,7 +707,47 @@
\v!frame=>\chardef\gridboxlinemode \plusthree,
\v!nonumber=>\chardef\gridboxlinenomode\zerocount,
\v!right=>\chardef\gridboxlinenomode\plusone,
- \v!left=>\chardef\gridboxlinenomode\plustwo]}
+ \v!left=>\chardef\gridboxlinenomode\plustwo]%
+ \ifcase\showgridstate
+ \let\addtextgridlayer\gobbleoneargument
+ \else % 1=bottom 2=top
+ \let\addtextgridlayer\doaddtextgridlayer
+ \fi}
+
+\definepalet
+ [layout]
+ [grid=red,
+ page=green]
+
+% if really needed for speed we can cache the grid
+
+\let\addtextgridlayer\gobbleoneargument
+
+\def\doaddtextgridlayer#1% to be checked for color and layer
+ {\startcolor[layout:grid]%
+ \setgridbox\scratchbox\makeupwidth\textheight % todo: check color
+ \global\setbox#1\hbox
+ {\ifcase\showgridstate\or\or\box#1\hskip-\makeupwidth\fi
+ \bgroup % color
+ \ifcase\layoutcolumns\else
+ \gray
+ \setlayoutcomponentattribute\v!grid\v!columns
+ \hbox \layoutcomponentboxattribute to \makeupwidth
+ {\dorecurse\layoutcolumns
+ {\hskip\layoutcolumnwidth
+ \ifnum\recurselevel<\layoutcolumns
+ \vrule
+ \!!height\ht\scratchbox
+ \!!depth\dp\scratchbox
+ \!!width\layoutcolumndistance
+ \fi}}%
+ \hskip-\makeupwidth
+ \fi
+ \setlayoutcomponentattribute\v!grid\v!lines
+ \hbox \layoutcomponentboxattribute{\box\scratchbox}%
+ \egroup
+ \ifcase\showgridstate\or\hskip-\makeupwidth\box#1\fi}%
+ \stopcolor}
\def\buildpagebox#1%
{\setbox#1\vbox to \paperheight
diff --git a/tex/context/base/page-txt.mkiv b/tex/context/base/page-txt.mkiv
index f4e2d76f9..4df499d84 100644
--- a/tex/context/base/page-txt.mkiv
+++ b/tex/context/base/page-txt.mkiv
@@ -468,39 +468,6 @@
\hss}%
\dp#1\zeropoint}
-\definepalet
- [layout]
- [grid=red,
- page=green]
-
-\def\addtextgridlayer#1% to be checked for color and layer
- {\ifcase\showgridstate\else % 1=bottom 2=top
- \startcolor[layout:grid]%
- \setgridbox\scratchbox\makeupwidth\textheight % todo: check color
- \setbox#1\hbox
- {\ifcase\showgridstate\or\or\box#1\hskip-\makeupwidth\fi
- \bgroup % color
- \ifcase\layoutcolumns\else
- \gray
- \setlayoutcomponentattribute\v!grid\v!columns
- \hbox \layoutcomponentboxattribute to \makeupwidth
- {\dorecurse\layoutcolumns
- {\hskip\layoutcolumnwidth
- \ifnum\recurselevel<\layoutcolumns
- \vrule
- \!!height\ht\scratchbox
- \!!depth\dp\scratchbox
- \!!width\layoutcolumndistance
- \fi}}%
- \hskip-\makeupwidth
- \fi
- \setlayoutcomponentattribute\v!grid\v!lines
- \hbox \layoutcomponentboxattribute{\box\scratchbox}%
- \egroup
- \ifcase\showgridstate\or\hskip-\makeupwidth\box#1\fi}%
- \stopcolor
- \fi}
-
%D The placement of a whole line is handled by the next two
%D macros. These are hooked into the general purpose token
%D list registers mentioned before.
diff --git a/tex/context/base/strc-flt.mkiv b/tex/context/base/strc-flt.mkiv
index ff0304573..cb48d435a 100644
--- a/tex/context/base/strc-flt.mkiv
+++ b/tex/context/base/strc-flt.mkiv
@@ -1260,7 +1260,7 @@
{\page[\v!preference]%
\docheckiffloatfits
\ifroomforfloat
- \someherefloat[#1]%
+ \placesomeherefloat[#1]%
\else
\showmessage\m!floatblocks9\empty
\doreversesavefloat
@@ -1271,7 +1271,7 @@
\page[\v!preference]%
\docheckiffloatfits
\ifroomforfloat
- \someherefloat[#1]%
+ \placesomeherefloat[#1]%
\else
\dosavefloat
\fi
@@ -1296,15 +1296,15 @@
\def\sometopbottomfloat[#1]%
{\doifelse\floatmethod\v!auto
{\ifdim\pagetotal<\floatautofactor\pagegoal % when empty page, maxdimen
- \sometopsfloat[#1]%
+ \placesometopsfloat[#1]%
\else
- \somebotsfloat[#1]%
+ \placesomebotsfloat[#1]%
\fi}
{\doifelse\floatmethod\v!top
- {\sometopsfloat[#1]}
+ {\placesometopsfloat[#1]}
{\doifelse\floatmethod\v!bottom
- {\somebotsfloat[#1]}
- {\someherefloat[#1]}}}}
+ {\placesomebotsfloat[#1]}
+ {\placesomeherefloat[#1]}}}}
% De onderstaande macro wordt gebruikt bij de macros
% voor het plaatsen van tabellen en figuren (klopt niet
@@ -2093,17 +2093,6 @@
% no \registerotrcommand\placesome* here!, this has to be cleaned up:
-% \def\placesomeslotfloat {\OTRcommand\someslotfloat} % \def\placesomeslotfloat {\someslotfloat}
-% \def\placesomefixdfloat {\OTRcommand\somefixdfloat} % \def\placesomefixdfloat {\somefixdfloat}
-% \def\placesomesidefloat {\OTRcommand\somesidefloat} % \def\placesomesidefloat {\somesidefloat}
-% \def\placesomefacefloat {\OTRcommand\somefacefloat} % \def\placesomefacefloat {\somefacefloat}
-% \def\placesomepagefloat {\OTRcommand\somepagefloat} % \def\placesomepagefloat {\somepagefloat}
-% \def\placesomeleftpagefloat {\OTRcommand\someleftpagefloat} % \def\placesomeleftpagefloat {\someleftpagefloat}
-% \def\placesomerightpagefloat{\OTRcommand\somerightpagefloat} % \def\placesomerightpagefloat{\somerightpagefloat}
-% \def\placesomeherefloat {\OTRcommand\someherefloat} % \def\placesomeherefloat {\someherefloat}
-% \def\placesometopsfloat {\OTRcommand\sometopsfloat} % \def\placesometopsfloat {\sometopsfloat}
-% \def\placesomebotsfloat {\OTRcommand\somebotsfloat} % \def\placesomebotsfloat {\somebotsfloat}
-
\def\someleftsidefloat [#1]{\somesidefloat[#1]\presetindentation}
\def\somerightsidefloat [#1]{\somesidefloat[#1]}
\def\sometopfloat [#1]{\someelsefloat[#1]\nonoindentation}
@@ -2119,21 +2108,22 @@
\def\somebackspacefloat [#1]{\somesidefloat[#1]}
\def\somecutspacefloat [#1]{\somesidefloat[#1]}
-\def\sometopsfloat {\OTRcommand\sometopsfloat}
-\def\somebotsfloat {\OTRcommand\somebotsfloat}
-\def\someherefloat {\OTRcommand\someherefloat}
-\def\someslotfloat {\OTRcommand\someslotfloat}
-\def\somefixdfloat {\OTRcommand\somefixdfloat}
-\def\somefacefloat {\OTRcommand\somefacefloat}
-\def\somepagefloat {\OTRcommand\somepagefloat}
-\def\someleftpagefloat {\OTRcommand\someleftpagefloat}
-\def\somerightpagefloat{\OTRcommand\somerightpagefloat}
-
-% \def\someslotfloat {\placesomeslotfloat}
-% \def\somefixdfloat {\placesomefixdfloat}
-% \def\somefacefloat {\placesomefacefloat}
-% \def\somepagefloat {\placesomepagefloat}
-% \def\someleftpagefloat {\placesomeleftpagefloat}
-% \def\somerightpagefloat{\placesomerightpagefloat}
+\def\placesomeslotfloat {\OTRcommand\someslotfloat}
+\def\placesomeherefloat {\OTRcommand\someherefloat}
+\def\placesomefixdfloat {\OTRcommand\somefixdfloat}
+\def\placesomepagefloat {\OTRcommand\somepagefloat}
+\def\placesomeleftpagefloat {\OTRcommand\someleftpagefloat}
+\def\placesomerightpagefloat{\OTRcommand\somerightpagefloat}
+\def\placesometopsfloat {\OTRcommand\sometopsfloat}
+\def\placesomebotsfloat {\OTRcommand\somebotsfloat}
+\def\placesomesidefloat {\OTRcommand\somesidefloat}
+\def\placesomefacefloat {\OTRcommand\somefacefloat}
+
+\def\somefixdfloat {\placesomefixdfloat}
+\def\somepagefloat {\placesomepagefloat}
+\def\someleftpagefloat {\placesomeleftpagefloat}
+\def\somerightpagefloat{\placesomerightpagefloat}
+\def\somefacefloat {\placesomefacefloat}
+\def\someslotfloat {\placesomeslotfloat}
\protect \endinput
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index a0f95def2..aa71f88dc 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -553,12 +553,6 @@ function jobreferences.expandcurrent() -- todo: two booleans: o_has_tex& a_has_t
end
end
-local function identify(prefix,reference)
- local set = resolve(prefix,reference)
- local bug = false
- for i=1,#set do
- local var = set[i]
- local special, inner, outer, arguments, operation = var.special, var.inner, var.outer, var.arguments, var.operation
--~ local uo = urls[outer]
--~ if uo then
--~ special, operation, argument = "url", uo[1], inner or uo[2] -- maybe more is needed
@@ -568,6 +562,13 @@ local function identify(prefix,reference)
--~ special, operation, argument = "file", fo[1], inner -- maybe more is needed
--~ end
--~ end
+
+local function identify(prefix,reference)
+ local set = resolve(prefix,reference)
+ local bug = false
+ for i=1,#set do
+ local var = set[i]
+ local special, inner, outer, arguments, operation = var.special, var.inner, var.outer, var.arguments, var.operation
if special then
local s = specials[special]
if s then
@@ -579,6 +580,7 @@ local function identify(prefix,reference)
-- special()
var.kind = "special outer"
end
+ var.f = outer
elseif operation then
if arguments then
-- special(operation{argument,argument})
@@ -613,7 +615,7 @@ local function identify(prefix,reference)
end
var.i = { "reference", r }
jobreferences.resolvers.reference(var)
- var.f = f
+ var.f = outer
var.e = true -- external
end
end
@@ -635,7 +637,7 @@ local function identify(prefix,reference)
end
var.i = r
jobreferences.resolvers[r[1]](var)
- var.f = f
+ var.f = outer
end
end
end
@@ -658,17 +660,51 @@ local function identify(prefix,reference)
-- outer::special()
var.kind = "outer with special"
end
- var.f = f
+ var.f = outer
else
var.error = "unknown outer with special"
end
else
-- outer::
var.kind = "outer"
- var.f = f
+ var.f = outer
end
else
- var.error = "unknown outer"
+ if inner then
+ if arguments then
+ -- outer::inner{argument}
+ var.kind = "outer with inner with arguments"
+ else
+ -- outer::inner
+ var.kind = "outer with inner"
+ end
+ var.i = { "reference", inner }
+ jobreferences.resolvers.reference(var)
+ var.f = outer
+ elseif special then
+ local s = specials[special]
+ if s then
+ if operation then
+ if arguments then
+ -- outer::special(operation{argument,argument})
+ var.kind = "outer with special and operation and arguments"
+ else
+ -- outer::special(operation)
+ var.kind = "outer with special and operation"
+ end
+ else
+ -- outer::special()
+ var.kind = "outer with special"
+ end
+ var.f = outer
+ else
+ var.error = "unknown outer with special"
+ end
+ else
+ -- outer::
+ var.kind = "outer"
+ var.f = outer
+ end
end
else
if arguments then
@@ -731,6 +767,7 @@ local function identify(prefix,reference)
set[i] = var
end
jobreferences.currentset = set
+-- print(bug,table.serialize(set))
return set, bug
end
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index e32e2fc76..59be57eff 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 : 09/11/09 18:16:02
+-- merge date : 09/12/09 14:46:27
do -- begin closure to overcome local limits and interference