summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-grph.mp4
-rw-r--r--metapost/context/base/mp-mlib.mp2
-rw-r--r--metapost/context/base/mp-tool.mp8
3 files changed, 9 insertions, 5 deletions
diff --git a/metapost/context/base/mp-grph.mp b/metapost/context/base/mp-grph.mp
index 87a179677..1ff2a9ec2 100644
--- a/metapost/context/base/mp-grph.mp
+++ b/metapost/context/base/mp-grph.mp
@@ -56,8 +56,8 @@ string graphictextformat ; graphictextformat := "plain" ;
string graphictextstring ; graphictextstring := "" ;
string graphictextfile ; graphictextfile := "dummy.mpo" ;
-def data_mpo_file = job_name & "-mp.mpo" enddef ;
-def data_mpy_file = job_name & "-mp.mpy" enddef ;
+def data_mpo_file = job_name & "-mpgraph.mpo" enddef ;
+def data_mpy_file = job_name & "-mpgraph.mpy" enddef ;
def savegraphictext (expr str) =
if (graphictextstring<>"") :
diff --git a/metapost/context/base/mp-mlib.mp b/metapost/context/base/mp-mlib.mp
index 6722c81e4..81bb07caf 100644
--- a/metapost/context/base/mp-mlib.mp
+++ b/metapost/context/base/mp-mlib.mp
@@ -26,7 +26,7 @@ def resettextexts =
_tt_p_ := nullpicture ;
enddef ;
-extra_endfig := ";draw _tt_p_; " & extra_endfig ;
+extra_endfig := ";addto currentpicture also _tt_p_; " & extra_endfig; % was draw _tt_p_
extra_beginfig := extra_beginfig & "resettextexts;";
vardef rawtextext(expr str) =
diff --git a/metapost/context/base/mp-tool.mp b/metapost/context/base/mp-tool.mp
index 24f2e6676..c1def83b3 100644
--- a/metapost/context/base/mp-tool.mp
+++ b/metapost/context/base/mp-tool.mp
@@ -193,7 +193,8 @@ if unknown collapse_data :
boolean collapse_data ; collapse_data := false ;
fi ;
-boolean savingdata ; savingdata := false ;
+boolean savingdata ; savingdata := false ;
+boolean savingdatadone ; savingdatadone := false ;
def savedata expr txt =
if collapse_data :
@@ -208,6 +209,7 @@ enddef ;
def startsavingdata =
savingdata := true ;
+ savingdatadone := true ;
if collapse_data :
write
"\MPdata{" & decimal charcode & "}{%"
@@ -224,7 +226,9 @@ def stopsavingdata =
enddef ;
def finishsavingdata =
- write EOF to data_mpd_file ;
+ if savingdatadone :
+ write EOF to data_mpd_file ;
+ fi ;
enddef ;
%D Instead of a keystroke eating save and allocation