Re: [NTG-context] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context

> On 13 Oct 2021, at 22:34, Hans Hagen  wrote:
> 
> On 10/13/2021 6:54 PM, Hans Åberg wrote:
>>> On 13 Oct 2021, at 18:37, Hans Hagen  wrote:
>>> 
>>> On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:
 I was suggested a long ago to hack the file
  
 /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
 and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I 
 get this error:
 (./luaotfload.sty
 (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
 (./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value 
 (global
 'arguments')
 stack traceback:
[\directlua]:1: in main chunk.
 l.132 }
 ? …
 It is from this segment in the modified luatex-math.tex:
 \ifdefined\directlua
\directlua {
if arguments["mtx:lucidabright"] then
tex.print("\string\\lucidabright")
else
tex.print("\string\\latinmodern")
end
}
 \fi
 Is there a workaround? —I may ditch this setup in favour of using 
 'context' directly, so it is not so important if there is no fix.
>>> I have no clue ..
>> Has not stuff been moved from LuaTeX to ConTeXt? —If so, I thought it might 
>> have something with that to do.
> 
> luatex is just a tex engine and context is a macro package where context mkiv 
> is geared for luatex; the context fontloader has a generic core so it can be 
> used in plain and for latex some write a wrapper around that font hndler for 
> latex that evolved over years
> 
> i have no clue why you get "(./luaotfload.sty ..." but it is not context that 
> you run there (and i can't imagine some plain format loading it either)

I think that LaTeX extracted some parts out of ConTeXt for use with LuaTeX only 
for font loading, and that is why I have it, not remembering the details. I 
think I saw that LuaTeX a few years had more font loading stuff, but that was 
moved to ConTeXt, but you show know better, as it would then would have been 
you did it. :-)

>>> it looks like you load a latex style so I suppose that 'arguments' is no 
>>> longer defined there (as it worked for you in the past).
>> It does not contain it; it a copy in the same directory that has never 
>> changed.
> 
> hm, but i have no clue what this "mtx:..." does

It is line 97-105 in
/usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex

I have not done anything to that part, just adding some support for the STIX 
font.

>>> Maybe 'arguments' lives in some namespace?
>>> 
>>> \directlua {for k, v in pairs(_G) do print(k,v) end}
>>> 
>>> This will show you what is in the global namespace, maybe 'arg'?
>> If I put this code in right before the \ifdefined\directlua it prints a lot 
>> of "nil".
> 
> print(k,v) should print two values, key and value

I may have not used it right, just copying it in right above line 97.


___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context

> On 13 Oct 2021, at 22:28, Hans Hagen  wrote:
> 
> On 10/13/2021 7:02 PM, Hans Åberg wrote:
>>> On 13 Oct 2021, at 18:37, Hans Hagen  wrote:
>>> 
>>> On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:
 
 … —I may ditch this setup in favour of using 'context' directly, so it is 
 not so important if there is no fix.
>>> I have no clue ..
>> I made this as experiment to make a texinfo file along with a manual 
>> generating a PDF to display math properly, which the Info format cannot do.
> 
> I'm not familiar with texinfo but in the context distribution are some 
> luatex-* files that show how to load the generic context font loader (in 
> plain tex). One can make a format with:
> 
>  mtxrun --script plain --make
> 
> an dprocess a plain file with:
> 
>  mtxrun --script plain foo.tex
> 
> I suppose that texinfo is close to plain so doable too.
> 
>> However, it has been decided that the Info format should be extended with 
>> HTML, probably HTML5 then. So one might generate that directly with ConTeXt. 
>> —This was the reason for the other post.
> ok

I first made a texinfo file, and then translated it into a context file, and it 
turns out that the latter much simpler to create indexes and such: in the 
texinfo format, one has to keep track of them in various parts because of TeX's 
limited ability to do such things. In addition, GNU has policy of enforcing 
original TeX with limited Unicode support, making it suitable for simpler types 
of manuals only. There is no requirement to use this format or produce 'info' 
documentation, but it would be nice to produce an HTML. Personally, I prefer 
the PDF format.

___
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] new upload

2021-10-13 Thread jbf via ntg-context
In fact, Hans, that was going to be my comment after updating yesterday 
to the 10-10-21 version: some of the breaks were a bit overdone. Are 
these changes you indicate as tests actually included in the latest 
upload, or should I wait a bit?


Julian

On 14/10/21 2:34 am, Hans Hagen via ntg-context wrote:

influences the pagebreaks in relation to inserts (footnotes) in a more 
significant way than one would expect. 

___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context

On 10/13/2021 6:54 PM, Hans Åberg wrote:



On 13 Oct 2021, at 18:37, Hans Hagen  wrote:

On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:

I was suggested a long ago to hack the file
  /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
this error:
(./luaotfload.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
(./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value (global
'arguments')
stack traceback:
[\directlua]:1: in main chunk.
l.132 }
? …
It is from this segment in the modified luatex-math.tex:
\ifdefined\directlua
\directlua {
if arguments["mtx:lucidabright"] then
tex.print("\string\\lucidabright")
else
tex.print("\string\\latinmodern")
end
}
\fi
Is there a workaround? —I may ditch this setup in favour of using 'context' 
directly, so it is not so important if there is no fix.

I have no clue ..


Has not stuff been moved from LuaTeX to ConTeXt? —If so, I thought it might 
have something with that to do.


luatex is just a tex engine and context is a macro package where context 
mkiv is geared for luatex; the context fontloader has a generic core so 
it can be used in plain and for latex some write a wrapper around that 
font hndler for latex that evolved over years


i have no clue why you get "(./luaotfload.sty ..." but it is not context 
that you run there (and i can't imagine some plain format loading it 
either)



it looks like you load a latex style so I suppose that 'arguments' is no longer 
defined there (as it worked for you in the past).


It does not contain it; it a copy in the same directory that has never changed.


hm, but i have no clue what this "mtx:..." does


Maybe 'arguments' lives in some namespace?

\directlua {for k, v in pairs(_G) do print(k,v) end}

This will show you what is in the global namespace, maybe 'arg'?


If I put this code in right before the \ifdefined\directlua it prints a lot of 
"nil".


print(k,v) should print two values, key and value

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] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context

On 10/13/2021 7:02 PM, Hans Åberg wrote:



On 13 Oct 2021, at 18:37, Hans Hagen  wrote:

On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:


… —I may ditch this setup in favour of using 'context' directly, so it is not 
so important if there is no fix.

I have no clue ..


I made this as experiment to make a texinfo file along with a manual generating 
a PDF to display math properly, which the Info format cannot do.


I'm not familiar with texinfo but in the context distribution are some 
luatex-* files that show how to load the generic context font loader (in 
plain tex). One can make a format with:


  mtxrun --script plain --make

an dprocess a plain file with:

  mtxrun --script plain foo.tex

I suppose that texinfo is close to plain so doable too.


However, it has been decided that the Info format should be extended with HTML, 
probably HTML5 then. So one might generate that directly with ConTeXt. —This 
was the reason for the other post.

ok

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] setuplocalinterlinespace not affecting the whole group?

