ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Johannes Graumann <johannes_graumann@web.de>
Subject: Split Table Desperation - again!
Date: Wed, 21 Jun 2006 15:22:47 -0700	[thread overview]
Message-ID: <e7cgsj$51e$1@sea.gmane.org> (raw)

Hello,

While the recent modifications to the split table mechanisms provided by
Hans help me out with my most annoying monster table using the XML mapping
code below (see
http://www.idyll.org:8081/JohSite/context/p46-50_split_working.pdf/view for
the typeset table; clearly to much whitespace, but everything is typeset
and page boundaries are honored) and several other -smaller- tables in the
same tome (see
http://www.idyll.org:8081/JohSite/context/p45_unsplit_working.pdf/view for
a typeset example), one medium-sized table that clearly should not be split
gets split none the less (see
http://www.idyll.org:8081/JohSite/context/p162-163_unnecessary_split.pdf/view) ...
and I have no idea why.

Puzzled and helpless, Joh

XML mapping code:

% 'table' - table definition
\defineXMLnested
  [table]
  [lines=auto]
  {
    \defineXMLsave[floattitle]
    \defineXMLsave[caption]
    \defineXMLsave[header]
    \defineXMLsave[body]
    \defineXMLsave[footer]
  }
  {
    \splitfloat[lines=\XMLop{lines}]
      {
        \expanded{%
          \placetable
            [\XMLpar{table}{location}{}]
            [\XMLpar{table}{label}{unknown}]
            {\select{caption}{\XMLflush{floattitle}
{{\bf\XMLflush{floattitle}} \XMLflush{caption}}}
        }
      }
      {
        \setupTABLE[row][1][topframe=on]
        \setupTABLE[row][last][bottomframe=on]
\bTABLE[frame=off,split=repeat,splitmethod=b,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
          \bTABLEhead\XMLflush{header}\eTABLEhead
          \bTABLEbody\XMLflush{body}\eTABLEbody
          \bTABLEfoot\XMLflush{footer}\eTABLEfoot
        \eTABLE
      }
  }

% 'td' - table cell definition defaulting to single row/column, automatic
width determination, left alignment
\defineXMLnested
  [td]
  [rows=1,cols=1,width=,bottomframe=,topframe=,align=right]
  {
    \doifelse{\XMLop{width}}{}%
      {
        \doifelse{\XMLop{bottomframe}}{}%
          {
            \doifelse{\XMLop{topframe}}{}%
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols}]}}
             
{\expanded{\bTD[align=\XMLop{align},topframe=\XMLop{topframe},nr=\XMLop{rows},nc=\XMLop{cols}]}}
          }
          {
            \doifelse{\XMLop{topframe}}{}%
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},bottomframe=\XMLop{bottomframe}]}}
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},bottomframe=\XMLop{bottomframe},topframe=\XMLop{topframe}]}}
          }
      }
      {
        \doifelse{\XMLop{bottomframe}}{}%
          {
            \doifelse{\XMLop{topframe}}{}%
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width}]}}
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width},topframe=\XMLop{topframe}]}}
          }
          {
            \doifelse{\XMLop{topframe}}{}%
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width},bottomframe=\XMLop{bottomframe}]}}
             
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width},bottomframe=\XMLop{bottomframe},topframe=\XMLop{topframe}]}}
          }
      }
  }
  {\par\eTD}

% 'tr' - table row definition, defaulting to no bottomframe
\defineXMLnested
  [tr]
  [bottomframe=,rulethickness=0.5pt]
  {\doifelse{\XMLop{bottomframe}}{}%
    {\expanded{\bTR}}%
   
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
  }
  {\eTR}

             reply	other threads:[~2006-06-21 22:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21 22:22 Johannes Graumann [this message]
2006-06-22  8:23 ` Hans Hagen

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='e7cgsj$51e$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).