ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Schmitz Thomas A." <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: question for metapost experts
Date: Thu, 10 Aug 2017 14:07:09 +0200	[thread overview]
Message-ID: <0E3A6B2F-2C74-4F50-AF37-D8B61A3AF210@uni-bonn.de> (raw)

Hi all,

this one is for all the metapos/metafun experts out there (Alan, are you there?). For a counter in one of my slide backgrounds, I have to calculate an intersectionpoint, given in percentage of the difference between current page and last page. I have always had some difficulties on the first run, when the value of the last page isn’t known yet and hence not written to the tuc file, but the error 

> ! The paths don't intersect.
> <to be read again>


used to disappear in subsequent runs. Now, ConTeXt doesn’t compile the file at all and stops on this error. There is an error message I haven’t seen before:

> intersectionpoint->...The paths don't intersect");
> origin.else:0.5[point.x_.o...
> <to be read again>
> ;
> <*> ... ;z13 = (z11 -- z12) intersectionpoint qw ;
> draw z13 withcolor (0.1,0....
> This error message was generated by an `errmessage'
> command, so I can't give any explicit help.
> Pretend that you're Miss Marple: Examine all clues,
> and deduce the truth by inspired guesses.

Is there a way to make this conditional, such as (pseudocode)

if q intersects p:
 z = q intersectionpoint p ;
else:
 z = (0,0) ;
fi ; 

I hope that this would allow ConTeXt to proceed and calculate the point correctly on the second run.

Thanks, and all best

Thomas
___________________________________________________________________________________
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:[~2017-08-10 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 12:07 Schmitz Thomas A. [this message]
2017-08-10 12:18 ` Hans Hagen
2017-08-10 12:39   ` Schmitz Thomas A.

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=0E3A6B2F-2C74-4F50-AF37-D8B61A3AF210@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).