Re: [NTG-context] groupedcommand with color

2012-02-14 Thread Wolfgang Schuster

Am 14.02.2012 um 14:26 schrieb Steffen Wolfrum:

> 
> Am 14.02.2012 um 13:44 schrieb Hans Hagen:
> 
>> On 14-2-2012 13:37, Steffen Wolfrum wrote:
>>> 
>>> Am 14.02.2012 um 13:21 schrieb Hans Hagen:
>>> 
 On 14-2-2012 12:55, Steffen Wolfrum wrote:
> Hi,
> 
> due to \color[]{} now needs an argument, groupedcommand doesn't work as 
> before:
> 
> 
> \define\PlainSwitch%
> {\groupedcommand{\language[de]\ss}{}}
> 
> \define\ColorSwitch%
> {\groupedcommand{\language[de]\ss\color[darkred]}{}}
> 
> \starttext
> 
> English: \date
> 
> {\PlainSwitch German \date}
> 
> English: \date
> 
> {\ColorSwitch German \date}
> 
> Test \date
> 
> \stoptext
> 
> Someone knows what to change here (in order to get the red "G" back)?
 
 something
 
 {\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}
>>> 
>>> 
>>> In version 2012.01.16  this gives an error:
>>> 
>>> ! Extra }, or forgotten \endgroup.
>> 
>> and how about
>> 
>> {\groupedcommand{\language[de]\ss\directcolored[darkred]}{}}
> 
> now it works: directedcolor, as well as switchtolcolor


You can also use \definestartstop to create your command which can then be used 
with \ColorSwitch{…} and {\ColorSwitch …}.

\definestartstop
  [ColorSwitch]
  [commands={\language[de]},
   style=sans,
   color=darkred]

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
___


Re: [NTG-context] groupedcommand with color

2012-02-14 Thread Steffen Wolfrum

Am 14.02.2012 um 13:44 schrieb Hans Hagen:

> On 14-2-2012 13:37, Steffen Wolfrum wrote:
>> 
>> Am 14.02.2012 um 13:21 schrieb Hans Hagen:
>> 
>>> On 14-2-2012 12:55, Steffen Wolfrum wrote:
 Hi,
 
 due to \color[]{} now needs an argument, groupedcommand doesn't work as 
 before:
 
 
 \define\PlainSwitch%
 {\groupedcommand{\language[de]\ss}{}}
 
 \define\ColorSwitch%
 {\groupedcommand{\language[de]\ss\color[darkred]}{}}
 
 \starttext
 
 English: \date
 
 {\PlainSwitch German \date}
 
 English: \date
 
 {\ColorSwitch German \date}
 
 Test \date
 
 \stoptext
 
 Someone knows what to change here (in order to get the red "G" back)?
>>> 
>>> something
>>> 
>>> {\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}
>> 
>> 
>> In version 2012.01.16  this gives an error:
>> 
>> ! Extra }, or forgotten \endgroup.
> 
> and how about
> 
> {\groupedcommand{\language[de]\ss\directcolored[darkred]}{}}


now it works: directedcolor, as well as switchtolcolor

Thank you Hans and Philipp!
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] groupedcommand with color

2012-02-14 Thread Philipp Gesang
On 2012-02-14 13:37, Steffen Wolfrum wrote:
> 
> Am 14.02.2012 um 13:21 schrieb Hans Hagen:
> 
> > On 14-2-2012 12:55, Steffen Wolfrum wrote:
> >> Hi,
> >> 
> >> due to \color[]{} now needs an argument, groupedcommand doesn't work as 
> >> before:
> >> 
> >> 
> >> \define\PlainSwitch%
> >> {\groupedcommand{\language[de]\ss}{}}
> >> 
> >> \define\ColorSwitch%
> >> {\groupedcommand{\language[de]\ss\color[darkred]}{}}
> >> 
> >> \starttext
> >> 
> >> English: \date
> >> 
> >> {\PlainSwitch German \date}
> >> 
> >> English: \date
> >> 
> >> {\ColorSwitch German \date}
> >> 
> >> Test \date
> >> 
> >> \stoptext
> >> 
> >> Someone knows what to change here (in order to get the red "G" back)?
> > 
> > something
> > 
> > {\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}
> 
> 
> In version 2012.01.16  this gives an error:
> 
> ! Extra }, or forgotten \endgroup.

Works when using “\switchtocolor”:


\define\ColorSwitch
  {\groupedcommand{\language[de]\ss\switchtocolor[darkred]}{}}
\starttext

foo \bgroup\ColorSwitch bar\egroup baz\par

\stoptext


Regards
Philipp



> 
> 
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpqh5EvCIQTj.pgp
Description: PGP signature
___
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
___

Re: [NTG-context] groupedcommand with color

2012-02-14 Thread Hans Hagen

On 14-2-2012 13:37, Steffen Wolfrum wrote:


Am 14.02.2012 um 13:21 schrieb Hans Hagen:


On 14-2-2012 12:55, Steffen Wolfrum wrote:

Hi,

due to \color[]{} now needs an argument, groupedcommand doesn't work as before:


\define\PlainSwitch%
{\groupedcommand{\language[de]\ss}{}}

\define\ColorSwitch%
{\groupedcommand{\language[de]\ss\color[darkred]}{}}

\starttext

English: \date

{\PlainSwitch German \date}

English: \date

{\ColorSwitch German \date}

Test \date

\stoptext

Someone knows what to change here (in order to get the red "G" back)?


something

{\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}



In version 2012.01.16  this gives an error:

! Extra }, or forgotten \endgroup.


and how about

{\groupedcommand{\language[de]\ss\directcolored[darkred]}{}}


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] groupedcommand with color

2012-02-14 Thread Steffen Wolfrum

Am 14.02.2012 um 13:21 schrieb Hans Hagen:

> On 14-2-2012 12:55, Steffen Wolfrum wrote:
>> Hi,
>> 
>> due to \color[]{} now needs an argument, groupedcommand doesn't work as 
>> before:
>> 
>> 
>> \define\PlainSwitch%
>> {\groupedcommand{\language[de]\ss}{}}
>> 
>> \define\ColorSwitch%
>> {\groupedcommand{\language[de]\ss\color[darkred]}{}}
>> 
>> \starttext
>> 
>> English: \date
>> 
>> {\PlainSwitch German \date}
>> 
>> English: \date
>> 
>> {\ColorSwitch German \date}
>> 
>> Test \date
>> 
>> \stoptext
>> 
>> Someone knows what to change here (in order to get the red "G" back)?
> 
> something
> 
> {\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}


In version 2012.01.16  this gives an error:

! Extra }, or forgotten \endgroup.


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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] groupedcommand with color

2012-02-14 Thread Hans Hagen

On 14-2-2012 12:55, Steffen Wolfrum wrote:

Hi,

due to \color[]{} now needs an argument, groupedcommand doesn't work as before:


\define\PlainSwitch%
{\groupedcommand{\language[de]\ss}{}}

\define\ColorSwitch%
{\groupedcommand{\language[de]\ss\color[darkred]}{}}

\starttext

English: \date

{\PlainSwitch German \date}

English: \date

{\ColorSwitch German \date}

Test \date

\stoptext

Someone knows what to change here (in order to get the red "G" back)?


something

{\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___