I am trying to get an URL link in a textext() via METAPOST. I’ve got this before \starttext (or after, tried both):
\setupinteraction
[state=start,
color=blue,
style=bold]
The intended link shows up in blue and bold, but it is not clickable.
I’ve turned ConTeXt tracing on and see this when the text is passed to METAPOST:
cld > tex > f : 8 : picture pic; x:=1233.000; y:=913.000; w:=180.000; h:=407.000;pic := Label( w, h, (1.000,1.000,0.784), 1.0, 1.000, (0.000,0.000,0.000), 1.000, "dashed evenly", 1.000, (0.000,0.000,0.000), 1.000, "", "\definebodyfont[11pt][rm][default=Regular at 11pt]\switchtobodyfont[11pt]\setupinterlinespace[12.1pt]\framed[align=flushleft,frame=off,offset=none,width=170.000bp]{\colored[r=0.000, g=0.000, b=0.000]{\tf The elements are shown in colors where blue represents active structure, yellow behaviour, and green passive structure. See \goto{here}[url(https://ea.rna.nl/2011/06/05/on-the-use-of-colours-in-archimate/)].\crlf{}\crlf{} {\bf Color codes:}\crlf{}\crlf{} - \colored[mared]{\bf Red}{} and \colored[maviolet]{\bf Violet}{} stand for a 'higher' layer element used as an abstract representation of a lower layer element. When the target is the Business Layer, it implies automated business behavior (marked violet).\crlf{}\crlf{} - \colored[maorange]{\bf Orange}{} and \colored[mablue]{\bf Blue}{} are used to model 'downward' serving, e.g. Business Layer serving the Technology Layer.\crlf{}\crlf{} - \colored[magreen]{\bf Green}{} stands for class relations inside the metamodel. Important conseqence: relations of a parent (in the meta-model) Specialization are valid for {\it all} children (in the meta-model). This does not happen when Specialization is used in an actual model. There are in fact two fully different specializations in ArchiMate (see the book, including the free excerpt, for a full explanation)\\}}", "up", "center", "center") shifted (x, -y);draw pic;path AllPathIds_idCDCEH; AllPathIds_idCDCEH := pathpart pic; pair AllNodeCenters_idCDCEH; AllNodeCenters_idCDCEH := center pic;
The red is what is being typeset, the \goto is part of that.
And later this when METAPOST passes it on to TeX via textext():
cld > tex > f : 8 : \definebodyfont [11pt][rm][default=Regular at 11pt]\switchtobodyfont [11pt]\setupinterlinespace [12.1pt]\framed [align=flushleft,frame=off,offset=none,width=170.000bp]{\colored [r=0.000, g=0.000, b=0.000]{\tf The elements are shown in colors where blue represents active structure, yellow behaviour, and green passive structure. See \goto {here}[url(https://ea.rna.nl/2011/06/05/on-the-use-of-colours-in-archimate/)].\crlf {}\crlf {} {\bf Color codes:}\crlf {}\crlf {} - \colored [mared]{\bf Red}{} and \colored [maviolet]{\bf Violet}{} stand for a 'higher' layer element used as an abstract representation of a lower layer element. When the target is the Business Layer, it implies automated business behavior (marked violet).\crlf {}\crlf {} - \colored [maorange]{\bf Orange}{} and \colored [mablue]{\bf Blue}{} are used to model 'downward' serving, e.g. Business Layer serving the Technology Layer.\crlf {}\crlf {} - \colored [magreen]{\bf Green}{} stands for class relations inside the metamodel. Important conseqence: relations of a parent (in the meta-model) Specialization are valid for {\it all} children (in the meta-model). This does not happen when Specialization is used in an actual model. There are in fact two fully different specializations in ArchiMate (see the book, including the free excerpt, for a full explanation)\\}}
Still correct. But the end result doesn’t have a working hyperlink. Outside the route to METAPOST, the \goto statement does produce a working link.
Should this work when passed via textext()?
G