Karsten Heymann wrote:
> Hello Hans,
>
> Hans Hagen wrote:
>
>> if a float is too wide it will be moved around; wide floats spanning
>> columns and text flowing around it is not one of the strong points of
>> normal columns
>>
>
> At least I didn't overlook something simple :)
>
> Is there any easy fix to prevent the "table" from disapperaring when I
> uncomment the \input knuth?
>
> % -*- mode: context; coding: latin-9-unix; -*-
>
> \setuplayout [grid=yes]
>
> \definecolumnset[example]
> \setupfloat[table][width=\makeupwidth]
>
> \starttext
> \startcolumnset[example]
>
> \input knuth
> %\input knuth
>
> \placetable{Tabelle}
> \framed[width=\makeupwidth,height=4cm]{Hallo}
>
> \input knuth
>
> \input knuth
>
> \stopcolumnset
> \stoptext
>
>
well, you can't blame knuth for that one ... the problem is that the
graphix is oved to a next page already but that page has no content
\unprotect
\def\OTRSETflushleftovers
{\OTRSETdoifcellelse{1}{1}
{\bgroup
\OTRSETcentergridcells
\chardef\OTRSETbalancemethod\plusone
\OTRSETreducegridbox
\global\setbox\OTRfinalpagebox\OTRSETmakegridbox
\global\ht\OTRfinalpagebox\textheight % signals output
\OTRSETdofinaloutput
\globallet\OTRSETbalht\zeropoint
\egroup}
{}}
\def\stopcolumnset
{\relax
\ifnum\columnsetlevel=\plusone
\endgraf % needed, else wrong vsize in one par case
\global\chardef\OTRSETfinish\plusone
% no, extra page \pagebreak % (test on pascal toc)
\dostopcolumnset
\egroup
\global\notelimittrue % brrr, untested and fuzzy
\setvsize
\sethsize
\ifvoid\OTRfinalpagebox\else
% probably balanced
\ifdim\ht\OTRfinalpagebox<\textheight
\snaptogrid[\v!page]\hbox{\box\OTRfinalpagebox}%
\else
\box\OTRfinalpagebox
\fi
\fi
\global\chardef\OTRSETfinish\zerocount
\ifsomefloatwaiting \setvsize \pagebreak \setvsize \fi
\OTRSETflushleftovers %% ADDED
\else
\egroup
\fi
\decrement\columnsetlevel\relax}
\protect
\setuplayout[grid=yes] \definecolumnset[example] \showgrid
\starttext
\startcolumnset[example]
\input knuth \endgraf \input knuth
\placetable
{Tabelle}
{\framed[width=\makeupwidth,height=4cm]{Hallo}}
\input knuth \endgraf \input knuth
\stopcolumnset
\input knuth \endgraf \input knuth
\stoptext
-----------------------------------------------------------------
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
-----------------------------------------------------------------
_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context