From b8bc4fc22157f43c15f40d784ab05bdd30c93c44 Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 5 May 2012 12:00:16 +0300 Subject: beta 2012.05.05 10:42 --- .../lexers/data/scite-context-data-metafun.lua | 2 +- .../scite/scite-context-data-metafun.properties | 34 ++++----- context/data/scite/scite-context-visual.tex | 5 ++ metapost/context/base/mp-mlib.mpiv | 24 +++++++ scripts/context/lua/mtx-watch.lua | 29 ++++++-- tex/context/base/back-pdf.mkiv | 5 +- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4076 -> 4067 bytes tex/context/base/context-version.png | Bin 106067 -> 105270 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/lpdf-col.lua | 4 +- tex/context/base/lpdf-mis.lua | 18 ++--- tex/context/base/mlib-pdf.lua | 7 +- tex/context/base/mlib-pps.lua | 80 ++++++++++++++++----- tex/context/base/mlib-pps.mkiv | 28 ++++++++ tex/context/base/s-abr-01.tex | 1 + tex/context/base/status-files.pdf | Bin 24320 -> 24314 bytes tex/context/base/status-lua.pdf | Bin 173210 -> 173203 bytes tex/context/base/type-imp-averia.mkiv | 52 +++++++++----- tex/context/base/type-imp-texgyre.mkiv | 6 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 23 files changed, 225 insertions(+), 80 deletions(-) diff --git a/context/data/scite/lexers/data/scite-context-data-metafun.lua b/context/data/scite/lexers/data/scite-context-data-metafun.lua index c05bd6f25..6f6e3f422 100644 --- a/context/data/scite/lexers/data/scite-context-data-metafun.lua +++ b/context/data/scite/lexers/data/scite-context-data-metafun.lua @@ -1,4 +1,4 @@ return { - ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "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", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "transparent", "withtransparency", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions" }, + ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "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", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "transparent", "withtransparency", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions" }, ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent" }, } \ No newline at end of file diff --git a/context/data/scite/scite-context-data-metafun.properties b/context/data/scite/scite-context-data-metafun.properties index e33ab103e..753dcf3e6 100644 --- a/context/data/scite/scite-context-data-metafun.properties +++ b/context/data/scite/scite-context-data-metafun.properties @@ -33,21 +33,21 @@ grayed greyed onlayer along graphictext \ loadfigure externalfigure withmask figure register \ bitmapimage colordecimals ddecimal dddecimal ddddecimal \ textext thetextext rawtextext textextoffset verbatim \ -thelabel label transparent withtransparency infont \ -set_linear_vector linear_shade define_linear_shade define_circular_linear_shade define_sampled_linear_shade \ -set_circular_vector circular_shade define_circular_shade define_circular_linear_shade define_sampled_circular_shade \ -space CRLF grayscale greyscale withgray \ -withgrey colorpart readfile clearxy unitvector \ -center epsed anchored originpath infinite \ -break xstretched ystretched snapped pathconnectors \ -function constructedpath constructedpairs punkedfunction curvedfunction \ -tightfunction punkedpath curvedpath tightpath punkedpairs \ -curvedpairs tightpairs evenly oddly condition \ -pushcurrentpicture popcurrentpicture tensecircle roundedsquare colortype \ -whitecolor blackcolor normalfill normaldraw visualizepaths \ -naturalizepaths drawboundary drawwholepath visualizeddraw visualizedfill \ -draworigin drawboundingbox drawpath drawpoint drawpoints \ -drawcontrolpoints drawcontrollines drawpointlabels drawlineoptions drawpointoptions \ -drawcontroloptions drawlabeloptions draworiginoptions drawboundoptions drawpathoptions \ -resetdrawoptions +thelabel label transparent withtransparency asgroup \ +infont set_linear_vector linear_shade define_linear_shade define_circular_linear_shade \ +define_sampled_linear_shade set_circular_vector circular_shade define_circular_shade define_circular_linear_shade \ +define_sampled_circular_shade space CRLF grayscale greyscale \ +withgray withgrey colorpart readfile clearxy \ +unitvector center epsed anchored originpath \ +infinite break xstretched ystretched snapped \ +pathconnectors function constructedpath constructedpairs punkedfunction \ +curvedfunction tightfunction punkedpath curvedpath tightpath \ +punkedpairs curvedpairs tightpairs evenly oddly \ +condition pushcurrentpicture popcurrentpicture tensecircle roundedsquare \ +colortype whitecolor blackcolor normalfill normaldraw \ +visualizepaths naturalizepaths drawboundary drawwholepath visualizeddraw \ +visualizedfill draworigin drawboundingbox drawpath drawpoint \ +drawpoints drawcontrolpoints drawcontrollines drawpointlabels drawlineoptions \ +drawpointoptions drawcontroloptions drawlabeloptions draworiginoptions drawboundoptions \ +drawpathoptions resetdrawoptions diff --git a/context/data/scite/scite-context-visual.tex b/context/data/scite/scite-context-visual.tex index e4f22ea36..0a1b8bb71 100644 --- a/context/data/scite/scite-context-visual.tex +++ b/context/data/scite/scite-context-visual.tex @@ -1,5 +1,7 @@ % language=uk +\usemodule[art-01] + \defineframedtext [entry] @@ -24,6 +26,9 @@ in combination with the embedded lua and metapost lexers and inline as well as display \ctxlua{context("lua code")}. + Non breakable spaces in for instance 10 mm and quads like here + are shown as well. + \startlinecorrection \startMPcode for i=1 upto 100 : diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 43e620cfa..f89e7a491 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -591,3 +591,27 @@ enddef ; % property p ; p = properties(withcolor (1,1,0,1)) ; % fill fullcircle scaled 20cm withproperties p ; + +% Experimental: + +primarydef t asgroup s = % s = isolated|knockout + begingroup + save savedpicture ; + picture savedpicture ; + save currentbounds ; + path currentbounds ; + savedpicture := if picture t : t else : image(draw t) fi ; + currentbounds := boundingbox savedpicture ; + image ( + draw currentbounds + withprescript "gr_state=start" + withprescript "gr_type=" & s + withprescript "gr_llx=" & decimal xpart llcorner currentbounds + withprescript "gr_lly=" & decimal ypart llcorner currentbounds + withprescript "gr_urx=" & decimal xpart urcorner currentbounds + withprescript "gr_ury=" & decimal ypart urcorner currentbounds ; + draw savedpicture ; + draw currentbounds + withprescript "gr_state=stop" ; + ) endgroup +enddef ; diff --git a/scripts/context/lua/mtx-watch.lua b/scripts/context/lua/mtx-watch.lua index 5bd0ad5f4..118d1a815 100644 --- a/scripts/context/lua/mtx-watch.lua +++ b/scripts/context/lua/mtx-watch.lua @@ -30,6 +30,8 @@ scripts.watch = scripts.watch or { } local format, concat, difftime, time = string.format, table.concat, os.difftime, os.time local next, type = next, type +local basename, dirname, joinname = file.basename, file.dirname, file.join +local lfsdir, lfsattributes = lfs.dir, lfs.attributes -- the machine/instance matches the server app we use @@ -68,9 +70,10 @@ local function noset(t) end end -local lfsdir, lfsattributes = lfs.dir, lfs.attributes -local function glob(files,path) +-- todo: split order (o-name.luj) and combine with atime to determine sort order. + +local function glob(files,path) -- some day: sort by name (order prefix) and atime for name in lfsdir(path) do if name:find("^%.") then -- skip . and .. @@ -86,7 +89,8 @@ local function glob(files,path) glob(files,name) end elseif name:find(".%luj$") then - files[name] = a.change or a.ctime or a.modification or a.mtime + -- files[name] = a.change or a.ctime or a.modification or a.mtime + files[#files+1] = { dirname(name), basename(name) } end end end @@ -94,6 +98,16 @@ end local clock = os.gettimeofday or os.time -- we cannot trust os.clock on linux +local function filenamesort(a,b) + local fa, da = a[1], a[2] + local fb, db = b[1], b[2] + if da == db then + return fa < fb + else + return da < db + end +end + function scripts.watch.watch() local delay = tonumber(environment.argument("delay") or 5) or 5 if delay == 0 then @@ -120,8 +134,13 @@ function scripts.watch.watch() lfs.chdir(path) local files = { } glob(files,path) - table.sort(files) -- what gets sorted here, todo: by time - for name, time in next, files do + table.sort(files,filenamesort) +-- for name, time in next, files do + for i=1,#files do + local f = files[i] + local dirname = f[1] + local basename = f[2] -- we can use that later on + local name = joinname(dirname,basename) --~ local ok, joblog = xpcall(function() return dofile(name) end, function() end ) local ok, joblog = pcall(dofile,name) if ok and joblog then diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv index 184294120..9e441e224 100644 --- a/tex/context/base/back-pdf.mkiv +++ b/tex/context/base/back-pdf.mkiv @@ -210,7 +210,8 @@ %D Temporary hack, will be removed or improved or default. -\def\TransparencyHack{\ctxlua{backends.codeinjections.addtransparencygroup()}} +%def\TransparencyHack{\ctxlua{backends.codeinjections.addtransparencygroup()}} +\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]} %D \macros %D {dostartobject,dostopobject,doinsertobject} @@ -228,6 +229,8 @@ {\back_object_stop \egroup} +% attr {/Group << /S /Transparency /I false /K true >>} + \def\back_object_register#1#2% {\the\pdfbackendeveryxform \finalizeobjectbox\objectbox diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 650befb25..3d8d8afb8 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.04.26 22:27} +\newcontextversion{2012.05.05 10:42} %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/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 472a0d8f2..82330e215 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{2012.04.26 22:27} +\newcontextversion{2012.05.05 10:42} %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-version.pdf b/tex/context/base/context-version.pdf index df7ff1d8b..00c2e5f71 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png index 4ada51703..0e5e80ed8 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index ac11dd9f9..40f1e299a 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.04.26 22:27} +\edef\contextversion{2012.05.05 10:42} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 168aca76c..64af2d758 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.04.26 22:27} +\edef\contextversion{2012.05.05 10:42} %D For those who want to use this: diff --git a/tex/context/base/lpdf-col.lua b/tex/context/base/lpdf-col.lua index 227878b5b..b7d4b0eff 100644 --- a/tex/context/base/lpdf-col.lua +++ b/tex/context/base/lpdf-col.lua @@ -38,6 +38,8 @@ local colorsvalue = colors.value local transparenciesvalue = transparencies.value local forcedmodel = colors.forcedmodel +local c_transparency = pdfconstant("Transparency") + -- page groups (might move to lpdf-ini.lua) local colorspaceconstants = { -- v_none is ignored @@ -56,7 +58,7 @@ table.setmetatableindex(transparencygroups, function(transparencygroups,colormod local cs = colorspaceconstants[colormodel] if cs then local g = pdfreference(pdfflushobject(pdfdictionary { - S = pdfconstant("Transparency"), + S = c_transparency, CS = cs, I = true, })) diff --git a/tex/context/base/lpdf-mis.lua b/tex/context/base/lpdf-mis.lua index cf0a54f5e..f427fa3db 100644 --- a/tex/context/base/lpdf-mis.lua +++ b/tex/context/base/lpdf-mis.lua @@ -93,15 +93,15 @@ end -- -function codeinjections.addtransparencygroup() - -- png: /CS /DeviceRGB /I true - local d = pdfdictionary { - S = pdfconstant("Transparency"), - I = true, - K = true, - } - lpdf.registerpagefinalizer(function() lpdf.addtopageattributes("Group",d) end) -- hm -end +-- function codeinjections.addtransparencygroup() +-- -- png: /CS /DeviceRGB /I true +-- local d = pdfdictionary { +-- S = pdfconstant("Transparency"), +-- I = true, +-- K = true, +-- } +-- lpdf.registerpagefinalizer(function() lpdf.addtopageattributes("Group",d) end) -- hm +-- end -- actions (todo: store and update when changed) diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua index deac9d51a..7a23ba947 100644 --- a/tex/context/base/mlib-pdf.lua +++ b/tex/context/base/mlib-pdf.lua @@ -276,6 +276,7 @@ function metapost.flush(result,flusher,askedfig) flusher = flusher or metapost.flushers.pdf local resetplugins = metapost.resetplugins or ignore -- before figure local processplugins = metapost.processplugins or ignore -- each object + local synchronizeplugins = metapost.synchronizeplugins or ignore local pluginactions = metapost.pluginactions or ignore -- before / after local startfigure = flusher.startfigure local stopfigure = flusher.stopfigure @@ -302,8 +303,7 @@ function metapost.flush(result,flusher,askedfig) startfigure(fignum,llx,lly,urx,ury,"begin",figure) t[#t+1] = "q" if objects then - resetplugins() -- we should move the colorinitializer here - t[#t+1] = metapost.colorinitializer() + resetplugins(t) -- we should move the colorinitializer here for o=1,#objects do local object = objects[o] local objecttype = object.type @@ -327,6 +327,9 @@ function metapost.flush(result,flusher,askedfig) else -- we use an indirect table as we want to overload -- entries but this is not possible in userdata + -- + -- can be optimized if no path + -- local original = object local object = { } setmetatable(object, { diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua index e6459df05..7821b3dbf 100644 --- a/tex/context/base/mlib-pps.lua +++ b/tex/context/base/mlib-pps.lua @@ -620,17 +620,17 @@ local sequencers = utilities.sequencers local appendgroup = sequencers.appendgroup local appendaction = sequencers.appendaction -local resetter = nil -local analyzer = nil -local processor = nil +local resetter = nil +local analyzer = nil +local processor = nil -local resetteractions = sequencers.new { arguments = "" } -local analyzeractions = sequencers.new { arguments = "object,prescript" } -local processoractions = sequencers.new { arguments = "object,prescript,before,after" } +local resetteractions = sequencers.new { arguments = "t" } +local analyzeractions = sequencers.new { arguments = "object,prescript" } +local processoractions = sequencers.new { arguments = "object,prescript,before,after" } -appendgroup(resetteractions, "system") -appendgroup(analyzeractions, "system") -appendgroup(processoractions,"system") +appendgroup(resetteractions, "system") +appendgroup(analyzeractions, "system") +appendgroup(processoractions, "system") -- later entries come first @@ -669,13 +669,13 @@ function metapost.pluginactions(what,t,flushfigure) -- before/after object, depe return t end -function metapost.resetplugins() -- intialize plugins, before figure +function metapost.resetplugins(t) -- intialize plugins, before figure -- plugins can have been added - resetter = resetteractions .runner - analyzer = analyzeractions .runner - processor = processoractions.runner + resetter = resetteractions .runner + analyzer = analyzeractions .runner + processor = processoractions .runner -- let's apply one runner - resetter() + resetter(t) end function metapost.analyzeplugins(object) -- each object (first pass) @@ -716,6 +716,12 @@ local function cm(object) return sx,rx,ry,sy,tx,ty end +-- color + +local function cl_reset(t) + t[#t+1] = metapost.colorinitializer() -- only color +end + -- text local tx_done = { } @@ -886,7 +892,10 @@ local function sh_process(object,prescript,before,after) -- fatal error end before[#before+1], after[#after+1] = "q /Pattern cs", format("W n /%s sh Q",name) - object.color, object.type, object.grouped = false, false, true -- not nil, otherwise mt + -- false, not nil, else mt triggered + object.colored = false + object.type = false + object.grouped = true end end @@ -1036,12 +1045,47 @@ local function la_process(object,prescript,before,after) end end +-- groups + +local types = { + isolated +} + +local function gr_process(object,prescript,before,after) + local gr_state = prescript.gr_state + if gr_state then + if gr_state == "start" then + local gr_type = utilities.parsers.settings_to_hash(prescript.gr_type) + before[#before+1] = function() + context.MPLIBstartgroup( + gr_type.isolated and 1 or 0, + gr_type.knockout and 1 or 0, + prescript.gr_llx, + prescript.gr_lly, + prescript.gr_urx, + prescript.gr_ury + ) + end + elseif gr_state == "stop" then + after[#after+1] = function() + context.MPLIBstopgroup() + end + end + object.path = false + object.color = false + object.grouped = true + end +end + -- definitions -appendaction(resetteractions,"system",tx_reset) +appendaction(resetteractions, "system",cl_reset) +appendaction(resetteractions, "system",tx_reset) + +appendaction(processoractions,"system",gr_process) -appendaction(analyzeractions,"system",tx_analyze) -appendaction(analyzeractions,"system",gt_analyze) +appendaction(analyzeractions, "system",tx_analyze) +appendaction(analyzeractions, "system",gt_analyze) appendaction(processoractions,"system",sh_process) -- (processoractions,"system",gt_process) diff --git a/tex/context/base/mlib-pps.mkiv b/tex/context/base/mlib-pps.mkiv index b233f7b08..950d1be57 100644 --- a/tex/context/base/mlib-pps.mkiv +++ b/tex/context/base/mlib-pps.mkiv @@ -106,4 +106,32 @@ \def\MPLIBresettexts {\ctxlua{metapost.resettextexts()}} +%D Experiment + +\let\MPLIBstartgroup\gobblefivearguments +\let\MPLIBstopgroup \relax + +%D Also experimental: + +\def\doMPLIBstopgroup#1#2#3#4#5#6% some day this might happen elsewhere + {\egroup + \wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint\relax + \ht\scratchbox #6\onebasepoint + \dp\scratchbox-#4\onebasepoint + \pdfxform + attr {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#1=1 true \else false \fi >>} + resources {\pdfbackendcurrentresources} + \scratchbox + \setbox\scratchbox\hbox\bgroup\pdfrefxform\pdflastxform\egroup + \wd\scratchbox\zeropoint + \ht\scratchbox\zeropoint + \dp\scratchbox\zeropoint + \box\scratchbox + \endgroup} + +\def\MPLIBstartgroup#1#2#3#4#5#6% isolated 0/1, knockout 0/1 llx lly urx ury + {\begingroup + \setbox\scratchbox\hbox\bgroup + \def\MPLIBstopgroup{\doMPLIBstopgroup{#1}{#2}{#3}{#4}{#5}{#6}}} + \protect \endinput diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex index 7a0c33c54..d6685bd71 100644 --- a/tex/context/base/s-abr-01.tex +++ b/tex/context/base/s-abr-01.tex @@ -47,6 +47,7 @@ \logo [BMP] {bmp} \logo [BSD] {bsd} \logo [CCODE] {C} +\logo [CPLUSPLUS] {C\high{++}} \logo [CALCMATH] {CalcMath} \logo [CD] {cd} \logo [CPU] {cpu} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 4c4671ed0..bd91c6c66 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index d35e114f5..6772415d6 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/type-imp-averia.mkiv b/tex/context/base/type-imp-averia.mkiv index 310704378..fd0ee7100 100644 --- a/tex/context/base/type-imp-averia.mkiv +++ b/tex/context/base/type-imp-averia.mkiv @@ -23,20 +23,36 @@ \starttypescriptcollection[averia] - \starttypescript [\s!serif] [averia,averiaserif] [\s!name] + \starttypescript [\s!serif] [averia] [\s!name] \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!file:\typescripttwo-regular] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:\typescripttwo-bold] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:\typescripttwo-italic] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:\typescripttwo-bolditalic] [\s!features=\s!default] + \definefontsynonym [\s!Serif] [\s!file:averia-regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:averia-bold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:averia-italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:averia-bolditalic] [\s!features=\s!default] \stoptypescript - \starttypescript [\s!serif] [averia-light,averiaserif-light] [\s!name] + \starttypescript [\s!serif] [averiaserif] [\s!name] \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!file:\typescripttwo-light] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:\typescripttwo-regular] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:\typescripttwo-lightitalic] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:\typescripttwo-italic] [\s!features=\s!default] + \definefontsynonym [\s!Serif] [\s!file:averiaserif-regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:averiaserif-bold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:averiaserif-italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:averiaserif-bolditalic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!serif] [averialight] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!file:averia-light] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:averia-regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:averia-lightitalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:averia-italic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!serif] [averiaseriflight] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!file:averiaserif-light] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:averiaserif-regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:averiaserif-lightitalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:averiaserif-italic] [\s!features=\s!default] \stoptypescript \starttypescript [\s!sans] [averiasans] [\s!name] @@ -47,7 +63,7 @@ \definefontsynonym [\s!SansBoldItalic] [\s!file:averiasans-bolditalic] [\s!features=\s!default] \stoptypescript - \starttypescript [\s!sans] [averiasans-light] [\s!name] + \starttypescript [\s!sans] [averiasanslight] [\s!name] \setups[\s!font:\s!fallback:\s!sans] \definefontsynonym [\s!Sans] [\s!file:averiasans-light] [\s!features=\s!default] \definefontsynonym [\s!SansBold] [\s!file:averiasans-regular] [\s!features=\s!default] @@ -60,15 +76,15 @@ \starttypescript[averia] \definetypeface [averia] [\s!rm] [\s!serif] [averiaserif] [\s!default] \definetypeface [averia] [\s!ss] [\s!sans] [averiasans] [\s!default] - \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default] - \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default] + \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.850] + \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.025] \stoptypescript - \starttypescript[averia-light] - \definetypeface [averia] [\s!rm] [\s!serif] [averiaserif-light] [\s!default] - \definetypeface [averia] [\s!ss] [\s!sans] [averiasans-light] [\s!default] - \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default] - \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default] + \starttypescript[averialight] + \definetypeface [averialight] [\s!rm] [\s!serif] [averiaseriflight] [\s!default] + \definetypeface [averialight] [\s!ss] [\s!sans] [averiasanslight] [\s!default] + \definetypeface [averialight] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.850] + \definetypeface [averialight] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.025] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/base/type-imp-texgyre.mkiv b/tex/context/base/type-imp-texgyre.mkiv index 19534f8fb..823f6b4a9 100644 --- a/tex/context/base/type-imp-texgyre.mkiv +++ b/tex/context/base/type-imp-texgyre.mkiv @@ -201,7 +201,7 @@ % Times Math (tx) - \starttypescript [\s!math][times][\s!all] + \starttypescript [\s!math][times,termes][\s!all] \loadfontgoodies[tx-math] \definefontsynonym[\s!MathRoman][txmath@tx-math] % \definefontsynonym[\s!MathRomanBold][MathRoman] @@ -209,13 +209,13 @@ % Palatino Math (px) - \starttypescript [\s!math][palatino][\s!all] + \starttypescript [\s!math][palatino,pagella][\s!all] \loadfontgoodies[px-math] \definefontsynonym[\s!MathRoman][pxmath@px-math] % \definefontsynonym[\s!MathRomanBold][MathRoman] \stoptypescript -% \starttypescript [\s!math][palatino][\s!all] +% \starttypescript [\s!math][palatino,pagella][\s!all] % \definefontsynonym[\s!MathRoman][file:texgyrepagella-math.otf][\s!features=\s!math\mathsizesuffix] % \stoptypescript diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index ce79a9e82..828b89dc3 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/12 22:27:59 +-- merge date : 05/05/12 10:42:56 do -- begin closure to overcome local limits and interference -- cgit v1.2.3