From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Henning Hraban Ramm <texml@fiee.net>
Subject: Re: no pagenumber depending of number of lines?
Date: Sun, 8 Sep 2019 16:43:58 +0200 [thread overview]
Message-ID: <bc19d329-58de-da0e-5775-595edb865922@gmail.com> (raw)
In-Reply-To: <5662335D-E2FD-4060-9820-67D1E9843C88@fiee.net>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2019-09-08 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 21:05 Henning Hraban Ramm
2019-09-08 14:43 ` Wolfgang Schuster [this message]
2019-09-08 21:49 ` Henning Hraban Ramm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc19d329-58de-da0e-5775-595edb865922@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=ntg-context@ntg.nl \
--cc=texml@fiee.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).