* \goto works but links don't when passed via textext() in METAPOST
@ 2020-05-10 23:12 Gerben Wierda
0 siblings, 0 replies; only message in thread
From: Gerben Wierda @ 2020-05-10 23:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3820 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 6326 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-10 23:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 23:12 \goto works but links don't when passed via textext() in METAPOST Gerben Wierda
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).