ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Issue with grid
@ 2020-11-22 16:03 Joseph
  2020-11-22 17:54 ` Pablo Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Joseph @ 2020-11-22 16:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 2541 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Issue with grid
  2020-11-22 16:03 Issue with grid Joseph
@ 2020-11-22 17:54 ` Pablo Rodriguez
  2020-11-22 18:50   ` RE : " Joseph
  2020-11-22 23:05 ` Hans Hagen
  2020-11-22 23:09 ` Hans Hagen
  2 siblings, 1 reply; 13+ messages in thread
From: Pablo Rodriguez @ 2020-11-22 17:54 UTC (permalink / raw)
  To: ntg-context

On 11/22/20 5:03 PM, Joseph wrote:
> Dear list,
>
> In some cases with latest LMTX I see text not aligned to grid. MWE
> reproduces the problem (could not reproduce with default font).

Hi Joseph,

I think this is related to the fact that your paragraphs are hard to
break between pages, since they only contain two lines.

I think this paragraph break among pages is what triggers the issue you
mention.

> Typesetting MWE using online ConTeXt page shows correctly aligned text
> on grid.

https://live.contextgarden.net/ includes both LuaTeX 2.06 20200630 +
ConTeXt MkIV 2020.06.30 17:30.

> If number of itérations is changed from 8 to 7) problem does not appear,
> seems to be linked to the fact page is fully filled with lines.

Because the text fits in a single page.

> If one of the \blank lines is commented out problem does not occur either.

Because you avoid the problem of breaking the paragraph between pages.

You can also avoid that using the following (but it will work only with
your MWE, I know):

  \setuplayout[setups=*lessstrict]
  \startsetups[*lessstrict]
      \widowpenalty=1000
      \clubpenalty=1000
      \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}]

  \showgrid

I think that the problem might be related to the (unsuccesful) avoidance
of orphans and widows in current latest.

But of course, Hans or Wolfgang know better.

Just in case it might help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE :  Issue with grid
  2020-11-22 17:54 ` Pablo Rodriguez
@ 2020-11-22 18:50   ` Joseph
  0 siblings, 0 replies; 13+ messages in thread
From: Joseph @ 2020-11-22 18:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 5464 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Issue with grid
  2020-11-22 16:03 Issue with grid Joseph
  2020-11-22 17:54 ` Pablo Rodriguez
@ 2020-11-22 23:05 ` Hans Hagen
  2020-11-23  8:31   ` RE : " Joseph
  2020-11-22 23:09 ` Hans Hagen
  2 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2020-11-22 23:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Joseph

On 11/22/2020 5:03 PM, Joseph wrote:
> Dear list,
> 
> In some cases with latest LMTX I see text not aligned to grid. MWE 
> reproduces the problem (could not reproduce with default font).
> 
> Typesetting MWE using online ConTeXt page shows correctly aligned text 
> on grid.
> 
> \showgrid
> 
> \setuplayout[grid=both]
> 
> \definefontfeature[base][mode=node]
> 
> \definefontfamily[mainfont][serif][EBGaramond][features=base]
> 
> \setupbodyfont[mainfont, 9pt]
> 
> \starttext
> 
> \blank[line, samepage]Fin des psalmes.
> 
> \blank[line, samepage]Fin des psalmes.
> 
> \dorecurse{8}{\input knuth
> 
> }
> 
> \stoptext
> 
> If number of itérations is changed from 8 to 7) problem does not appear, 
> seems to be linked to the fact page is fully filled with lines.
> 
> If one of the \blank lines is commented out problem does not occur either.

It might have to do with the fact that the height/depth ratio that is 
used doesn't match well with the ascenders/descenders of the font that 
you use. The defaults are:

\setupinterlinespace
   [height=.72,
    depth=.28,
    line=2.8\exheight]

so you can play with these. The 72:28 ratio works ok for most fonts but 
sometimes need to be adapted. Sometimes the 2.8 is not enough.

(makes me wonder: i can issue a warning when a font can overrun)

(normally grid snapping should catch is but columns are kind of different)

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Issue with grid
  2020-11-22 16:03 Issue with grid Joseph
  2020-11-22 17:54 ` Pablo Rodriguez
  2020-11-22 23:05 ` Hans Hagen
@ 2020-11-22 23:09 ` Hans Hagen
  2 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2020-11-22 23:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Joseph

On 11/22/2020 5:03 PM, Joseph wrote:

> \definefontfeature[base][mode=node]
> 
> \definefontfamily[mainfont][serif][EBGaramond][features=base]
Really? No features enabled at all? EBGaramond is quite loaded with 
features. Just use 'default'.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE :  Issue with grid
  2020-11-22 23:05 ` Hans Hagen
@ 2020-11-23  8:31   ` Joseph
  2020-11-23  9:54     ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Joseph @ 2020-11-23  8:31 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 5181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RE :  Issue with grid
  2020-11-23  8:31   ` RE : " Joseph
@ 2020-11-23  9:54     ` Hans Hagen
  2020-11-23 10:13       ` RE : " Joseph
  0 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2020-11-23  9:54 UTC (permalink / raw)
  To: Joseph, mailing list for ConTeXt users

On 11/23/2020 9:31 AM, Joseph wrote:
> I don’t understand the answer I am afraid, I’ve never seen any issue 
> with grid alignment before (I don’t use columns either, and I changed 
> nothing at all).
you talk about grid alignment i.e. text not sitting on the grid ... this 
is something that relates to font and line distance properties

if on th eother hand you talk about when a pag ebreak occurs pablos 
answer points to the solution

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE : RE :  Issue with grid
  2020-11-23  9:54     ` Hans Hagen
