Re: [NTG-context] calculating optimal height of textblock

2021-04-29 Thread Hans Hagen

On 4/29/2021 11:59 AM, denis.ma...@ub.unibe.ch wrote:

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

line heights, depths and topskip delta



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


Re: [NTG-context] calculating optimal height of textblock

2021-04-29 Thread denis.maier
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' ; mailing list for ConTeXt users  cont...@ntg.nl>
> Betreff: AW: [NTG-context] calculating optimal height of textblock
> 
> Thanks, Hans. That's really helpful.
> 
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: Hans Hagen 
> > Gesendet: Mittwoch, 28. April 2021 17:58
> > An: mailing list for ConTeXt users ; Maier, Denis
> > Christian (UB) 
> > Betreff: Re: [NTG-context] calculating optimal height of textblock
> >
> > On 4/28/2021 2:07 PM, denis.ma...@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
___


Re: [NTG-context] calculating optimal height of textblock

2021-04-29 Thread denis.maier
Thanks, Hans. That's really helpful. 

Denis

> -Ursprüngliche Nachricht-
> Von: Hans Hagen 
> Gesendet: Mittwoch, 28. April 2021 17:58
> An: mailing list for ConTeXt users ; Maier, Denis
> Christian (UB) 
> Betreff: Re: [NTG-context] calculating optimal height of textblock
> 
> On 4/28/2021 2:07 PM, denis.ma...@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
___


Re: [NTG-context] calculating optimal height of textblock

2021-04-28 Thread Hans Hagen

On 4/28/2021 2:07 PM, denis.ma...@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
___


[NTG-context] calculating optimal height of textblock

2021-04-28 Thread denis.maier
Hi,

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 :

=
\setupbodyfont[10pt]

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

\setuplayout[reset]
\setuplayout[backspace=17mm,
  topspace=19mm,
  header=0mm,
  footerdistance=4mm,
  footer=5mm,
  width=105mm,
  %height=174mm,
  height=178mm,
  %height=177mm, % does not suffice for 
a complete line
  rightmargin=0mm,
  leftmargin=0mm,
  ]

\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
=

How do you do this usually? Any best-practices? Hints? Trial and error seems to 
work ok, but maybe there is a more efficient method...

Best
Denis
___
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
___