* Colored text in \type?
@ 2011-09-02 4:49 Alasdair McAndrew
2011-09-02 5:11 ` Jaroslav Hajtmar
2011-09-02 7:47 ` Peter Münster
0 siblings, 2 replies; 7+ messages in thread
From: Alasdair McAndrew @ 2011-09-02 4:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 543 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 781 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Colored text in \type?
2011-09-02 4:49 Colored text in \type? Alasdair McAndrew
@ 2011-09-02 5:11 ` Jaroslav Hajtmar
2011-09-02 5:18 ` Alasdair McAndrew
2011-09-02 7:47 ` Peter Münster
1 sibling, 1 reply; 7+ messages in thread
From: Jaroslav Hajtmar @ 2011-09-02 5:11 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Colored text in \type?
2011-09-02 5:11 ` Jaroslav Hajtmar
@ 2011-09-02 5:18 ` Alasdair McAndrew
0 siblings, 0 replies; 7+ messages in thread
From: Alasdair McAndrew @ 2011-09-02 5:18 UTC (permalink / raw)
To: hajtmar, mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2516 bytes --]
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 <hajtmar@gyza.cz> 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<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 <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/<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 <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/<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
[-- Attachment #1.2: Type: text/html, Size: 4086 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Colored text in \type?
2011-09-02 4:49 Colored text in \type? Alasdair McAndrew
2011-09-02 5:11 ` Jaroslav Hajtmar
@ 2011-09-02 7:47 ` Peter Münster
2011-09-02 12:34 ` Wolfgang Schuster
1 sibling, 1 reply; 7+ messages in thread
From: Peter Münster @ 2011-09-02 7:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, Sep 02 2011, Alasdair McAndrew wrote:
>
> \color[blue]{\type{%t^y_8*&}}
>
> doesn't seem to work; nor does
>
> {\blue \type{%t^y_8*&}}
No problem with mkiv.
--
Peter
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Colored text in \type?
2011-09-02 7:47 ` Peter Münster
@ 2011-09-02 12:34 ` Wolfgang Schuster
2011-09-02 14:24 ` Alasdair McAndrew
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2011-09-02 12:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 02.09.2011 um 09:47 schrieb Peter Münster:
> On Fri, Sep 02 2011, Alasdair McAndrew wrote:
>
>>
>> \color[blue]{\type{%t^y_8*&}}
>>
>> doesn't seem to work; nor does
>>
>> {\blue \type{%t^y_8*&}}
>
> No problem with mkiv.
You don’t even need \type in mkiv:
\asciimode
\starttext
\definehighlight[one][color=red, style=mono]
\definehighlight[two][color=green,style=mono]
\mono{%t^y_8*&}
\one{%t^y_8*&}
\two{%t^y_8*&}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Colored text in \type?
2011-09-02 12:34 ` Wolfgang Schuster
@ 2011-09-02 14:24 ` Alasdair McAndrew
2011-09-02 14:47 ` luigi scarso
0 siblings, 1 reply; 7+ messages in thread
From: Alasdair McAndrew @ 2011-09-02 14:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1370 bytes --]
I'm using MkII - are there any particular advantages to using MkIV?
-Alasdair
On Fri, Sep 2, 2011 at 10:34 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:
>
> Am 02.09.2011 um 09:47 schrieb Peter Münster:
>
> > On Fri, Sep 02 2011, Alasdair McAndrew wrote:
> >
> >>
> >> \color[blue]{\type{%t^y_8*&}}
> >>
> >> doesn't seem to work; nor does
> >>
> >> {\blue \type{%t^y_8*&}}
> >
> > No problem with mkiv.
>
> You don’t even need \type in mkiv:
>
> \asciimode
>
> \starttext
>
> \definehighlight[one][color=red, style=mono]
> \definehighlight[two][color=green,style=mono]
>
> \mono{%t^y_8*&}
>
> \one{%t^y_8*&}
>
> \two{%t^y_8*&}
>
> \stoptext
>
> Wolfgang
>
> ___________________________________________________________________________________
> 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
[-- Attachment #1.2: Type: text/html, Size: 2403 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Colored text in \type?
2011-09-02 14:24 ` Alasdair McAndrew
@ 2011-09-02 14:47 ` luigi scarso
0 siblings, 0 replies; 7+ messages in thread
From: luigi scarso @ 2011-09-02 14:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, Sep 2, 2011 at 4:24 PM, Alasdair McAndrew <amca01@gmail.com> wrote:
> I'm using MkII - are there any particular advantages to using MkIV?
>
It seems that you like math... :-)
http://www.gust.org.pl/bachotex/2011-en/presentations/Scarso_2_2011/view
--
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-09-02 14:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-02 4:49 Colored text in \type? Alasdair McAndrew
2011-09-02 5:11 ` Jaroslav Hajtmar
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
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).