ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	"Schmitz Thomas A." <thomas.schmitz@uni-bonn.de>
Subject: Re: question for metapost experts
Date: Thu, 10 Aug 2017 14:18:41 +0200	[thread overview]
Message-ID: <de0aa58e-6b21-3bd9-3b8f-9f6da8c5239e@wxs.nl> (raw)
In-Reply-To: <0E3A6B2F-2C74-4F50-AF37-D8B61A3AF210@uni-bonn.de>

On 8/10/2017 2:07 PM, Schmitz Thomas A. wrote:
> 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)

p intersection_point q

(also sets intersection_found)

> 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
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 12:07 Schmitz Thomas A.
2017-08-10 12:18 ` Hans Hagen [this message]
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=de0aa58e-6b21-3bd9-3b8f-9f6da8c5239e@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    --cc=thomas.schmitz@uni-bonn.de \
    /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).