[NTG-context] no pagenumber depending of number of lines?

Henning Hraban Ramm texml at fiee.net
Sun Sep 8 23:49:36 CEST 2019


> Am 2019-09-08 um 16:43 schrieb Wolfgang Schuster <wolfgang.schuster.lists at 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



More information about the ntg-context mailing list