Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
On 12/25/20 10:09 PM, Hans Hagen wrote:
>> [...]
> \startMPcode
>  path p ; p := (
>  ( 1,  1) --
>  ( 1,  5) --
>  (10, 10) --
>  (14,  4) --
>  cycle) xsized .75TextWidth;
>
>  draw p ;
>
>  freelabel("\strut α",point 0 of p,center p) ;
>  freelabel("\strut β",point 1 of p,center p) ;
>  freelabel("\strut γ",point 2 of p,center p) ;
>  freelabel("\strut δ",point 3 of p,center p) ;
> \stopMPcode

Many thanks for your code, Hans.

This is exactly what I need.

Pablo
--
http://www.ousia.tk
___
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
___


Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Hans Hagen

On 12/25/2020 6:36 PM, Fabrice L wrote:

Hi,


Le 25 déc. 2020 à 12:30, Pablo Rodriguez  a écrit :

Dear list,

I have this minimal MetaFun sample (the only one in my real document):

  \setupbodyfont[pagella]
  \starttext
  \startMPcode
  pair a ; a := (1, 1) ;
  pair b ; b := (1, 10) ;
  pair c ; c := (10, 10) ;
  pair d ; d := (10, 1) ;
  draw (a--b--c--d--a) xsized .75TextWidth;

  draw thelabel.lft("α",a) ;
  draw thelabel.lft("β",b) ;
  draw thelabel.top("γ",c) ;
  draw thelabel.rt("δ",d) ;
  \stopMPcode
  \stoptext

Is there a way to relate adapt the labels to the xsized positions used?


I’m sure somebody could find a more elegant solution, but here is a simple one:

  \setupbodyfont[pagella]
  \starttext
  \startMPcode
  pair a ; a := (1, 1) ;
  pair b ; b := (1, 10) ;
  pair c ; c := (10, 10) ;
  pair d ; d := (10, 1) ;
  path square ;
  square := (a--b--c--d--cycle) xsized .75TextWidth ;
  
  draw square xsized .75TextWidth;


  draw thelabel.lft("α",point 0 of square) ;
  draw thelabel.lft("β",point 1 of square) ;
  draw thelabel.top("γ",point 2 of square) ;
  draw thelabel.rt("δ",point 3 of square) ;
  \stopMPcode
  \stoptext

Fabrice.


\startMPcode
path p ; p := (
( 1,  1) --
( 1,  5) --
(10, 10) --
(14,  4) --
cycle) xsized .75TextWidth;

draw p ;

freelabel("\strut α",point 0 of p,center p) ;
freelabel("\strut β",point 1 of p,center p) ;
freelabel("\strut γ",point 2 of p,center p) ;
freelabel("\strut δ",point 3 of p,center p) ;
\stopMPcode


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


[NTG-context] Table disappears in floatcombination

2020-12-25 Thread Christoph Reller
Hi,

Consider the following MWE:

\definefloat[combination][figure]
\setupcaptions[
  number=no, %<- comment and table appears
  align=flushright]
\starttext
\startplacecombination[title=Combination]
  \startfloatcombination
\startplacetable%[title=Table] %<- uncomment and table appears
  \bTABLE \bTR \bTD Cell \eTD \eTR \eTABLE
\stopplacetable
  \stopfloatcombination
\stopplacecombination
\stoptext

In the latest LMTX version of ConTeXt, the table is not shown. (In MKIV it
is present.) Either commenting line 3 or activating the table title in line
8 makes the table appear.

Also, once the captions appear, they don't align on the right side. When
changing the caption alignment to "align=flushleft", they align perfectly
on the left side.

Am I doing something wrong?

Cheers,

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


Re: [NTG-context] Alternative for selector in LMTX for different heading and reference texts for descriptions

2020-12-25 Thread Christoph Reller
On Tue, Dec 22, 2020 at 5:25 AM Christoph Reller 
wrote:

> On Sat, Dec 19, 2020 at 10:43 PM Christoph Reller <
> christoph.rel...@gmail.com> wrote:
>
>> Hans Hagen  schrieb am Sa., 19. Dez. 2020, 19:16:
>>
>>> Actually, what you want is:
>>>
>>> \definedescription[desc]
>>> \starttext
>>>  \startdesc[title={Long title},reference=foo,referencetext={Short
>>> Title}]
>>>  \input jojomayer
>>>  \stopdesc
>>>  \about[foo]
>>> \stoptext
>>>
>>> So I'll add that (after all, occasionally we need to add some
>>> functionality in order to indicate progress.)
>>
>>
>> Great! That would be a good solution for me.
>> Thanks,
>> Christoph
>>
>
> Thank you for the implementation, Hans!
>
>  A small issue: When omitting the referencetext, then the shown text is
> now something like "248>desc:referencetext".
>

