[NTG-context] splitted xtable with repeating headers and placetable
Geert Dobbels
dobbels.geert at googlemail.com
Sun Apr 5 00:30:02 CEST 2020
Wolfgang,
Below is what I think is the bare minimum to explain this question
(sorry for not doing it right from the beginning...)
As I said, with the code as it is below, the header is not repeated
after the first page, but the table is in the right place.
Replacing "split=yes" by "split=repeat" makes the header repeat
correctly but puts the beginning of the table on the next page, leaving
the first page nearly completely blank.
In both cases, the "header=repeat" setting has no influence at all on
the behaviour and can be omitted without changing the results.
As I read in some other posts, sometimes putting the table in a float
can help, so I tried this (by removing the 3 "%" in the code below), but
there seems to be a conflict with the figure in the page header, and it
stops with an error message.
However, replacing the figure in the page header by a normal text
suddenly solves the problem: putting "split" in the setupfloat and
"header=repeat" in the setupxtable gives me a table with repeated
headers that starts exactly where I want it to start. Apparently in this
case, the "headers=repeat" is necessary. Unfortunately, I need a company
logo up in the page header, which is what causes the error for which I
have no explanation.
btw: I am using context standalone version: 2020.01.30 14:13
=====================================================
\setuppapersize[A4, landscape]
\setuplayout[location=middle, width=27.5cm, height=18cm,
backspace=1cm,header=4cm]
\setupcaptions[location=none]
\setupbackgrounds[header][text][background={Logos}, state=repeat]
\defineoverlay
[Logos][{
\framed[width=\textwidth, height=3cm, align=right, strut=no, offset=none]{
\framed[width=0.280\textwidth,height=3cm,align=right,]
{\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} }
\framed[width=0.430\textwidth,height=3cm,align=middle] {sometext in the
middle}
\framed[width=0.270\textwidth, height=3cm, align=middle]{sometext on the
right}
}
}]
%\setupfloat[table][default={force,split}]
\setupxtable[ option=stretch,split=repeat,header=repeat,align=middle]
\setupxtable[head][background=color,backgroundcolor=gray,foregroundcolor=red]
\starttext
Some lines of text. This text must come just before the table, but only
on the first page of the table
\def\onerow{
\startxrow
\startxcell first \stopxcell
\startxcell second \stopxcell
\startxcell third \stopxcell
\startxcell fourth \stopxcell
\startxcell fifth \stopxcell
\startxcell sixth \stopxcell
\stopxrow}
%\startplacetable
\startxtable
\startxtablehead[head]
\onerow
\stopxtablehead
\startxtablebody
\dorecurse{40}{\onerow}
\stopxtablebody
\stopxtable
%\stopplacetable
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200405/b60b32f8/attachment-0001.htm>
More information about the ntg-context
mailing list