From: Hans Hagen <pragma@wxs.nl>
Subject: table splitting
Date: Sat, 14 Aug 1999 12:38:53 +0200 [thread overview]
Message-ID: <37B5473D.8F1E882E@wxs.nl> (raw)
Hi Wybo,
You problem was relatex to an asynchronous \pagegoal (primitive tex
dimension) combined with the fact that a par entry in a table was not
taken into account in height calculations (it was considered to be a
line). BTW, as long as you don't use vertical rules, \starttabulate is
the better alternative).
Now, here we go:
%%%%%%%%%%%% don't use [top] here
\dorecurse{160}{Just some text before the float. }
\startpostponing
\splitfloat
{\placefigure{this is a floating table}}
{\starttables[|lp(50mm)|l|]
\NC \startitemize[packed]
\item first item
\item second item
\item third item
\item last item
\stopitemize \NC right column text \NC\MR
\NC left column text \NC right column text \NC\MR
etc etc
%%%%%%%%%%% add this (all of it!) to cont-new.tex %%%%% make sure it's
surrounded by
\unprotect
\protect
%%%%%%%%% Hack for Wybo:
\def\douitstellen%
{\the\everytopofpage
\ifinuitstellen\else\ifcase\nofpostponedblocks\else % The \nof-test
is
\global\pagetotal\!!zeropoint % recently added
\global\inuitstellentrue % definitely
needed
\dorecurse{\nofpostponedblocks} % else we can
loose
{\haalbuffer[buf-\recurselevel]} % or disorder
floats
\doflushfloats % new but potential dangerous % and that is
something
\doglobal\newcounter\nofpostponedblocks % we don't want,
do we?
\global\inuitstellenfalse % Anyhow,
'uitstellen'
\fi\fi} % is still
suboptimal.
\newdimen\TABLEparheight
% adapted table macros
\def\BeginTableParBox#1%
{\setbox\scratchbox=\vtop\bgroup % \setbox added
\hsize=#1
\normalbaselines
\let~=\!ttTie
\let\-=\!ttDH
\blanko[\v!blokkeer] % added
\the\EveryTableParBox}
\def\EndTableParBox%
{\removelastskip % added
%\MakeStrut{0pt}{\StrutDepthFactor\StrutUnit} % removed
\egroup % finishes the \vtop begun by \BeginTableParbox
\getboxheight\scratchdimen\of\box\scratchbox\relax % added
\ifdim\scratchdimen>\TABLEparheight % added
\global\TABLEparheight=\scratchdimen % added
\fi % added
\box\scratchbox}
%
\def\handleTABLEbreak#1#2%
{\ifsplittables
\setbox0=\hbox{\AugmentedTableStrut{#1}{#2}}%
\getboxheight\dimen0\of\box0\relax
\ifdim\TABLEparheight>\dimen0 % new
\dimen0=\TABLEparheight % new
\global\TABLEparheight=\!!zeropoint % new
\fi % new
\ifTABLEgrayline \else
\global\advance\TABLEheight by \dimen0
\fi
\ifTABLEinbreak
\global\let\beforeTABLEline=\empty
\gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
\else
\dimen2=\TABLEheight
\advance\dimen2 by \dp\strutbox
\advance\dimen2 by \TABLEtailheight
\advance\dimen2 by \TABLEcaptionheight
\advance\dimen2 by \lineheight % we're ahead
\ifdim\dimen2>\TABLEmaxheight
\gdef\beforeTABLEline%
{\setTABLEforce\TABLEforcelastrow}%
\gdef\afterTABLEline%
{\TABLEnoalign
{\nobreak
\global\TABLEinbreaktrue}%
\TABLEtail
\TABLEnoalign
{\goodbreak
\calculatemaxTABLEheight\nocalculatemaxTABLEheight
\removeTABLEtopskip
\setTABLEaction\TABLEunknown
\setTABLEforce \TABLEunknown}%
\TABLEhead
\TABLEnoalign
{\nobreak
\global\TABLEinbreakfalse
\setTABLEforce\TABLEforcefirstrow}}%
\else
\global\let\beforeTABLEline=\empty
\gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
\fi
\fi
\else
\global\let\beforeTABLEline=\empty
\gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
\fi}
This should work (it does 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.nl
-----------------------------------------------------------------
next reply other threads:[~1999-08-14 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-14 10:38 Hans Hagen [this message]
1999-08-15 10:18 ` Wybo Dekker
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=37B5473D.8F1E882E@wxs.nl \
--to=pragma@wxs.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).