How to avoid that \writetolist becomes a page-breaker
Probably due to my abuse of \writetolist, I noticed that inserting \writetolist right after \subject makes TeX to think that it can break the page there without problems. See the following minimal example: %===============cut here============= \definelist[myrandompart] \starttext \dorecurse{12}{ \input reich } \subject{\bf Wrong!} \writetolist[myrandompart]{It's a test} \input knuth \page \dorecurse{12}{ \input reich } \subject{\bf Correct!} %\writetolist[myrandompart]{It's a test} \input knuth %===============cut here============= I'm pretty sure the solution is out there. Some hints would be very welcome. Thanks in advance -- Marco
Marco Pessotto
Probably due to my abuse of \writetolist, I noticed that inserting \writetolist right after \subject makes TeX to think that it can break the page there without problems.
See the following minimal example:
%===============cut here=============
\definelist[myrandompart]
\starttext
\dorecurse{12}{ \input reich } \subject{\bf Wrong!} \writetolist[myrandompart]{It's a test}
\input knuth
\page
\dorecurse{12}{ \input reich } \subject{\bf Correct!} %\writetolist[myrandompart]{It's a test}
\input knuth
%===============cut here=============
I'm pretty sure the solution is out there. Some hints would be very welcome.
Thanks in advance
To answer to my own question, it looks like that \subject{\bf My title!} \dontleavehmode \writetolist[myrandompart]{}{It's a test} works. The question if is this the right thing to do, still remains, though -- Marco
On 14-12-2010 10:32, Marco Pessotto wrote:
\subject{\bf My title!} \dontleavehmode \writetolist[myrandompart]{}{It's a test}
works. The question if is this the right thing to do, still remains, though
it's quite ok as long as you realize that it introduces 'something' in the text stream, so xxx \dontleavehmode\writetolist[myrandompart]{}{It's a test} xxx is actually: xxx [something written to a list] xxx so when whitespace is setup, in some cases you can get some extra also, the [something ...] can end up on the current page or the next one, depending on the circumstances in practice it's no real problem as one will do explicit writes inside boxes or so ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 14-12-2010 9:00, Marco Pessotto wrote: \doneleavehmode \writetolist[myrandompart]{It's a test} \input knuth i.e. just bind the write to some text ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen
On 14-12-2010 9:00, Marco Pessotto wrote:
\doneleavehmode \writetolist[myrandompart]{It's a test} \input knuth
i.e. just bind the write to some text
Thanks for your answer. I'm on my way to the wiki :-) -- Marco
participants (2)
-
Hans Hagen
-
Marco Pessotto