Dear list, motivated by https://tex.stackexchange.com/questions/455484 I was trying to split a long float across several pages. It also works but instead of the caption I see “there is nothing to split” at the end of the listing. The source file documentation of \splitfloat suggests that this is intended for tabular material. Is is possible to split other material as well? Cheers, Henri --- \definefloat[listing] \starttext \startplacelisting[title={math.h},location=split] \typefile{/usr/include/math.h} \stopplacelisting \stoptext
On 10/17/2018 5:45 PM, Henri Menke wrote:
Dear list,
motivated by https://tex.stackexchange.com/questions/455484 I was trying to split a long float across several pages. It also works but instead of the caption I see “there is nothing to split” at the end of the listing. The source file documentation of \splitfloat suggests that this is intended for tabular material. Is is possible to split other material as well?
A splitter has to talk to the split mechanism ... % goes into cont-new.mkiv \unprotect \def\handlesplittext#1% {\setbox\tsplitresult\vbox {\vsplit\tsplitcontent to \dimexpr#1-\lineheight\relax}} \unexpanded\def\startsplittext {\begingroup \resettsplit \let\tsplitminimumfreelines\!!zerocount \let\tsplitminimumfreespace\!!zeropoint \let\extrasplitfloatlines \!!plusone \let\tsplitdirectsplitter \handlesplittext \setbox\tsplitcontent\vbox\bgroup \insidefloattrue} \unexpanded\def\stopsplittext {\egroup \handledirecttsplit \endgroup} \protect \usemodule[scite] \setupbodyfont[dejavu,8pt] \starttext \splitfloat {\placefigure{some caption}} {\startsplittext \typefile[option=TEX,before=,after=]{oeps.tex} \stopsplittext} \stoptext
Cheers, Henri
---
\definefloat[listing]
\starttext
\startplacelisting[title={math.h},location=split] \typefile{/usr/include/math.h} \stopplacelisting
\stoptext ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Henri Menke