[NTG-context] Re: Why overbar is so big

2023-08-14 Thread Xavier B.
Yes. It works without lualibs-os
Thanks
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-14 Thread Hans Hagen via ntg-context

On 8/14/2023 9:13 AM, Xavier B. wrote:

It does not work:

\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}

What do you run directlua in LMTX?
in this case, what does does lualibs-os provide? os.resultof is built 
into context so that should just work


ok, i did as search on ctan and it looks like that lua file is just the 
context l-os one renamed so no need to load anything, in fact, loading 
it might even break the built in when it does overloads


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-14 Thread Xavier B.
It does not work:

\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}

What do you run directlua in LMTX?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-13 Thread Hans Hagen

On 8/13/2023 10:39 PM, Xavier B. wrote:

Running LMTX I have an error: lualibs-os not found:

lua error   > lua error on line 35 in file 
ng-pre-informacio-document.conTeXt:

token call, execute: 
...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: module 
'lualibs-os' not found:
 no field package.preload['lualibs-os']
 no file '/usr/local/share/lua/5.4/lualibs-os.lua'
 no file '/usr/local/share/lua/5.4/lualibs-os/init.lua'
 no file '/usr/local/lib/lua/5.4/lualibs-os.lua'
 no file '/usr/local/lib/lua/5.4/lualibs-os/init.lua'
 no file './lualibs-os.lua'
 no file './lualibs-os/init.lua'
stack traceback:
 [C]: in upvalue 'requiem'
 ...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in function 
<...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
 (...tail calls...)
 [ctxlua]:1: in main chunk
