ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jaroslav Hajtmar <hajtmar@gyza.cz>
To: ntg-context@ntg.nl
Subject: Re: Colored text in \type?
Date: Fri, 02 Sep 2011 07:11:02 +0200	[thread overview]
Message-ID: <4E606566.6090202@gyza.cz> (raw)
In-Reply-To: <CAPGiC76qQJKtsLBmU5mxNt40eGH5ikM=CW-HuH3AEaPC+qbpRw@mail.gmail.com>

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
___________________________________________________________________________________


  reply	other threads:[~2011-09-02  5:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02  4:49 Alasdair McAndrew
2011-09-02  5:11 ` Jaroslav Hajtmar [this message]
2011-09-02  5:18   ` Alasdair McAndrew
2011-09-02  7:47 ` Peter Münster
2011-09-02 12:34   ` Wolfgang Schuster
2011-09-02 14:24     ` Alasdair McAndrew
2011-09-02 14:47       ` luigi scarso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E606566.6090202@gyza.cz \
    --to=hajtmar@gyza.cz \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).