Re: [NTG-context] xtables in custom macros

2011-11-06 Thread Thomas A. Schmitz

On 11/04/2011 10:44 PM, Thomas A. Schmitz wrote:

Hans,

thanks a lot, I'll play with it tomorrow (was on the road today, from
Florence back home...).

All best

Thomas


Yes, this works wonderfully! And thanks for mentioning the xml example 
in the manual!


All best

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


Re: [NTG-context] xtables in custom macros

2011-11-04 Thread Hans Hagen

On 3-11-2011 23:01, Stefan Müller wrote:

\define\Doesnt{\startxtable \startxrow \startxcell does not work
 \stopxcell \stopxrow \stopxtable}
  
\starttext
\Works \stopxtable
%\Doesnt
\stoptext

\def\test
  {\setbuffer[demo]
 \startxtable
   \startxrow
 \startxcell does not work \stopxcell
   \stopxrow
 \stopxtable
   \endbuffer
   \processxtablebuffer[demo]}


--

-
  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] xtables in custom macros

2011-11-04 Thread Thomas A. Schmitz

On 11/4/11 10:38 AM, Hans Hagen wrote:

\def\test
   {\setbuffer[demo]
  \startxtable
\startxrow
  \startxcell does not work \stopxcell
\stopxrow
  \stopxtable
\endbuffer
\processxtablebuffer[demo]}



Hans,

is the solution to my xml problem along these lines as well? Example:

\startbuffer[test]
a
 table
  tablerow
   tablecell
One
   /tablecell
   tablecell
Two
   /tablecell
  /tablerow
  tablerow
   tablecell
Three
   /tablecell
   tablecell
