ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik Kabel <context@rik.users.panix.com>
To: ntg-context@ntg.nl
Subject: Re: Risposta: line correction
Date: Fri, 29 Sep 2017 17:38:38 -0400	[thread overview]
Message-ID: <880954dd-18a7-6a49-dee2-40a823dc54e7@rik.users.panix.com> (raw)
In-Reply-To: <1506678793.1786.37.camel@fastwebnet.it>

On 2017-09-29 05:53, MF wrote:
> So for quotations and adjust the space around them are you suggesting
> manual adjustment?
>
> I was already more convinced of keeping snap-to-grid turned off. Now
> the problem is how to adjust the spaces around quotations (and floats)
> at the minimum cost.
>
> Since the line heights of the main text and the ones of quotations do
> not change, the adjustment depends only on the number of lines of
> quotations. I could compile a table for more common cases:
>
> # of lines | adjustment
> 1 line     | ... pt
> 2 lines    | ... pt
> 3 lines    | ... pt
> ...
> 20 lines   | ... pt
>
> I should teach users how to insert adjustments, but the task would be
> eased because they should only copy a value from a table or insert a
> name that corresponds the the number of lines (i.e. "adjust-3-lines",
> "adjust-4-lines", etc.)
>
> Greetings,
> Massi
> ___________________________________________________________________________________

Be careful not to insert an adjustment after a block that is split over 
two pages.

A more useful (from a user perspective, I do not know about the coding) 
solution would be a command to snap to the nearest grid line (up or 
down, half or whole step).

But both your count and my \snapto suffer from a common problem. Both 
are likely to leave different amounts of space before and after the 
block. A more evenly balanced approach is to compute the height of the 
block plus the vertical space by which it should be set off plus the 
vertical space needed to reach a grid-line or half-grid and, if the 
block stays on the page, split the difference top and bottom. If the 
block does not stay on the page, some portion with the top offset must 
be calculated and placed on the page if it otherwise meets widow/orphan 
tests.

-- 
Rik

___________________________________________________________________________________
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:[~2017-09-29 21:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 14:21 MF
2017-09-28 19:48 ` Henri
2017-09-28 21:30   ` mf
2017-09-28 21:47     ` luigi scarso
2017-09-29  8:33       ` Hans Hagen
2017-09-28 21:51     ` Henri
2017-09-28 21:55     ` Henri
2017-09-28 22:35       ` mf
2017-09-29  3:19         ` Rik Kabel
2017-09-29  9:30           ` Risposta: " MF
2017-09-29 12:08             ` Hans Hagen
2017-09-29  8:37         ` Hans Hagen
2017-09-29  9:53           ` Risposta: " MF
2017-09-29 21:38             ` Rik Kabel [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=880954dd-18a7-6a49-dee2-40a823dc54e7@rik.users.panix.com \
    --to=context@rik.users.panix.com \
    --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).