Re: [NTG-context] How to avoid that \writetolist becomes a page-breaker

2010-12-15 Thread Hans Hagen

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
-
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to avoid that \writetolist becomes a page-breaker

2010-12-15 Thread 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

-
  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
-
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to avoid that \writetolist becomes a page-breaker

2010-12-15 Thread Marco Pessotto
Hans Hagen pra...@wxs.nl writes:

 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

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] How to avoid that \writetolist becomes a page-breaker

2010-12-14 Thread 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

-- 
Marco

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to avoid that \writetolist becomes a page-breaker

2010-12-14 Thread Marco Pessotto
Marco Pessotto melmo...@gmail.com writes:

 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

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___