2021-10-13 Thread Denis Maier via ntg-context
Thanks!

Von: Wolfgang Schuster 
Gesendet: Mittwoch, 13. Oktober 2021 18:14
An: mailing list for ConTeXt users ; Denis Maier via 
ntg-context 
Cc: Maier, Denis Christian (UB) 
Betreff: Re: [NTG-context] setuplocalinterlinespace not affecting the whole 
group?

Denis Maier via ntg-context schrieb am 13.10.2021 um 17:52:

Hi,
I have this MWE:

%
\definebodyfontenvironment
[9bp]
[
normal=9bp,
b=24bp,
]

\setupbodyfont[9bp]

\startTEXpage

{
\setuplocalinterlinespace[line=25.5bp]
%\setupinterlinespace[line=25.5bp]
\tfb
One\crlf
Two

Three
}
\stopTEXpage
%

For some reason \setuplocalinterlinespace[line=25.5bp] seems to affect only the 
first paragraph in the group, but not the distance between the two paragraphs. 
Using \setupinterlinespace instead of \setuplocalinterlinespace gives the same 
result.
(Adding a \crlf between Two and Three gives the correct visual appearance. But 
that's an ugly hack of course...)

Any hints?

Add \par after Three or remove the curly braces.


Wolfgang
___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context

> On 13 Oct 2021, at 18:37, Hans Hagen  wrote:
> 
> On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:
>> 
>> … —I may ditch this setup in favour of using 'context' directly, so it is 
>> not so important if there is no fix.
> I have no clue .. 

I made this as experiment to make a texinfo file along with a manual generating 
a PDF to display math properly, which the Info format cannot do.

However, it has been decided that the Info format should be extended with HTML, 
probably HTML5 then. So one might generate that directly with ConTeXt. —This 
was the reason for the other post.

___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context

> On 13 Oct 2021, at 18:37, Hans Hagen  wrote:
> 
> On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:
>> I was suggested a long ago to hack the file
>>  
>> /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
>> and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
>> this error:
>> (./luaotfload.sty
>> (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
>> (./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value 
>> (global
>> 'arguments')
>> stack traceback:
>>  [\directlua]:1: in main chunk.
>> l.132 }
>> ? …
>> It is from this segment in the modified luatex-math.tex:
>> \ifdefined\directlua
>>\directlua {
>>if arguments["mtx:lucidabright"] then
>>tex.print("\string\\lucidabright")
>>else
>>tex.print("\string\\latinmodern")
>>end
>>}
>> \fi
>> Is there a workaround? —I may ditch this setup in favour of using 'context' 
>> directly, so it is not so important if there is no fix.
> I have no clue ..

Has not stuff been moved from LuaTeX to ConTeXt? —If so, I thought it might 
have something with that to do.

> it looks like you load a latex style so I suppose that 'arguments' is no 
> longer defined there (as it worked for you in the past).

It does not contain it; it a copy in the same directory that has never changed.

> Maybe 'arguments' lives in some namespace?
> 
> \directlua {for k, v in pairs(_G) do print(k.v) end}
> 
> This will show you what is in the global namespace, maybe 'arg'?

If I put this code in right before the \ifdefined\directlua it prints a lot of 
"nil".


___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context
It results in the error

! Argument of \\ has an extra }.
 
\par 
 
}
l.132 }
 
