ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* 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

* Re: Testpage with extras
  2014-01-30 11:34 Testpage with extras "H. Özoguz"
@ 2014-01-30 21:23 ` Hans Hagen
  2014-01-31  9:46   ` Keith J. Schultz
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2014-01-30 21:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 1/30/2014 12:34 PM, "H. Özoguz" wrote:
>> 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?

new in beta .... please wikify ...

\definepagechecker
   [whatever]
   [lines=35,
    voffset=10pt,
    before={\vfill\wordright{(see next page)}\par},
    after=\noindentation]

\setupindenting[yes,9pt,first]

\starttext
     \noindentation
     \input knuth\par
     \input knuth\par
     \noindentation
     \input knuth\par
     \checkpage[whatever]
     \input knuth\par
     \input knuth\par
\stoptext

... i assume that others (read: Wolfgang) will check if the old testpage 
is compatible -)

Hans

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


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

* Re: Testpage with extras
  2014-01-30 21:23 ` Hans Hagen
@ 2014-01-31  9:46   ` Keith J. Schultz
  2014-01-31 10:18     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Keith J. Schultz @ 2014-01-31  9:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2464 bytes --]

Hi Hans,

Personally, I find the names used sub-optimal!

I would think something like conditionalbreak or conditionalpagebreak
would be better and verbose.

Other names could be ifpagelength, ifpagelengthstill, leftonpage, or something
similar. 

I assume you have implemented checkpage as an added layer on top
of testpage! 

At least the test is if X lines left on page or still fit on page!

I also have a question. Are the commands setuppagechecker sothat 

\definepagechecker[whatever]

\setuppagechecker[whatever]
 [lines=35,
  voffset=10pt,
  before={\vfill\wordright{(see next page)}\par},
  after=\noindentation]

and also

\checkpage [lines=35,
  voffset=10pt,
  before={\vfill\wordright{(see next page)}\par},
  after=\noindentation]

Question: what is the voffset used for? Line height? If so then a better name for this
would be nice, too!

regards
	Keith.

Am 30.01.2014 um 22:23 schrieb Hans Hagen <pragma@wxs.nl>:
[snip, snip]
> new in beta .... please wikify ...
> 
> \definepagechecker
>  [whatever]
>  [lines=35,
>   voffset=10pt,
>   before={\vfill\wordright{(see next page)}\par},
>   after=\noindentation]
> 
> \setupindenting[yes,9pt,first]
> 
> \starttext
>    \noindentation
>    \input knuth\par
>    \input knuth\par
>    \noindentation
>    \input knuth\par
>    \checkpage[whatever]
>    \input knuth\par
>    \input knuth\par
> \stoptext
> 
> ... i assume that others (read: Wolfgang) will check if the old testpage is compatible -)
> 
> Hans
> 
> -----------------------------------------------------------------
>                                          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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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-31  9:46   ` Keith J. Schultz
@ 2014-01-31 10:18     ` Hans Hagen
  2014-02-01  9:15       ` Keith J. Schultz
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2014-01-31 10:18 UTC (permalink / raw)
  To: ntg-context

On 1/31/2014 10:46 AM, Keith J. Schultz wrote:

> Personally, I find the names used sub-optimal!

we had testpage and that one stays anyway and checkpage is close to that 
(overloading testpage with a new syntax is messy)

> I would think something like conditionalbreak or conditionalpagebreak
> would be better and verbose.

the new check command could evolve in more than break .. in fact it just 
checks and then does some action (not per se a break)

> Other names could be ifpagelength, ifpagelengthstill, leftonpage, or
> something similar.

one can say

\definepagechecker[leftonpage]

and then use it like

\chechpage[leftonpage]

> I assume you have implemented checkpage as an added layer on top
> of testpage!

no, the reverse

> At least the test is if X lines left on page or still fit on page!
>
> I also have a question. Are the commands setuppagechecker sothat
>
> \definepagechecker[whatever]
>
> \setuppagechecker[whatever]
>   [lines=35,
>    voffset=10pt,
>    before={\vfill\wordright{(see next page)}\par},
>    after=\noindentation]
>
> and also
>
> \checkpage [lines=35,
>    voffset=10pt,
>    before={\vfill\wordright{(see next page)}\par},
>    after=\noindentation]

in that case you use those values, while

\checkpage
   [whatever]
   [lines=12]

would overload given whatever values

  > Question: what is the voffset used for? Line height? If so then a 
better
> name for this
> would be nice, too!

it's 'offset' ... and it's like the second argument of testpage (i can't 
think of another key so i've chosen one that already is part of context, 
which has advantages)

> regards
> Keith.
>
> Am 30.01.2014 um 22:23 schrieb Hans Hagen <pragma@wxs.nl
> <mailto:pragma@wxs.nl>>:
> [snip, snip]
>> new in beta .... please wikify ...
>>
>> \definepagechecker
>>  [whatever]
>>  [lines=35,
>>   voffset=10pt,
>>   before={\vfill\wordright{(see next page)}\par},
>>   after=\noindentation]
>>
>> \setupindenting[yes,9pt,first]
>>
>> \starttext
>>    \noindentation
>>    \input knuth\par
>>    \input knuth\par
>>    \noindentation
>>    \input knuth\par
>>    \checkpage[whatever]
>>    \input knuth\par
>>    \input knuth\par
>> \stoptext
>>
>> ... i assume that others (read: Wolfgang) will check if the old
>> testpage is compatible -)
>>
>> Hans
>>
>> -----------------------------------------------------------------
>>                                          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
>> <http://www.pragma-ade.com/>
>>                                             |www.pragma-pod.nl
>> <http://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 <mailto: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
>> ___________________________________________________________________________________
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

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


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

* Re: Testpage with extras
  2014-01-31 10:18     ` Hans Hagen
