summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-01-05 11:45:00 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-01-05 11:45:00 +0100
commit6032373f72b7980d5b197eb371f1d56ecb800ee8 (patch)
treea4b8909aea02ccedcffac468dc80e5c7d88850e6 /metapost
parenta04a6e9b9b68a836f27d971115fd1049c04e6c19 (diff)
downloadcontext-6032373f72b7980d5b197eb371f1d56ecb800ee8.tar.gz
2021-01-05 10:44:00
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mpiv/mp-grap.mpiv34
1 files changed, 23 insertions, 11 deletions
diff --git a/metapost/context/base/mpiv/mp-grap.mpiv b/metapost/context/base/mpiv/mp-grap.mpiv
index 0299c0587..2288307e4 100644
--- a/metapost/context/base/mpiv/mp-grap.mpiv
+++ b/metapost/context/base/mpiv/mp-grap.mpiv
@@ -24,6 +24,10 @@ if numbersystem <> "double" :
endinput ;
fi
+if known contextlmtxmode :
+ def _op_ = base_draw_options enddef ;
+fi ;
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% $Id : graph.mp,v 1.2 2004/09/19 21 :47 :10 karl Exp $
@@ -102,17 +106,23 @@ vardef logten primary x =
else: mlog(abs x)/mlog(10) fi
enddef ;
-vardef ln primary x =
- if unknown x: whatever
- elseif x=0: Mzero
- else: mlog(abs x)/256 fi
-enddef ;
+if known contextlmtxmode :
+ % already defined
+else :
-vardef exp primary x =
- if unknown x: whatever
- elseif x<= Mzero: 0
- else: (mexp 256)**x fi
-enddef ;
+ vardef ln primary x =
+ if unknown x: whatever
+ elseif x=0: Mzero
+ else: mlog(abs x)/256 fi
+ enddef ;
+
+ vardef exp primary x =
+ if unknown x: whatever
+ elseif x<= Mzero: 0
+ else: (mexp 256)**x fi
+ enddef ;
+
+fi
vardef powten primary x =
if unknown x: whatever
@@ -1151,7 +1161,9 @@ enddef ;
% We format in luatex (using \mathematics{}) ...
% we could pass via variables and save escaping as that is inefficient
-if unknown context_mlib :
+if known contextlmtxmode :
+% already defined
+elseif unknown context_mlib :
vardef escaped_format(expr s) =
"" for n=0 upto length(s) : &