diff --git a/luamplib.dtx b/luamplib.dtx index a1e15b1..d42a72f 100644 --- a/luamplib.dtx +++ b/luamplib.dtx @@ -3379,9 +3379,10 @@ local function do_preobj_TR(object,prescript) if opaq then local key, on, os, new local mode = prescript.tr_alternative or 1 - mode = transparancy_modes[tonumber(mode) or mode] + mode = transparancy_modes[tonumber(mode) or mode:lower()] if not mode then - warn("unsupported blend mode: '%s'", prescript.tr_alternative) + mode = prescript.tr_alternative + warn("unsupported blend mode: '%s'", mode) end opaq = format("%.3f", opaq) :gsub(decimals,rmzeros) for i,v in ipairs{ {mode,opaq},{"Normal",1} } do diff --git a/test-luamplib-latex.tex b/test-luamplib-latex.tex index a4248a2..71a87ae 100644 --- a/test-luamplib-latex.tex +++ b/test-luamplib-latex.tex @@ -345,7 +345,9 @@ draw test withpattern "mypatt" ; \endmpfig \mpfig - draw maketext "\bfseries\TeX" rotated 30 scaled 3 + picture tex; + tex = mplibgraphictext "\bfseries\TeX" rotated 30 scaled 4; + draw tex withshadingmethod "linear" withshadingvector (3,0) withshadingcolors (red,blue)