From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27366 Path: news.gmane.org!not-for-mail From: nico Newsgroups: gmane.comp.tex.context Subject: Re: TABLE 'last line' tag? Date: Fri, 21 Apr 2006 22:57:27 +0200 Message-ID: References: <4447BBC9.1040607@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=----------D6bml2zgRWv6jeb4ba3WxK X-Trace: sea.gmane.org 1145653023 9997 80.91.229.2 (21 Apr 2006 20:57:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2006 20:57:03 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 21 22:57:02 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 1FX2gU-0007qp-Hz for gctc-ntg-context-518@m.gmane.org; Fri, 21 Apr 2006 22:56:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E227C126F8; Fri, 21 Apr 2006 22:56:49 +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 15382-04; Fri, 21 Apr 2006 22:56:49 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A1CE11277B; Fri, 21 Apr 2006 22:54:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C39CD1277B for ; Fri, 21 Apr 2006 22:54:54 +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 15442-04 for ; Fri, 21 Apr 2006 22:54:53 +0200 (CEST) Original-Received: from swip.net (mailfe13.tele2.fr [212.247.155.140]) by ronja.ntg.nl (Postfix) with SMTP id 17648126F8 for ; Fri, 21 Apr 2006 22:54:12 +0200 (CEST) X-T2-Posting-ID: 3brHPWvyEzVNt0QNlxQWsxGJRDYe7rueGgqwO1zxZAg= X-Cloudmark-Score: 0.000000 [] Original-Received: from [80.170.144.17] (HELO localhost) by mailfe13.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 13776790 for ntg-context@ntg.nl; Fri, 21 Apr 2006 22:54:10 +0200 Original-To: "mailing list for ConTeXt users" In-Reply-To: User-Agent: Opera M2/7.54 (FreeBSD, build 955) 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:27366 Archived-At: ------------D6bml2zgRWv6jeb4ba3WxK Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, 21 Apr 2006 12:44:45 -0700, Johannes Graumann =20 wrote: > nico wrote: > >> On Thu, 20 Apr 2006 17:27:50 -0700, Johannes Graumann >> wrote: >> >>> nico wrote: >>> >>>> Why don't you test if the attribute is set before applying it to the= =20 >>>> TR? >>>> You see the problem on the last row, but the fact is that you force = =20 >>>> the >>>> bottomframe clear for every row (which is dirty IMHO). >>> It's not that easy, since the bottomframe - once set - is persistent = =20 >>> ... >>> so >>> every row underneath my header (e.g.) will have 'bottomframe=3Don' se= t. >> >> No, the options are local to the current level where it is set. If >> bottomframe is on for one row, it won't set bottomframe to the next =20 >> rows. >> In the following example, only two rows (the header and another one in= =20 >> the >> body) have local bottomframe on, and the last row bottomframe is done = =20 >> with >> table setup: > > The persistence issue is XML specific, I believe and therefore does not > apply to your code example. It's because you systematically apply the attribute. Doing this should =20 work, even if there's maybe a smarter way of doing: \defineXMLnested [tr] [bottomframe=3D,rulethickness=3D0.5pt] {\doifelse{\XMLop{bottomframe}}{}% {\expanded{\bTR}}% {\expanded{\bTR[bottomframe=3D\XMLop{bottomframe},rulethickness=3D\XM= Lop{rulethickness}]}}} {\eTR} I attach the full example. Regards, BG ------------D6bml2zgRWv6jeb4ba3WxK Content-Disposition: attachment; filename=splittable.tex Content-Type: application/x-tex; name=splittable.tex Content-Transfer-Encoding: quoted-printable \setupcaption[table][location=3Dtop] % Fixing multipage table according to Hans Hagen: \unprotect % in core-ntb : we check the flag=20 \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=20 \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=3D\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} \protect % beware: you need to set the splitmethod to b (boxed split)=20 \defineXMLnested [splittable] { \defineXMLsave[caption] \defineXMLsave[header] \defineXMLsave[body] \defineXMLsave[footer] } { \splitfloat {\placetable[\XMLpar{table}{location}{here}][\XMLpar{table}{label}{= unknown}]{\XMLflush{caption}}} { \setupTABLE[row][first][rulethickness=3D0.90pt,topframe=3Don] \setupTABLE[row][last][rulethickness=3D0.90pt,bottomframe=3Don] \bTABLE[frame=3Doff,split=3Drepeat,splitmethod=3Db,distance=3D7.5= pt,style=3D{\switchtobodyfont[small]\setupinterlinespace[line=3D2.8ex]}] \bTABLEhead\XMLflush{header}\eTABLEhead \bTABLEbody\XMLflush{body}\eTABLEbody \bTABLEfoot\XMLflush{footer}\eTABLEfoot \eTABLE } } \defineXMLnested [tr] [bottomframe=3D,rulethickness=3D0.5pt] {\doifelse{\XMLop{bottomframe}}{}% {\expanded{\bTR}}% {\expanded{\bTR[bottomframe=3D\XMLop{bottomframe},rulethickness=3D\XML= op{rulethickness}]}}} {\eTR} \defineXMLnested [td] [rows=3D1,cols=3D1] {\expanded{\bTD[nr=3D\XMLop{rows},nc=3D\XMLop{cols}]}} {\par\eTD} \starttext \startXMLdata FFFFFFFFFFFFF FF FFFFFFFFFFFFFFFFF FFFFFFFF FFFFF FFFFFFFFF FFFFF= FFFF FFFFFFFF FFFF FF FFFFFFFFFF FFFFFFF FFFF FFFFFFFF FFF FFFFFFFF FF FF= FFFFFFF FF FFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFF FFFFFFFF FFFFFFFFFFFF= FFFFFFFFFF FFF FFFF FF FFF FFFF FFFFFFF FFFFFFFFF FFF FFFFF FF FFFFFFFF = FFFF FFFFF FFFFFFFFF FF FFFFF FFFF FFF FFFF FFFFFFFFFFFFFFF FFFFFFFFF F= FFFF FFFFFFFFFFF FFFFFFFF FFFFFFFFFFFFF FF FFFFFFFFFFFFFFFFF FFFFFFF FFFF= FFFF FFF FFFFFFFF FFF FFFFFFFF FFFFFFFFF FFFFFF FFFFFFFF FFFFFFFFFFFFFFFF= FFFFFFFFFF FFFFFFFFFFF FFFFFFFFF FFFF FFFFFFF FF FFFFF FFF FFFFFFFFFFF FF= FFF FFF FFFFFF F.
YYYYYY<= /td>YYYYYYYYY= YYYYYYYYY
XXXXXXXXXXXXXXX<= td>XXXXXX XXXXXXXXXXXXXXX<= td>XXXXXX XXXXXXXXXXXXXXX<= td>XXXXXX XXXXXXXXXXXXXXX<= td>XXXXXX XXXXXXXXXXXXXXX<= td>XXXXXX XXXXXXXXXXXXXXX<= td>XXXXXX XXXXXXXXXXXXXXX<= td>XXXXXX
\stopXMLdata \stoptext ------------D6bml2zgRWv6jeb4ba3WxK Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ------------D6bml2zgRWv6jeb4ba3WxK--