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