From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/70999 Path: news.gmane.org!not-for-mail From: Alasdair McAndrew Newsgroups: gmane.comp.tex.context Subject: Re: Colored text in \type? Date: Fri, 2 Sep 2011 15:18:48 +1000 Message-ID: References: <4E606566.6090202@gyza.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1296252458==" X-Trace: dough.gmane.org 1314940742 6792 80.91.229.12 (2 Sep 2011 05:19:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Sep 2011 05:19:02 +0000 (UTC) To: hajtmar@gyza.cz, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 02 07:18:58 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QzM9Z-0002Y3-FL for gctc-ntg-context-518@m.gmane.org; Fri, 02 Sep 2011 07:18:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 83425CAF3D; Fri, 2 Sep 2011 07:18:56 +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 fdjDoSOReZbe; Fri, 2 Sep 2011 07:18:53 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 57271CAF43; Fri, 2 Sep 2011 07:18:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 61D38CAF43 for ; Fri, 2 Sep 2011 07:18:52 +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 cX-bcc9ElsRt for ; Fri, 2 Sep 2011 07:18:49 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id ABFDACAF3D for ; Fri, 2 Sep 2011 07:18:49 +0200 (CEST) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter3-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p825ImFA018702 for ; Fri, 2 Sep 2011 07:18:48 +0200 Original-Received: by bkbzt4 with SMTP id zt4so3045901bkb.14 for ; Thu, 01 Sep 2011 22:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8ar1o1y+I/uAP+/23WQ9pTTw7s3OFPO7uEC36UIZFk0=; b=gDlbuiwK+6rwsTlrwYqeDhwaikIxLLKjeWaKqVmI9anoIGoHRhP+om+MCNWP/pbY9I 1d1czWbbeiu5RcASdJ6cbhr2Jgq0DUFKF9Ukl9OoYcous/zCkZKebFUdlODiwU1Qoixn GQwp0wgT3OAbvjSVV4DwQNSItHmmfdcs1R5DA= Original-Received: by 10.204.135.13 with SMTP id l13mr331233bkt.198.1314940728301; Thu, 01 Sep 2011 22:18:48 -0700 (PDT) Original-Received: by 10.204.69.211 with HTTP; Thu, 1 Sep 2011 22:18:48 -0700 (PDT) In-Reply-To: <4E606566.6090202@gyza.cz> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0dFrFiMiE - 1e9aaff396e4 - 20110902 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:70999 Archived-At: --===============1296252458== Content-Type: multipart/alternative; boundary=0015174783c402d87e04abee7f81 --0015174783c402d87e04abee7f81 Content-Type: text/plain; charset=ISO-8859-1 Thanks very much - that works perfectly. I didn't know about \definetype. Thanks again, Alasdair On Fri, Sep 2, 2011 at 3:11 PM, Jaroslav Hajtmar wrote: > Hello Alasdair. > > Try use \definetype : > > \definetype[rtype][color=red,**style=type] > \definetype[btype][color=blue,**style=type] > > > > \starttext > > \type{%t^y_8*&} > > \rtype{%t^y_8*&} > > \btype{%t^y_8*&} > > \stoptext > > Jaroslav Hajtmar > > > Dne 2.9.2011 6:49, Alasdair McAndrew napsal(a): > >> I'm writing up some computer notes for my students, and I have examples of >> variables and other commands which involve characters like % and underscore. >> These are typeset with >> >> \type{%t^y_8*&} >> >> for example. What I would like to do is to color these as well. However >> >> \color[blue]{\type{%t^y_8*&}} >> >> doesn't seem to work; nor does >> >> {\blue \type{%t^y_8*&}} >> >> So - how do I obtain colored text within \type? >> >> Thanks, >> Alasdair >> >> -- >> Blog: http://amca01.wordpress.com >> Web: http://bit.ly/Alasdair >> Facebook: http://www.facebook.com/**alasdair.mcandrew >> >> >> ______________________________**______________________________** >> _______________________ >> 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 >> ______________________________**______________________________** >> _______________________ >> > > ______________________________**______________________________** > _______________________ > 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 > ______________________________**______________________________** > _______________________ > -- Blog: http://amca01.wordpress.com Web: http://bit.ly/Alasdair Facebook: http://www.facebook.com/alasdair.mcandrew --0015174783c402d87e04abee7f81 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks very much - that works perfectly.=A0 I didn't know about \define= type.

Thanks again,
Alasdair

On= Fri, Sep 2, 2011 at 3:11 PM, Jaroslav Hajtmar <hajtmar@gyza.cz> wrote:
Hello Alasdair.
Try use \definetype :

\definetype[rtype][color=3Dred,style=3Dtype]
\definetype[btype][color=3Dblue,style=3Dtype]



\starttext

\type{%t^y_8*&}

\rtype{%t^y_8*&}

\btype{%t^y_8*&}

\stoptext

Jaroslav Hajtmar


Dne 2.9.2011 6:49, Alasdair McAndrew napsal(a):
<= div class=3D"h5"> I'm writing up some computer notes for my students, and I have examples= of variables and other commands which involve characters like % and unders= core. =A0These are typeset with

\type{%t^y_8*&}

for example. =A0What I would like to do is to color these as well. =A0Howev= er

\color[blue]{\type{%t^y_8*&}}

doesn't seem to work; nor does

{\blue \type{%t^y_8*&}}

So - how do I obtain colored text within \type?

Thanks,
Alasdair

--
Blog: http://amca= 01.wordpress.com
Web: http://bit.ly/Ala= sdair
Facebook: http://www.facebook.com/alasdair.mcandrew


_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist :ntg-conte= xt@ntg.nl =A0/http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0:
http://w= ww.pragma-ade.nl =A0/http://tex.aanhet.net
archive =A0:http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 :http:/= /contextgarden.net
_____________________________________________________________= ______________________

_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0:
http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/ wiki =A0 =A0 : http:= //contextgarden.net
_____________________________________________________________= ______________________



--
Blog: http://amca01.wordpress.com
Web:=A0 http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alas= dair.mcandrew
--0015174783c402d87e04abee7f81-- --===============1296252458== 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 ___________________________________________________________________________________ --===============1296252458==--