Re: [NTG-context] Bug in Luatex file handling?

2021-06-15 Thread Hans Hagen

On 6/15/2021 2:38 PM, Hans van der Meer wrote:
This I cannot explain. Opening a file directly from its full name in a 
string succeeds. But doing the same from a parameter transferred from 
ConteXt to Lua succeeds if the file is in one directory deeper but fails 
if the file is two directories deeper.

I suspect there is something not ok in LuaTeX.
The lines with  and  directly come from print statements 
inserted in the Lua code.


dr. Hans van der Meer

Open file in directory 1 and 2 levels deep - direct call succeeds
..io.open("events/hga-0372-345-62.xml","r")=>file (0x7fff97415f88)
..io.open("events/transcripten/hga-0372-345-62.xml","r")=>file 
(0x7fff97416020)


Idem but now from parameter filename transferred from ConTeXt into Lua:
Open file one level deeper succeeds (printed filename comes from the call):
 >>io.open(filename,"r") 
filename=events/hga-0372-1764-63.xml=>file (0x7fff974160b8)

Open file two levels deeper fails:
 >>io.open(filename,"r") 
filename=events/transcripten/hga-0372-1764-63.xml=>nil


Caller:
\def\FileExist#1{\cldcontext{hvdm.existfile([===[#1]===])}}
Lua code:
hvdm.existfile = function (filename)
-- The test code was inserted here --
local file = io.open(filename, "r")
if file then
file:close()
end
return file ~= nil and "true" or "false"
end


does lfs.isfile(name) work?

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


[NTG-context] Bug in Luatex file handling?

2021-06-15 Thread Hans van der Meer
This I cannot explain. Opening a file directly from its full name in a string 
succeeds. But doing the same from a parameter transferred from ConteXt to Lua 
succeeds if the file is in one directory deeper but fails if the file is two 
directories deeper.
I suspect there is something not ok in LuaTeX.
The lines with  and  directly come from print statements inserted in 
the Lua code.

dr. Hans van der Meer

Open file in directory 1 and 2 levels deep - direct call succeeds
..io.open("events/hga-0372-345-62.xml","r")=>file (0x7fff97415f88)
..io.open("events/transcripten/hga-0372-345-62.xml","r")=>file 
(0x7fff97416020)

Idem but now from parameter filename transferred from ConTeXt into Lua:
Open file one level deeper succeeds (printed filename comes from the call):
>>io.open(filename,"r") filename=events/hga-0372-1764-63.xml=>file 
>>(0x7fff974160b8)
Open file two levels deeper fails:
>>io.open(filename,"r") 
>>filename=events/transcripten/hga-0372-1764-63.xml=>nil

Caller:
\def\FileExist#1{\cldcontext{hvdm.existfile([===[#1]===])}}
Lua code:
hvdm.existfile = function (filename)
-- The test code was inserted here --
local file = io.open(filename, "r")
if file then
file:close()
end
return file ~= nil and "true" or "false"
end

___
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] bug in luatex on osx-ppc

2011-05-24 Thread Taco Hoekwater




Op 24 mei 2011 om 11:26 heeft "Thomas A. Schmitz"  
het volgende geschreven:

> Hi all,
> 
> after updating the minimals to the latest beta on osx-ppc, I can't compile 
> any document, I always get this error:
> 
> context test
> 
> mtx-context | run 1: luatex 
> --fmt="/Users/tas/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en"
>  
> --lua="/Users/tas/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui"
>  --backend="pdf" "./test"
> This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277)
> \write18 enabled.
> Could not undump 51859 1-byte item(s): : unexpected end of file.
> 
> mtx-context | fatal error: return code: 1%
> 
> This happens both with the binary in the minimals (0.70.1) and when I compile 
> the latest trunk (0.71.0), so I'm a bit lost here - it looks like a problem 
> in the executables, right?
> 
Yes, I believe so as well. Do you have any idea when the trouble started?
As I do not have a ppc machine, it will be a nightmare to find the problem 
unless you have a clear idea when it started (ideally a revision number, even).

Best wishes,
Taco
___
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
___


Re: [NTG-context] bug in luatex on osx-ppc

2011-05-24 Thread Thomas A. Schmitz


On May 24, 2011, at 12:01 PM, Otared Kavian wrote:


Hi Thomas,

Some time ago I had an analogous problem related to a new version of  
LuaTeX (on Mac OS X 10.6.7, Intel processor). I can't say anything  
about the error message you get, but what I did was the following:

--- I erased the content of texmf cache, that is in my case
/context-minimal/tex/texmf-cache/luatex-cache
--- and I ran again first-setup.sh
after that everything was working fine.

Best regards: OK


Hi Otared,

thanks, but I've done this already a couple of time; I think  the  
problem is somewhat deeper.


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


Re: [NTG-context] bug in luatex on osx-ppc

2011-05-24 Thread Otared Kavian
Hi Thomas,

