Colored text in \type?
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
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 ___________________________________________________________________________________
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
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.mcandrewhttp://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
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
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
On Fri, Sep 2, 2011 at 4:24 PM, Alasdair McAndrew
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
participants (5)
-
Alasdair McAndrew
-
Jaroslav Hajtmar
-
luigi scarso
-
pmlists@free.fr
-
Wolfgang Schuster