From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27131 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML and Multipage table Date: Thu, 13 Apr 2006 10:46:49 +0200 Message-ID: <443E0FF9.8010505@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1144918148 17623 80.91.229.2 (13 Apr 2006 08:49:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Apr 2006 08:49:08 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 13 10:49:06 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTxVg-0002rF-IU for gctc-ntg-context-518@m.gmane.org; Thu, 13 Apr 2006 10:49:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 362271276C; Thu, 13 Apr 2006 10:49:04 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02830-01; Thu, 13 Apr 2006 10:49:03 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EFF3B12775; Thu, 13 Apr 2006 10:46:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8C0DF12775 for ; Thu, 13 Apr 2006 10:46:47 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02544-07-2 for ; Thu, 13 Apr 2006 10:46:45 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id E307F1276C for ; Thu, 13 Apr 2006 10:46:44 +0200 (CEST) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 12426 for ; Thu, 13 Apr 2006 12:46:44 +0400 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:27131 Archived-At: Johannes Graumann wrote: > Hello, > > Does anybody have an insight into why a table created with the following > mapping rule for XML code does not present it's caption and is not split? > > Thanks Joh > > \defineXMLnested > [table] > {\bgroup > \defineXMLsave[caption] > \defineXMLsave[header] > \defineXMLsave[body] > %\defineXMLnested[header]{\bTABLEhead} {\eTABLEhead} > %\defineXMLnested[body] {\bTABLEbody} {\eTABLEbody} > \placetable > [\XMLpar{table}{location}{here}] > [\XMLpar{table}{label}{unknown}] > {\XMLflush{caption}} > \bgroup > > \setupTABLE[frame=off,split=repeat,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}] > > \framed[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=0.75pt] > \bgroup \bTABLE[distance=7.5pt] > \bTABLEhead > \XMLflush{header} > \eTABLEhead > \bTABLEbody > \XMLflush{body} > \eTABLEbody > \bTABLEfoot\eTABLEfoot > } > {\eTABLE > \egroup > \egroup > \egroup} > first of all, putting a \framed around it makes it unsplittable; best use the framed options that come with the floats second, there's a problem in signaling the splitter, which demands a patch \unprotect % in core-ntb : we check the flag \def\splittblbox#1% {\ifinsidesplitfloat \donetrue \else\ifinsidefloat \donefalse \else \donetrue \fi\fi \ifdone \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}% \else \notsplittblbox{#1}% \fi} % in page-flt : we add a flag \newif\ifinsidesplitfloat % will become chardef \def\dosplitfloat[#1]#2% nog dubbele refs {\ifinsidecolumns % tzt ook nog figuren splitten % not yet supported \else \bgroup \insidefloattrue \insidesplitfloattrue \getparameters[\??si][#1]% \resetnumber[\??si]% \def\floatcaptionsuffix{\convertednumber[\??si]}% \TABLEcaptionheight\@@silines\lineheight % brrr \simplifypagebreak % \page becomes \goodbreak \dowithnextbox {\forgetall \dontcomplain \doloop {\setbox2\vsplit\nextbox to \lineheight \setbox2\vbox{\unvbox2} \ifdim\ht2>\lineheight \incrementnumber[\??si]% \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint \let\floatcaptionsuffix\empty \fi \fi \bgroup #2{\unvbox2} \egroup \ifdim\nextboxht>\zeropoint \page \decrementnumber[\floatcaptionnumber]% \fi \fi \ifdim\nextboxht>\zeropoint\else \expandafter\exitloop \fi}% \egroup} \vbox \fi} % beware: you need to set the splitmethod to b (boxed split) \starttext \splitfloat {\placetable{test}} {\bTABLE[split=repeat,splitmethod=b] \dorecurse{100}{\bTR \bTD test \eTD \eTR} \eTABLE} \stoptext this whole splitting has to be revised (although a two way singaling is not that trivial here) Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------