summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/meta-ini.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/meta-ini.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/meta-ini.mkiv34
1 files changed, 24 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.mkiv b/Master/texmf-dist/tex/context/base/meta-ini.mkiv
index 00b1da032ab..6502047fbc0 100644
--- a/Master/texmf-dist/tex/context/base/meta-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/meta-ini.mkiv
@@ -110,7 +110,7 @@
\let\stopMPextensions\relax
-\unexpanded\def\startMPinitializations#1\stopMPinitializations % for all instances, when enables
+\unexpanded\def\startMPinitializations#1\stopMPinitializations % for all instances, when enabled
{\global\t_meta_initializations\expandafter{\the\t_meta_initializations#1}}
\let\stopMPinitializations\relax
@@ -190,6 +190,16 @@
%{\normalexpanded{\meta_analyze_graphicname_indeed[#1::::]}}
{\normalexpanded{\meta_analyze_graphicname_indeed[#1}::::]}
+\def\meta_show_properties_indeed
+ {\writestatus{metapost}{name: \currentMPgraphicname, instance: \currentMPinstance, format: \currentMPformat}}
+
+\let\meta_show_properties\donothing
+
+\installtextracker
+ {metapost.properties}
+ {\let\meta_show_properties\meta_show_properties_indeed}
+ {\let\meta_show_properties\donothing}
+
\unexpanded\def\meta_analyze_graphicname_indeed[#1::#2::#3]% instance ::
{\edef\currentMPgraphicname{#2}%
\ifx\currentMPgraphicname\empty
@@ -200,10 +210,12 @@
\else
\let\currentMPinstance\defaultMPinstance
\fi\fi
- \edef\currentMPformat{\MPinstanceparameter\s!format}}
+ \edef\currentMPformat{\MPinstanceparameter\s!format}%
+ \meta_show_properties}
-\def\currentMPinstance{\defaultMPinstance}
-\def\currentMPformat {\currentMPinstance}
+\def\currentMPgraphicname{\s!unknown}
+\def\currentMPinstance {\defaultMPinstance}
+\def\currentMPformat {\currentMPinstance}
\defineMPinstance[metafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
\defineMPinstance[extrafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
@@ -432,7 +444,7 @@
\startMPextensions
string contextversion;
- contextversion:="\contextversion";
+ contextversion:="\contextversion"; % expanded
\stopMPextensions
%D \macros
@@ -838,12 +850,12 @@
\def\MPdataMPOfile{\jobname-mpgraph.mpo}
\def\MPdataMPYfile{\jobname-mpgraph.mpy}
-\startMPextensions
+\startMPinitializations
boolean collapse_data; collapse_data:=true;
def data_mpd_file = "\MPdataMPDfile" enddef ;
def data_mpo_file = "\MPdataMPOfile" enddef ;
def data_mpy_file = "\MPdataMPYfile" enddef ;
-\stopMPextensions
+\stopMPinitializations
\unexpanded\def\getMPdata
{\let\MPdata\secondoftwoarguments
@@ -1175,11 +1187,13 @@
vardef ForegroundBox =
unitsquare xysized(HSize,VSize)
enddef ;
- vardef PageFraction =
- if \lastpage>1: (\realfolio-1)/(\lastpage-1) else: 1 fi
- enddef ;
+ PageFraction := 1 ;
\stopMPextensions
+\startMPinitializations
+ PageFraction := if \lastpage>1: (\realfolio-1)/(\lastpage-1) else: 1 fi ;
+\stopMPinitializations
+
%D And some more. These are not really needed since we
%D don't use the normal figure inclusion macros any longer.