Thank you for the fast fix of this issue!
Cheers, Christoph
___
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
___


Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
On 12/25/20 6:36 PM, Fabrice L wrote:
>> I have this minimal MetaFun sample (the only one in my real document):
>> [...]
>> Is there a way to relate adapt the labels to the xsized positions used?
>
> I’m sure somebody could find a more elegant solution, but here is a simple 
> one:
>
>  \setupbodyfont[pagella]
>  \starttext
>  \startMPcode
>  pair a ; a := (1, 1) ;
>  pair b ; b := (1, 10) ;
>  pair c ; c := (10, 10) ;
>  pair d ; d := (10, 1) ;
>  path square ;
>  square := (a--b--c--d--cycle) xsized .75TextWidth ;
>
>  draw square xsized .75TextWidth;
>
>  draw thelabel.lft("α",point 0 of square) ;
>  draw thelabel.lft("β",point 1 of square) ;
>  draw thelabel.top("γ",point 2 of square) ;
>  draw thelabel.rt("δ",point 3 of square) ;
>  \stopMPcode
>  \stoptext

Many thanks for your ultra-fast reply, Fabrice.

I didn’t know that paths could be also defined (MP is all Greek to me).

I realized that drawing doesn’t require resizing again (once the path
definition contains resizing).

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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
___


Re: [NTG-context] Bib support broken in lmtx

2020-12-25 Thread denis.maier
Don't know if that's related, but you should probably removethe space before 
the key in your bibfile.

Von: ntg-context  im Auftrag von Philipp A. 

Gesendet: Freitag, 25. Dezember 2020 18:36:33
An: ConTeXt Mailing List
Betreff: [NTG-context] Bib support broken in lmtx

Hi! A pretty minimal document using a bibliography is broken for me:

test.lmtx:
\enableregime[utf-8]
\mainlanguage[en]

\usebtxdataset[default][test.bib]
\setupbtx[dataset=default]
\usebtxdefinitions[apa]

\starttext

\cite[authoryear][angerer2016]

%\placelistofpublications[default][method=dataset]

\stoptext

