[NTG-context] Metafun: dotlabel issue in latest LMTX
Otared Kavian
otared at gmail.com
Sun Dec 27 21:28:10 CET 2020
Hi Hans,
The following (due to you and Aditya, discussed a few days ago) used to work with LMTX until version 2020-12-10, but it does not work anymore with LMTX version 2020-12-24 17:30. I wonder whether this is due to some changes you have made recently.
%% begin squaredot-test.tex
\startMPdefinitions
newpath mydotlabelshape ;
mydotlabelshape := fullcircle ;
mydotlabeldiam := 12 pt ;
vardef mydotlabel@#(expr s,z) text t_ =
label@#(s,z) t_ ;
fill (mydotlabelshape scaled 2mydotlabeldiam) shifted z t_;
enddef ;
\stopMPdefinitions
\starttext
\startMPcode
newpath p ;
p := (2cm, 3cm) -- (3cm, 5cm);
mydotlabeldiam := 15pt;
mydotlabelshape := fullsquare ;
draw p ;
mydotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p)
withcolor transparent("exclusion",.5,red) ;
mydotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p)
withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext
%% end squaredot-test.tex
I get an error message, which is obscure to me, saying:
%-- begin error message excerpt
metafun > log > error: Isolated expression
metafun > log >
metapost > log >
metapost > log > <to be read again>
metapost > log > ;
metapost > log > <*> newpath mydotlabelshape ;
metafun > log >
metafun > log > I couldn't find an '=' or ':=' after the expression that is shown above this
error message, so I guess I'll just ignore it and carry on.
metafun > log >
metapost > log > mydotlabelshape := fullcircle ; mydotlabeldiam := 12 pt ; vardef mydotlabel@##(expr s,z) text t_ = label@##(s,z) t_ ; fill (mydotlabelshape scaled 2mydotlabeldiam) shi...
%-- end error message excerpt
Best regards: Otared
More information about the ntg-context
mailing list