I have a section of text that contains several paragraphs, enumerated lists and possibly small tables (3 or 4 rows maximum), and where this section of text crosses a page boundary I'd like to put “continued…” at the bottom of the page and “…continued” at the top of the next page.
What I have so far is:
- Put it all into a
\vbox - Work out how much space is left on the page using
\textheight-\pagetotal(and subtract a little but more for the “continued…” text) \vsplitthe vbox based on the above calculation (or place the entire vbox if it will fit on the page and then “exit”).- Put the split box on the page, then the “continued…” text, then put “…continued” on the next page.
- Repeat steps 2–4.
This seems to work but it doesn't split the text in very nice places. In some cases it splits I can post code if necessary but I'll have to try and clean it up first or you'll get nightmares.
I was just wondering if there was a simpler (or even built-in way) to do this in ConTeXt. I am trying to automate the production of some documents using ConTeXt but the specification that I have to match is unfortunately very strict (and ugly).
\startat the begin of the section and\stopat the end of it, now you can use\setupfootertextsto set a different text for the footer which appears only when there is a page break in this group. – Wolfgang Schuster Jul 23 '15 at 20:53\startand\stopblock, then I get "...continued" at the top of a page whenever there is also a "continued..." at the bottom of the page, which means, there are erroneous "...continued" appearing at the top of the page even though "...continued" was not supposed to appear until the next page. Am I making sense? – dreamlax Dec 18 '15 at 10:24\pagetotalvalue never seems to be very reliable, it seems I am battling TeX's paragraph building routine or something, as sometimes\pagetotalgives the expected value, but other times, it is as if most of the content has not yet been placed on the page (speaking of which, is there any way to force TeX to do this?). – dreamlax Dec 18 '15 at 10:38