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
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
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
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 -----------------------------------------------------------------
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
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> <b>Three</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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
participants (4)
-
"Stefan Müller"
-
Hans Hagen
-
Thomas A. Schmitz
-
Wolfgang Schuster