* xml table reading problem
@ 2006-04-08 1:45 Johannes Graumann
2006-04-08 11:33 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Graumann @ 2006-04-08 1:45 UTC (permalink / raw)
Hello,
Derived from the 'figure' and 'table' examples in the XML example document,
I came up with the following set of mapping rules for formating XML tables
with ConTeXt.
\defineXMLenvironment
[table]
{
\bgroup
\defineXMLpush[caption]
\defineXMLpush[content]
}
{
\placetable
[\XMLpar{table}{location}{here}]
[\XMLpar{table}{label}{unknown}]
{\XMLpop{caption}}
\ix
\bTABLE
\XMLpop{content}
\eTABLE
\x
\egroup
}
\defineXMLnested [tr] \bTR \eTR
\defineXMLnested [td] \bTD \eTD
When compiling a file with this rule set, I get the following error:
! Missing { inserted.
<to be read again>
\edef
\doifsomething #1->\edef
\!!stringa {#1}\ifx \!!stringa \empty
\expandafter ...
\switchtobodyfont [#1]->\doifsomething {#1}
{\doifdefinedelse {\??ft
\normal...
\XML:ele:/table ...nown}] {\XMLpop {caption}} \ix
\bTABLE \XMLpop
{content} ...
l.437 </table>
When switching to scroll mode, the tables come out ok, but I'm unable to use
\defineXMLenvironmentsave
[textref]
[name=]
{}
{\in{\XMLflush{textref}}[\XMLop{name}]}
to refer to them ...
Any input would be highly appreciated.
On a side note: how do I, in a document with
general '\setupinterlinespace[line=2\bodyfontsize]' switch to 'small'
interlinespace for floatcaptions (and footnotes)?
Tried '\setupcaptions[style={small
\setupinterlinespace[small]},width=\textwidth]', but that doesn't work ...
Thanks, Joh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xml table reading problem
2006-04-08 1:45 xml table reading problem Johannes Graumann
@ 2006-04-08 11:33 ` Hans Hagen
2006-04-09 18:25 ` Johannes Graumann
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-04-08 11:33 UTC (permalink / raw)
Johannes Graumann wrote:
> Hello,
>
> Derived from the 'figure' and 'table' examples in the XML example document,
> I came up with the following set of mapping rules for formating XML tables
> with ConTeXt.
>
> \defineXMLenvironment
>
\defineXMLnested
> [table]
> {
> \bgroup
> \defineXMLpush[caption]
> \defineXMLpush[content]
>
\defineXMLsave (changed name)
> }
> {
> \placetable
> [\XMLpar{table}{location}{here}]
> [\XMLpar{table}{label}{unknown}]
> {\XMLpop{caption}}
> \ix
> \bTABLE
> \XMLpop{content}
> \eTABLE
>
\expanded{\bTABLE\XMLflush{content}}\eTABLE
> \x
> \egroup
> }
> \defineXMLnested [tr] \bTR \eTR
> \defineXMLnested [td] \bTD \eTD
>
> When compiling a file with this rule set, I get the following error:
>
> ! Missing { inserted.
> <to be read again>
> \edef
> \doifsomething #1->\edef
> \!!stringa {#1}\ifx \!!stringa \empty
> \expandafter ...
>
> \switchtobodyfont [#1]->\doifsomething {#1}
> {\doifdefinedelse {\??ft
> \normal...
>
> \XML:ele:/table ...nown}] {\XMLpop {caption}} \ix
> \bTABLE \XMLpop
> {content} ...
> l.437 </table>
>
> When switching to scroll mode, the tables come out ok, but I'm unable to use
>
> \defineXMLenvironmentsave
> [textref]
> [name=]
> {}
> {\in{\XMLflush{textref}}[\XMLop{name}]}
>
> to refer to them ...
>
> Any input would be highly appreciated.
>
> On a side note: how do I, in a document with
> general '\setupinterlinespace[line=2\bodyfontsize]' switch to 'small'
> interlinespace for floatcaptions (and footnotes)?
>
> Tried '\setupcaptions[style={small
> \setupinterlinespace[small]},width=\textwidth]', but that doesn't work ...
>
> Thanks, Joh
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
--
-----------------------------------------------------------------
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xml table reading problem
2006-04-08 11:33 ` Hans Hagen
@ 2006-04-09 18:25 ` Johannes Graumann
2006-04-09 18:32 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Graumann @ 2006-04-09 18:25 UTC (permalink / raw)
Hans,
Thank you once more, but I'm just to green for this ...
\defineXMLnested
[table]
{
\bgroup
\defineXMLsave[caption]
\defineXMLsave[content]
}
{
\placetable
[\XMLpar{table}{location}{here}]
[\XMLpar{table}{label}{unknown}]
{\XMLflush{caption}}
\ix
\expanded{\bTABLE\XMLflush{content}}\eTABLE
\x
\egroup
}
Still gives me trouble:
! Missing { inserted.
<to be read again>
\edef
\doifsomething #1->\edef
\!!stringa {#1}\ifx \!!stringa \empty
\expandafter ...
\switchtobodyfont [#1]->\doifsomething {#1}
{\doifdefinedelse {\??ft
\normal...
\dogetgrouped ...nown}] {\XMLflush {caption}} \ix
\expanded {\bTABLE
\XMLflu...
l.417 </table>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xml table reading problem
2006-04-09 18:25 ` Johannes Graumann
@ 2006-04-09 18:32 ` Hans Hagen
2006-04-09 18:38 ` Johannes Graumann
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-04-09 18:32 UTC (permalink / raw)
Johannes Graumann wrote:
> Hans,
>
> Thank you once more, but I'm just to green for this ...
>
> \defineXMLnested
> [table]
> {
> \bgroup
> \defineXMLsave[caption]
> \defineXMLsave[content]
> }
> {
> \placetable
> [\XMLpar{table}{location}{here}]
> [\XMLpar{table}{label}{unknown}]
> {\XMLflush{caption}}
>
{
> \ix
> \expanded{\bTABLE\XMLflush{content}}\eTABLE
>
}
> \egroup
> }
>
-----------------------------------------------------------------
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xml table reading problem
2006-04-09 18:32 ` Hans Hagen
@ 2006-04-09 18:38 ` Johannes Graumann
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Graumann @ 2006-04-09 18:38 UTC (permalink / raw)
Hans Hagen wrote:
> {
> }
Thanks ... blush ...
Joh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-04-09 18:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-08 1:45 xml table reading problem Johannes Graumann
2006-04-08 11:33 ` Hans Hagen
2006-04-09 18:25 ` Johannes Graumann
2006-04-09 18:32 ` Hans Hagen
2006-04-09 18:38 ` Johannes Graumann
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).