ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Testpage with extras
@ 2014-01-30  9:37 "H. Özoguz"
  2014-01-30 11:23 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: "H. Özoguz" @ 2014-01-30  9:37 UTC (permalink / raw)
  To: ntg-context

Hi there,

I asked a similar question before, but I try it again (in a bit 
different way):

The command \testpage[n] Paragraph sets the next paragraph on the next 
page, if there are less than n lines left on the current page. I use 
this command very often, but need it with some extension: If \testpage 
is "active" (meaning, there are indeed less than n lines left), then it 
should not only input an pagebreak, but also some other command.

E.g.: somewhat like \testpage[n,{\noindentation}] should add 
"\noindentation" before the paragraph, if and only if, there are less 
than n lines left. Or maybe: "\testpage[n, {TESTPAGE IS ACTIV}" to 
simply add this text infront of the next paragraph (of course the first 
one is more interesting).

At the moment I use \testpage[n]\noindentation but that fails, if the 
document has changed and there are >= n lines left => no pagebreak, but 
still \noindentation of course - but they only should act simultaneously.

Is that possible in some way?

Best regards!
Huseyin
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Testpage with extras
@ 2014-01-30 11:34 "H. Özoguz"
  2014-01-30 21:23 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: "H. Özoguz" @ 2014-01-30 11:34 UTC (permalink / raw)
  To: ntg-context

> use case needed

Here two cases to compare:

1.

\setupindenting[yes, 9pt, first]
\starttext
\noindentation\input knuth\\
\input knuth\blank \noindentation
\input knuth
\testpage[35]\noindentation\input knuth
\stoptext

2.

\setupindenting[yes, 9pt, first]
\starttext
\noindentation\input knuth\\
\input knuth\blank \noindentation
\input knuth
\testpage[10]\noindentation\input knuth
\stoptext

In the second case the testpage is not active, but the "noindentation" 
(the one right after it) still is (correct bahavior of course). But I 
want to link this "testpage" and this "noindentation" with each other, 
s.t. both are active, if the line-criterion is true, and both are not 
acting, if not. That is, what I meant with "\testpage[n,noindentation]".

Could I make it clear now?

Huseyin
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-01 11:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30  9:37 Testpage with extras "H. Özoguz"
2014-01-30 11:23 ` Hans Hagen
2014-01-30 11:34 "H. Özoguz"
2014-01-30 21:23 ` Hans Hagen
2014-01-31  9:46   ` Keith J. Schultz
2014-01-31 10:18     ` Hans Hagen
2014-02-01  9:15       ` Keith J. Schultz
2014-02-01 11:03         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).