ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* emergency stretch not taken in account in some cases
@ 2016-07-18 21:21 josephcanedo
  2016-07-18 22:10 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: josephcanedo @ 2016-07-18 21:21 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 619 bytes --]

Dear all,


In some cases specifying \setupalign[stretch] does not seem to have any effect with latest betas (live, 2016.06.20 22:14 version are fine, but 2016.07.18 is not), and the output has now overfulls instead of (admitedly a bit large) underfulls.


Attached  simple (albeit bit extreme) MWE. Sorry for the relatively large MWE but could not figure out how to make it shorter.


emergency_stretch.pdf produced with latest beta (updated with first-setup.bat today).

emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.


Thanks a lot for any advise.


Best regards


Joseph Canedo

[-- Attachment #1.2: Type: text/html, Size: 1778 bytes --]

[-- Attachment #2: emergency_stretch.pdf --]
[-- Type: application/pdf, Size: 9817 bytes --]

[-- Attachment #3: emergency_stretch.tex --]
[-- Type: application/octet-stream, Size: 928 bytes --]

\unprotect

\setupmargindata[Outer][method=first, location=outer, margin=margin,
  style=\tf, stack=continue,
  align={normal, hanging, morehyphenation, hz, verytolerant, stretch}, parent=\??margindata]
\setupmargindata[Inner][method=first, location=inner, margin=margin, 
  style=\tf,
  align=outer, parent=\??margindata]

\definemargindata[InOuter][Outer][margin=margin, width=\outermarginwidth, align={normal, hanging, morehyphenation, hz, verytolerant,stretch}]
\definemargindata[InInner][Inner][margin=margin, width=\innermarginwidth, align=outer]

\setupmarginframed[Outer][method=first, align={normal, hanging, morehyphenation, hz, verytolerant,stretch}, parent=\??marginframed]
\setupmarginframed[Inner][method=first, align=outer, parent=\??marginframed]

\definemarginframed[InOuter][Outer]
\definemarginframed[InInner][Inner]

\protect

\starttext

Foo \InOuter{\input knuth } Bar.

\stoptext

[-- Attachment #4: emergency_stretch_ok.pdf --]
[-- Type: application/pdf, Size: 9930 bytes --]

[-- Attachment #5: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: emergency stretch not taken in account in some cases
  2016-07-18 21:21 emergency stretch not taken in account in some cases josephcanedo
@ 2016-07-18 22:10 ` Wolfgang Schuster
  2016-07-19  6:59   ` josephcanedo
  2016-07-20 18:48   ` josephcanedo
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2016-07-18 22:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1568 bytes --]

> josephcanedo@gmail.com <mailto:josephcanedo@gmail.com>
> 18. Juli 2016 um 23:21
> Dear all,
>
> In some cases specifying \setupalign[stretch] does not seem to have 
> any effect with latest betas (live, 2016.06.20 22:14 version are fine, 
> but 2016.07.18 is not), and the output has now overfulls instead of 
> (admitedly a bit large) underfulls.
>
> Attached  simple (albeit bit extreme) MWE. Sorry for the relatively 
> large MWE but could not figure out how to make it shorter.
>
> emergency_stretch.pdf produced with latest beta (updated with 
> first-setup.bat today).
> emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.
I can’t reproduce your problem but justified text isn’t the best option 
in narrow columns.

Below is a simplified version of your code which doesn’t use the parent 
setting from margindata and marginframed setups, there is also no need 
to set the alignment twice and marginframed has no method key (the 
source is wrong).

\definemargindata
   [InOuter]
   [method=first,
    location=outer,
    margin=margin,
    width=\outermarginwidth,
    style=\tf,
    stack=continue,
    align={normal,hanging,morehyphenation,hz,verytolerant,stretch}]

\definemargindata
   [InInner]
   [method=first,
    location=inner,
    margin=margin,
    width=\innermarginwidth,
    style=\tf,
    align=outer]

\definemarginframed[InOuter]
\definemarginframed[InInner]

%\setuplayout[width=12cm,rightmargin=4cm]

\starttext

Foo \InOuter{\input knuth } Bar.

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3732 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  emergency stretch not taken in account in some cases
  2016-07-18 22:10 ` Wolfgang Schuster
@ 2016-07-19  6:59   ` josephcanedo
  2016-07-20 18:48   ` josephcanedo
  1 sibling, 0 replies; 5+ messages in thread
From: josephcanedo @ 2016-07-19  6:59 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2221 bytes --]

Thanks a lot Wolfgang for the simpler code, I’ll replace mine with your suggestion, in actual document the margins width are much larger and font smaller too.

I use binaries on Win64 platform (installed using command line method: first-setup.bat --modules=all):


$ ls -l $(which luatex.dll)
-rwxr-xr-x 1 Jo Administrateurs 9567232 Jul 11 22:29 /c/ConTeXt/test/tex/texmf-win64/bin/luatex.dll 


$ luatex --version
This is LuaTeX, Version 0.97.0 (TeX Live 2016/W32TeX)


$ context --version
mtx-context     | current version: 2016.07.18 16:46





From: schuster.wolfgang@gmail.com
Sent: ‎Tuesday‎, ‎July‎ ‎19‎, ‎2016 ‎12‎:‎10‎ ‎AM
To: ntg-context@ntg.nl








josephcanedo@gmail.com

18. Juli 2016 um 23:21


Dear all,




In some cases specifying \setupalign[stretch] does not seem to have any effect with latest betas (live, 2016.06.20 22:14 version are fine, but 2016.07.18 is not), and the output has now overfulls instead of (admitedly a bit large) underfulls.




Attached  simple (albeit bit extreme) MWE. Sorry for the relatively large MWE but could not figure out how to make it shorter.




emergency_stretch.pdf produced with latest beta (updated with first-setup.bat today).

emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.
I can’t reproduce your problem but justified text isn’t the best option in narrow columns.

Below is a simplified version of your code which doesn’t use the parent setting from margindata and marginframed setups, there is also no need to set the alignment twice and marginframed has no method key (the source is wrong).

\definemargindata
  [InOuter]
  [method=first,
   location=outer,
   margin=margin,
   width=\outermarginwidth,
   style=\tf,
   stack=continue,
   align={normal,hanging,morehyphenation,hz,verytolerant,stretch}]

\definemargindata
  [InInner]
  [method=first,
   location=inner,
   margin=margin, 
   width=\innermarginwidth,
   style=\tf,
   align=outer]

\definemarginframed[InOuter]
\definemarginframed[InInner]

%\setuplayout[width=12cm,rightmargin=4cm]

\starttext

Foo \InOuter{\input knuth } Bar.

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 5266 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  emergency stretch not taken in account in some cases
  2016-07-18 22:10 ` Wolfgang Schuster
  2016-07-19  6:59   ` josephcanedo
@ 2016-07-20 18:48   ` josephcanedo
  2016-07-20 20:46     ` Wolfgang Schuster
  1 sibling, 1 reply; 5+ messages in thread
From: josephcanedo @ 2016-07-20 18:48 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2522 bytes --]

I think I could figure out the reason of this problem. Actually emergency stretch is broken in all cases it seems. In luatex source code I see:


source/texk/web2c/luatexdir/tex/commands.w:    primitive_tex("emergencystretch",
 assign_dimen_cmd, dimen_base + emergency_stretch_code, dimen_base);


source/texk/web2c/luatexdir/tex/equivalents.h:#define emergency_stretch_par
         glue_par(emergency_stretch_code)


source/texk/web2c/luatexdir/tex/equivalents.h:#  define glue_par(A)  equiv(glue_base+(A))


I could be wrong but to me it seems we assign some value to emergency stretch “variable” setting using “emergencystretch” command and we use another via emergency_stretch_par.


Unfortunately I am not able to build luatex locally on Windows Platform, only sync code from SVN repository.


Thanks a lot,


Joseph Canedo





From: schuster.wolfgang@gmail.com
Sent: ‎Tuesday‎, ‎July‎ ‎19‎, ‎2016 ‎12‎:‎10‎ ‎AM
To: ntg-context@ntg.nl








josephcanedo@gmail.com

18. Juli 2016 um 23:21


Dear all,




In some cases specifying \setupalign[stretch] does not seem to have any effect with latest betas (live, 2016.06.20 22:14 version are fine, but 2016.07.18 is not), and the output has now overfulls instead of (admitedly a bit large) underfulls.




Attached  simple (albeit bit extreme) MWE. Sorry for the relatively large MWE but could not figure out how to make it shorter.




emergency_stretch.pdf produced with latest beta (updated with first-setup.bat today).

emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.
I can’t reproduce your problem but justified text isn’t the best option in narrow columns.

Below is a simplified version of your code which doesn’t use the parent setting from margindata and marginframed setups, there is also no need to set the alignment twice and marginframed has no method key (the source is wrong).

\definemargindata
  [InOuter]
  [method=first,
   location=outer,
   margin=margin,
   width=\outermarginwidth,
   style=\tf,
   stack=continue,
   align={normal,hanging,morehyphenation,hz,verytolerant,stretch}]

\definemargindata
  [InInner]
  [method=first,
   location=inner,
   margin=margin, 
   width=\innermarginwidth,
   style=\tf,
   align=outer]

\definemarginframed[InOuter]
\definemarginframed[InInner]

%\setuplayout[width=12cm,rightmargin=4cm]

\starttext

Foo \InOuter{\input knuth } Bar.

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 5735 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: emergency stretch not taken in account in some cases
  2016-07-20 18:48   ` josephcanedo
@ 2016-07-20 20:46     ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2016-07-20 20:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1194 bytes --]

> josephcanedo@gmail.com <mailto:josephcanedo@gmail.com>
> 20. Juli 2016 um 20:48
> I think I could figure out the reason of this problem. Actually 
> emergency stretch is broken in all cases it seems. In luatex source 
> code I see:
>
> source/texk/web2c/luatexdir/tex/commands.w:    
> primitive_tex("emergencystretch",
>  assign_dimen_cmd, *dimen_base *+ emergency_stretch_code, dimen_base);
>
> source/texk/web2c/luatexdir/tex/equivalents.h:#define 
> emergency_stretch_par
> *glue_par*(emergency_stretch_code)
>
> source/texk/web2c/luatexdir/tex/equivalents.h:#  define glue_par(A)  
> equiv(*glue_base*+(A))
>
> I could be wrong but to me it seems we assign some value to emergency 
> stretch “variable” setting using “emergencystretch” command and we use 
> another via emergency_stretch_par.
>
> Unfortunately I am not able to build luatex locally on Windows 
> Platform, only sync code from SVN repository.
This produces three different paragraphs.

\setupwhitespace[line]

\starttext

\input tufte

\startalignment[stretch]
\input tufte
\stopalignment

\startalignment[extremestretch]
\input tufte
\stopalignment

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3374 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2016-07-20 20:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 21:21 emergency stretch not taken in account in some cases josephcanedo
2016-07-18 22:10 ` Wolfgang Schuster
2016-07-19  6:59   ` josephcanedo
2016-07-20 18:48   ` josephcanedo
2016-07-20 20:46     ` Wolfgang Schuster

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