Four
   /tablecell
  /tablerow
 /table
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{main}{a|table|tablerow|tablecell}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:table
\startxtable
  \xmlflush{#1}
\stopxtable
\stopxmlsetups

\startxmlsetups xml:tablerow
\startxrow
  \xmlflush{#1}
\stopxrow
\stopxmlsetups

\startxmlsetups xml:tablecell
\startxcell \xmlflush{#1} \stopxcell
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

Would like to find a way to use the new mechanism with xml.

All best

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


Re: [NTG-context] xtables in custom macros

2011-11-04 Thread Hans Hagen

On 4-11-2011 11:11, Thomas A. Schmitz wrote:

On 11/4/11 10:38 AM, Hans Hagen wrote:

\def\test
{\setbuffer[demo]
\startxtable
\startxrow
\startxcell does not work \stopxcell
\stopxrow
\stopxtable
\endbuffer
\processxtablebuffer[demo]}



Hans,

is the solution to my xml problem along these lines as well? Example:

\startbuffer[test]
a
table
tablerow
tablecell
One
/tablecell
tablecell
Two
/tablecell
/tablerow
tablerow
tablecell
Three
/tablecell
tablecell
Four
/tablecell
/tablerow
/table
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{main}{a|table|tablerow|tablecell}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:table
\startxtable
\xmlflush{#1}
\stopxtable
\stopxmlsetups

\startxmlsetups xml:tablerow
\startxrow
\xmlflush{#1}
\stopxrow
\stopxmlsetups

\startxmlsetups xml:tablecell
\startxcell \xmlflush{#1} \stopxcell
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

Would like to find a way to use the new mechanism with xml.


In the next beta .. still somewhat experimental as we need to deal with 
all kind of situations, like \asciimode in regular tex.


\startbuffer[test]
table
tablerow
tablecell
One
/tablecell
tablecell
Two
/tablecell
/tablerow
tablerow
tablecell
bThree/b
/tablecell
tablecell
Four
/tablecell
/tablerow
/table
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{main}{b|table|tablerow|tablecell}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:b
\bold{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:table
\startembeddedxtable
\xmlflush{#1}
\stopembeddedxtable
\stopxmlsetups

\startxmlsetups xml:tablerow
\startxrow
\xmlflush{#1}
\stopxrow
\stopxmlsetups

\startxmlsetups xml:tablecell
\startxcell
\xmlflush{#1}
\stopxcell
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

Hans

-
  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] xtables in custom macros

2011-11-04 Thread Stefan Müller
 On 3-11-2011 23:01, Stefan Müller wrote:
  \define\Doesnt{\startxtable \startxrow \startxcell does not work
   \stopxcell \stopxrow \stopxtable}

  \starttext
  \Works \stopxtable
  %\Doesnt
  \stoptext
 \def\test
{\setbuffer[demo]
   \startxtable
 \startxrow
   \startxcell does not work \stopxcell
 \stopxrow
   \stopxtable
 \endbuffer
 \processxtablebuffer[demo]}

Nice! Thank you very much!

Stefan
-- 


___
ey, leute, ich hab so lange gebraucht um mir plan a auszudenken, fragt jetzt 
doch nicht auch 
noch nach plan b!

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
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] xtables in custom macros

2011-11-04 Thread Hans Hagen

On 4-11-2011 18:18, Stefan Müller wrote:

On 3-11-2011 23:01, Stefan Müller wrote:

\define\Doesnt{\startxtable \startxrow \startxcell does not work
  \stopxcell \stopxrow \stopxtable}

  
 \starttext
 \Works \stopxtable
 %\Doesnt
 \stoptext

\def\test
{\setbuffer[demo]
   \startxtable
 \startxrow
   \startxcell does not work \stopxcell
 \stopxrow
   \stopxtable
 \endbuffer
 \processxtablebuffer[demo]}


Nice! Thank you very much!


the manual shows a more convenient way (embeddedxtable)

Hans


-
  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] xtables in custom macros

2011-11-04 Thread Thomas A. Schmitz

On 11/04/2011 01:48 PM, Hans Hagen wrote:


\startxmlsetups xml:table
\startembeddedxtable
\xmlflush{#1}
\stopembeddedxtable
\stopxmlsetups


Hans,

thanks a lot, I'll play with it tomorrow (was on the road today, from 
Florence back home...).


All best

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


[NTG-context] xtables in custom macros

2011-11-03 Thread Stefan Müller
Hi list,

I just played a bit with the nice new xtables.  It seems as if \stopxtable 
does not work if used inside a custom macro.  I get a Runaway argument error 
with the current standalone if I uncomment \Doesnt in the following example.

\define\Works{\startxtable \startxrow \startxcell works \stopxcell \stopxrow}
\define\Doesnt{\startxtable \startxrow \startxcell does not work \stopxcell 
\stopxrow \stopxtable}

\starttext
\Works \stopxtable
%\Doesnt
\stoptext

Did I miss something or is this a bug?

Best regards,
Stefan.
-- 


___
ey, leute, ich hab so lange gebraucht um mir plan a auszudenken, fragt jetzt 
doch nicht auch 
noch nach plan b!

NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
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] xtables in custom macros

2011-11-03 Thread Wolfgang Schuster

Am 03.11.2011 um 20:37 schrieb Stefan Müller:

 Hi list,
 
 I just played a bit with the nice new xtables.  It seems as if \stopxtable 
 does not work if used inside a custom macro.  I get a Runaway argument 
 error with the current standalone if I uncomment \Doesnt in the following 
 example.
 
 \define\Works{\startxtable \startxrow \startxcell works \stopxcell \stopxrow}
 \define\Doesnt{\startxtable \startxrow \startxcell does not work \stopxcell 
 \stopxrow \stopxtable}
 
 \starttext
 \Works \stopxtable
 %\Doesnt
 \stoptext
 
 Did I miss something or is this a bug?

The stable environment stores the content in a buffer and you can’t
put the start and stop commands of a buffer in different commands.

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] xtables in custom macros

2011-11-03 Thread Stefan Müller
 Am 03.11.2011 um 20:37 schrieb Stefan Müller:
 
  Hi list,
  
  I just played a bit with the nice new xtables.  It seems as if
 \stopxtable does not work if used inside a custom macro.  I get a Runaway
 argument error with the current standalone if I uncomment \Doesnt in the
 following example.
  
  \define\Works{\startxtable \startxrow \startxcell works \stopxcell
 \stopxrow}
  \define\Doesnt{\startxtable \startxrow \startxcell does not work
 \stopxcell \stopxrow \stopxtable}
  
  \starttext
  \Works \stopxtable
  %\Doesnt
  \stoptext
  
  Did I miss something or is this a bug?
 
 The stable environment stores the content in a buffer and you can’t
 put the start and stop commands of a buffer in different commands.
 
 Wolfgang

I'm not sure if I understood correctly...  I don't want to put the start and 
stop commands in different commands.  In the example I want to have 
\startxtable and \stopxtable inside the same command (\Doesnt), i.e. I want a 
self-defined command that produces a complete xtable, not only the xrows.

Stefan
-- 


___
ey, leute, ich hab so lange gebraucht um mir plan a auszudenken, fragt jetzt 
doch nicht auch 
noch nach plan b!

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
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
___