Re: [NTG-context] LMTX, BIdi, full paragraph, and spurious empty line

2021-06-24 Thread Rik Kabel


On 6/23/2021 19:44, Rik Kabel wrote:



On 6/23/2021 18:10, Hans Hagen wrote:

On 6/22/2021 4:52 AM, Rik Kabel wrote:

[...]ome an alternative way to do that.)
I'll send you a possible fix but it needs a bit of testing. It has to 
do with (probably spurious) spaces which means that the parbuilder 
then considers the dir node to be a reasoable breakpoint (well, kin 
dof okay as one gets what one asks for), but I'll be a bit more 
agressive in dealing with that.


Hans


Thank you, Hans, for looking into this so soon.

[...]



Hans and all,

I mistakenly put the new code in the wrong instance. When I put it in 
the right place and remade ConTeXt, all is well as far as my test 
examples go and the spurious lines are gone.


Thank you for the fix.

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


Re: [NTG-context] LMTX, BIdi, full paragraph, and spurious empty line

2021-06-23 Thread Rik Kabel


On 6/23/2021 18:10, Hans Hagen wrote:

On 6/22/2021 4:52 AM, Rik Kabel wrote:

[...]ome an alternative way to do that.)
I'll send you a possible fix but it needs a bit of testing. It has to 
do with (probably spurious) spaces which means that the parbuilder 
then considers the dir node to be a reasoable breakpoint (well, kin 
dof okay as one gets what one asks for), but I'll be a bit more 
agressive in dealing with that.


Hans


Thank you, Hans, for looking into this so soon.

I did try what you sent, but see no difference. I have eliminated the 
changes to spaceskip as a cause and simplified the example, removing the 
spaceskip and delimitedtext.


New example, in which I get a spurious line after the third and fourth 
Walt Kelly entries:


   %% Demonstration of spurious line insertion on full paragraph with bidi

   \setupdirections [bidi=on,method=unicode]

   \enabletrackers  [typesetters.directions]
   %\showmakeup  [glue,dir]

   \definepapersize [Testing]
 [width=6.69in]
   \setuppapersize  [Testing]

   \setuplayout [width=fit,
  backspace=1.4in,
  cutspace=1in,
  leftmargin=0.65in,
  rightmargin=0.65in]

   \setupwhitespace [small]


   \setupbodyfont   [libertinus,11pt]

   \startbuffer[Test]
    Kelly, Cynthia C., ed. 2005. {\em Oppenheimer and the Manhattan
    Project: Insights into J.~Robert Oppenheimer, ‘Father of the
    Atomic Bomb’}. Singapore: World Scientific.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York NY Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY: Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York,, NY: Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York; NY Simon
    & Schuster.

    Kuhn, Thomas S. 1962. {\em The Structure of Scientific
    Revolutions}. Chicago, IL: University of Chicago Press.

    Weinreich, Max. 1945. “Der YIVO un di problemen fun undzer
    tsayt (דער ייִוואָ און די פּראָבלעמען פֿון אונדזער צײַט).”
    {\em YIVO Bleter} 25 (1): 3--18. The title is translated as
    {\em The YIVO and the problems of our time}, and also as
    {\em The YIVO faces the post-war world}.

   \stopbuffer

   \starttext

  \getbuffer[Test]

   \stoptext

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


Re: [NTG-context] LMTX, BIdi, full paragraph, and spurious empty line

2021-06-23 Thread Hans Hagen

On 6/22/2021 4:52 AM, Rik Kabel wrote:

Hello all,

Last October Denis Maier complained about a spurious empty line 
generated with protrusion and bidi active and a full paragraph. (See 
https://www.mail-archive.com/ntg-context@ntg.nl/msg95916.html 
 or 
similar on your favorite mail archive.)


I have recreated the issue without involving protrusion. When a 
paragraph is very full and bidi is on, an extra line seems to be 
generated. Without bidi there is no extra line. This is quite sensitive, 
of course, to line width. I have probably 30 instances of it occurring 
in a tightly-set bibliography. I would assume that it may occur in any 
text, but have not noticed it in the body of my book.


I have created an example document that shows it. The problem disappears 
if bidi is turned off (comment out the first non-comment line) but of 
course then the RTL text is mis-set. In this example, the spurious line 
appears after the Walt Kelly entry.


This was tested under ConTeXt  ver: 2021.06.18 23:37 LMTX  fmt: 
2021.6.21, but is not a new problem with this version. /The problem does 
not occur with MKIV from the same installation./


%% Demonstration of spurious line insertion on full paragraph with
bidi active

\setupdirections  [bidi=on,method=unicode]

\definepapersize  [Testing]
   [width=6.69in]
\setuppapersize   [Testing]

\setuplayout  [width=fit,
    backspace=1.4in,
    cutspace=1in,
    leftmargin=0.65in,
    rightmargin=0.65in]

