ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Splitting a float that isn't a table
@ 2006-11-03 16:13 Duncan Hothersall
  2006-11-03 18:01 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Duncan Hothersall @ 2006-11-03 16:13 UTC (permalink / raw)


I define a floating block called Exhibit

\definefloat[Exhibit][table]

which just contains paragraphs of text. I'd like to be able to split it
using the \splitfloat mechanism but that only seems to work if the
content of the float is a table, not paragraphs.

----
\definefloat[Exhibit][table]
\starttext
\input tufte\par
\splitfloat[lines=auto]{\placeExhibit{Knuth}}
{\dorecurse{4}{\input knuth \par}}
\input tufte\page[yes]
\stoptext
----

This outputs "there is nothing to split" in the resultant PDF.

Is there any way to achieve the equivalent of

----
\definefloat[Exhibit][table]
\starttext
\input tufte\par
\splitfloat[lines=auto]{\placeExhibit{Knuth}}
{\bTABLE[frame=off]\dorecurse{4}{\bTR\bTD\input knuth \eTD\eTR}
\eTABLE}
\input tufte\page[yes]
\stoptext
----

without having to make every paragraph a table cell?

Thanks in advance.

Duncan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Splitting a float that isn't a table
  2006-11-03 16:13 Splitting a float that isn't a table Duncan Hothersall
@ 2006-11-03 18:01 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2006-11-03 18:01 UTC (permalink / raw)


Duncan Hothersall wrote:
> I define a floating block called Exhibit
>
> \definefloat[Exhibit][table]
>
> which just contains paragraphs of text. I'd like to be able to split it
> using the \splitfloat mechanism but that only seems to work if the
> content of the float is a table, not paragraphs.
>
> ----
> \definefloat[Exhibit][table]
> \starttext
> \input tufte\par
> \splitfloat[lines=auto]{\placeExhibit{Knuth}}
> {\dorecurse{4}{\input knuth \par}}
> \input tufte\page[yes]
> \stoptext
> ----
>
> This outputs "there is nothing to split" in the resultant PDF.
>
> Is there any way to achieve the equivalent of
>
> ----
> \definefloat[Exhibit][table]
> \starttext
> \input tufte\par
> \splitfloat[lines=auto]{\placeExhibit{Knuth}}
> {\bTABLE[frame=off]\dorecurse{4}{\bTR\bTD\input knuth \eTD\eTR}
> \eTABLE}
> \input tufte\page[yes]
> \stoptext
> ----
>
> without having to make every paragraph a table cell?
>
>   
for simple texts:

\def\startsometext
  {\beginshapebox}

\def\stopsometext
  {\endshapebox
   \reshapebox{\ruledhbox{\strut\box\shapebox}}
   \setbox\tsplitcontent\vbox{\flushshapebox}
   \handletsplit}

\starttext

\input tufte

\splitfloat
  [lines=auto]
  {\placefigure{}}
  {\startsometext
   \dorecurse{4}{\input knuth \par}
   \stopsometext}

\input tufte

\showframe

\splitfloat
  [lines=auto]
  {\placefigure{}}
  {\starttabulate[|p|]
   \NC \dorecurse{4}{\input knuth }\NC\NR
   \stoptabulate}

\starttabulate[|p|]
\NC \input knuth \NC\NR
\stoptabulate

\stoptext

wikifyable (hm, could even be a nice article ...) 

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] 2+ messages in thread

end of thread, other threads:[~2006-11-03 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-03 16:13 Splitting a float that isn't a table Duncan Hothersall
2006-11-03 18:01 ` 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).