@ 2020-11-23 10:13       ` Joseph
  2020-11-23 12:18         ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Joseph @ 2020-11-23 10:13 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 4065 bytes --]

[-- Attachment #2: TestGrid.pdf --]
[-- Type: application/pdf, Size: 19826 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re:  RE : RE :  Issue with grid
  2020-11-23 10:13       ` RE : " Joseph
@ 2020-11-23 12:18         ` Hans Hagen
  2020-11-23 15:29           ` RE : " Joseph
  0 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2020-11-23 12:18 UTC (permalink / raw)
  To: Joseph, mailing list for ConTeXt users

On 11/23/2020 11:13 AM, Joseph wrote:
> Yes, I refer to text not being aligned on the grid. This only happens if 
> \blank is used it seems, and text sits above where it’s supposed to (ie 
> amount of space being skipped vertically is smaller, ie \blank[line] 
> skips less than 1 line). I attach pdf I get. Could reduce MWE a bit.
> 
> \showgrid
> 
> \setuplayout[grid=both]
> 
> \definefontfamily[mainfont][serif][EBGaramond][features=default]
> 
> \setupbodyfont[mainfont, 9pt]
> 
> \starttext
> 
> \blank[line]Fin des psalmes.
> 
> \blank[line]Fin des psalmes.
> 
> \dorecurse{8}{\input knuth
> 
> }
> 
> \stoptext
It looks ok here< I also checked the latest eb (less fonts now it seems).

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE : RE : RE :  Issue with grid
  2020-11-23 12:18         ` Hans Hagen
@ 2020-11-23 15:29           ` Joseph
  2020-11-23 16:13             ` Pablo Rodriguez
  2020-11-25 17:10             ` RE : " Joseph
  0 siblings, 2 replies; 13+ messages in thread
From: Joseph @ 2020-11-23 15:29 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 4252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re:  RE : RE : RE : Issue with grid
  2020-11-23 15:29           ` RE : " Joseph
@ 2020-11-23 16:13             ` Pablo Rodriguez
  2020-11-25 17:10             ` RE : " Joseph
  1 sibling, 0 replies; 13+ messages in thread
From: Pablo Rodriguez @ 2020-11-23 16:13 UTC (permalink / raw)
  To: ntg-context

On 11/23/20 4:29 PM, Joseph wrote:
> Could reproduce this problem with ‘default’ font and even seeing it
> cumulating in same page. BTW, Perhaps you already fixed it locally.

Hi Joseph,

probably the approach has to be different.

Setting the whitespace to line fixes everything:

  \startsetups[*lessstrict]
      \widowpenalty=1000
      \clubpenalty=1000
      \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}, grid=both]

  \showgrid

  \setupwhitespace[line]

  \starttext

  \dorecurse{8}
    {\blank[line]Fin des psalmes.\par
     \blank[line]\input knuth\par}

  \stoptext

Just in case it helps,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE :  RE : RE : RE :  Issue with grid
  2020-11-23 15:29           ` RE : " Joseph
  2020-11-23 16:13             ` Pablo Rodriguez
@ 2020-11-25 17:10             ` Joseph
  2020-11-25 17:35               ` Hans Hagen
  1 sibling, 1 reply; 13+ messages in thread
From: Joseph @ 2020-11-25 17:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 6145 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re:  RE : RE : RE : RE : Issue with grid
  2020-11-25 17:10             ` RE : " Joseph
@ 2020-11-25 17:35               ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2020-11-25 17:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Joseph

On 11/25/2020 6:10 PM, Joseph wrote:
> \setupindenting[yes, next, 1em]
> 
> \starttext
> 
> \input knuth
> 
> \stoptext
hm, maybe i did somethign wrong. i'll check it, but indeed for now you 
can just use the patch

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-11-25 17:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 16:03 Issue with grid Joseph
2020-11-22 17:54 ` Pablo Rodriguez
2020-11-22 18:50   ` RE : " Joseph
2020-11-22 23:05 ` Hans Hagen
2020-11-23  8:31   ` RE : " Joseph
2020-11-23  9:54     ` Hans Hagen
2020-11-23 10:13       ` RE : " Joseph
2020-11-23 12:18         ` Hans Hagen
2020-11-23 15:29           ` RE : " Joseph
2020-11-23 16:13             ` Pablo Rodriguez
2020-11-25 17:10             ` RE : " Joseph
2020-11-25 17:35               ` Hans Hagen
2020-11-22 23:09 ` Hans Hagen

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).