?

> On 13 Oct 2021, at 18:26, Hans van der Meer via ntg-context 
>  wrote:
> 
>>  tex.print("\string\\latinmodern")
> 
> should be at least double backslashes: tex.print("\\string\\latinmodern") I 
> would think
> 
> met vriendelijke groet
> dr. Hans van der Meer

___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context

On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:

I was suggested a long ago to hack the file
  /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
this error:
(./luaotfload.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
(./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value (global
'arguments')
stack traceback:
[\directlua]:1: in main chunk.
l.132 }

? …


It is from this segment in the modified luatex-math.tex:

\ifdefined\directlua
\directlua {
if arguments["mtx:lucidabright"] then
tex.print("\string\\lucidabright")
else
tex.print("\string\\latinmodern")
end
}
\fi

Is there a workaround? —I may ditch this setup in favour of using 'context' 
directly, so it is not so important if there is no fix.
I have no clue .. it looks like you load a latex style so I suppose that 
'arguments' is no longer defined there (as it worked for you in the 
past). Maybe 'arguments' lives in some namespace?


 \directlua {for k, v in pairs(_G) do print(k.v) end}

This will show you what is in the global namespace, maybe 'arg'?

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] Error: attempt to index a nil value

2021-10-13 Thread Hans van der Meer via ntg-context
>  tex.print("\string\\latinmodern")

should be at least double backslashes: tex.print("\\string\\latinmodern") I 
would think

