From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83582 Path: news.gmane.org!not-for-mail From: Michael Ash Newsgroups: gmane.comp.tex.context Subject: Re: Change URL color to match layer Date: Tue, 30 Jul 2013 21:11:28 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1726317846==" X-Trace: ger.gmane.org 1375233126 25740 80.91.229.3 (31 Jul 2013 01:12:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 01:12:06 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 31 03:12:09 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4KxU-0006Z8-KK for gctc-ntg-context-518@m.gmane.org; Wed, 31 Jul 2013 03:12:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A010F101F1; Wed, 31 Jul 2013 03:11:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AsIW+QuiHubr; Wed, 31 Jul 2013 03:11:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9D2F9101E5; Wed, 31 Jul 2013 03:11:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 68C6D101E5 for ; Wed, 31 Jul 2013 03:11:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id V3Rj1Cvmilke for ; Wed, 31 Jul 2013 03:11:23 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id D760E101E4 for ; Wed, 31 Jul 2013 03:11:23 +0200 (CEST) Original-Received: from mailhub1.oit.umass.edu (mailhub1.oit.umass.edu [128.119.103.53]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r6V1Bobv020446 for ; Wed, 31 Jul 2013 03:11:51 +0200 Original-Received: from mailhub1.oit.umass.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 14051326040 for ; Tue, 30 Jul 2013 21:11:47 -0400 (EDT) Original-Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) (Authenticated sender: maash) by mailhub1.oit.umass.edu (Postfix) with ESMTPSA id C38A2326027 for ; Tue, 30 Jul 2013 21:11:46 -0400 (EDT) Original-Received: by mail-vb0-f51.google.com with SMTP id x16so102625vbf.24 for ; Tue, 30 Jul 2013 18:11:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=9A+pKFiyC97KIOP0/XXgLuFxYGqB4a6qlBH7af3q1Xs=; b=QCOWXGSMSDuooW0CcbOOc6zuEPTzmO/l5qHfFtrLKjgvsT6lrtB3QLugP85EXnBNRU +Qq21w8jvJWKTI4pJiy3ENcOaOvyE0XUWR74UNge1GkFA52y2e3JiEn9R5fL2Z6Rajlv DlS/vKzM1WH45I/+cimlz6Ea0NwbPHeVzVOo5ujIaYLKj4/u6ZRNGPjP65oyhjyELNGQ ncs/OCp62PibHDj0YPxpIlfRmVw6lF9H9px5jMcxQvQZXqq4SSqOiPMuyzsUAeSScjz0 DH2c5qWvDtcHDxuzGmYpESA4mOnD6vXhdHe5CkZl0nNQSqdtZj5aAxhZgWkde1VuRGZ9 qPQw== X-Received: by 10.221.44.136 with SMTP id ug8mr10891295vcb.13.1375233108431; Tue, 30 Jul 2013 18:11:48 -0700 (PDT) Original-Received: by 10.52.185.102 with HTTP; Tue, 30 Jul 2013 18:11:28 -0700 (PDT) In-Reply-To: X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.7.31.10044 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODYTEXTH_SIZE_10000_LESS 0, CTYPE_MULTIPART_NO_QUOTE 0, DATE_TZ_NA 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __C230066_P5 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FORWARDED_MSG 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HTML_FONT_BLUE 0, __HTML_FONT_RED 0, __IN_REP_TO 0, __MIME_HTML 0, __MIME_VERSION 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __YOUTUBE_RCVD 0' X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=128.119.103.53; country=US; region=MA; city=Amherst; postalcode=01003; latitude=42.3804; longitude=-72.5231; metrocode=543; areacode=413; http://maps.google.com/maps?q=42.3804,-72.5231&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07K6NbOVF - 05bdc069669b - 20130731 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:83582 Archived-At: --===============1726317846== Content-Type: multipart/alternative; boundary=001a113378d8e9579804e2c468db --001a113378d8e9579804e2c468db Content-Type: text/plain; charset=ISO-8859-1 I think that I have found an answer: in the \setupinteraction command that manages URL's, hyperlinks, PDF properties, etc. include color=,contrastcolor=, \usemodule[letter] %% Would like this URL to match the color of the return address ("location") \useURL[author-email][mailto:author@myhome.com][][author@myhome.com] %% Would like this URL to match the color of the recipient's address ("address") \useURL[recipient-email][mailto:addressee@gmail.com][][addressee@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 ] \setupinteraction[state=start,color=,contrastcolor=,style=normal] \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 On Tue, Jul 30, 2013 at 5:57 PM, Michael Ash wrote: > 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:mash@econs.umass.edu][][mash@econs.umass.edu] > %% Would like this URL to match the color of the recipient's address > ("address") > \useURL[recipient-email][mailto:addressee@gmail.com][][addressee@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 > > -- Michael Ash, Chair, Department of Economics Professor of Economics and Public Policy University of Massachusetts Amherst Amherst, MA 01003 Email mash@econs.umass.edu Tel +1-413-545-2590 Twitter https://twitter.com/michaelaoash --001a113378d8e9579804e2c468db Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I think that I have found an answer: =A0in the \setupinteraction command th= at manages URL's, hyperlinks, PDF properties, etc.=A0include=A0
col= or=3D,contrastcolor=3D,


