Re: [NTG-context] "error not related to input file"

2019-12-16 Thread Rudolf Bahr
On Sat, Dec 14, 2019 at 10:31:20PM +0100, Hans Hagen wrote:
> On 12/14/2019 5:43 PM, Rudolf Bahr wrote:
> > 
> > Hello All,
> > 
> > In:
> > LuaMetaTeX, Version 2.03.3
> > ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: 
> > english/english
> > I get the following error message:
> > 
> > tex error   > error not related to input file:
> > tex error   >   tex: ! Emergency stop
> > tex error   >   lua: ?
> > tex error   >   mps: -
> >
> > In LuaTeX ... I get a "*" instead of the error message above.
> > And again my program does all what it should, but a grey pdf-page too.
> >
> > Sorry, no MWE available.


On Sat, Dec 14, 2019 at 07:27:34PM +0100, Otared Kavian wrote:
> 
> Since I have also suffered somewhat from the cryptic (and often useless…) 
> error messages, I understand your frustration :-)
> Now, maybe if you do 
>   context --directives="system.showerror" myfile.tex
> then you get a file named « myfile-status.html » which is more helpful.


On Sat, Dec 14, 2019 at 10:31:20PM +0100, Hans Hagen wrote:
>
> normally an * means: waiting for input  and no message is then involved
> as in principle there is no real error, apart from waiting for input


Otared and Hans, thank you for your answers and Otared especially for your
sympathy! :-)

In the meantime I could get rid of "! Emergency stop" and "*" by changing
a \def-command which calls a luacode subprogram; see further down in my MWE.

My program run now looks essentially better, but 
"--directives="system.showerror" 
and "-status.html" still report an error: "! Undefined control 
sequence"
without telling which control sequence is undefined. How reliable is this error
message? I don't know of control sequences in luacode or what does this error 
message
mean?

Here is a MWE which shows my program structure. Sorry, this MWE works really :-)
During my attempts to find the error I got for a short time the message: 
"Invalid
\starttext ... \stoptext structure" which I don't understand.

--- MWE 
---
\def\projectpath{/home/sam/trip-2019/}

\startluacode
   userdata = userdata or {}
   u = userdata

   function u.table_save ( tab, file )
  local tab   = tab
  local file  = file

  dofile ("table_save_u_table_load.lua")
  table.save(tab, file)
   end


   function u.Init ( col )

  local col  = col 
  local ppth = tokens.getters.macro("projectpath")
  local xO   = tokens.getters.macro("xO")
  local yO   = tokens.getters.macro("yO")

  local I = {}  -- Table of initial values
  I ["projectpath"] = ppth
  I ["column"]  = {}
  I ["column"][col] = {}
  I ["column"][col]["layerpos"] = {}
  I ["column"][col]["layerpos"] ["xO"] = xO
  I ["column"][col]["layerpos"] ["yO"] = yO

  u.table_save(I,"I-Table.lua") 
   end
   
\stopluacode

%\def\Init #1 {\ctxlua {u.Init ([==[#1]==]) }}% --the blanks produced my "! 
Emergency stop"
\def\Init#1{\ctxlua{u.Init([==[#1]==])}}%   --in this form the command 
works 

\starttext
   \def\Column{A}%
   \def\xO{0}%  in pt
   \def\yO{20}% in pt

   \Init{\Column}%%
\stoptext
---
For those possibly interested in running this MWE I append 
"table_save_u_table_load.lua",
a lua program to save and reload lua tables, found in the lua homepage. Anyway, 
the
resulting flattened table "I" is here:

return {
-- Table: {1}
{
   ["column"]={2},
   ["projectpath"]="/home/sam/trip-2019/",
},
-- Table: {2}
{
   ["A"]={3},
},
-- Table: {3}
{
   ["layerpos"]={4},
},
-- Table: {4}
{
   ["yO"]="20",
   ["xO"]="0",
},
}



I think nobody will be able to help me in this case, I myself have to try again 
and 
again to finally find the error. If so, this would be the nicest christmas gift 
to me :-)

Best regards,

Rudolf


--[[
Save Table to File
Load Table from File
v 1.0

Lua 5.2 compatible

Only Saves Tables, Numbers and Strings
Insides Table References are saved
Does not save Userdata, Metatables, Functions and indices of these

table.save( table , filename )

on failure: returns an error msg


table.load( filename or stringtable )

Loads a table that has been saved via the table.save function

on success: returns a previously saved table
on failure: returns as second argument an error msg


Licensed under the same terms as Lua itself.
]]--
do
-- declare local variables
--// exportstring( string )
--// returns a "Lua" portable version of the string
local function exportstring( s )
return 

Re: [NTG-context] "error not related to input file"

2019-12-14 Thread Hans Hagen

