Re: [NTG-context] \setuptyping and \type{}

2010-12-04 Thread Hans Hagen

On 3-12-2010 10:32, Khaled Hosny wrote:

Is there a way to setup insertion of some stuff before/after \type{},
tried \setuptyping but only works for \start/stoptyping.

\setuptyping[before=\framed]

\starttext
\type{aa}

\starttyping
aa
\stoptyping
\stoptext


the next beta will have:

\starttext

test \type[left=(,right=),command=\inframed]{test}

\stoptext

but command is somewhat restricted as it does not get an argument but 
something \bgroup..\egroup which is fine for anything that gets boxed



-
  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] \setuptyping and \type{}

2010-12-04 Thread Khaled Hosny
On Sat, Dec 04, 2010 at 06:41:37PM +0100, Hans Hagen wrote:
 On 3-12-2010 10:32, Khaled Hosny wrote:
 Is there a way to setup insertion of some stuff before/after \type{},
 tried \setuptyping but only works for \start/stoptyping.
 
 \setuptyping[before=\framed]
 
 \starttext
 \type{aa}
 
 \starttyping
 aa
 \stoptyping
 \stoptext
 
 the next beta will have:
 
 \starttext
 
 test \type[left=(,right=),command=\inframed]{test}
 
 \stoptext
 
 but command is somewhat restricted as it does not get an argument
 but something \bgroup..\egroup which is fine for anything that gets
 boxed

Thanks Hans!

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] \setuptyping and \type{}

2010-12-04 Thread Khaled Hosny
On Fri, Dec 03, 2010 at 03:36:14PM +0100, Wolfgang Schuster wrote:
 
 Am 03.12.2010 um 10:32 schrieb Khaled Hosny:
 
  Is there a way to setup insertion of some stuff before/after \type{},
  tried \setuptyping but only works for \start/stoptyping.
  
  \setuptyping[before=\framed]
 
 You can try to convince Hans to add a command key to \setuptype, untill
 then you can use this:
 
 \unexpanded\def\mytype{\groupedcommand{\setgroupedtype\inframed}{\relax}}
 
 \starttext
 one \mytype{\two} three
 \stoptext

Thanks Wolfgang.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] \setuptyping and \type{}

2010-12-03 Thread Wolfgang Schuster

Am 03.12.2010 um 10:32 schrieb Khaled Hosny:

 Is there a way to setup insertion of some stuff before/after \type{},
 tried \setuptyping but only works for \start/stoptyping.
 
 \setuptyping[before=\framed]

You can try to convince Hans to add a command key to \setuptype, untill
then you can use this:

\unexpanded\def\mytype{\groupedcommand{\setgroupedtype\inframed}{\relax}}

\starttext
one \mytype{\two} three
\stoptext

„before“ and „after“ keys are used only for environments to change
the spacing (e.g. before=\blank) at the begin and end of a environment
or to frame it (e.g. before=\startframedtext).

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] \setuptyping and \type{}

2010-12-03 Thread Hans Hagen

On 3-12-2010 10:32, Khaled Hosny wrote:

Is there a way to setup insertion of some stuff before/after \type{},
tried \setuptyping but only works for \start/stoptyping.

\setuptyping[before=\framed]

\starttext
\type{aa}

\starttyping
aa
\stoptyping
\stoptext


that would be 'left' and 'right' then (but it's not yet there)

-
  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
___