ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Johannes Graumann <johannes_graumann@web.de>
Subject: xml table reading problem
Date: Fri, 07 Apr 2006 18:45:40 -0700	[thread overview]
Message-ID: <e174qf$8km$1@sea.gmane.org> (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

             reply	other threads:[~2006-04-08  1:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-08  1:45 Johannes Graumann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e174qf$8km$1@sea.gmane.org' \
    --to=johannes_graumann@web.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).