summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-metafun.lua2
-rw-r--r--context/data/scite/context/scite-context-data-metafun.properties5
-rw-r--r--metapost/context/base/mpiv/mp-mlib.mpiv10
-rw-r--r--metapost/context/base/mpiv/mp-page.mpiv29
-rw-r--r--tex/context/base/context-version.pdfbin4168 -> 4172 bytes
-rw-r--r--tex/context/base/mkiv/back-pdf.mkiv8
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-rul.lua38
-rw-r--r--tex/context/base/mkiv/lpdf-ano.lua26
-rw-r--r--tex/context/base/mkiv/mlib-run.lua15
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9038 -> 9064 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin261033 -> 267224 bytes
-rw-r--r--tex/context/base/mkiv/strc-itm.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-mat.mkiv73
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
17 files changed, 154 insertions, 62 deletions
diff --git a/context/data/scite/context/lexers/data/scite-context-data-metafun.lua b/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
index 1e998c8e1..b403fd54f 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
@@ -1,4 +1,4 @@
return {
- ["commands"]={ "transparency", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshadestep", "withshadefraction", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright" },
+ ["commands"]={ "transparency", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshadestep", "withshadefraction", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "fillup", "eofillup", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright" },
["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "metapostversion", "maxdimensions", "drawoptionsfactor" },
} \ No newline at end of file
diff --git a/context/data/scite/context/scite-context-data-metafun.properties b/context/data/scite/context/scite-context-data-metafun.properties
index 8295c7c00..1b00cc5e0 100644
--- a/context/data/scite/context/scite-context-data-metafun.properties
+++ b/context/data/scite/context/scite-context-data-metafun.properties
@@ -49,8 +49,9 @@ drawpointlabels drawlineoptions drawpointoptions drawcontroloptions drawlabelopt
draworiginoptions drawboundoptions drawpathoptions resetdrawoptions undashed \
decorated redecorated undecorated passvariable passarrayvariable \
tostring format formatted startpassingvariable stoppassingvariable \
-eofill eoclip nofill area addbackground \
-shadedup shadeddown shadedleft shadedright
+eofill eoclip nofill fillup eofillup \
+area addbackground shadedup shadeddown shadedleft \
+shadedright
keywordclass.metafun.internals=\
nocolormodel greycolormodel graycolormodel rgbcolormodel \
diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv
index 17ec983a1..326342b70 100644
--- a/metapost/context/base/mpiv/mp-mlib.mpiv
+++ b/metapost/context/base/mpiv/mp-mlib.mpiv
@@ -1451,11 +1451,11 @@ vardef formatted(expr f, x) = textext(varfmt(f, x)) enddef ;
% new
-def both text t = draw t withpostscript "both" enddef ; % we use draw because we need the proper boundingbox
-def eoboth text t = draw t withpostscript "eoboth" enddef ; % we use draw because we need the proper boundingbox
-def eofill text t = fill t withpostscript "evenodd" enddef ;
-def nofill text t = fill t withpostscript "collect" enddef ;
-%%% eoclip text t = clip t withpostscript "evenodd" enddef ; % no postscripts yet
+def fillup text t = draw t withpostscript "both" enddef ; % we use draw because we need the proper boundingbox
+def eofillup text t = draw t withpostscript "eoboth" enddef ; % we use draw because we need the proper boundingbox
+def eofill text t = fill t withpostscript "evenodd" enddef ;
+def nofill text t = fill t withpostscript "collect" enddef ;
+%%% eoclip text t = clip t withpostscript "evenodd" enddef ; % no postscripts yet
% def withrule expr r =
% if (t = "even-odd") or (t = "evenodd") : withpostscript "evenodd" fi
diff --git a/metapost/context/base/mpiv/mp-page.mpiv b/metapost/context/base/mpiv/mp-page.mpiv
index a6fa3fba3..4ccf4448e 100644
--- a/metapost/context/base/mpiv/mp-page.mpiv
+++ b/metapost/context/base/mpiv/mp-page.mpiv
@@ -662,3 +662,32 @@ def Enlarged (expr p, d) =
urEnlarged (p,d) --
ulEnlarged (p,d) -- cycle)
enddef ;
+
+% for the moment we put these here:
+
+numeric RuleWidth ; RuleWidth := 0 ;
+numeric RuleHeight ; RuleHeight := 0 ;
+numeric RuleDepth ; RuleDepth := 0 ;
+numeric RuleThickness ; RuleThickness := 0 ;
+numeric RuleFactor ; RuleFactor := 0 ;
+numeric RuleOffset ; RuleOffset := 0 ;
+ def RuleColor = (.5white) enddef ;
+
+def FakeWord(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled (RuleDepth-RuleThickness/2)
+ withcolor RuleColor ;
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled (RuleHeight-RuleDepth-RuleThickness/2)
+ shifted (0,RuleDepth+RuleThickness)
+ withcolor RuleColor ;
+enddef ;
+
+def FakeRule(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled RuleHeight
+ withcolor RuleColor ;
+enddef ;
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index c8b24df0d..db62d2f0f 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/back-pdf.mkiv b/tex/context/base/mkiv/back-pdf.mkiv
index c4aaacc9b..93e6af0b3 100644
--- a/tex/context/base/mkiv/back-pdf.mkiv
+++ b/tex/context/base/mkiv/back-pdf.mkiv
@@ -136,10 +136,11 @@
\unexpanded\def\dostartrotation#1%
{\forcecolorhack
- \clf_pdfstartrotation#1\relax}
+ \clf_pdfstartrotation#1\relax} % todo: implement without Q q
\unexpanded\def\dostoprotation
- {\clf_pdfstoprotation}
+ {\clf_pdfstoprotation
+ \forcecolorhack}
% scaling
@@ -148,7 +149,8 @@
\clf_pdfstartscaling rx #1 ry #2\relax}
\unexpanded\def\dostopscaling
- {\clf_pdfstopscaling}
+ {\clf_pdfstopscaling
+ \forcecolorhack}
% mirroring
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index a5c077c88..9b95cfa8c 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.02.24 11:19}
+\newcontextversion{2016.02.25 14:00}
%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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index b116e336a..2bf4d34c5 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.02.24 11:19}
+\edef\contextversion{2016.02.25 14:00}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/grph-rul.lua b/tex/context/base/mkiv/grph-rul.lua
index 4ca36b677..5d3cb8ad5 100644
--- a/tex/context/base/mkiv/grph-rul.lua
+++ b/tex/context/base/mkiv/grph-rul.lua
@@ -55,33 +55,31 @@ do
return v
end)
- local makecode = utilities.templates.replacer [[
- beginfig(1);
- RuleWidth := %width% ;
- RuleHeight := %height% ;
- RuleDepth := %depth% ;
- RuleThickness := %line% ;
- RuleFactor := %factor% ;
- RuleOffset := %offset% ;
- def RuleColor = %color% enddef ;
- %data%;
- endfig ;
- ]]
+ local replacer = utilities.templates.replacer
local predefined = {
- ["fake:word"] = [[
-fill unitsquare xscaled RuleWidth yscaled RuleHeight withcolor RuleColor ;
-draw (0,RuleDepth+RuleThickness/2) -- (RuleWidth,RuleDepth+RuleThickness/2) withpen pencircle scaled RuleThickness withcolor white ;
+ ["fake:word"] = replacer [[
+FakeWord(%width%,%height%,%depth%,%line%,%color%);
]],
- ["fake:rule"] = [[
-fill unitsquare xscaled RuleWidth yscaled RuleHeight withcolor RuleColor ;
+ ["fake:rule"] = replacer[[
+FakeRule(%width%,%height%,%depth%,%line%,%color%);
]],
+ ["fake:rest"] = replacer [[
+RuleWidth := %width% ;
+RuleHeight := %height% ;
+RuleDepth := %depth% ;
+RuleThickness := %line% ;
+RuleFactor := %factor% ;
+RuleOffset := %offset% ;
+def RuleColor = %color% enddef ;
+%data%;
+ ]]
}
ruleactions.mp = function(p,h,v,i,n)
- local name = p.name
- local code = makecode {
- data = name and predefined[name] or p.data or "",
+ local name = p.name or "fake:rest"
+ local code = (predefined[name] or predefined["fake:rest"]) {
+ data = p.data or "",
width = p.width * bpfactor,
height = p.height * bpfactor,
depth = p.depth * bpfactor,
diff --git a/tex/context/base/mkiv/lpdf-ano.lua b/tex/context/base/mkiv/lpdf-ano.lua
index f4f5f1a8e..42e3c3b10 100644
--- a/tex/context/base/mkiv/lpdf-ano.lua
+++ b/tex/context/base/mkiv/lpdf-ano.lua
@@ -495,14 +495,15 @@ local function pdflinkinternal(internal,page)
local used = usedinternals[internal]
if used == defaultview or used == true then
return pagereferences[page]
+ else
+ if type(internal) ~= "string" then
+ internal = autoprefix .. internal
+ end
+ return pdfdictionary {
+ S = pdf_goto,
+ D = internal,
+ }
end
- if type(internal) ~= "string" then
- internal = autoprefix .. internal
- end
- return pdfdictionary {
- S = pdf_goto,
- D = internal,
- }
else
return pagereferences[page]
end
@@ -515,11 +516,12 @@ local function pdflinkname(destination,internal,page)
local used = usedinternals[internal]
if used == defaultview then -- or used == true then
return pagereferences[page]
+ else
+ return pdfdictionary {
+ S = pdf_goto,
+ D = destination,
+ }
end
- return pdfdictionary {
- S = pdf_goto,
- D = destination,
- }
elseif method == v_name then
-- flaginternals[internal] = true -- for bookmarks and so
return pdfdictionary {
@@ -752,7 +754,7 @@ runners["inner"] = function(var,actions)
local name = nil
local method = references.innermethod
local vi = var.i
- local page = var.page
+ local page = var.r
if vi then
local vir = vi.references
if vir then
diff --git a/tex/context/base/mkiv/mlib-run.lua b/tex/context/base/mkiv/mlib-run.lua
index f20461bbb..8109cff2d 100644
--- a/tex/context/base/mkiv/mlib-run.lua
+++ b/tex/context/base/mkiv/mlib-run.lua
@@ -601,10 +601,17 @@ do
function metapost.simple(format,code) -- even less than metapost.quickcanddirty
local mpx = metapost.format(format or "metafun","metafun")
-- metapost.setoutercolor(2)
- metapost.process(mpx,code,false,flusher,false,false,1,true) -- last true is plugmode !
- local stream = concat(result," ")
- result = nil -- cleanup
- return stream, width, height, depth
+ metapost.process(mpx,
+ { "beginfig(1);", code, "endfig;" },
+ false, flusher, false, false, 1, true -- last true is plugmode !
+ )
+ if result then
+ local stream = concat(result," ")
+ result = nil -- cleanup
+ return stream, width, height, depth
+ else
+ return "", 0, 0, 0
+ end
end
end
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 63cbe1a82..76a2ab915 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -126,7 +126,7 @@ return {
"passvariable", "passarrayvariable", "tostring", "format", "formatted",
"startpassingvariable", "stoppassingvariable",
--
- "eofill", "eoclip", "nofill",
+ "eofill", "eoclip", "nofill", "fillup", "eofillup",
"area",
--
"addbackground",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 6a35797d3..0b2a283e6 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 202123eb8..1dc7bb32f 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-itm.mkvi b/tex/context/base/mkiv/strc-itm.mkvi
index b826413b2..e8b47babe 100644
--- a/tex/context/base/mkiv/strc-itm.mkvi
+++ b/tex/context/base/mkiv/strc-itm.mkvi
@@ -1586,7 +1586,7 @@
\fi
\fi
\noindent % no \dontleavehmode
- \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\collecteditemgroupitem}%
+ \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\collecteditemgroupitem\hss}%
\endgroup}
\def\strc_itemgroups_collected_flush
diff --git a/tex/context/base/mkiv/strc-mat.mkiv b/tex/context/base/mkiv/strc-mat.mkiv
index 6bf9b149b..5bfad81eb 100644
--- a/tex/context/base/mkiv/strc-mat.mkiv
+++ b/tex/context/base/mkiv/strc-mat.mkiv
@@ -885,10 +885,10 @@
\unexpanded\def\formulanumber
{\strc_formulas_number} % for the moment
-\def\strc_formulas_number
+\unexpanded\def\strc_formulas_number
{\dosingleempty\strc_formulas_number_again}
-\def\strc_formulas_number_again[#1]%
+\unexpanded\def\strc_formulas_number_again[#1]%
{\def\currentformulareference{#1}%
\strc_formulas_number_indeed}
@@ -902,27 +902,80 @@
\setfalse\c_strc_formulas_increment
\dosingleempty\strc_formulas_place}
-\def\strc_formulas_place[#1]%
+\unexpanded\def\strc_formulas_place[#1]%
{\def\currentplaceformulareference{#1}%
\let\currentplaceformulasuffix\empty
\doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
-\def\strc_formulas_place_yes#1%
+\unexpanded\def\strc_formulas_place_yes#1%
{\def\currentplaceformulasuffix{#1}%
\strc_formulas_place_nop}
-\def\strc_formulas_place_nop
+\unexpanded\def\strc_formulas_place_nop
{\doifelsenextchar$\strc_formulas_place_pickup\strc_formulas_place_indeed} % [ref]$$ [ref]\start
-\def\strc_formulas_place_indeed
+\unexpanded\def\strc_formulas_place_indeed
{\strc_formulas_place_numbering}
-\def\strc_formulas_place_pickup$$#1$$%
+\unexpanded\def\strc_formulas_place_pickup$$#1$$%
{\strc_formulas_place_numbering
\strc_formulas_start_formula{}#1\strc_formulas_stop_formula}
-\let\startplaceformula\placeformula
-\let\stopplaceformula \relax
+% \let\startplaceformula\placeformula
+% \let\stopplaceformula \relax
+
+% \startplaceformula \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[-] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[x] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[reference=foo] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[title=whatever] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[suffix=x] \startformula e=mc^2 \stopformula \stopplaceformula
+
+\unexpanded\def\startplaceformula{\dosingleempty\strc_formulas_start_place}
+\unexpanded\def\stopplaceformula {\strc_formulas_stop_place}
+
+\let\currentplaceformulareference\empty
+\let\currentplaceformulasuffix \empty
+
+\def\strc_formulas_start_place
+ {\begingroup
+ \global\settrue\c_strc_formulas_inside_place
+ \iffirstargument
+ \expandafter\strc_formulas_start_place_yes
+ \else
+ \expandafter\strc_formulas_start_place_nop
+ \fi}
+
+\def\strc_formulas_start_place_yes[#1]%
+ {\doifassignmentelse{#1}\strc_formulas_start_place_parameters\strc_formulas_start_place_reference[#1]}
+
+\def\strc_formulas_start_place_nop
+ {\let\currentplaceformulareference\empty
+ \let\currentplaceformulasuffix \empty
+ \strc_formulas_place_nop}
+
+\def\strc_formulas_start_place_reference[#1]%
+ {\edef\currentplaceformulareference{#1}%
+ \let\currentplaceformulasuffix\empty
+ %\doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+ \strc_formulas_place_nop}
+
+\def\strc_formulas_start_place_parameters[#1]%
+ {\letdummyparameter\c!name \empty
+ \letdummyparameter\c!reference\empty
+ \letdummyparameter\c!suffix \empty
+ \getdummyparameters[#1]%
+ \edef\currentplaceformulatitle {\dummyparameter\c!title}%
+ \edef\currentplaceformulareference{\dummyparameter\c!reference}%
+ \edef\currentplaceformulasuffix {\dummyparameter\c!suffix}%
+ \ifx\currentplaceformulatitle\empty\else
+ \normalexpanded{\setformulalistentry{\currentplaceformulatitle}}%
+ \fi
+ \doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+
+\def\strc_formulas_stop_place
+ {\relax
+ \endgroup}
% to be checked
@@ -955,7 +1008,7 @@
\unexpanded\def\placenamedformula
{\dosingleempty\strc_formulase_place_named}
-\def\strc_formulase_place_named
+\unexpanded\def\strc_formulase_place_named
{\iffirstargument
\expandafter\strc_formulase_place_named_yes
\else
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 7c784a440..51d289527 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 02/24/16 11:19:40
+-- merge date : 02/25/16 14:00:07
do -- begin closure to overcome local limits and interference