On 12/14/2019 5:43 PM, Rudolf Bahr wrote:


Hello All,

In:
LuaMetaTeX, Version 2.03.3
ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: english/english
I get the following error message:

tex error   > error not related to input file:
tex error   >   tex: ! Emergency stop
tex error   >   lua: ?
tex error   >   mps: -

Sorry, no MWE available.
What does this message mean? [1] shows only an empty page.
To this point my programm does all what it should with the exception of creating
a grey pdf-file-page. My pdf-programs are okular and xpdf.

In:
LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: english/english
I get a "*" instead of the error message above. And again my program does all 
what
it should, but a grey pdf-page too.

Shure, there must be an error in my program. But where should I look for it?
I tried several MWEs, but they all worked at their best.

Please, any ideas?
normally an * means: waiting for input  and no message is then 
involved as in principle there is no real error, apart from waiting for 
input


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 not related to input file"

2019-12-14 Thread Otared Kavian
Hi,

Since I have also suffered somewhat from the cryptic (and often useless…) error 
messages, I understand your frustration :-)
Now, maybe if you do 
context --directives="system.showerror" myfile.tex
then you get a file named « myfile-status.html » which is more helpful.

Best regards: OK

> On 14 Dec 2019, at 17:57, Rudolf Bahr  wrote:
> 
> 
> On Sat, Dec 14, 2019 at 05:43:45PM +0100, Bahr Rudolf wrote:
>> 
>> Hello All,
>> 
>> In:
>> LuaMetaTeX, Version 2.03.3
>> ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: 
>> english/english
>> I get the following error message:
>> 
>> tex error   > error not related to input file:
>> tex error   >   tex: ! Emergency stop
>> tex error   >   lua: ?
>> tex error   >   mps: -
>> 
>> Sorry, no MWE available.
>> What does this message mean? [1] shows only an empty page.
>> To this point my programm does all what it should with the exception of 
>> creating
>> a grey pdf-file-page. My pdf-programs are okular and xpdf.
>> 
>> In:
>> LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
>> ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: 
>> english/english
>> I get a "*" instead of the error message above. And again my program does 
>> all what
>> it should, but a grey pdf-page too.
>> 
>> Shure, there must be an error in my program. But where should I look for it?
>> I tried several MWEs, but they all worked at their best.
>> 
>> Please, any ideas?
>> 
>> Best wishes,
>> Rudolf
>> 
>> 
>> [1] https://wiki.contextgarden.net/error_not_related_to_input_file
>> 
> 
> 
> Sorry, I forgot:
> My program uses up to now mainly \startluacode ... \stopluacode.
> 
> Rudolf
> ___
> 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] "error not related to input file"

2019-12-14 Thread Rudolf Bahr

On Sat, Dec 14, 2019 at 05:43:45PM +0100, Bahr Rudolf wrote:
> 
> Hello All,
> 
> In:
> LuaMetaTeX, Version 2.03.3
> ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: 
> english/english
> I get the following error message:
> 
> tex error   > error not related to input file:
> tex error   >   tex: ! Emergency stop
> tex error   >   lua: ?
> tex error   >   mps: -
> 
> Sorry, no MWE available.
> What does this message mean? [1] shows only an empty page.
> To this point my programm does all what it should with the exception of 
> creating
> a grey pdf-file-page. My pdf-programs are okular and xpdf.
> 
> In:
> LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
> ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: 
> english/english
> I get a "*" instead of the error message above. And again my program does all 
> what
> it should, but a grey pdf-page too.
> 
> Shure, there must be an error in my program. But where should I look for it?
> I tried several MWEs, but they all worked at their best.
> 
> Please, any ideas?
> 
> Best wishes,
> Rudolf
> 
> 
> [1] https://wiki.contextgarden.net/error_not_related_to_input_file
> 


Sorry, I forgot:
My program uses up to now mainly \startluacode ... \stopluacode.

Rudolf
___
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 not related to input file"

2019-12-14 Thread Rudolf Bahr

Hello All,

In:
LuaMetaTeX, Version 2.03.3
ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: english/english
I get the following error message:

tex error   > error not related to input file:
tex error   >   tex: ! Emergency stop
tex error   >   lua: ?
tex error   >   mps: -

Sorry, no MWE available.
What does this message mean? [1] shows only an empty page.
To this point my programm does all what it should with the exception of creating
a grey pdf-file-page. My pdf-programs are okular and xpdf.

In:
LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: english/english
I get a "*" instead of the error message above. And again my program does all 
what
it should, but a grey pdf-page too.

Shure, there must be an error in my program. But where should I look for it?
I tried several MWEs, but they all worked at their best.

Please, any ideas?

Best wishes,
Rudolf


[1] https://wiki.contextgarden.net/error_not_related_to_input_file

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