Some time ago I had an analogous problem related to a new version of LuaTeX (on 
Mac OS X 10.6.7, Intel processor). I can't say anything about the error message 
you get, but what I did was the following:
--- I erased the content of texmf cache, that is in my case
/context-minimal/tex/texmf-cache/luatex-cache
--- and I ran again first-setup.sh
after that everything was working fine.

Best regards: OK

On 24 mai 2011, at 11:26, Thomas A. Schmitz wrote:

> Hi all,
> 
> after updating the minimals to the latest beta on osx-ppc, I can't compile 
> any document, I always get this error:
> 
> context test
> 
> mtx-context | run 1: luatex 
> --fmt="/Users/tas/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en"
>  
> --lua="/Users/tas/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui"
>  --backend="pdf" "./test"
> This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277)
> \write18 enabled.
> Could not undump 51859 1-byte item(s): : unexpected end of file.
> 
> mtx-context | fatal error: return code: 1%
> 
> This happens both with the binary in the minimals (0.70.1) and when I compile 
> the latest trunk (0.71.0), so I'm a bit lost here - it looks like a problem 
> in the executables, right?
> 
> All best
> 
> Thomas
> ___
> 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
> ___


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


[NTG-context] bug in luatex on osx-ppc

2011-05-24 Thread Thomas A. Schmitz

Hi all,

after updating the minimals to the latest beta on osx-ppc, I can't  
compile any document, I always get this error:


context test

mtx-context | run 1: luatex --fmt="/Users/tas/context/tex/texmf- 
cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/ 
cont-en" --lua="/Users/tas/context/tex/texmf-cache/luatex-cache/ 
context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui" -- 
backend="pdf" "./test"

This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277)
 \write18 enabled.
Could not undump 51859 1-byte item(s): : unexpected end of file.

mtx-context | fatal error: return code: 1%

This happens both with the binary in the minimals (0.70.1) and when I  
compile the latest trunk (0.71.0), so I'm a bit lost here - it looks  
like a problem in the executables, right?


All best

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


Re: [NTG-context] Bug in luatex?

2008-09-04 Thread Hans Hagen
Diego Depaoli wrote:
> Hi all,
> compiling this small file with luatex I get weird results.

this is a bug in luatex itself

taco: when i comment brokenpenalty here, it works ok

\def\nopenalties
   {\widowpenalty\zerocount
\clubpenalty \zerocount
\brokenpenalty   \zerocount % prevents
\doublehyphendemerits\zerocount
\finalhyphendemerits \zerocount
\adjdemerits \zerocount
   }

this is used in (supp-box) \processisolatedwords

(btw, some day i will rewrite all annotation related stuff)

test file:

\setupinteraction[state=start]

\useURL[161/63][http://www.regione.emilia-romagna.it/cra/pdf/161_63.pdf][][Legge
 
14 febbraio]

\starttext
 \from[161/63]
\stoptext

somehow between 14 and febbraio no valid breakpoint occurs (a par is 
created with three lines that has to be split in three)


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Bug in luatex?

2008-09-03 Thread Diego Depaoli
Hi all,
compiling this small file with luatex I get weird results.
All works fine with xetex.

\mainlanguage[it]
\setupcolors[state=start]
\setupinteraction[state=start, color=darkblue]
\useURL[54/92][http://arianna.consiglioregionale.piemonte.it/base/leggi/l1992054.html][][Legge
regionale 09 dicembre 1992, n. 54]
\useURL[1/90][http://www.italgiure.giustizia.it/nir/lexs/1990/lexs308762.html][][Legge
del 4 gennaio 1990 n. 1]
\useURL[40/07][http://www.parlamento.it/leggi/07040l.htm][][Legge 2
aprile 2007, n. 40]
\useURL[174/05][http://www.camera.it/parlam/leggi/05174l.htm][][Legge
17 agosto 2005, n. 174]
\useURL[1142/70][http://impresa.comune.belluno.it/pdffiles/1142_70.pdf][][Legge
23 dicembre 1970, n. 1142]
\useURL[161/63][http://www.regione.emilia-romagna.it/cra/pdf/161_63.pdf][][Legge
14 febbraio 1963, n. 161]
\useURL[735/84][http://www.italgiure.giustizia.it/nir/1984/lexs_106505.html][][Legge
29 ottobre 1984, n. 735]

\starttext
\startitemize[a,packed]
\item {\bf Attività di acconciatore:} riferimento normativo
\from[161/63], \from[1142/70], \from[174/05], \from[735/84] nelle
parti compatibili con la \from[174/05], \from[40/07], presente
regolamento.
\item {\bf Attività di estetista e affini:} riferimento normativo
\from[1/90], \from[54/92], \from[40/07], presente regolamento
\stopitemize
\stoptext

Many thanks

-- 
Diego Depaoli


exampleluatex.pdf
Description: Adobe PDF document


examplexetex.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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___