test.bib:
@Article{ angerer2016,
author = {Angerer, Philipp and Haghverdi, Laleh and B{\"{u}}ttner, Maren and 
Theis, Fabian J and Marr, Carsten and Buettner, Florian},
doi = {10.1093/bioinformatics/btv715},
issn = {14602059},
journal = {Bioinformatics},
language = {en},
number = {8},
pages = {1241--1243},
title = {{Destiny: Diffusion maps for large-scale single-cell data in R}},
url = 
{http://bioinformatics.oxfordjournals.org/lookup/doi/10.1093/bioinformatics/btv715
 files/103/Angerer et al. - 2016 - destiny diffusion maps for large-scale 
single-cel.pdf},
volume = {32},
year = {2016}
}

This log occurs:

❯ context test.lmtx
resolvers   | formats | executing runner 'run luametatex format': 
~/Library/ConTeXt/tex/texmf-osx-64/bin/luametatex --jobname="test" 
--fmt=~/Library/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=~/Library/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.lmtx" --c:input="./test.lmtx" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="~/Library/ConTeXt/tex/texmf-osx-64/bin"
system  >
system  > ConTeXt  ver: 2020.12.24 17:30 LMTX  fmt: 2020.12.25  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 'test', input './test.lmtx', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.lmtx'
publications> adding bib data to set 'default' from source 'test.bib'
open source > level 2, order 3, name 
~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi'
close source> level 2, order 3, name 
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
publications> analyzing previous publication run for 'default'
publications> no entry 'angerer2016' found in dataset 'default'
backend > xmp > using file 
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 1, order 3, name './test.lmtx'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
~/Library/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.004 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 13 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 476 modules (0.204 sec), 95 tables 
(0.012 sec), 571 chunks (0.216 sec)
mkiv lua stats  > traced context: maxstack: 1517, freed: 0, unreachable: 1517
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 435 lists of 434
mkiv lua stats  > node memory usage: 6 attribute, 3 attribute_list, 1 glue, 36 
glue_spec, 3 kern, 2 penalty, 1 temp, 1 whatsit
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 instances 
(re)created, 38 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: internal: 0, file: 0, direct: 0, late: 0, function 
0, total: 0 (0 per page)
mkiv lua stats  > randomizer: resumed with value 0.37495928832999
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.112, afm 1.513, tfm 1.000, 7 instances, 3 
shared in backend, 3 common vectors, 0 common hashes, load time 0.156 seconds
mkiv lua stats  > publications load time: 0.004 seconds, 1396 bytes, 1 
definitions, 0 shortcuts
mkiv lua stats  > font embedding time: 0.006 seconds, 1 fonts
mkiv lua stats  > result saved in file: test.pdf, 

[NTG-context] Bib support broken in lmtx

2020-12-25 Thread Philipp A.
Hi! A pretty minimal document using a bibliography is broken for me:

test.lmtx:
\enableregime[utf-8]
\mainlanguage[en]

\usebtxdataset[default][test.bib]
\setupbtx[dataset=default]
\usebtxdefinitions[apa]

\starttext

\cite[authoryear][angerer2016]

%\placelistofpublications[default][method=dataset]

\stoptext

test.bib:
@Article{ angerer2016,
author = {Angerer, Philipp and Haghverdi, Laleh and B{\"{u}}ttner, Maren
and Theis, Fabian J and Marr, Carsten and Buettner, Florian},
doi = {10.1093/bioinformatics/btv715},
issn = {14602059},
journal = {Bioinformatics},
language = {en},
number = {8},
pages = {1241--1243},
title = {{Destiny: Diffusion maps for large-scale single-cell data in R}},
url = {
http://bioinformatics.oxfordjournals.org/lookup/doi/10.1093/bioinformatics/btv715
files/103/Angerer et al. - 2016 - destiny diffusion maps for large-scale
single-cel.pdf},
volume = {32},
year = {2016}
}

This log occurs:

❯ context test.lmtx
resolvers   | formats | executing runner 'run luametatex format':
~/Library/ConTeXt/tex/texmf-osx-64/bin/luametatex --jobname="test"
--fmt=~/Library/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=~/Library/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./test.lmtx" --c:input="./test.lmtx"
--c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="~/Library/ConTeXt/tex/texmf-osx-64/bin"
system  >
system  > ConTeXt  ver: 2020.12.24 17:30 LMTX  fmt: 2020.12.25
 int: english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 'test', input './test.lmtx', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.lmtx'
*publications> adding bib data to set 'default' from source 'test.bib'*
open source > level 2, order 3, name
~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi'
close source> level 2, order 3, name
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded

*publications> analyzing previous publication run for
'default'publications> no entry 'angerer2016' found in dataset
'default'*
backend > xmp > using file
'~/Library/ConTeXt/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 1, order 3, name './test.lmtx'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
~/Library/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.004 seconds, 0 scans with
scantime 0.000 seconds, 0 shared scans, 13 found files, scanned paths:

mkiv lua stats  > stored bytecode data: 476 modules (0.204 sec), 95 tables
(0.012 sec), 571 chunks (0.216 sec)
mkiv lua stats  > traced context: maxstack: 1517, freed: 0, unreachable:
1517
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 435 lists of 434
mkiv lua stats  > node memory usage: 6 attribute, 3 attribute_list, 1 glue,
36 glue_spec, 3 kern, 2 penalty, 1 temp, 1 whatsit
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7
instances (re)created, 38 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf
output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: internal: 0, file: 0, direct: 0, late: 0,
function 0, total: 0 (0 per page)
mkiv lua stats  > randomizer: resumed with value 0.37495928832999
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf,
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.112, afm 1.513, tfm 1.000, 7
instances, 3 shared in backend, 3 common vectors, 0 common hashes, load
time 0.156 seconds
*mkiv lua stats  > publications load time: 0.004 seconds, 1396 bytes, 1
definitions, 0 shortcuts*
mkiv lua stats  > font embedding time: 0.006 seconds, 1 fonts
mkiv lua stats  > result saved in file: test.pdf, compresslevel 1,
objectcompresslevel 3
mkiv lua stats  > used platform: osx-64, type: unix, binary subtree:
texmf-osx-64
mkiv lua stats  > used engine: luametatex version: 2.0808, functionality
level: 20201222, format id: 551, compiler: clang
mkiv lua stats  > tex properties: 740027 hash slots used of 2097152, 45811
control 

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Fabrice L
Hi,

> Le 25 déc. 2020 à 12:30, Pablo Rodriguez  a écrit :
> 
> Dear list,
> 
> I have this minimal MetaFun sample (the only one in my real document):
> 
>  \setupbodyfont[pagella]
>  \starttext
>  \startMPcode
>  pair a ; a := (1, 1) ;
>  pair b ; b := (1, 10) ;
>  pair c ; c := (10, 10) ;
>  pair d ; d := (10, 1) ;
>  draw (a--b--c--d--a) xsized .75TextWidth;
> 
>  draw thelabel.lft("α",a) ;
>  draw thelabel.lft("β",b) ;
>  draw thelabel.top("γ",c) ;
>  draw thelabel.rt("δ",d) ;
>  \stopMPcode
>  \stoptext
> 
> Is there a way to relate adapt the labels to the xsized positions used?

I’m sure somebody could find a more elegant solution, but here is a simple one:

 \setupbodyfont[pagella]
 \starttext
 \startMPcode
 pair a ; a := (1, 1) ;
 pair b ; b := (1, 10) ;
 pair c ; c := (10, 10) ;
 pair d ; d := (10, 1) ;
 path square ; 
 square := (a--b--c--d--cycle) xsized .75TextWidth ;
 
 draw square xsized .75TextWidth;

 draw thelabel.lft("α",point 0 of square) ;
 draw thelabel.lft("β",point 1 of square) ;
 draw thelabel.top("γ",point 2 of square) ;
 draw thelabel.rt("δ",point 3 of square) ;
 \stopMPcode
 \stoptext

Fabrice.

> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> 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
> ___

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


[NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
Dear list,

I have this minimal MetaFun sample (the only one in my real document):

  \setupbodyfont[pagella]
  \starttext
  \startMPcode
  pair a ; a := (1, 1) ;
  pair b ; b := (1, 10) ;
  pair c ; c := (10, 10) ;
  pair d ; d := (10, 1) ;
  draw (a--b--c--d--a) xsized .75TextWidth;

  draw thelabel.lft("α",a) ;
  draw thelabel.lft("β",b) ;
  draw thelabel.top("γ",c) ;
  draw thelabel.rt("δ",d) ;
  \stopMPcode
  \stoptext

Is there a way to relate adapt the labels to the xsized positions used?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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
___


Re: [NTG-context] Check if two paths intersect in Metafun

2020-12-25 Thread Fabrice L
Hi,

> Le 25 déc. 2020 à 08:48, Jairo A. del Rio  a écrit :
> 
> Hi, list. I've got a question about paths and intersections. The following:
> 
> \starttext 
> \startMPpage
> path p[];
> 
> p[1] = fullcircle scaled 2cm;
> p[2] = unitsquare shifted (4cm,6cm);
> 
> if (known (p[1] intersectionpoint p[2])):
> 
> draw textext("yes");
> 
> else:
> 
> draw textext("no");
> fi;
> 
> \stopMPpage
> \stoptext
> 
> yields an error message: "The paths don't intersect". Is there a way to 
> intercept this error message and trigger an action instead? Thank you in 
> advance.

Instead of using « intersectionpoint » use « Intersectiontimes », this will 
give you the « time » of the intersection of the two paths. If the paths do not 
intersect, than the value is (-1,-1). So you could do something like:

pair checkintersec ;
checkintersec := p[1] intersectiontimes p[2] ;
If xpart(checkintersec) <> -1 : 
draw textext("yes »);
else: 
draw textext(« non »);
fi;

Fabrice.

> 
> Best regards,
> 
> Jairo
> ___
> 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
> ___

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


[NTG-context] Check if two paths intersect in Metafun

2020-12-25 Thread Jairo A. del Rio
Hi, list. I've got a question about paths and intersections. The following:


\starttext

\startMPpage

path p[];


p[1] = fullcircle scaled 2cm;

p[2] = unitsquare shifted (4cm,6cm);


if (known (p[1] intersectionpoint p[2])):


draw textext("yes");


else:


draw textext("no");

fi;


\stopMPpage

\stoptext

yields an error message: "The paths don't intersect". Is there a way to
intercept this error message and trigger an action instead? Thank you in
advance.

Best regards,

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