\setupwhitespace  [small]

\setupbodyfont    [libertinus,11pt]

\define\SetupBib{
   \spaceskip 0.7\interwordspace plus .5\interwordstretch minus
\interwordshrink
   \definedelimitedtext
     [Exdent]
     [leftmargin=1em,
  indenting={yes,-1em},
  indentnext=yes]}

\starttext
   \input jojomayer

   \input klein

   \blank[2*line]

   \SetupBib
   \startExdent

     Kelly, Cynthia C., ed. 2005. {\em Oppenheimer and the Manhattan
     Project: Insights into J.~Robert Oppenheimer, ‘Father of the
     Atomic Bomb’}. Singapore: World Scientific.

     Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY: Simon
     & Schuster.

     Kuhn, Thomas S. 1962. {\em The Structure of Scientific
     Revolutions}. Chicago, IL: University of Chicago Press.

     Weinreich, Max. 1945. “Der YIVO un di problemen fun undzer
     tsayt (דער ייִוואָ און די פּראָבלעמען פֿון אונדזער צײַט).”
     {\em YIVO Bleter} 25 (1): 3--18. The title is translated as
     {\em The YIVO and the problems of our time}, and also as
     {\em The YIVO faces the post-war world}.

   \stopExdent
\stoptext

Of course, there could be some other mechanism at work here than bidi, 
but changing that clears the problem in this instance. (It may be the 
adjustment to spaceskip that I use to tighten up the text in the 
bibliography, and if it is, I welcome an alternative way to do that.)
I'll send you a possible fix but it needs a bit of testing. It has to do 
with (probably spurious) spaces which means that the parbuilder then 
considers the dir node to be a reasoable breakpoint (well, kin dof okay 
as one gets what one asks for), but I'll be a bit more agressive in 
dealing with that.


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] LMTX, BIdi, full paragraph, and spurious empty line

2021-06-21 Thread Rik Kabel

Hello all,

Last October Denis Maier complained about a spurious empty line 
generated with protrusion and bidi active and a full paragraph. (See 
https://www.mail-archive.com/ntg-context@ntg.nl/msg95916.html 
 or 
similar on your favorite mail archive.)


I have recreated the issue without involving protrusion. When a 
paragraph is very full and bidi is on, an extra line seems to be 
generated. Without bidi there is no extra line. This is quite sensitive, 
of course, to line width. I have probably 30 instances of it occurring 
in a tightly-set bibliography. I would assume that it may occur in any 
text, but have not noticed it in the body of my book.


I have created an example document that shows it. The problem disappears 
if bidi is turned off (comment out the first non-comment line) but of 
course then the RTL text is mis-set. In this example, the spurious line 
appears after the Walt Kelly entry.


This was tested under ConTeXt  ver: 2021.06.18 23:37 LMTX  fmt: 
2021.6.21, but is not a new problem with this version. /The problem does 
not occur with MKIV from the same installation./


   %% Demonstration of spurious line insertion on full paragraph with
   bidi active

   \setupdirections  [bidi=on,method=unicode]

   \definepapersize  [Testing]
  [width=6.69in]
   \setuppapersize   [Testing]

   \setuplayout  [width=fit,
   backspace=1.4in,
   cutspace=1in,
   leftmargin=0.65in,
   rightmargin=0.65in]

   \setupwhitespace  [small]

   \setupbodyfont    [libertinus,11pt]

   \define\SetupBib{
  \spaceskip 0.7\interwordspace plus .5\interwordstretch minus
   \interwordshrink
  \definedelimitedtext
    [Exdent]
    [leftmargin=1em,
 indenting={yes,-1em},
 indentnext=yes]}

   \starttext
  \input jojomayer

  \input klein

  \blank[2*line]

  \SetupBib
  \startExdent

    Kelly, Cynthia C., ed. 2005. {\em Oppenheimer and the Manhattan
    Project: Insights into J.~Robert Oppenheimer, ‘Father of the
    Atomic Bomb’}. Singapore: World Scientific.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY: Simon
    & Schuster.

    Kuhn, Thomas S. 1962. {\em The Structure of Scientific
    Revolutions}. Chicago, IL: University of Chicago Press.

    Weinreich, Max. 1945. “Der YIVO un di problemen fun undzer
    tsayt (דער ייִוואָ און די פּראָבלעמען פֿון אונדזער צײַט).”
    {\em YIVO Bleter} 25 (1): 3--18. The title is translated as
    {\em The YIVO and the problems of our time}, and also as
    {\em The YIVO faces the post-war world}.

  \stopExdent
   \stoptext

Of course, there could be some other mechanism at work here than bidi, 
but changing that clears the problem in this instance. (It may be the 
adjustment to spaceskip that I use to tighten up the text in the 
bibliography, and if it is, I welcome an alternative way to do that.)


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