2007/9/7, William S.
Hello,
I am wondering if the float numbers can be reused for floats that are longer than a page. I use floats that contain program segments (source code) for a project report for my university studies.
The guidelines specify that captions for code which is longer than one page or crosses page boundaries should be reprinted and the title changed to (continued).
example:
Program Segment 1.1: Hello World #include
main() { ...on next page...
Program Segment 1.1: (continued) printf("hello world!\n"); }
Can someone help me do this in ConTeXt? I think I can do the splitting of the code myself if needed, but I don't know how to reuse the float number. Currently this is how I define the float:
\definetyping[Program][blank=halfline] \definefloat[ProgramSegment][ProgramSegments] \setupcaption[ProgramSegment][location=top,align=right,headstyle=bold,style=bold,inbetween={}] \setuplabeltext[en][ProgramSegment=Program Segment ]
And I use it like this: \placeProgramSegment[here]{Hello World} { \startProgram main() { printf("hello world!\n"); } \stopProgram }
Any help will be appreciated.
Thanks, William.
you can start with the following example from Hans. \definefloat[Exhibit][table] \starttext \input tufte\par \splitfloat[lines=auto]{\placeExhibit{Knuth}} {\dorecurse{4}{\input knuth \par}} \input tufte\page[yes] \stoptext Wolfgang