ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Metafun: dotlabel issue in latest LMTX
Date: Sun, 27 Dec 2020 21:28:10 +0100	[thread overview]
Message-ID: <623DB965-F9E6-463B-BA1A-6B293986A95E@gmail.com> (raw)

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

                 reply	other threads:[~2020-12-27 20:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=623DB965-F9E6-463B-BA1A-6B293986A95E@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).