ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Hans Åberg via ntg-context" <ntg-context@ntg.nl>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: "Hans Åberg" <haberg-1@telia.com>,
	"mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Error: attempt to index a nil value
Date: Wed, 13 Oct 2021 23:22:59 +0200	[thread overview]
Message-ID: <B6F86D36-306F-48B3-858F-65B97D892CED@telia.com> (raw)
In-Reply-To: <0f88c8b0-6c14-1e5d-c07c-308e74c5b838@xs4all.nl>


> On 13 Oct 2021, at 22:34, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> On 10/13/2021 6:54 PM, Hans Åberg wrote:
>>> On 13 Oct 2021, at 18:37, Hans Hagen <j.hagen@xs4all.nl> 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
___________________________________________________________________________________

  reply	other threads:[~2021-10-13 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 16:01 Hans Åberg via ntg-context
2021-10-13 16:26 ` Hans van der Meer via ntg-context
2021-10-13 16:39   ` Hans Åberg via ntg-context
2021-10-13 16:37 ` Hans Hagen via ntg-context
2021-10-13 16:54   ` Hans Åberg via ntg-context
2021-10-13 20:34     ` Hans Hagen via ntg-context
2021-10-13 21:22       ` Hans Åberg via ntg-context [this message]
2021-10-13 17:02   ` Hans Åberg via ntg-context
2021-10-13 20:28     ` Hans Hagen via ntg-context
2021-10-13 21:13       ` Hans Åberg via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B6F86D36-306F-48B3-858F-65B97D892CED@telia.com \
    --to=ntg-context@ntg.nl \
    --cc=haberg-1@telia.com \
    --cc=j.hagen@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).