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
___________________________________________________________________________________