25 \subsubject{Versió}
26
27 Contínuament canvio aquest document, afegint, modificant o eliminant 
algunes parts seves. En aquest sentit, és una obra permanentment inacabada. Per 
aquest motiu convé saber quina versió del document esteu llegint.
28
29 \medskip
30 La versió d'aquest document és la {\bf 0.4.0-alfa.\currentdate[year,-, 
mm,-,dd]}.
31
32 \bigskip
33 Aquest document ha estat generat, \currentdate[weekday,{ },day,{ 
},month,{ },year] a les \currenttime, usant programari lliure 
(\goto{\Context}[url(http://wiki.contextgarden.net)] versió 
\contextversionnumber, \goto{\texenginename}[url(http://www.luatex.org)] versió 
\texengineversion\space i \goto{PGF/Ti{\em 
k}Z}[url(http://sourceforge.net/projects/pgf/)]) sota un entorn 
\goto{GNU/Linux}[url(https://www.linuxfoundation.org)] (\goto{Artix 
Linux}[url(https://artixlinux.org)]). La revisió d'aquest document és la número 
\goto{\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}}[url(https://repo.or.cz/apunts-espa-matematiques.git/shortlog/HEAD)]. El conjunt 
de les versions s'administra amb \goto{git}[url(http://git-scm.com/)]. Teniu el codi font del 
document en aquest repositori: 
\goto{https://repo.or.cz/apunts-espa-matematiques.git}[url(https://repo.or.cz/apunts-espa-matematiques.git)].
36


Can you give me the solution here?
I have no clue what lualibs-os is so ... if it's something third party 
you and try.


--permitloadlib

and cross your fingers. Also, whenever using lua code that is not part 
of context keep in mind that we use lua 5.4


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Why overbar is so big

2023-08-13 Thread Xavier B.
Running LMTX I have an error: lualibs-os not found:

lua error   > lua error on line 35 in file 
ng-pre-informacio-document.conTeXt:

token call, execute: 
...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: module 
'lualibs-os' not found:
no field package.preload['lualibs-os']
no file '/usr/local/share/lua/5.4/lualibs-os.lua'
no file '/usr/local/share/lua/5.4/lualibs-os/init.lua'
no file '/usr/local/lib/lua/5.4/lualibs-os.lua'
no file '/usr/local/lib/lua/5.4/lualibs-os/init.lua'
no file './lualibs-os.lua'
no file './lualibs-os/init.lua'
stack traceback:
[C]: in upvalue 'requiem'
...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in 
function <...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
(...tail calls...)
[ctxlua]:1: in main chunk
25 \subsubject{Versió}
26
27 Contínuament canvio aquest document, afegint, modificant o eliminant 
algunes parts seves. En aquest sentit, és una obra permanentment inacabada. Per 
aquest motiu convé saber quina versió del document esteu llegint.
28
29 \medskip
30 La versió d'aquest document és la {\bf 0.4.0-alfa.\currentdate[year,-, 
mm,-,dd]}.
31
32 \bigskip
33 Aquest document ha estat generat, \currentdate[weekday,{ },day,{ 
},month,{ },year] a les \currenttime, usant programari lliure 
(\goto{\Context}[url(http://wiki.contextgarden.net)] versió 
\contextversionnumber, \goto{\texenginename}[url(http://www.luatex.org)] versió 
\texengineversion\space i \goto{PGF/Ti{\em 
k}Z}[url(http://sourceforge.net/projects/pgf/)]) sota un entorn 
\goto{GNU/Linux}[url(https://www.linuxfoundation.org)] (\goto{Artix 
Linux}[url(https://artixlinux.org)]). La revisió d'aquest document és la número 
\goto{\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}}[url(https://repo.or.cz/apunts-espa-matematiques.git/shortlog/HEAD)]. 
El conjunt de les versions s'administra amb 
\goto{git}[url(http://git-scm.com/)]. Teniu el codi font del document en aquest 
repositori: 
\goto{https://repo.or.cz/apunts-espa-matematiques.git}[url(https://repo.or.cz/apunts-espa-matematiques.git)].
36


Can you give me the solution here?

Thanks,
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-13 Thread Mikael Sundqvist
Hi,

On Sun, Aug 13, 2023 at 9:13 AM Xavier B.  wrote:
>
> So,
>
> Finally is it a bug in MKIV? It seems you fix some kind of bug in your 
> messages. Is it true?
>
> > The output with Luametatex is correct but Luatex creates a raised bar
> > (and different linebreaking).
> >
> > \showglyphs
> >
> > \startTEXpage[offset=1ex]
> >  \ruledhbox{$\overline{OA} = \overbar  {OA} = 4.2$}
> >  \par
> >  \ruledhbox{$\underline   {OA} = \underbar {OA} = 4.2$}
> >  \par
> >  \ruledhbox{$\widetilde   {OA} = \widebar  {OA} = 4.2$}
> >  \par
> >  \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$}
> > \stopTEXpage
> >
> > I'll add a 'force fix in spite of extensible being present' in mkiv. In
> > lmtx we always fix also because we drop in nicer shapes (watch the round
> > tips in lm and fancy tips in antykwa) and concluded that fonts will
> > remain as they are.
> >
> > Hans
>
> As you suggested, I will give a try to LMTX but be aware most user still use 
> MKIV until most distros upgrade the texlive version of context to LMTX.
>
> Regards,
> Xavier

One can also try to instead use the accent mechanism instead of a stacker:

% engine=luatex

\definemathtopaccent[widebar] ["0305]

\startTEXpage[offset=3pt]
$\overbar{OA}$

$\widebar{OA}$
\stopTEXpage

The \widebar is defined (almost) like that in lmtx.

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Why overbar is so big

2023-08-13 Thread Hans Hagen via ntg-context

On 8/13/2023 9:08 AM, Xavier B. wrote:

So,

Finally is it a bug in MKIV? It seems you fix some kind of bug in your 
messages. Is it true?


Not really. It's a a bug in the fonts (that will stay if only for 
compaibility reasons). There is a catch in mkiv that compensates for it 
but only when characters are not there. So, for these two I now force 
the catch.


In lmtx we have a bit different approach: we just assuem they are wrong 
in all fonts and fix them or replace them. We also have a more advanced 
math engine so we can control placement better.


There are also 'font parameters' involved that can be bad (i guess that 
designers can't really test math font parameters). In lmtx we have more 
of them, beyond what opentype math provides.


All of this is handled in goodie files. That mechanism is present in 
mkiv but no one ever bothered to spent time on it. That said: the last 
two years Mikeal and I spent a *lot* of time on math and we don't really 
look back at mkiv / mkii also because there is way more neat things now 
(most probably go unnoticed) ... you can read about it in some documents 
that come with context, articles in tugboat, and there are talks by 
Mikael at tug meetings on YT.



 The output with Luametatex is correct but Luatex creates a raised bar
 (and different linebreaking).

\showglyphs

\startTEXpage[offset=1ex]
  \ruledhbox{$\overline{OA} = \overbar  {OA} = 4.2$}
  \par
  \ruledhbox{$\underline   {OA} = \underbar {OA} = 4.2$}
  \par
  \ruledhbox{$\widetilde   {OA} = \widebar  {OA} = 4.2$}
  \par
  \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$}
\stopTEXpage

I'll add a 'force fix in spite of extensible being present' in mkiv. In
lmtx we always fix also because we drop in nicer shapes (watch the round
tips in lm and fancy tips in antykwa) and concluded that fonts will
remain as they are.

Hans


As you suggested, I will give a try to LMTX but be aware most user still use 
MKIV until most distros upgrade the texlive version of context to LMTX.
It's not that hard to install lmtx alongside. If distributions take from 
texlive then likely you also end up with files that are not needed (base 
package) and lack some fonts (esp math) by default. You'd also benefit 
from the last couple of years advancements. Keep in mind that for a long 
term tex (document) project a snapshot approach is healthy because you 
never know what a distribution adds / replaces (esp fonts can be a mess 
and you want to know what you use).


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-13 Thread Xavier B.
So,

Finally is it a bug in MKIV? It seems you fix some kind of bug in your 
messages. Is it true?

> The output with Luametatex is correct but Luatex creates a raised bar 
> (and different linebreaking).
> 
> \showglyphs
> 
> \startTEXpage[offset=1ex]
>  \ruledhbox{$\overline{OA} = \overbar  {OA} = 4.2$}
>  \par
>  \ruledhbox{$\underline   {OA} = \underbar {OA} = 4.2$}
>  \par
>  \ruledhbox{$\widetilde   {OA} = \widebar  {OA} = 4.2$}
>  \par
>  \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$}
> \stopTEXpage
> 
> I'll add a 'force fix in spite of extensible being present' in mkiv. In 
> lmtx we always fix also because we drop in nicer shapes (watch the round 
> tips in lm and fancy tips in antykwa) and concluded that fonts will 
> remain as they are.
> 
> Hans

As you suggested, I will give a try to LMTX but be aware most user still use 
MKIV until most distros upgrade the texlive version of context to LMTX.

Regards,
Xavier
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-12 Thread Hans Hagen via ntg-context

On 8/12/2023 10:10 AM, Xavier B. wrote:

The font is the default:
\setupbodyfont [modern, 12pt] % modern o cmr, 11pt

I use Linux (arch derivative).
if you want nicer math switch over to lmtx as mkiv is sort of frozen and 
efforts wrt math go into lmtx


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-12 Thread Hans Hagen via ntg-context

On 8/12/2023 11:46 AM, Wolfgang Schuster wrote:

Hans Hagen via ntg-context schrieb am 12.08.2023 um 11:13:

On 8/12/2023 10:10 AM, Xavier B. wrote:

The font is the default:
\setupbodyfont [modern, 12pt] % modern o cmr, 11pt

I use Linux (arch derivative).

Looks ok here (see atached). Does the modern-math.lfg file have:

    AccentTopShiftUp = -60,
    FlattenedAccentTopShiftUp    = -60,

I assume it has the same lm math font as we use.


Do you test with Luatex?


Only when asked.

The output with Luametatex is correct but Luatex creates a raised bar 
(and different linebreaking).

\showglyphs

\startTEXpage[offset=1ex]
\ruledhbox{$\overline{OA} = \overbar  {OA} = 4.2$}
\par
\ruledhbox{$\underline   {OA} = \underbar {OA} = 4.2$}
\par
\ruledhbox{$\widetilde   {OA} = \widebar  {OA} = 4.2$}
\par
\ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$}
\stopTEXpage

I'll add a 'force fix in spite of extensible being present' in mkiv. In 
lmtx we always fix also because we drop in nicer shapes (watch the round 
tips in lm and fancy tips in antykwa) and concluded that fonts will 
remain as they are.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Why overbar is so big

2023-08-12 Thread Wolfgang Schuster

Hans Hagen via ntg-context schrieb am 12.08.2023 um 11:13:

On 8/12/2023 10:10 AM, Xavier B. wrote:

The font is the default:
\setupbodyfont [modern, 12pt] % modern o cmr, 11pt

I use Linux (arch derivative).

Looks ok here (see atached). Does the modern-math.lfg file have:

    AccentTopShiftUp = -60,
    FlattenedAccentTopShiftUp    = -60,

I assume it has the same lm math font as we use.


Do you test with Luatex?

The output with Luametatex is correct but Luatex creates a raised bar 
(and different linebreaking).


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Why overbar is so big

2023-08-12 Thread Hans Hagen via ntg-context

On 8/12/2023 10:10 AM, Xavier B. wrote:

The font is the default:
\setupbodyfont [modern, 12pt] % modern o cmr, 11pt

I use Linux (arch derivative).

Looks ok here (see atached). Does the modern-math.lfg file have:

AccentTopShiftUp = -60,
FlattenedAccentTopShiftUp= -60,

I assume it has the same lm math font as we use.

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
-


overbar.pdf
Description: Adobe PDF document
\startTEXpage[offset=1ts]
$\overbar{OA} = 4.2$
\stopTEXpage
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Why overbar is so big

2023-08-12 Thread Xavier B.
The font is the default:
\setupbodyfont [modern, 12pt] % modern o cmr, 11pt

I use Linux (arch derivative).

Xavier

On Fri, 11 Aug 2023 21:38:00 +0200
"Xavier B."  ha escrit:

> If you run
> 
> \starttext
> 
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 
> proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
> $\overbar{OA} = 4,2$
> \stoptext
> 
> Then the overbar has the bar in a very long altitude.
> Can you please, see the output attached.
> 
> Thanks in advance,
> Xavier
> 
> PS: I use context version:mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2023.03.10 12:15
> mtx-context | main context file: 
> /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2023.03.10 12:15
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-11 Thread Thangalin
Looks fine to me.

Current version: 2023.08.10 02:59

Running on Linux.

What fonts are you using?

On Fri, Aug 11, 2023 at 12:38 PM Xavier B.  wrote:

> If you run
>
> \starttext
>
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
> commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
> cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
> est laborum.
> $\overbar{OA} = 4,2$
> \stoptext
>
> Then the overbar has the bar in a very long altitude.
> Can you please, see the output attached.
>
> Thanks in advance,
> Xavier
>
> PS: I use context version:mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file:
> /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2023.03.10 12:15
> mtx-context | main context file:
> /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2023.03.10 12:15
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___


t.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___