ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* no pagenumber depending of number of lines?
@ 2019-09-07 21:05 Henning Hraban Ramm
  2019-09-08 14:43 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2019-09-07 21:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, I got a difficult customer…

If the last page of a chapter is less then half full (or has less than n lines), he doesn’t want a page number.

Is there a simple solution to that request?
Otherwise I delete the page numbers from the PDF...


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: no pagenumber depending of number of lines?
  2019-09-07 21:05 no pagenumber depending of number of lines? Henning Hraban Ramm
@ 2019-09-08 14:43 ` Wolfgang Schuster
  2019-09-08 21:49   ` Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2019-09-08 14:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 07.09.2019 um 23:05:
> Hi, I got a difficult customer…
>
> If the last page of a chapter is less then half full (or has less than n lines), he doesn’t want a page number.
>
> Is there a simple solution to that request?
> Otherwise I delete the page numbers from the PDF...
% remove header when the text fills less than half of the page

\startsetups[chapter:after]
     \par
     \ifdim\pagetotal<.5\pagegoal
         \page[header,yes]
     \fi
\stopsetups

% remove header when there are less than 20 lines of text

% \startsetups[chapter:after]
%     \par
%     \getnoflines{\pagetotal}
%     \ifnum\noflines<20
%         \page[header,yes]
%     \fi
% \stopsetups

\setuphead[chapter][aftersection=\directsetup{chapter:after}]

\starttext

\startchapter
\dorecurse{14}{\samplefile{ward}}
\stopchapter

\startchapter
\dorecurse{18}{\samplefile{ward}}
\stopchapter

\stoptext

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: no pagenumber depending of number of lines?
  2019-09-08 14:43 ` Wolfgang Schuster
@ 2019-09-08 21:49   ` Henning Hraban Ramm
  0 siblings, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2019-09-08 21:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 2019-09-08 um 16:43 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Henning Hraban Ramm schrieb am 07.09.2019 um 23:05:
>> Hi, I got a difficult customer…
>> 
>> If the last page of a chapter is less then half full (or has less than n lines), he doesn’t want a page number.
>> 
>> Is there a simple solution to that request?
>> Otherwise I delete the page numbers from the PDF...
> % remove header when the text fills less than half of the page
> 
> \startsetups[chapter:after]
>     \par
>     \ifdim\pagetotal<.5\pagegoal
>         \page[header,yes]
>     \fi
> \stopsetups
> 
> % remove header when there are less than 20 lines of text
> 
> % \startsetups[chapter:after]
> %     \par
> %     \getnoflines{\pagetotal}
> %     \ifnum\noflines<20
> %         \page[header,yes]
> %     \fi
> % \stopsetups
> 
> \setuphead[chapter][aftersection=\directsetup{chapter:after}]

Thank you so much!
That’s exactly what I need.

BTW I guess I need to create a wiki page about page numbering…


Grüßlinge, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2019-09-08 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07 21:05 no pagenumber depending of number of lines? Henning Hraban Ramm
2019-09-08 14:43 ` Wolfgang Schuster
2019-09-08 21:49   ` Henning Hraban Ramm

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).