ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: no pagenumber depending of number of lines?
Date: Sun, 8 Sep 2019 23:49:36 +0200	[thread overview]
Message-ID: <66AC0CDC-C8F2-40C6-BA2E-8C9799737AC4@fiee.net> (raw)
In-Reply-To: <bc19d329-58de-da0e-5775-595edb865922@gmail.com>


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

      reply	other threads:[~2019-09-08 21:49 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
2019-09-08 21:49   ` Henning Hraban Ramm [this message]

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=66AC0CDC-C8F2-40C6-BA2E-8C9799737AC4@fiee.net \
    --to=texml@fiee.net \
    --cc=ntg-context@ntg.nl \
    /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).