From d91c37679b13162a4ead85abbe564090b2e1b51c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 24 Oct 2017 11:13:27 +0200 Subject: 2017-10-24 10:36:00 --- metapost/context/base/mpii/mp-tool.mpii | 1 + metapost/context/base/mpiv/mp-grph.mpiv | 5 ++--- metapost/context/base/mpiv/mp-luas.mpiv | 7 +++++-- metapost/context/base/mpiv/mp-text.mpiv | 14 +++++++------- metapost/context/base/mpiv/mp-tool.mpiv | 34 +++++++-------------------------- 5 files changed, 22 insertions(+), 39 deletions(-) (limited to 'metapost') diff --git a/metapost/context/base/mpii/mp-tool.mpii b/metapost/context/base/mpii/mp-tool.mpii index a3300f5bb..562139fed 100644 --- a/metapost/context/base/mpii/mp-tool.mpii +++ b/metapost/context/base/mpii/mp-tool.mpii @@ -2816,3 +2816,4 @@ enddef; extra_endfig := extra_endfig & "mfun_apply_max_dimensions ;" ; let dump = relax ; + diff --git a/metapost/context/base/mpiv/mp-grph.mpiv b/metapost/context/base/mpiv/mp-grph.mpiv index 5938b9f02..04d4920f6 100644 --- a/metapost/context/base/mpiv/mp-grph.mpiv +++ b/metapost/context/base/mpiv/mp-grph.mpiv @@ -65,7 +65,6 @@ enddef ; numeric currentgraphictext ; currentgraphictext := 0 ; -def data_mpo_file = job_name & "-mpgraph.mpo" enddef ; def data_mpy_file = job_name & "-mpgraph.mpy" enddef ; def begingraphictextfig (expr n) = @@ -82,10 +81,10 @@ def endgraphictextfig = enddef ; def loadfigure primary filename = - doloadfigure (filename) + mfun_load_figure(filename) enddef ; -def doloadfigure (expr filename) text figureattributes = +def mfun_load_figure (expr filename) text figureattributes = begingroup ; save figurenumber, figurepicture, number, fixedplace ; numeric figurenumber ; figurenumber := 0 ; diff --git a/metapost/context/base/mpiv/mp-luas.mpiv b/metapost/context/base/mpiv/mp-luas.mpiv index 6444c6f07..99df0b861 100644 --- a/metapost/context/base/mpiv/mp-luas.mpiv +++ b/metapost/context/base/mpiv/mp-luas.mpiv @@ -49,10 +49,13 @@ boolean context_luas ; context_luas := true ; % % Fourth variant: +string mfun_lua_bs ; mfun_lua_bs = "[[" ; +string mfun_lua_es ; mfun_lua_es = "]]" ; + vardef mlib_luas_luacall(text t) = runscript("" for s = t : if string s : - & s + & mfun_lua_bs & s & mfun_lua_es elseif numeric s : & decimal s elseif boolean s : @@ -72,7 +75,7 @@ vardef mlib_luas_lualist(expr c)(text t) = hide(b := true) fi if string s : - & ditto & s & ditto + & mfun_lua_bs & s & mfun_lua_es elseif numeric s : & decimal s elseif boolean s : diff --git a/metapost/context/base/mpiv/mp-text.mpiv b/metapost/context/base/mpiv/mp-text.mpiv index b68e8412a..043d09d80 100644 --- a/metapost/context/base/mpiv/mp-text.mpiv +++ b/metapost/context/base/mpiv/mp-text.mpiv @@ -59,10 +59,10 @@ def build_parshape (expr p, offset_or_path, dx, dy, baselineskip, strutheight, s startsavingdata ; - savedata "\global\parvoffset " & decimal voffset&"bp " ; - savedata "\global\parhoffset " & decimal hoffset&"bp " ; - savedata "\global\parwidth " & decimal hsize&"bp " ; - savedata "\global\parheight " & decimal vsize&"bp " ; + savedata "\global\parvoffset " & decimal voffset & "bp " ; + savedata "\global\parhoffset " & decimal hoffset & "bp " ; + savedata "\global\parwidth " & decimal hsize & "bp " ; + savedata "\global\parheight " & decimal vsize & "bp " ; if not path offset_or_path : q := q xscaled ((hsize-2hoffset)/hsize) yscaled ((vsize-2voffset)/vsize) ; @@ -144,13 +144,13 @@ def build_parshape (expr p, offset_or_path, dx, dy, baselineskip, strutheight, s if (i=strutheight) and (width[n]