\usemodule[l= etter]

%% Would like this URL to match the color of the return= address ("location")
\useURL[author-email][mailto:author@myhome.com][][author@myhome.com]
%% Would like this URL to match the color of the recipient's addre= ss ("address")
\useURL[recipient-email][mailto:addressee@gmail.com][][addressee@gmail.com]
%% Would like this URL to match the color of the main body=A0
\useURL[knuthbio][http://en.wikipedia.org/wiki/Do= nald_Knuth][][http://en.wikipedia.org/wiki/Donald_Knuth]

\setupinteraction[state=3Dstart,color=3D,contrastcolor= =3D,style=3Dnormal]

\setupletter[
=A0 na= me=3D{Michael Ash},
=A0 email=3D{\from[author-email]}
= =A0 ]

\setupletter[signature=3D{Michael Ash}]

=
\defineletterelement[layer][location][example]{\correspondenceparamete= r{name} \correspondenceparameter{email}\par}
\setupletterlayer[lo= cation][alternative=3Dexample,color=3Dred]

\defineletterelement[layer][address][example]{\correspo= ndenceparameter{toname}\par}
\setupletterlayer[address][alternati= ve=3Dexample,color=3Dblue]
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
\starttext
\startletter[
=A0 toname=3D{The Address= ee\\\from[recipient-email]},
=A0 opening=3D{Dear Addressee:},
=A0 closing=3D{Best regards,}]

=A0 Enjoy \f= rom[knuthbio]

\stopletter
\stoptext



On Tue, Jul 30, 2013 at 5:57 PM,= Michael Ash <mash@econs.umass.edu> wrote:
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 y= ou very much for your guidance.

Best,
Michael



\usemodule[l= etter]

\setupinteraction[state=3Dstart,color= =3Dblack]
%% \setupinteraction[state=3Dstart,color=3Dred]

%% Would like this URL to match the color of the return address = ("location")
\useURL[author-email][mailto:mash@econs.umass.edu][][mash@econs.umass.ed= u]
%% Would like this URL to match the color of the recipient's addre= ss ("address")
\useURL[recipient-email][mailto:addressee@gmail.com][= ][addressee@gmail.= com]
%% Would like this URL to match the color of the main body=A0
\useURL[knuthbio][http:= //en.wikipedia.org/wiki/Donald_Knuth][][http://en.wikipedia.org/wiki/Donald= _Knuth]

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

=
\setupletter[signature=3D{Michael Ash}]

\defi= neletterelement[layer][location][example]{\correspondenceparameter{name} \c= orrespondenceparameter{email}\par}
\setupletterlayer[location][alternative=3Dexample,color=3Dred]

\defineletterelement[layer][address][example]{\correspond= enceparameter{toname}\par}
\setupletterlayer[address][alternative= =3Dexample,color=3Dblue]
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0
\starttext
\startletter[
=A0 toname= =3D{The Addressee\\\from[recipient-email]},
=A0 opening=3D{Dear A= ddressee:},
=A0 closing=3D{Best regards,}]

=A0 Enjoy \from[knuthbio]

\sto= pletter
\stoptext




--
Michael Ash,= Chair, Department of Economics
Professor=A0of Economics and Public Pol= icy=A0 =A0 =A0 =A0=A0=A0
University of Massachusetts Amherst
Amherst,= MA 01003
Email=A0mash@econ= s.umass.edu
Tel +1-413-545-2590=A0Twitter=A0https://twitter.com/michaelaoash=
--001a113378d8e9579804e2c468db-- --===============1726317846== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1726317846==--