@ 2014-02-01  9:15       ` Keith J. Schultz
  2014-02-01 11:03         ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Keith J. Schultz @ 2014-02-01  9:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2082 bytes --]

Hi Hans,

how about the \ifleftonpage, or something like that?

Just trying to have the name of the command more literate.

Of course if the conditional part is to be expanded to something
more elaborate then pagechecker would be fine!

regards
	Keith.

Am 31.01.2014 um 11:18 schrieb Hans Hagen <pragma@wxs.nl>:

> On 1/31/2014 10:46 AM, Keith J. Schultz wrote:
> 
>> Personally, I find the names used sub-optimal!
> 
> we had testpage and that one stays anyway and checkpage is close to that (overloading testpage with a new syntax is messy)
> 
>> I would think something like conditionalbreak or conditionalpagebreak
>> would be better and verbose.
> 
> the new check command could evolve in more than break .. in fact it just checks and then does some action (not per se a break)
> 
>> Other names could be ifpagelength, ifpagelengthstill, leftonpage, or
>> something similar.
> 
> one can say
> 
> \definepagechecker[leftonpage]
> 
> and then use it like
> 
> \chechpage[leftonpage]
> 
>> I assume you have implemented checkpage as an added layer on top
>> of testpage!
> 
> no, the reverse
> 
>> At least the test is if X lines left on page or still fit on page!
>> 
>> I also have a question. Are the commands setuppagechecker sothat
>> 
>> \definepagechecker[whatever]
>> 
>> \setuppagechecker[whatever]
>>  [lines=35,
>>   voffset=10pt,
>>   before={\vfill\wordright{(see next page)}\par},
>>   after=\noindentation]
>> 
>> and also
>> 
>> \checkpage [lines=35,
>>   voffset=10pt,
>>   before={\vfill\wordright{(see next page)}\par},
>>   after=\noindentation]
> 
> in that case you use those values, while
> 
> \checkpage
>  [whatever]
>  [lines=12]
> 
> would overload given whatever values
> 
> > Question: what is the voffset used for? Line height? If so then a better
>> name for this
>> would be nice, too!
> 
> it's 'offset' ... and it's like the second argument of testpage (i can't think of another key so i've chosen one that already is part of context, which has advantages)

[snip, snip]

[-- Attachment #1.2: Type: text/html, Size: 3170 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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-02-01  9:15       ` Keith J. Schultz
@ 2014-02-01 11:03         ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2014-02-01 11:03 UTC (permalink / raw)
  To: ntg-context

On 2/1/2014 10:15 AM, Keith J. Schultz wrote:
> Hi Hans,
>
> how about the \ifleftonpage, or something like that?

\if....

is reserved for 'real' ifs

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


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

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

On 1/30/2014 10:37 AM, "H. Özoguz" wrote:
> 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?

use case needed

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


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

* 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

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 11:34 Testpage with extras "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
  -- strict thread matches above, loose matches on Subject: below --
2014-01-30  9:37 "H. Özoguz"
2014-01-30 11:23 ` 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).