* XML and Multipage table
@ 2006-04-13 3:56 Johannes Graumann
2006-04-13 8:46 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Graumann @ 2006-04-13 3:56 UTC (permalink / raw)
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}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: XML and Multipage table
2006-04-13 3:56 XML and Multipage table Johannes Graumann
@ 2006-04-13 8:46 ` Hans Hagen
2006-04-19 5:46 ` Johannes Graumann
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2006-04-13 8:46 UTC (permalink / raw)
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: XML and Multipage table
2006-04-13 8:46 ` Hans Hagen
@ 2006-04-19 5:46 ` Johannes Graumann
2006-04-19 7:19 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Graumann @ 2006-04-19 5:46 UTC (permalink / raw)
Hans Hagen wrote:
> first of all, putting a \framed around it makes it unsplittable; best use
> the framed options that come with the floats
Ok.
> second, there's a problem in signaling the splitter, which demands a patch
Please excuse my ignorance: can I add these patches just to my *.ctx file or
do I have to edit the actual distributed file? If the latter is true: is it
(in the case of 'core-ntb') './tex/context/base/core-ntb.tex' or
'/base/core-ntb.tex' that need to be edited? How about 'page-flt'? Do I have
to edit './tex/context/base/page-flt.tex' or './base/page-flt.tex'? Do I
have to call 'texexec --make' afterwards?
Sorry for my novice-ness,
Joh
>
> \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
> -----------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: XML and Multipage table
2006-04-19 5:46 ` Johannes Graumann
@ 2006-04-19 7:19 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2006-04-19 7:19 UTC (permalink / raw)
Johannes Graumann wrote:
>> ing the splitter, which demands a patch
>>
> Please excuse my ignorance: can I add these patches just to my *.ctx file or
>
what's a ctx file? not your source i presume? texexec looks for ctx
files, being xml files, in order to know what pre/postprocessing is needed
> do I have to edit the actual distributed file? If the latter is true: is it
>
normally cont-new.tex but you can also take the current beta
-----------------------------------------------------------------
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] 4+ messages in thread
end of thread, other threads:[~2006-04-19 7:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-13 3:56 XML and Multipage table Johannes Graumann
2006-04-13 8:46 ` Hans Hagen
2006-04-19 5:46 ` Johannes Graumann
2006-04-19 7:19 ` Hans Hagen
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).