Re: [NTG-context] Issues with vertical spacing in simple case

2018-07-26 Thread Joseph Canedo
Thanks a lot for the fix.

De : Joseph Canedo
Envoyé le :samedi 21 juillet 2018 00:01
À : Hans Hagen; mailing list for ConTeXt users
Objet :RE: [NTG-context] Issues with vertical spacing in simple case

I’ve modified the MWE to avoid the \\ and it shows same problem. I’ve used the 
\\ to make a par with 2 lines (lazy typing more words :-). In any case \\ or 
not, the \hang* directives do not seem taken in consideration in this 
particular case for last par. Other cases seem to work fine.

%\setuplayout[grid=both]
%\enabletrackers[vspacing.synchronizepage]

\starttext

\dorecurse{39}{
A.

}

Chapitre.
\blank[0pt, samepage]
\hangindent=30pt\hangafter=-2Third par with some lengthy sentence. Second 
sentence. Third sentence. Fourth sentence. Fifth sentence.
\blank[0pt, samepage]
\hangindent=30pt\hangafter=-2 Fourth par not indented. Lengthy sentence. Second 
sentence. Third sentence. Fourth sentence. Fifth sentence.

\stoptext



De : Hans Hagen
Envoyé le :vendredi 20 juillet 2018 10:51
À : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/19/2018 10:52 PM, Joseph Canedo wrote:
> Finally I could make a MWE that reproduces the issue.
> 
> 
> 
> %\setuplayout[grid=both] % uncommenting this makes last line not indented.
> 
> %\enabletrackers[vspacing.synchronizepage]
> 
> \starttext
> 
> \dorecurse{39}{ % other values like 40 do not show issue
> 
> A.
> 
> }
> 
> Chapitre.
> 
> \blank[0pt, samepage]
> 
> \hangindent=30pt\hangafter=-2Third par.\\
> 
> Second line.
> 
> \blank[0pt, samepage]
> 
> \hangindent=30pt\hangafter=-2 Fourth par not indented.\\ Second line not 
> indented.
> 
> \stoptext
it's probably more related to the wrong usage of \\ which you normally 
should not use at the end of aparagraoh (i'll make the remover for that 
a bit more clever)

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] Issues with vertical spacing in simple case

2018-07-20 Thread Joseph Canedo
I’ve modified the MWE to avoid the \\ and it shows same problem. I’ve used the 
\\ to make a par with 2 lines (lazy typing more words :-). In any case \\ or 
not, the \hang* directives do not seem taken in consideration in this 
particular case for last par. Other cases seem to work fine.

%\setuplayout[grid=both]
%\enabletrackers[vspacing.synchronizepage]

\starttext

\dorecurse{39}{
A.

}

Chapitre.
\blank[0pt, samepage]
\hangindent=30pt\hangafter=-2Third par with some lengthy sentence. Second 
sentence. Third sentence. Fourth sentence. Fifth sentence.
\blank[0pt, samepage]
\hangindent=30pt\hangafter=-2 Fourth par not indented. Lengthy sentence. Second 
sentence. Third sentence. Fourth sentence. Fifth sentence.

\stoptext



De : Hans Hagen
Envoyé le :vendredi 20 juillet 2018 10:51
À : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/19/2018 10:52 PM, Joseph Canedo wrote:
> Finally I could make a MWE that reproduces the issue.
> 
> 
> 
> %\setuplayout[grid=both] % uncommenting this makes last line not indented.
> 
> %\enabletrackers[vspacing.synchronizepage]
> 
> \starttext
> 
> \dorecurse{39}{ % other values like 40 do not show issue
> 
> A.
> 
> }
> 
> Chapitre.
> 
> \blank[0pt, samepage]
> 
> \hangindent=30pt\hangafter=-2Third par.\\
> 
> Second line.
> 
> \blank[0pt, samepage]
> 
> \hangindent=30pt\hangafter=-2 Fourth par not indented.\\ Second line not 
> indented.
> 
> \stoptext
it's probably more related to the wrong usage of \\ which you normally 
should not use at the end of aparagraoh (i'll make the remover for that 
a bit more clever)

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] Issues with vertical spacing in simple case

2018-07-20 Thread Hans Hagen

