* how to color italics?
@ 2008-09-22 9:09 Steffen Wolfrum
2008-09-22 11:24 ` Steffen Wolfrum
0 siblings, 1 reply; 15+ messages in thread
From: Steffen Wolfrum @ 2008-09-22 9:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
for making editing easier I'd like my italics (\em) to be in PDF
typeset colored.
Something like \setupem[color=blue]
How can this be done?
Steffen
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 9:09 how to color italics? Steffen Wolfrum
@ 2008-09-22 11:24 ` Steffen Wolfrum
2008-09-22 11:48 ` Taco Hoekwater
2008-09-22 11:48 ` Thomas A. Schmitz
0 siblings, 2 replies; 15+ messages in thread
From: Steffen Wolfrum @ 2008-09-22 11:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
It should be something like \Colorit{this} example:
\def\Colorit{\it\color[magenta]}
But this above never closes the italics, while ...
\def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
... gives an error.
Someone can help?
St.
Am 22.09.2008 um 11:09 schrieb Steffen Wolfrum:
> Hi,
>
> for making editing easier I'd like my italics (\em) to be in PDF
> typeset colored.
>
> Something like \setupem[color=blue]
>
>
> How can this be done?
>
> Steffen
> ___________________________________________________________________________________
> 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:24 ` Steffen Wolfrum
@ 2008-09-22 11:48 ` Taco Hoekwater
2008-09-22 11:55 ` Aditya Mahajan
2008-09-22 11:55 ` Steffen Wolfrum
2008-09-22 11:48 ` Thomas A. Schmitz
1 sibling, 2 replies; 15+ messages in thread
From: Taco Hoekwater @ 2008-09-22 11:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
Steffen Wolfrum wrote:
>
> But this above never closes the italics, while ...
>
> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>
> ... gives an error.
>
>
> Someone can help?
Worryingly lowlevel:
\def\emphasistypeface{\it\color[magenta]}
Best wishes,
Taco
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:24 ` Steffen Wolfrum
2008-09-22 11:48 ` Taco Hoekwater
@ 2008-09-22 11:48 ` Thomas A. Schmitz
2008-09-22 11:58 ` Steffen Wolfrum
2008-09-22 12:00 ` Steffen Wolfrum
1 sibling, 2 replies; 15+ messages in thread
From: Thomas A. Schmitz @ 2008-09-22 11:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sep 22, 2008, at 1:24 PM, Steffen Wolfrum wrote:
> It should be something like \Colorit{this} example:
>
> \def\Colorit{\it\color[magenta]}
>
>
> But this above never closes the italics, while ...
>
> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>
> ... gives an error.
>
>
> Someone can help?
>
>
> St.
You want your command to take an argument, so you have to mention that
argument in the definition (untested):
\define[1]\Colorit%
{\color[magenta]{\it #1}}
Thomas
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:48 ` Taco Hoekwater
@ 2008-09-22 11:55 ` Aditya Mahajan
2008-09-22 12:02 ` Taco Hoekwater
2008-09-22 11:55 ` Steffen Wolfrum
1 sibling, 1 reply; 15+ messages in thread
From: Aditya Mahajan @ 2008-09-22 11:55 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 22 Sep 2008, Taco Hoekwater wrote:
> Steffen Wolfrum wrote:
>>
>> But this above never closes the italics, while ...
>>
>> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>>
>> ... gives an error.
>>
>>
>> Someone can help?
>
> Worryingly lowlevel:
>
> \def\emphasistypeface{\it\color[magenta]}
This has to be used {\emphasistypeface ....}. If you want something that
works as \emph{....} as well as {\emph ...} and can also be passed as an
option to all the style= keys, try
\definealternativestyle [emph] [{\it\color[magenta]}] []
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:48 ` Taco Hoekwater
2008-09-22 11:55 ` Aditya Mahajan
@ 2008-09-22 11:55 ` Steffen Wolfrum
1 sibling, 0 replies; 15+ messages in thread
From: Steffen Wolfrum @ 2008-09-22 11:55 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Taco Hoekwater
Am 22.09.2008 um 13:48 schrieb Taco Hoekwater:
> Steffen Wolfrum wrote:
>>
>> But this above never closes the italics, while ...
>>
>> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>>
>> ... gives an error.
>>
>>
>> Someone can help?
>
> Worryingly lowlevel:
>
> \def\emphasistypeface{\it\color[magenta]}
... this looks very close to what I wrote in the same email at top:
\def\Colorit{\it\color[magenta]}
... and this had the problem of never stopping (closing) the italics
again!
(BTW: sorry for introducing \it, I need \em of course)
Steffen
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:48 ` Thomas A. Schmitz
@ 2008-09-22 11:58 ` Steffen Wolfrum
2008-09-22 12:09 ` Thomas A. Schmitz
2008-09-22 12:00 ` Steffen Wolfrum
1 sibling, 1 reply; 15+ messages in thread
From: Steffen Wolfrum @ 2008-09-22 11:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 22.09.2008 um 13:48 schrieb Thomas A. Schmitz:
>
> On Sep 22, 2008, at 1:24 PM, Steffen Wolfrum wrote:
>
>> It should be something like \Colorit{this} example:
>>
>> \def\Colorit{\it\color[magenta]}
>>
>>
>> But this above never closes the italics, while ...
>>
>> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>>
>> ... gives an error.
>>
>>
>> Someone can help?
>>
>>
>> St.
>
> You want your command to take an argument, so you have to mention that
> argument in the definition (untested):
>
> \define[1]\Colorit%
> {\color[magenta]{\it #1}}
... same problem as in Taco's proposal: the \it never stops
st.
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:48 ` Thomas A. Schmitz
2008-09-22 11:58 ` Steffen Wolfrum
@ 2008-09-22 12:00 ` Steffen Wolfrum
1 sibling, 0 replies; 15+ messages in thread
From: Steffen Wolfrum @ 2008-09-22 12:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 22.09.2008 um 13:48 schrieb Thomas A. Schmitz:
>
> On Sep 22, 2008, at 1:24 PM, Steffen Wolfrum wrote:
>
>> It should be something like \Colorit{this} example:
>>
>> \def\Colorit{\it\color[magenta]}
>>
>>
>> But this above never closes the italics, while ...
>>
>> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>>
>> ... gives an error.
>>
>>
>> Someone can help?
>>
>>
>> St.
>
> You want your command to take an argument, so you have to mention that
> argument in the definition (untested):
>
> \define[1]\Colorit%
> {\color[magenta]{\it #1}}
but, hey ... what about this:
\define[1]\Colorit%
{\color[magenta]{\groupedcommand\em\/ #1}}
Thanks for pointing it to that Thomas!
Steffen
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:55 ` Aditya Mahajan
@ 2008-09-22 12:02 ` Taco Hoekwater
2008-09-22 12:17 ` Aditya Mahajan
0 siblings, 1 reply; 15+ messages in thread
From: Taco Hoekwater @ 2008-09-22 12:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
Aditya Mahajan wrote:
> On Mon, 22 Sep 2008, Taco Hoekwater wrote:
>
>> Steffen Wolfrum wrote:
>>> But this above never closes the italics, while ...
>>>
>>> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>>>
>>> ... gives an error.
>>>
>>>
>>> Someone can help?
>> Worryingly lowlevel:
>>
>> \def\emphasistypeface{\it\color[magenta]}
>
> This has to be used {\emphasistypeface ....}. If you want something that
No. Instead it redefines the internals of the normal \em command.
Best wishes,
Taco
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 11:58 ` Steffen Wolfrum
@ 2008-09-22 12:09 ` Thomas A. Schmitz
0 siblings, 0 replies; 15+ messages in thread
From: Thomas A. Schmitz @ 2008-09-22 12:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sep 22, 2008, at 1:58 PM, Steffen Wolfrum wrote:
> ... same problem as in Taco's proposal: the \it never stops
>
>
> st.
Then add grouping
\define[1]\Colorit%
{\color[magenta]{\bgroup\it #1\egroup}}
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 12:02 ` Taco Hoekwater
@ 2008-09-22 12:17 ` Aditya Mahajan
2008-09-22 12:30 ` Taco Hoekwater
0 siblings, 1 reply; 15+ messages in thread
From: Aditya Mahajan @ 2008-09-22 12:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 22 Sep 2008, Taco Hoekwater wrote:
> Aditya Mahajan wrote:
>> On Mon, 22 Sep 2008, Taco Hoekwater wrote:
>>
>>> Steffen Wolfrum wrote:
>>>> But this above never closes the italics, while ...
>>>>
>>>> \def\Colorit{\strut\groupedcommand\it\color[magenta]\/}
>>>>
>>>> ... gives an error.
>>>>
>>>>
>>>> Someone can help?
>>> Worryingly lowlevel:
>>>
>>> \def\emphasistypeface{\it\color[magenta]}
>>
>> This has to be used {\emphasistypeface ....}. If you want something that
>
> No. Instead it redefines the internals of the normal \em command.
Ah, so that is why it is lowlevel. I wonder why the following does not
work.
\setupbodyfontenvironment [default]
[em={\italic\color[red]}]
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 12:17 ` Aditya Mahajan
@ 2008-09-22 12:30 ` Taco Hoekwater
2008-09-22 12:43 ` ppchtex rotation Alan BRASLAU
2008-09-22 13:00 ` how to color italics? Hans Hagen
0 siblings, 2 replies; 15+ messages in thread
From: Taco Hoekwater @ 2008-09-22 12:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
Aditya Mahajan wrote:
>
> Ah, so that is why it is lowlevel. I wonder why the following does not
> work.
>
> \setupbodyfontenvironment [default]
> [em={\italic\color[red]}]
The em key is a bit extra extra special: it has to be either
'italic' or 'slanted', everything else is ignored. This is because
of the need to allow bold emphasis. (\bf\em == \bs or \bi).
I would personally be happier if it would just use whatever was
in the argument when it is *not* italic or slanted, instead of
ignoring the argument, but that's how it is.
Best wishes,
Taco
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* ppchtex rotation
2008-09-22 12:30 ` Taco Hoekwater
@ 2008-09-22 12:43 ` Alan BRASLAU
2008-09-22 13:00 ` how to color italics? Hans Hagen
1 sibling, 0 replies; 15+ messages in thread
From: Alan BRASLAU @ 2008-09-22 12:43 UTC (permalink / raw)
To: ntg-context
Hello,
I am having trouble drawing rotated molecules using ppchtex.
In the example below, I would like to draw the molecule shown in (a)
rotated as shown in (b).
I would appreciate any suggestions. Thanks.
Alan
\usemodule[chemic]
\setupchemical[width=fit]
\starttext
\startcombination[2*1]
{\startchemical
\chemical[SIX,B,C,MOV2,B,C,R234,RZ234,MOV5,MOV6,B,C,R561,RZ561]
[R,R,R,R,R,R]
\stopchemical}
{(a)}
{\startchemical
\chemical[SIX,ROT2,B,C,R234,RZ234,ADJ1,ADJ1,ADJ2,B,C,ADJ1,ADJ1,ADJ4,B,C,R156,RZ156]
[R,R,R,R,R,R]
\stopchemical}
{(b)}
\stopcombination
\stoptext
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 12:30 ` Taco Hoekwater
2008-09-22 12:43 ` ppchtex rotation Alan BRASLAU
@ 2008-09-22 13:00 ` Hans Hagen
2008-09-23 16:01 ` Steffen Wolfrum
1 sibling, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2008-09-22 13:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Taco Hoekwater wrote:
>
> Aditya Mahajan wrote:
>> Ah, so that is why it is lowlevel. I wonder why the following does not
>> work.
>>
>> \setupbodyfontenvironment [default]
>> [em={\italic\color[red]}]
>
> The em key is a bit extra extra special: it has to be either
> 'italic' or 'slanted', everything else is ignored. This is because
> of the need to allow bold emphasis. (\bf\em == \bs or \bi).
>
> I would personally be happier if it would just use whatever was
> in the argument when it is *not* italic or slanted, instead of
> ignoring the argument, but that's how it is.
\def\doemphasistypeface#1#2%
{\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!slanted
{#1}%
{\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!italic
{#2}%
{\doifelsevaluenothing{\??ft\fontclass\normalizedbodyfontsize\c!em}
{\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}\v!slanted
{#1}%
{\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}\v!italic
{#2}%
{\getvalue{\??ft\normalizedbodyfontsize\c!em}}}}
{\getvalue{\??ft\fontclass\normalizedbodyfontsize\c!em}}}}}
however, this does not provide italic correction, so better is:
\newtoks\everyemphasized
\unexpanded\def\em
{\relax
\ifdim\slantperpoint>\zeropoint
\settrue\emneeded
\else
\setfalse\emneeded
\fi
\setemphasisboldface % new
\ifx\fontalternative\c!it % \ifnum\fam=\itfam
\def\emphasistypeface{\it}\tf
\else\ifx\fontalternative\c!sl % \ifnum\fam=\slfam
\def\emphasistypeface{\sl}\tf
\else\ifx\fontalternative\c!bf % \ifnum\fam=\bffam
\emphasisboldface
\else\ifx\fontalternative\c!bs % \ifnum\fam=\bsfam
\def\emphasisboldface{\bs}\bf
\else\ifx\fontalternative\c!bi % \ifnum\fam=\bifam
\def\emphasisboldface{\bi}\bf
\else
\emphasistypeface
\fi\fi\fi\fi\fi
\the\everyemphasized
\ifconditional\emneeded\relax
\else
\expandafter\aftergroup
\fi
\emphasiscorrection}
which provides a hook, as in:
\appendtoks
\red
\to \everyemphasized
both mechanisms will be provided (maybe something emcolor later, when i
can get myself motivated for such an possibly never documented feature)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to color italics?
2008-09-22 13:00 ` how to color italics? Hans Hagen
@ 2008-09-23 16:01 ` Steffen Wolfrum
0 siblings, 0 replies; 15+ messages in thread
From: Steffen Wolfrum @ 2008-09-23 16:01 UTC (permalink / raw)
To: Hans Hagen, mailing list for ConTeXt users
Am 22.09.2008 um 15:00 schrieb Hans Hagen:
> Taco Hoekwater wrote:
>>
>> Aditya Mahajan wrote:
>>> Ah, so that is why it is lowlevel. I wonder why the following does
>>> not
>>> work.
>>>
>>> \setupbodyfontenvironment [default]
>>> [em={\italic\color[red]}]
>>
>> The em key is a bit extra extra special: it has to be either
>> 'italic' or 'slanted', everything else is ignored. This is because
>> of the need to allow bold emphasis. (\bf\em == \bs or \bi).
>>
>> I would personally be happier if it would just use whatever was
>> in the argument when it is *not* italic or slanted, instead of
>> ignoring the argument, but that's how it is.
>
>
> \def\doemphasistypeface#1#2%
> {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!
> slanted
> {#1}%
> {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!
> italic
> {#2}%
> {\doifelsevaluenothing{\??ft\fontclass\normalizedbodyfontsize
> \c!em}
> {\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}\v!
> slanted
> {#1}%
> {\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}\v!
> italic
> {#2}%
> {\getvalue{\??ft\normalizedbodyfontsize\c!em}}}}
> {\getvalue{\??ft\fontclass\normalizedbodyfontsize\c!em}}}}}
>
> however, this does not provide italic correction, so better is:
>
> \newtoks\everyemphasized
>
> \unexpanded\def\em
> {\relax
> \ifdim\slantperpoint>\zeropoint
> \settrue\emneeded
> \else
> \setfalse\emneeded
> \fi
> \setemphasisboldface % new
> \ifx\fontalternative\c!it % \ifnum\fam=\itfam
> \def\emphasistypeface{\it}\tf
> \else\ifx\fontalternative\c!sl % \ifnum\fam=\slfam
> \def\emphasistypeface{\sl}\tf
> \else\ifx\fontalternative\c!bf % \ifnum\fam=\bffam
> \emphasisboldface
> \else\ifx\fontalternative\c!bs % \ifnum\fam=\bsfam
> \def\emphasisboldface{\bs}\bf
> \else\ifx\fontalternative\c!bi % \ifnum\fam=\bifam
> \def\emphasisboldface{\bi}\bf
> \else
> \emphasistypeface
> \fi\fi\fi\fi\fi
> \the\everyemphasized
> \ifconditional\emneeded\relax
> \else
> \expandafter\aftergroup
> \fi
> \emphasiscorrection}
>
> which provides a hook, as in:
>
>
> \appendtoks
> \red
> \to \everyemphasized
Be careful: this kills the ability of the emphasized word to be
hyphenated!
(... at least here with MKII)
Steffen
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-09-23 16:01 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22 9:09 how to color italics? Steffen Wolfrum
2008-09-22 11:24 ` Steffen Wolfrum
2008-09-22 11:48 ` Taco Hoekwater
2008-09-22 11:55 ` Aditya Mahajan
2008-09-22 12:02 ` Taco Hoekwater
2008-09-22 12:17 ` Aditya Mahajan
2008-09-22 12:30 ` Taco Hoekwater
2008-09-22 12:43 ` ppchtex rotation Alan BRASLAU
2008-09-22 13:00 ` how to color italics? Hans Hagen
2008-09-23 16:01 ` Steffen Wolfrum
2008-09-22 11:55 ` Steffen Wolfrum
2008-09-22 11:48 ` Thomas A. Schmitz
2008-09-22 11:58 ` Steffen Wolfrum
2008-09-22 12:09 ` Thomas A. Schmitz
2008-09-22 12:00 ` Steffen Wolfrum
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).