met vriendelijke groet
dr. Hans van der Meer


> On 13 Oct 2021, at 18:01, Hans Åberg via ntg-context  
> wrote:
> 
> I was suggested a long ago to hack the file
> /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
> and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
> this error:
> (./luaotfload.sty
> (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
> (./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value 
> (global
> 'arguments')
> stack traceback:
>   [\directlua]:1: in main chunk.
> l.132 }
> 
> ? …
> 
> 
> It is from this segment in the modified luatex-math.tex:
> 
> \ifdefined\directlua
>   \directlua {
>   if arguments["mtx:lucidabright"] then
>   tex.print("\string\\lucidabright")
>   else
>   tex.print("\string\\latinmodern")
>   end
>   }
> \fi
> 
> Is there a workaround? —I may ditch this setup in favour of using 'context' 
> directly, so it is not so important if there is no fix.
> 
> 
> ___
> 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
___


Re: [NTG-context] setuplocalinterlinespace not affecting the whole group?

2021-10-13 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 13.10.2021 um 17:52:


Hi,

I have this MWE:

%

\definebodyfontenvironment

    [9bp]

    [

    normal=9bp,

    b=24bp,

    ]

\setupbodyfont[9bp]

\startTEXpage

{

\setuplocalinterlinespace[line=25.5bp]

%\setupinterlinespace[line=25.5bp]

\tfb

One\crlf

Two

Three

}

\stopTEXpage

%

For some reason \setuplocalinterlinespace[line=25.5bp] seems to affect 
only the first paragraph in the group, but not the distance between 
the two paragraphs. Using \setupinterlinespace instead of 
\setuplocalinterlinespace gives the same result.


(Adding a \crlf between Two and Three gives the correct visual 
appearance. But that’s an ugly hack of course...)


Any hints?



Add \par after Three or remove the curly braces.

Wolfgang

___
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] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context
I was suggested a long ago to hack the file
 /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
this error:
(./luaotfload.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
(./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value (global
'arguments')
stack traceback:
[\directlua]:1: in main chunk.
l.132 }

? …


It is from this segment in the modified luatex-math.tex:

\ifdefined\directlua
   \directlua {
   if arguments["mtx:lucidabright"] then
   tex.print("\string\\lucidabright")
   else
   tex.print("\string\\latinmodern")
   end
   }
\fi

Is there a workaround? —I may ditch this setup in favour of using 'context' 
directly, so it is not so important if there is no fix.


___
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] setuplocalinterlinespace not affecting the whole group?

2021-10-13 Thread Denis Maier via ntg-context
Hi,
I have this MWE:

%
\definebodyfontenvironment
[9bp]
[
normal=9bp,
b=24bp,
]

\setupbodyfont[9bp]

\startTEXpage

{
\setuplocalinterlinespace[line=25.5bp]
%\setupinterlinespace[line=25.5bp]
\tfb
One\crlf
Two

Three
}
\stopTEXpage
%

For some reason \setuplocalinterlinespace[line=25.5bp] seems to affect only the 
first paragraph in the group, but not the distance between the two paragraphs. 
Using \setupinterlinespace instead of \setuplocalinterlinespace gives the same 
result.
(Adding a \crlf between Two and Three gives the correct visual appearance. But 
that's an ugly hack of course...)

Any hints?

Best,
Denis



interlinespace.pdf
Description: interlinespace.pdf
___
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] new upload

2021-10-13 Thread Hans Hagen via ntg-context

Hi,

This midweek upload has something new. There has been some discussion 
about footnotes and one thing I noticed when playing with some new 
possibilities is that the stretch in topskip (we use a default amount 
that long ago was derived from plain tex and is relative to the body 
font size) influences the pagebreaks in relation to inserts (footnotes) 
in a more significant way than one would expect.


I also noticed that this stretch component is one of the reasons why 
sometimes a side float shape will carry over to a next page in spite of 
there being room. This relates to \brokenpenalty.


At the end of this mail are some tests that demonstrate this. As a 
consequence we now have a "ntop" parameter as well as a shaping related 
penalty primitives (parameters):


  \shapingpenaltiesmode"FF% set all (future) bits (currently 4)
  \shapingpenalty\plushundred % don't go too high

which is currently not enabled by default but might be in upcoming 
versions; this also depends on user feedback. It's a non intrusive 
extension the LuaMetaTeX engine. I have this setting in my local 
preferences file.


Hans


% test code (for Massimiliano and Hraban to play with)

\starttext

\showframe

% this is the current default behaviour; we have a topskip with
% quite some stretch and that stretch is taken into account
% when tex calculates the badness; watch the next page

\dorecurse{4}{
\bgroup
\shapingpenaltiesmode\zerocount
\showmakeup[penalty]
\placefigure[left]{}{}
\input tufte \par
\egroup
}

\page EMPTY \page

% the ntop is new and when >= 0 it is a multiplier for the number
% of lines stretch, here we have one line; watch the next page

\dorecurse{4}{
\bgroup
\shapingpenaltiesmode\zerocount
\setupinterlinespace[ntop=1]
\showmakeup[penalty]
\placefigure[left]{}{}
\input tufte \par
\egroup
}

\page EMPTY \page

% these shaping parameters will discourage a linebreak within a
% shape; the placement macro checked available space but that
% doesn't mean that there can be no linebreak

\dorecurse{4}{
\bgroup
\showmakeup[penalty]
\shapingpenaltiesmode"FF\relax
\shapingpenalty\plushundred
\placefigure[left]{}{}
\input tufte \par
\egroup
}

\page EMPTY \page

% the next pages show the effect of changed topskip on page breaks
% with footnotes

\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}