On 7/19/2018 10:52 PM, Joseph Canedo wrote:

Finally I could make a MWE that reproduces the issue.



%\setuplayout[grid=both] % uncommenting this makes last line not indented.

%\enabletrackers[vspacing.synchronizepage]

\starttext

\dorecurse{39}{ % other values like 40 do not show issue

A.

}

Chapitre.

\blank[0pt, samepage]

\hangindent=30pt\hangafter=-2Third par.\\

Second line.

\blank[0pt, samepage]

\hangindent=30pt\hangafter=-2 Fourth par not indented.\\ Second line not 
indented.


\stoptext
it's probably more related to the wrong usage of \\ which you normally 
should not use at the end of aparagraoh (i'll make the remover for that 
a bit more clever)


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] Issues with vertical spacing in simple case

2018-07-19 Thread Joseph Canedo
Finally I could make a MWE that reproduces the issue.


%\setuplayout[grid=both] % uncommenting this makes last line not indented. 
%\enabletrackers[vspacing.synchronizepage]

\starttext

\dorecurse{39}{ % other values like 40 do not show issue
A.

}

Chapitre.
\blank[0pt, samepage]
\hangindent=30pt\hangafter=-2Third par.\\
Second line.
\blank[0pt, samepage]
\hangindent=30pt\hangafter=-2 Fourth par not indented.\\ Second line not 
indented.

\stoptext

Thanks

De : Joseph Canedo
Envoyé le :jeudi 19 juillet 2018 22:26
À : Hans Hagen; mailing list for ConTeXt users
Objet :RE: [NTG-context] Issues with vertical spacing in simple case

Thanks for the extended explanation. I guess I need to figure out how to create 
a MWE that reproduces the issue.

Provenance : Courrier pour Windows 10

De : Hans Hagen
Envoyé le :jeudi 19 juillet 2018 09:35
À : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/19/2018 8:55 AM, Joseph Canedo wrote:
> Thanks.
> 
> The problem happens in a case where there are no paragraph split between 
> 2 pages. All pars are entirely either in page 1 or page 2 (these numbers 
> are not actual page numbers, but it’s for clarity).
> 
> I am trying to create a MWE but it’s not trivial. The situation as far 
> as I understand it is like the following :
> 
> I’ve added tracers for vspacing.synchronizepage function.
> 
> When page 1 ships, there are 2 paragraphs (1 + 3 lines) still pending 
> because they do not fit in page 1 so they will be shipped in page 2 (I 
> think that what is in texlists.page_head variable). Hence tex.prevgraf 
> which was 0 is set to 4 (see this from traces in output log).

what do you mean with pending ... tex doesn't look ahead, only back

you probably need to look at the delta of pagegoal - pagetotal and evide 
that by the line height .. probably good enough for text without whitespace

even then, hyphenation penalties can make a page one or more lines 
shorter so you also need to disable some of that

> vspacing    > page 4, prevdepth 2.56577pt => 2.56577pt, prevgraf 0 => 4
> 
> vspacing    > list glue:topskip hlist:line penalty:userpenalty 
> penalty:userpenalty glue:baselineskip hlist:line 
> penalty:linebreakpenalty glue:baselineskip hlist:line 
> penalty:linebreakpenalty glue:baselineskip hlist:line glue:userskip
> 
> Next paragraph after the 2 pending pars I refer to above has a non zero 
> \hangindent and \hangafter (set to -1) and when it starts being 
> processed (in horizontal mode) prevgraf is already 4 so I think this 
> cancels out that hanging (that’s the effect I see in output, there is no 
> indent in 1st line of 3rd par), as IIRC TEX considers par has already 4 
> lines but in actuality it has 0. If I read correctly the TeXBook, 
> prevgraf value has some impact on \hangafter / \hangindent

you never really know what you look at: tex collects stuff and triggers 
the output routine when it thinks it makes sense

in context there is also the rather complex vertical spacing mechanism 
that needs to look back and forward while looking back can interfere 
with page breaks (and/or retrying)

these mechanisms evolved over time and are still nto perfect

> The value of \prevgraf affects line breaking only when TEX
> is dealing with nonstandard \parshape or \hangindent.

no, it's independent ... just th enumber of lines (hboxes) that make a 
paragraph after it's broken into lines

