ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \em producing red text?
@ 2012-02-21  3:18 Alasdair McAndrew
  2012-02-21  6:47 ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Alasdair McAndrew @ 2012-02-21  3:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 434 bytes --]

In some overheads I'm creating, I'd like emphasized text {\em like this} to
appear as red.  I hoped that something like this would work:

\setupbodyfontenvironment[default][em={slanted, textcolor=red}]

but it doesn't.  What is the canonical way of obtaining red, emphasized,
text?

Thanks,
Alasdair

-- 
Blog: http://amca01.wordpress.com
Web:  http://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew

[-- Attachment #1.2: Type: text/html, Size: 702 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] 5+ messages in thread

* Re: \em producing red text?
  2012-02-21  3:18 \em producing red text? Alasdair McAndrew
@ 2012-02-21  6:47 ` Aditya Mahajan
  2012-02-21  9:19   ` Alasdair McAndrew
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2012-02-21  6:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 21 Feb 2012, Alasdair McAndrew wrote:

> In some overheads I'm creating, I'd like emphasized text {\em like this} to
> appear as red.  I hoped that something like this would work:
>
> \setupbodyfontenvironment[default][em={slanted, textcolor=red}]
>
> but it doesn't.  What is the canonical way of obtaining red, emphasized,
> text?

\definehighlight[emph][style=slanted, color=red]

\emph{...}

Aditya
___________________________________________________________________________________
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] 5+ messages in thread

* Re: \em producing red text?
  2012-02-21  6:47 ` Aditya Mahajan
@ 2012-02-21  9:19   ` Alasdair McAndrew
  2012-02-21 12:05     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Alasdair McAndrew @ 2012-02-21  9:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1724 bytes --]

I discovered this by hunting through font-ini.mkii:

\setupbodyfontenvironment [default] [em={\slanted\color[red]}]

Seems to work well.  You see, I want to use the same ConTeXt files for two
purposes: to create a set of printable notes (without colour) and to make a
set of displayable onscreen notes (with colour).  This means that {\em this
text} appears slanted in the printed notes, and slanted and red onscreen.

Thanks very much!

-Alasdair

On Tue, Feb 21, 2012 at 5:47 PM, Aditya Mahajan <adityam@umich.edu> wrote:

> On Tue, 21 Feb 2012, Alasdair McAndrew wrote:
>
>  In some overheads I'm creating, I'd like emphasized text {\em like this}
>> to
>> appear as red.  I hoped that something like this would work:
>>
>> \setupbodyfontenvironment[**default][em={slanted, textcolor=red}]
>>
>> but it doesn't.  What is the canonical way of obtaining red, emphasized,
>> text?
>>
>
> \definehighlight[emph][style=**slanted, color=red]
>
> \emph{...}
>
> Aditya
> ______________________________**______________________________**
> _______________________
> 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://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew

[-- Attachment #1.2: Type: text/html, Size: 2813 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] 5+ messages in thread

* Re: \em producing red text?
  2012-02-21  9:19   ` Alasdair McAndrew
@ 2012-02-21 12:05     ` Wolfgang Schuster
  2012-02-21 12:21       ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2012-02-21 12:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.02.2012 um 10:19 schrieb Alasdair McAndrew:

> I discovered this by hunting through font-ini.mkii:
> 
> \setupbodyfontenvironment [default] [em={\slanted\color[red]}]

Better \setupbodyfontenvironment[default][em={\sl\red}].

> Seems to work well.  You see, I want to use the same ConTeXt files for two purposes: to create a set of printable notes (without colour) and to make a set of displayable onscreen notes (with colour).  This means that {\em this text} appears slanted in the printed notes, and slanted and red onscreen.

This is also possible with the method Aditya suggested.

\startmode[screen]
\definehighligh[emph][style=slanted,color=red]
\stopmode

\startnotmode[screen]
\definehighligh[emph][style=slanted]
\stopnotmode

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] 5+ messages in thread

* Re: \em producing red text?
  2012-02-21 12:05     ` Wolfgang Schuster
@ 2012-02-21 12:21       ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2012-02-21 12:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.02.2012 um 13:05 schrieb Wolfgang Schuster:

> Am 21.02.2012 um 10:19 schrieb Alasdair McAndrew:
> 
>> I discovered this by hunting through font-ini.mkii:
>> 
>> \setupbodyfontenvironment [default] [em={\slanted\color[red]}]
> 
> Better \setupbodyfontenvironment[default][em={\sl\red}].

I was too fast, neither your nor mine version are valid. It does work
with mkii but not with mkiv where this will generate an error.

Adityas solution is one of a few methods which can be used in mkiv
and when you use mkii you can create a \emph command with
\definestartstop[emph][style=slanted,color=red].

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] 5+ messages in thread

end of thread, other threads:[~2012-02-21 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-21  3:18 \em producing red text? Alasdair McAndrew
2012-02-21  6:47 ` Aditya Mahajan
2012-02-21  9:19   ` Alasdair McAndrew
2012-02-21 12:05     ` Wolfgang Schuster
2012-02-21 12:21       ` Wolfgang Schuster

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).