\page EMPTY \page

\setupinterlinespace[ntop=2]

\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}

\page EMPTY \page

\setupinterlinespace[ntop=0]

\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}

\stoptext


-
  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] undefined command in current latest

2021-10-13 Thread Marcus Vinicius Mesquita via ntg-context
I noticed the same problem reported by Massi, since a lua function I use in
a project as an argument of \getmarking does not get expanded anymore with
the new marking code.

Marcus Vinicius

On Mon, Oct 11, 2021 at 8:33 AM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 10/11/2021 11:33 AM, mf via ntg-context wrote:
> > It looks like the argument of \getmarking is not expanded, since you get
> > "\it knuth" instead of an italicized "knuth" in the headers of this MWE:
> >
> > \definemarking[myheader]
> > \setupheadertexts[{\getmarking[myheader][last]}]
> > \starttext
> >\dorecurse{10}{\samplefile{knuth}\marking[myheader]{\it knuth}\par}
> > \stoptext
> we switched to the new marking code; i'll sent you a file to test
>
> fyi: in mkii/mkiv we had to work around limitations of mark
> synchronization and in mkiv that went even further; in lmtx we can use
> some new engine features so the whole lot could be simplified, which
> should also perfoem a little better; it means that mark content follows
> a bit different route
>
> 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
>
> ___
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] Update now!

2021-10-13 Thread Henning Hraban Ramm via ntg-context
Now is a good time to update your LMTX installation, since the current version 
(October 10th) works well in many regards (esp. footnotes).

I didn’t check yet some areas that are known to be problematic, like columns, 
but my projects with hundreds of footnotes (including side floats in footnotes) 
and other complex stuff look as they should.

Thank you, Hans!


That doesn’t mean I’ll stop complaining about stuff I would like to behave 
differently, of course ;)

Hraban
___
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] hyphenation

2021-10-13 Thread Hans Hagen via ntg-context

Hi,

Here is a nice trick to show all possible (within the constraints of 
fonts and languages) hyphenations in a paragraoh:


\bgroup
\setupalign[flushright]
\hyphenpenalty-10
\input tufte
\par % force hyphenation
\egroup

This one does the same for last lines on a page with a hyphen:

\bgroup
  % \interlinepenalty1
\brokenpenalty-1
\input tufte
\egroup

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
___