hangindent/after/parshape don't look at real dimensions, they only count 
lines

this is why a side float mechanism is so complex ... lots of border 
cases and trickery around page breaks (because not only the size of what 
goes side is important but also the preceding and following space, the 
height and depth of lines etc

> Joseph
> 
> *De : *Hans Hagen <mailto:j.ha...@xs4all.nl>
> *Envoyé le :*jeudi 19 juillet 2018 00:00
> *À : *Joseph Canedo <mailto:josephcan...@gmail.com>; mailing list for 
> ConTeXt users <mailto:ntg-context@ntg.nl>
> *Objet :*Re: [NTG-context] Issues with vertical spacing in simple case
> 
> On 7/18/2018 10:33 PM, Joseph Canedo wrote:
> 
>  > Thanks Hans.
> 
>  >
> 
>  > Picked up today beta and some code I have relying on value of
> 
>  > tex.prevgraf starts breaking. This is lettrine related code that sets
> 
>  > hangafter for 1st paragraph and eventually subsequent if lettrine is
> 
>  > larger than 1st par.
> 
>  >
> 
>  > I see the function vspacing.synchronizepage() sets prevgraf value I
> 
>  > guess to avoid bleeding also paragraph lines.
> 
>  >
> 
>  > Is there any possibility to get original unchanged tex.prevgraf value,
> 
>  > possibly using some callback or some other tex. ?
> 
>

Re: [NTG-context] Issues with vertical spacing in simple case

2018-07-19 Thread Joseph Canedo
Thanks for the extended explanation. I guess I need to figure out how to create 
a MWE that reproduces the issue.

Provenance : Courrier pour Windows 10

De : Hans Hagen
Envoyé le :jeudi 19 juillet 2018 09:35
À : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/19/2018 8:55 AM, Joseph Canedo wrote:
> Thanks.
> 
> The problem happens in a case where there are no paragraph split between 
> 2 pages. All pars are entirely either in page 1 or page 2 (these numbers 
> are not actual page numbers, but it’s for clarity).
> 
> I am trying to create a MWE but it’s not trivial. The situation as far 
> as I understand it is like the following :
> 
> I’ve added tracers for vspacing.synchronizepage function.
> 
> When page 1 ships, there are 2 paragraphs (1 + 3 lines) still pending 
> because they do not fit in page 1 so they will be shipped in page 2 (I 
> think that what is in texlists.page_head variable). Hence tex.prevgraf 
> which was 0 is set to 4 (see this from traces in output log).

what do you mean with pending ... tex doesn't look ahead, only back

you probably need to look at the delta of pagegoal - pagetotal and evide 
that by the line height .. probably good enough for text without whitespace

even then, hyphenation penalties can make a page one or more lines 
shorter so you also need to disable some of that

> vspacing    > page 4, prevdepth 2.56577pt => 2.56577pt, prevgraf 0 => 4
> 
> vspacing    > list glue:topskip hlist:line penalty:userpenalty 
> penalty:userpenalty glue:baselineskip hlist:line 
> penalty:linebreakpenalty glue:baselineskip hlist:line 
> penalty:linebreakpenalty glue:baselineskip hlist:line glue:userskip
> 
> Next paragraph after the 2 pending pars I refer to above has a non zero 
> \hangindent and \hangafter (set to -1) and when it starts being 
> processed (in horizontal mode) prevgraf is already 4 so I think this 
> cancels out that hanging (that’s the effect I see in output, there is no 
> indent in 1st line of 3rd par), as IIRC TEX considers par has already 4 
> lines but in actuality it has 0. If I read correctly the TeXBook, 
> prevgraf value has some impact on \hangafter / \hangindent

you never really know what you look at: tex collects stuff and triggers 
the output routine when it thinks it makes sense

in context there is also the rather complex vertical spacing mechanism 
that needs to look back and forward while looking back can interfere 
with page breaks (and/or retrying)

these mechanisms evolved over time and are still nto perfect

> The value of \prevgraf affects line breaking only when TEX
> is dealing with nonstandard \parshape or \hangindent.

no, it's independent ... just th enumber of lines (hboxes) that make a 
paragraph after it's broken into lines

hangindent/after/parshape don't look at real dimensions, they only count 
lines

this is why a side float mechanism is so complex ... lots of border 
cases and trickery around page breaks (because not only the size of what 
goes side is important but also the preceding and following space, the 
height and depth of lines etc

> Joseph
> 
> *De : *Hans Hagen <mailto:j.ha...@xs4all.nl>
> *Envoyé le :*jeudi 19 juillet 2018 00:00
> *À : *Joseph Canedo <mailto:josephcan...@gmail.com>; mailing list for 
> ConTeXt users <mailto:ntg-context@ntg.nl>
> *Objet :*Re: [NTG-context] Issues with vertical spacing in simple case
> 
> On 7/18/2018 10:33 PM, Joseph Canedo wrote:
> 
>  > Thanks Hans.
> 
>  >
> 
>  > Picked up today beta and some code I have relying on value of
> 
>  > tex.prevgraf starts breaking. This is lettrine related code that sets
> 
>  > hangafter for 1st paragraph and eventually subsequent if lettrine is
> 
>  > larger than 1st par.
> 
>  >
> 
>  > I see the function vspacing.synchronizepage() sets prevgraf value I
> 
>  > guess to avoid bleeding also paragraph lines.
> 
>  >
> 
>  > Is there any possibility to get original unchanged tex.prevgraf value,
> 
>  > possibly using some callback or some other tex. ?
> 
> you cannot rely on prevgraf crossing pages (so you get e.g. 8 at the top
> 
> of a page with 5 lines
> 
> where/how does it fail
> 
> 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
> 
> -
> 


-- 

-
   

Re: [NTG-context] Issues with vertical spacing in simple case

2018-07-19 Thread Hans Hagen

On 7/19/2018 8:55 AM, Joseph Canedo wrote:

Thanks.

The problem happens in a case where there are no paragraph split between 
2 pages. All pars are entirely either in page 1 or page 2 (these numbers 
are not actual page numbers, but it’s for clarity).


I am trying to create a MWE but it’s not trivial. The situation as far 
as I understand it is like the following :


I’ve added tracers for vspacing.synchronizepage function.

When page 1 ships, there are 2 paragraphs (1 + 3 lines) still pending 
because they do not fit in page 1 so they will be shipped in page 2 (I 
think that what is in texlists.page_head variable). Hence tex.prevgraf 
which was 0 is set to 4 (see this from traces in output log).


what do you mean with pending ... tex doesn't look ahead, only back

you probably need to look at the delta of pagegoal - pagetotal and evide 
that by the line height .. probably good enough for text without whitespace


even then, hyphenation penalties can make a page one or more lines 
shorter so you also need to disable some of that



vspacing    > page 4, prevdepth 2.56577pt => 2.56577pt, prevgraf 0 => 4

vspacing    > list glue:topskip hlist:line penalty:userpenalty 
penalty:userpenalty glue:baselineskip hlist:line 
penalty:linebreakpenalty glue:baselineskip hlist:line 
penalty:linebreakpenalty glue:baselineskip hlist:line glue:userskip


Next paragraph after the 2 pending pars I refer to above has a non zero 
\hangindent and \hangafter (set to -1) and when it starts being 
processed (in horizontal mode) prevgraf is already 4 so I think this 
cancels out that hanging (that’s the effect I see in output, there is no 
indent in 1st line of 3rd par), as IIRC TEX considers par has already 4 
lines but in actuality it has 0. If I read correctly the TeXBook, 
prevgraf value has some impact on \hangafter / \hangindent


you never really know what you look at: tex collects stuff and triggers 
the output routine when it thinks it makes sense


in context there is also the rather complex vertical spacing mechanism 
that needs to look back and forward while looking back can interfere 
with page breaks (and/or retrying)


these mechanisms evolved over time and are still nto perfect


The value of \prevgraf affects line breaking only when TEX
is dealing with nonstandard \parshape or \hangindent.


no, it's independent ... just th enumber of lines (hboxes) that make a 
paragraph after it's broken into lines


hangindent/after/parshape don't look at real dimensions, they only count 
lines


this is why a side float mechanism is so complex ... lots of border 
cases and trickery around page breaks (because not only the size of what 
goes side is important but also the preceding and following space, the 
height and depth of lines etc



Joseph

*De : *Hans Hagen <mailto:j.ha...@xs4all.nl>
*Envoyé le :*jeudi 19 juillet 2018 00:00
*À : *Joseph Canedo <mailto:josephcan...@gmail.com>; mailing list for 
ConTeXt users <mailto:ntg-context@ntg.nl>

*Objet :*Re: [NTG-context] Issues with vertical spacing in simple case

On 7/18/2018 10:33 PM, Joseph Canedo wrote:

 > Thanks Hans.

 >

 > Picked up today beta and some code I have relying on value of

 > tex.prevgraf starts breaking. This is lettrine related code that sets

 > hangafter for 1st paragraph and eventually subsequent if lettrine is

 > larger than 1st par.

 >

 > I see the function vspacing.synchronizepage() sets prevgraf value I

 > guess to avoid bleeding also paragraph lines.

 >

 > Is there any possibility to get original unchanged tex.prevgraf value,

 > possibly using some callback or some other tex. ?

you cannot rely on prevgraf crossing pages (so you get e.g. 8 at the top

of a page with 5 lines

where/how does it fail

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

-




--

-
  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] Issues with vertical spacing in simple case

2018-07-18 Thread Joseph Canedo
Thanks.
The problem happens in a case where there are no paragraph split between 2 
pages. All pars are entirely either in page 1 or page 2 (these numbers are not 
actual page numbers, but it’s for clarity). 

I am trying to create a MWE but it’s not trivial. The situation as far as I 
understand it is like the following :

I’ve added tracers for vspacing.synchronizepage function.
When page 1 ships, there are 2 paragraphs (1 + 3 lines) still pending because 
they do not fit in page 1 so they will be shipped in page 2 (I think that what 
is in texlists.page_head variable). Hence tex.prevgraf which was 0 is set to 4 
(see this from traces in output log).

vspacing> page 4, prevdepth 2.56577pt => 2.56577pt, prevgraf 0 => 4
vspacing> list glue:topskip hlist:line penalty:userpenalty 
penalty:userpenalty glue:baselineskip hlist:line penalty:linebreakpenalty 
glue:baselineskip hlist:line penalty:linebreakpenalty glue:baselineskip 
hlist:line glue:userskip

Next paragraph after the 2 pending pars I refer to above has a non zero 
\hangindent and \hangafter (set to -1) and when it starts being processed (in 
horizontal mode) prevgraf is already 4 so I think this cancels out that hanging 
(that’s the effect I see in output, there is no indent in 1st line of 3rd par), 
as IIRC TEX considers par has already 4 lines but in actuality it has 0. If I 
read correctly the TeXBook, prevgraf value has some impact on \hangafter / 
\hangindent

The value of \prevgraf affects line breaking only when TEX
is dealing with nonstandard \parshape or \hangindent.

Joseph

De : Hans Hagen
Envoyé le :jeudi 19 juillet 2018 00:00
À : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/18/2018 10:33 PM, Joseph Canedo wrote:
> Thanks Hans.
> 
> Picked up today beta and some code I have relying on value of 
> tex.prevgraf starts breaking. This is lettrine related code that sets 
> hangafter for 1st paragraph and eventually subsequent if lettrine is 
> larger than 1st par.
> 
> I see the function vspacing.synchronizepage() sets prevgraf value I 
> guess to avoid bleeding also paragraph lines.
> 
> Is there any possibility to get original unchanged tex.prevgraf value, 
> possibly using some callback or some other tex. ?
you cannot rely on prevgraf crossing pages (so you get e.g. 8 at the top 
of a page with 5 lines

where/how does it fail

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] Issues with vertical spacing in simple case

2018-07-18 Thread Hans Hagen

On 7/18/2018 10:33 PM, Joseph Canedo wrote:

Thanks Hans.

Picked up today beta and some code I have relying on value of 
tex.prevgraf starts breaking. This is lettrine related code that sets 
hangafter for 1st paragraph and eventually subsequent if lettrine is 
larger than 1st par.


I see the function vspacing.synchronizepage() sets prevgraf value I 
guess to avoid bleeding also paragraph lines.


Is there any possibility to get original unchanged tex.prevgraf value, 
possibly using some callback or some other tex. ?
you cannot rely on prevgraf crossing pages (so you get e.g. 8 at the top 
of a page with 5 lines


where/how does it fail

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] Issues with vertical spacing in simple case

2018-07-18 Thread Joseph Canedo
Thanks Hans.

Picked up today beta and some code I have relying on value of tex.prevgraf 
starts breaking. This is lettrine related code that sets hangafter for 1st 
paragraph and eventually subsequent if lettrine is larger than 1st par.
I see the function vspacing.synchronizepage() sets prevgraf value I guess to 
avoid bleeding also paragraph lines.

Is there any possibility to get original unchanged tex.prevgraf value, possibly 
using some callback or some other tex. ? 

Thanks

Joseph

De : Hans Hagen
Envoyé le :mercredi 18 juillet 2018 11:11
À : mailing list for ConTeXt users; Joseph Canedo
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/17/2018 11:35 PM, Joseph Canedo wrote:
> Dear list,
> 
> Trying to build a MWE for a problem with unexpected page break (near a 
> \blank[line, samepage]) I could not yet reproduce yet, I came up with 
> strange output.
> 
> With latest beta
> 
> mtx-context | current version: 2018.07.17 17:25
> 
> MWE :
> 
> \starttext
> 
> \dorecurse{5}{
> 
> \input knuth
> 
> \blank[line, samepage]Second.
> 
> \input zapf
> 
> \blank[line, samepage]Second maybe vertically wrong align?
> 
> }
> 
> \stoptext
> 
> Please see in page 2, the line printing : Second maybe vertically wrong 
> align? (topskip related?)
> 
> Seems very close to next line for an unknown reason to me.

The next beta will have a fix. The problem is that tex's prevdepth 
bleeds over into a next page so i try to deal with that ... it's 
sometimes hard to take all into accoutn that needs to (esp when there is 
interferences).

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] Issues with vertical spacing in simple case

2018-07-18 Thread Hans Hagen

On 7/17/2018 11:35 PM, Joseph Canedo wrote:

Dear list,

Trying to build a MWE for a problem with unexpected page break (near a 
\blank[line, samepage]) I could not yet reproduce yet, I came up with 
strange output.


With latest beta

mtx-context | current version: 2018.07.17 17:25

MWE :

\starttext

\dorecurse{5}{

\input knuth

\blank[line, samepage]Second.

\input zapf

\blank[line, samepage]Second maybe vertically wrong align?

}

\stoptext

Please see in page 2, the line printing : Second maybe vertically wrong 
align? (topskip related?)


Seems very close to next line for an unknown reason to me.


The next beta will have a fix. The problem is that tex's prevdepth 
bleeds over into a next page so i try to deal with that ... it's 
sometimes hard to take all into accoutn that needs to (esp when there is 
interferences).


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] Issues with vertical spacing in simple case

2018-07-17 Thread Hans Hagen

On 7/17/2018 11:35 PM, Joseph Canedo wrote:

Dear list,

Trying to build a MWE for a problem with unexpected page break (near a 
\blank[line, samepage]) I could not yet reproduce yet, I came up with 
strange output.


weird indeed (i know where / why it happens so i'll look into it)


With latest beta

mtx-context | current version: 2018.07.17 17:25

MWE :

\starttext

\dorecurse{5}{

\input knuth

\blank[line, samepage]Second.

\input zapf

\blank[line, samepage]Second maybe vertically wrong align?

}

\stoptext

Please see in page 2, the line printing : Second maybe vertically wrong 
align? (topskip related?)


Seems very close to next line for an unknown reason to me.

Thanks

Best regards

Joseph



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




--

-
  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] Issues with vertical spacing in simple case

2018-07-17 Thread Joseph Canedo
Dear list,

Trying to build a MWE for a problem with unexpected page break (near a 
\blank[line, samepage]) I could not yet reproduce yet, I came up with strange 
output.
With latest beta

mtx-context | current version: 2018.07.17 17:25

MWE :

\starttext
\dorecurse{5}{
\input knuth
\blank[line, samepage]Second.

\input zapf
\blank[line, samepage]Second maybe vertically wrong align?

}
\stoptext

Please see in page 2, the line printing : Second maybe vertically wrong align? 
(topskip related?)
Seems very close to next line for an unknown reason to me.

Thanks
Best regards

Joseph

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