ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: <denis.maier@ub.unibe.ch>
To: <j.hagen@xs4all.nl>, <ntg-context@ntg.nl>
Subject: Re: calculating optimal height of textblock
Date: Thu, 29 Apr 2021 09:59:27 +0000	[thread overview]
Message-ID: <cb12b5d58a644254b0bb3117e049d53b@ub.unibe.ch> (raw)
In-Reply-To: <18bf42cd46304eb0af7a92d970b5cacd@ub.unibe.ch>

One thing, I've noticed: 
Lines=40 seems to add more space than strictly necessary.

Why is that?

Example:

=======================
\setupbodyfont[10pt]

\definepapersize[test][width=140mm,height=208mm]
\setuppapersize[test][test]

\setuppagenumbering[location={footer,middle}]

\setuplayout[reset]
\setuplayout[backspace=17mm,
			topspace=19mm,
			header=0mm,
			headerdistance=0mm,
			footerdistance=4mm,
			footer=5mm,
			width=105mm,
			%height=177mm, % does not suffice for a complete line
			height=178mm, % enough for a complete line
			%lines=40, % adds a bit of extra whitespace below the last line
			rightmargin=0mm,
			leftmargin=0mm,
			]
	
% \setupalign[line]
% \setuptolerance[vertical,verytolerant,stretch]
% \setupinterlinespace[stretch=0.01]
			
\startsetups[mypenalties]
    \setdefaultpenalties
    \setpenalties\clubpenalties{2}{0}
    \setpenalties\widowpenalties{2}{0}
    \setpenalties\displaywidowpenalties{2}{0}
\stopsetups
\setuplayout[setups=mypenalties]	

%\showframe
\showmakeup
\showsetups

\starttext

\dorecurse{5}{\input knuth\par}

\stoptext

===============================

> -----Ursprüngliche Nachricht-----
> Von: Maier, Denis Christian (UB)
> Gesendet: Donnerstag, 29. April 2021 10:03
> An: 'Hans Hagen' <j.hagen@xs4all.nl>; mailing list for ConTeXt users <ntg-
> context@ntg.nl>
> Betreff: AW: [NTG-context] calculating optimal height of textblock
> 
> Thanks, Hans. That's really helpful.
> 
> Denis
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Hans Hagen <j.hagen@xs4all.nl>
> > Gesendet: Mittwoch, 28. April 2021 17:58
> > An: mailing list for ConTeXt users <ntg-context@ntg.nl>; Maier, Denis
> > Christian (UB) <denis.maier@ub.unibe.ch>
> > Betreff: Re: [NTG-context] calculating optimal height of textblock
> >
> > On 4/28/2021 2:07 PM, denis.maier@ub.unibe.ch wrote:
> >
> > > how do you usually calcultate your layouts? For example in this
> > > example, the third value for height is not really helpful as there
> > > will never be a complete line :
> >
> > you can use
> >
> >        lines=40,
> >
> > instead of height
> >
> > Hans
> >
> > -----------------------------------------------------------------
> >                                            Hans Hagen | PRAGMA ADE
> >                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> >         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> > -----------------------------------------------------------------
___________________________________________________________________________________
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:[~2021-04-29  9:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 12:07 denis.maier
2021-04-28 15:57 ` Hans Hagen
2021-04-29  8:03   ` denis.maier
2021-04-29  9:59     ` denis.maier [this message]
2021-04-29 11:30       ` Hans Hagen

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=cb12b5d58a644254b0bb3117e049d53b@ub.unibe.ch \
    --to=denis.maier@ub.unibe.ch \
    --cc=j.hagen@xs4all.nl \
    --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).