I would like to change the color of URL's in parts of a document.

In particular I am using the letter module and would like to have the color
of URL's match the color of text in the letterhead and then change to match
the color in the main body of the letter.

I can set the URL color once with \setupinteraction but I do not see how to
change it thereafter.

Thank you very much for your guidance.

Best,
Michael



\usemodule[letter]

\setupinteraction[state=start,color=black]
%% \setupinteraction[state=start,color=red]

%% Would like this URL to match the color of the return address ("location")
\useURL[author-email][mailto:m...@econs.umass.edu][][m...@econs.umass.edu]
%% Would like this URL to match the color of the recipient's address
("address")
\useURL[recipient-email][mailto:addres...@gmail.com][][addres...@gmail.com]
%% Would like this URL to match the color of the main body
\useURL[knuthbio][
http://en.wikipedia.org/wiki/Donald_Knuth][][http://en.wikipedia.org/wiki/Donald_Knuth
]

\setupletter[
  name={Michael Ash},
  email={\from[author-email]}
  ]

\setupletter[signature={Michael Ash}]

\defineletterelement[layer][location][example]{\correspondenceparameter{name}
\correspondenceparameter{email}\par}
\setupletterlayer[location][alternative=example,color=red]

\defineletterelement[layer][address][example]{\correspondenceparameter{toname}\par}
\setupletterlayer[address][alternative=example,color=blue]

\starttext
\startletter[
  toname={The Addressee\\\from[recipient-email]},
  opening={Dear Addressee:},
  closing={Best regards,}]

  Enjoy \from[knuthbio]

\stopletter
\stoptext
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to