ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henri <henrimenke@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: line correction
Date: Fri, 29 Sep 2017 10:55:16 +1300	[thread overview]
Message-ID: <1506635716.2334.172.camel@gmail.com> (raw)
In-Reply-To: <1506634241.3753.1.camel@fastwebnet.it>

On Thu, 2017-09-28 at 23:30 +0200, mf wrote:
> Thank you Henri.
> 
> Now consider this:
> -------------------------------
> \setuplayout[grid=both]
> \setupquotation[before={\switchtobodyfont[9pt]}]
> 
> \starttext
> \showgrid
> 
> \input knuth
> 
> \startlinecorrection[halfline]
> \startquotation
>   \input sapolsky
> \stopquotation
> \stoplinecorrection
> 
> \input knuth
> $\displaystyle{\frac{1}{a + b}}$

If you are really keen on screwing up your linespacing you can use

\vadjust pre{\blank[line]}%
$\displaystyle{\frac{1}{a + b}}$
\vadjust{\blank[line]}%

as a one-off solution.  But better make it a displayed formula or tweak it such that it does not
disrupt spacing and blends in with the text.  In this example I'd change $\displaystyle\frac{1}{a +
b}$ to $(a+b)^{-1}$.  Trust someone who does math typesetting every day.

> \input knuth
> 
> \stoptext
> -------------------------------
> 
> Now the text snaps to the grid after the quotation, but the tall
> formula inside the text overlaps with the text lines.
> 
> The solution would be a grid configuration that gives the line
> containing the formula two lines of height, putting that only line in
> the middle and then snapping the following lines again to the grid
> (still solving the alignment of quotations as in the grid=both case).
> Is it possible?
> 
> Best regards,
> Massi
> 
> Il giorno ven, 29/09/2017 alle 08.48 +1300, Henri ha scritto:
> > 
> > On Thu, 2017-09-28 at 16:21 +0200, MF wrote:
> > > 
> > > Hello list, 
> > > I would like ConTeXt to snap normal text to grid after a quotation.
> > > This example does not work:
> > > 
> > > --------------
> > > \setupquotation[before={\switchtobodyfont[9pt]}]
> > > 
> > > \starttext
> > > \showgrid
> > > 
> > > \input knuth
> > > 
> > > \startlinecorrection[halfline]
> > > \startquotation
> > >   \input sapolsky
> > > \stopquotation
> > > \stoplinecorrection
> > > 
> > > \input knuth
> > > 
> > > \stoptext
> > > --------------
> > > 
> > > If I prepend a \setuplayout[grid=yes], it works, but grid snapping
> > > introduces also other side effects I don't want (i.e. tall formulas
> > > inside text taking too much vertical space).
> > > 
> > > I would like the halfline spaces before and after the quotation to
> > > shrink or stretch a bit to the nearest multiple of the main text
> > > line
> > > height.
> > > 
> > > Is there an automatic way to get the normal text "return" on the
> > > grid
> > > after a quotation without turning on a global grid snapping?
> > \setuplayout[grid=both] to round down both height and width when
> > snapping.
> > 
> > > 
> > > 
> > > Thanks,
> > > Massi
> > > 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2017-09-28 21:55 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 [this message]
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

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=1506635716.2334.172.camel@gmail.com \
    --to=henrimenke@gmail.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).