[NTG-context] LuaTeX 1.0.3 announcement

2017-02-18 Thread Akira Kakuto

Luigi has shown me a simple and useful application of ffi:


In the case of lua(jit)tex in W32TeX, which are used in
context, standard C libraries are linked statically.
Thus it is necessary to load a necessary DLL for standard
C functions, like the following meaningless example:

\starttext
$$
j0(1.765)=
\startluacode
ffi=require("ffi")
ffi.cdef[[
double _j0(double x);
]]
-- In the case of lua(jit)tex in W32TeX, C libraries are linked
-- statically. Thus it is necessary to load a necessary DLL.
local msvcrt=ffi.load("msvcrt")
tex.print(msvcrt._j0(1.765))
\stopluacode
$$
\stoptext

It is expected that Windows APIs in the following libs
can be used without loading DLL:

WSOCK32.dll
USER32.dll
ADVAPI32.dll
SHELL32.dll
GDI32.dll
KERNEL32.dll
WS2_32.dll

Best,
Akira

___
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] generate multiple files from one source

2017-02-18 Thread Henning Hraban Ramm
Am 2017-02-18 um 23:27 schrieb Pablo Rodriguez :

> Dear list,
> 
> I have the following sample:
> 
>\setuppapersize[A8, landscape]
>\starttext
>\dorecurse{10}{
>\startpagemakeup[align=center]
>This is invoice number \recurselevel.
> 
>Customer name from CSV file.
> 
>Other data from the same CSV file.
>\stoppagemakeup}
>\stoptext
> 
> How can I get new PDF documents with a one invoice per document instead
> of new page breaks?
> 
> I need PDF documents with only one invoice (but with the correct number)
> and also a single PDF document with all invoices.
> 
> Of course, my real documents are more complex. What I need is a file
> breaking command. Appending -1, -2, -3... -n to the PDF file name would
> be fine for me.
> 
> How could I achieve this in the ConTeXt compilation?

I wouldn’t be surprised if ConTeXt can do that on its own, but I don’t know 
how, and I’d use a postprocessor like pdftk to split a multipage file into 
single pages.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] generate multiple files from one source

2017-02-18 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuppapersize[A8, landscape]
\starttext
\dorecurse{10}{
\startpagemakeup[align=center]
This is invoice number \recurselevel.

Customer name from CSV file.

Other data from the same CSV file.
\stoppagemakeup}
\stoptext

How can I get new PDF documents with a one invoice per document instead
of new page breaks?

I need PDF documents with only one invoice (but with the correct number)
and also a single PDF document with all invoices.

Of course, my real documents are more complex. What I need is a file
breaking command. Appending -1, -2, -3... -n to the PDF file name would
be fine for me.

How could I achieve this in the ConTeXt compilation?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] a question on setuptex

2017-02-18 Thread Pablo Rodriguez
On 02/18/2017 10:23 AM, Hans Hagen wrote:
> On 2/17/2017 11:49 PM, Mojca Miklavec wrote:
>> On 17 February 2017 at 23:38, Pablo Rodriguez wrote:
>>> [...]
>>> Of course, it makes sense in that case that a ConTeXt Suite with 64bit
>>> binaries is preferred. But as a fallback, 32bit binaries should be fine.
>>
>> It should work in principle. Just set "platform=linux" before calling
>> mtx-update.lua and disable '--make'. (You could in principle also call
>> rsync manually.) And then all you need to do is set the PATH to
>> binaries.
>>
>> The problem is that unless something changed, mtxrun will most likely
>> be causing you some troubles and will insist in fetching x86_64 (I'm
>> not sure how to completely avoid that).
> 
> maybe putting 32 bit bins in the 64 bit directory works ..

Many thanks for your replies, Alan, Mojca and Hans.

Sorry, I still think it shouldn’t be that complex.

In setuptex.bat we have:

set TEXMFOS=%~s1texmf-mswin-64
if exist %TEXMFOS%\bin\mtxrun.exe goto start
[...]
set TEXMFOS=%~s1\texmf-win32
if exist %TEXMFOS%\bin\mtxrun.exe goto start

What prevents in setuptex to also check for the path of the binaries and
go to Linux32 when the path for Linux64 binaries doesn’t exist?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] \textfraction query

2017-02-18 Thread Alan Bowen
Is there a way to get \textfraction to produce output in cases B or C
(either one will do) as it does in case A?

If I use \vfrac the output does not sit well beside \textfraction
output—and I use the latter elsewhere throughout the document.


\definefontfeature[fraction][frac=yes]
\definehighlight[textfraction][style={\feature[+][fraction]}]

\starttext

A. \textfraction{1/2}

B. \textfraction{1.5/2}

C. \textfraction{{2\textfraction{1/2}}/7}

\stoptext

Alan
___
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] LuaTeX 1.0.3 announcement

2017-02-18 Thread Alan Braslau
On Sat, 18 Feb 2017 14:59:14 +0100
luigi scarso  wrote:

> On Sat, Feb 18, 2017 at 2:27 PM, Henri Menke 
> wrote:
> > On 02/18/2017 09:42 AM, luigi scarso wrote:  
> >> On Sat, Feb 18, 2017 at 9:11 AM, Henri Menke
> >>  wrote:  
> >>> On 02/17/2017 08:57 PM, luigi scarso wrote:
> >>> How can I use the FFI?  There is nothing in the latest docs.
> >>> Thanks for all the efforts!  
> >> luatex ffi is beyond the "experimental state", and aims to  be
> >> compatible with luatexjit ffi.  
> >
> > So it has the same interface?  There seems to be no documentation
> > about it in the most recent manual from luatex.org  
> yes, "aims to be compatible" means same interface and functionality,
> but there is still lot of work to do,
> apart the dynamic  loading of the library and the C parser.
> But it's usable for testing.
> 

Luigi has shown me a simple and useful application of ffi:

\startluacode

ffi=require("ffi")
ffi.cdef[[
double j0(double x);
double j1(double x);
double jn(double x);
-- ...
]]

\stopluacode

These libm functions can then be used in lua as:

ffi.C.j0(x)

for example.

In my case, I pass them to MetaPost as:

\startMPdefinitions

vardef jzero primary x =
  scantokens(lua("mp.quoted(ffi.C.j0(" & decimal x & "))"))
enddef ;

\stopMPdefinitions

This experimental code appears to work quite well.

Thank you Luigi and Hans!

Alan
___
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] header hanging into margin

2017-02-18 Thread Csikos Bela
Dear context users:

I would like to setup page headers to be wider than the main text, that is 
hanging
into the margin area on both sides by 1.5-1.5 cms. How can I?

Here is my code:

\setuppapersize[A4]
\setuplayout[backspace=3.5cm,
width=14cm]
\setupheadertexts[]
\setupheadertexts[\setups{text a}][]
\startsetups[text a]
  \rlap{Left header text}
  \hfill
  {Middle header text}
  \hfill
  \llap{\pagenumber}
\stopsetups
\starttext
\input tufte
\stoptext

Thank you ind advance,

bcsikos
___
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] LuaTeX 1.0.3 announcement

2017-02-18 Thread Hans Hagen

On 2/18/2017 2:27 PM, Henri Menke wrote:

On 02/18/2017 09:42 AM, luigi scarso wrote:

On Sat, Feb 18, 2017 at 9:11 AM, Henri Menke  wrote:

On 02/17/2017 08:57 PM, luigi scarso wrote:
How can I use the FFI?  There is nothing in the latest docs.  Thanks for all 
the efforts!

luatex ffi is beyond the "experimental state", and aims to  be
compatible with luatexjit ffi.


So it has the same interface?  There seems to be no documentation about it in 
the most recent manual from luatex.org


btw, context will never depend on libraries for functioning but it has 
support for ffi built in and there might be some additional helpers for 
glueing to libraries but libraries themselves will always be considered 
a liability i.e. if someone uses them in a workflow (which is fine) 
support for specific libraries will not be provided (unless context 
ships with some module that uses them which probably will happen but 
even then those libraries are considered black boxes so failures are 
outside the dev team responsibilities)


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] LuaTeX 1.0.3 announcement

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 2:27 PM, Henri Menke  wrote:
> On 02/18/2017 09:42 AM, luigi scarso wrote:
>> On Sat, Feb 18, 2017 at 9:11 AM, Henri Menke  wrote:
>>> On 02/17/2017 08:57 PM, luigi scarso wrote:
>>> How can I use the FFI?  There is nothing in the latest docs.  Thanks for 
>>> all the efforts!
>> luatex ffi is beyond the "experimental state", and aims to  be
>> compatible with luatexjit ffi.
>
> So it has the same interface?  There seems to be no documentation about it in 
> the most recent manual from luatex.org
yes, "aims to be compatible" means same interface and functionality,
but there is still lot of work to do,
apart the dynamic  loading of the library and the C parser.
But it's usable for testing.

-- 
luigi
___
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] LuaTeX 1.0.3 announcement

2017-02-18 Thread Hans Hagen

On 2/18/2017 2:27 PM, Henri Menke wrote:

On 02/18/2017 09:42 AM, luigi scarso wrote:

On Sat, Feb 18, 2017 at 9:11 AM, Henri Menke  wrote:

On 02/17/2017 08:57 PM, luigi scarso wrote:
How can I use the FFI?  There is nothing in the latest docs.  Thanks for all 
the efforts!

luatex ffi is beyond the "experimental state", and aims to  be
compatible with luatexjit ffi.


So it has the same interface?  There seems to be no documentation about it in 
the most recent manual from luatex.org


indeed as there is enough on the web ... duplicating that makes no sense


For luajit ffi see
http://luajit.org/ext_ffi.html

The main difference with standard luajit is that by default jit.off()
in luajittex.



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




--

-
  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] LuaTeX 1.0.3 announcement

2017-02-18 Thread Henri Menke
On 02/18/2017 09:42 AM, luigi scarso wrote:
> On Sat, Feb 18, 2017 at 9:11 AM, Henri Menke  wrote:
>> On 02/17/2017 08:57 PM, luigi scarso wrote:
>> How can I use the FFI?  There is nothing in the latest docs.  Thanks for all 
>> the efforts!
> luatex ffi is beyond the "experimental state", and aims to  be
> compatible with luatexjit ffi.

So it has the same interface?  There seems to be no documentation about it in 
the most recent manual from luatex.org

> For luajit ffi see
> http://luajit.org/ext_ffi.html
> 
> The main difference with standard luajit is that by default jit.off()
> in luajittex.
> 

___
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] strange crash

2017-02-18 Thread Lutz Haseloff
I copied my self compiled luatex to /usr/local/context/bin and first-setup.sh  
worked as expected.
Now i can use the freshest luatex 1.0.4 with todays context beta on my phone.
Thank you all.

Am 18. Februar 2017 12:55:51 MEZ schrieb luigi scarso :
>On Sat, Feb 18, 2017 at 12:49 PM, Lutz Haseloff 
>wrote:
>> Okay, I used the self compiled experimental luatex.
>> And so does the luatex from the context minimals behave:
>>
>> (It is rather old)
>>
>> root@localhost:~# /usr/local/context/bin/luatex --version
>> This is LuaTeX, Version 1.0.0 (TeX Live 2017/dev)
>>
>> Execute 'luatex --credits' for credits and version details.
>>
>> There is NO warranty. Redistribution of this software is covered by
>> the terms of the GNU General Public License, version 2 or (at your
>option)
>> any later version. For more information about these matters, see the
>file
>> named COPYING and the LuaTeX source.
>>
>> LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team.
>>
>> root@localhost:~# /usr/local/context/bin/luatex --luaonly ~/test.lua
>> /home/test.lua:2: bad argument #1 to 'pairs' (table expected, got
>nil)
>> root@localhost:~#
>>
>>
>> It seems, that luatex 1.0.0 can't work with the new context beta.
>Thank you for testing in any case.
>We are seeing the issue now.
>It's better to use luatex 1.0.3 if you can. It's in tags/1.0.3
>
>
>-- 
>luigi
>___
>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
>___

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.___
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] strange crash

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 12:49 PM, Lutz Haseloff  wrote:
> Okay, I used the self compiled experimental luatex.
> And so does the luatex from the context minimals behave:
>
> (It is rather old)
>
> root@localhost:~# /usr/local/context/bin/luatex --version
> This is LuaTeX, Version 1.0.0 (TeX Live 2017/dev)
>
> Execute 'luatex --credits' for credits and version details.
>
> There is NO warranty. Redistribution of this software is covered by
> the terms of the GNU General Public License, version 2 or (at your option)
> any later version. For more information about these matters, see the file
> named COPYING and the LuaTeX source.
>
> LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team.
>
> root@localhost:~# /usr/local/context/bin/luatex --luaonly ~/test.lua
> /home/test.lua:2: bad argument #1 to 'pairs' (table expected, got nil)
> root@localhost:~#
>
>
> It seems, that luatex 1.0.0 can't work with the new context beta.
Hans is fixing mtxrun, but the latest beta works with 1.0.3, backward
compatibility is not assured.

-- 
luigi
___
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] strange crash

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 12:49 PM, Lutz Haseloff  wrote:
> Okay, I used the self compiled experimental luatex.
> And so does the luatex from the context minimals behave:
>
> (It is rather old)
>
> root@localhost:~# /usr/local/context/bin/luatex --version
> This is LuaTeX, Version 1.0.0 (TeX Live 2017/dev)
>
> Execute 'luatex --credits' for credits and version details.
>
> There is NO warranty. Redistribution of this software is covered by
> the terms of the GNU General Public License, version 2 or (at your option)
> any later version. For more information about these matters, see the file
> named COPYING and the LuaTeX source.
>
> LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team.
>
> root@localhost:~# /usr/local/context/bin/luatex --luaonly ~/test.lua
> /home/test.lua:2: bad argument #1 to 'pairs' (table expected, got nil)
> root@localhost:~#
>
>
> It seems, that luatex 1.0.0 can't work with the new context beta.
Thank you for testing in any case.
We are seeing the issue now.
It's better to use luatex 1.0.3 if you can. It's in tags/1.0.3


-- 
luigi
___
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] strange crash

2017-02-18 Thread Lutz Haseloff
Okay, I used the self compiled experimental luatex.
And so does the luatex from the context minimals behave:

(It is rather old)

root@localhost:~# /usr/local/context/bin/luatex --version
This is LuaTeX, Version 1.0.0 (TeX Live 2017/dev)

Execute  'luatex --credits'  for credits and version details.

There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.

LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team.

root@localhost:~# /usr/local/context/bin/luatex --luaonly ~/test.lua
/home/test.lua:2: bad argument #1 to 'pairs' (table expected, got nil)
root@localhost:~#


It seems, that luatex 1.0.0 can't work with the new context beta.

Am 18. Februar 2017 12:06:09 MEZ schrieb luigi scarso :
>On Sat, Feb 18, 2017 at 11:59 AM, Lutz Haseloff 
>wrote:
>> luatex --version
>> This is LuaTeX, Version 1.0.4 (TeX Live 2017/dev)
>hm why luatex 1.0.4 ?
>I expected that mtxrun installed luatex 1.0.3
>
>>
>> Execute 'luatex --credits' for credits and version details.
>>
>> There is NO warranty. Redistribution of this software is covered by
>> the terms of the GNU General Public License, version 2 or (at your
>option)
>> any later version. For more information about these matters, see the
>file
>> named COPYING and the LuaTeX source.
>>
>> LuaTeX is Copyright 2017 Taco Hoekwater and the LuaTeX Team.
>>
>>
>> luatex --luaonly test.lua
>> number function: 0xa4b7e0
>> new function: 0xa4b7e0
>> gc function: 0xa4b7e0
>> metatype function: 0xa4b7e0
>> os
>> sizeof function: 0xa4b7e0
>> i64 function: 0xa4b7e0
>> fill function: 0xa4b7e0
>> arch
>> debug function: 0xa4b7e0
>> istype function: 0xa4b7e0
>> abi function: 0xa4b7e0
>> load function: 0xa4b7e0
>> alignof function: 0xa4b7e0
>> cast function: 0xa4b7e0
>> offsetof function: 0xa4b7e0
>> u64 function: 0xa4b7e0
>> string function: 0xa4b7e0
>> errno function: 0xa4b7e0
>> typeof function: 0xa4b7e0
>> cdef function: 0xa4b7e0
>> type function: 0xa4b7e0
>> copy function: 0xa4b7e0
>
>ok, now if you call one function you should see
>
>The ffi module is available for:\n"
>
>archictures   : ARCH_X86 and ARCH_X64,\n"
>operating systems : OS_CE, OS_WIN, OS_LINUX, OS_BSD and OS_POSIX
>
>The ARM processor is currently not supported. There are subtle
>differences between this module and the one in luajitTeX
>and we hope to be in sync around TeXLive 2018.
>Different OS can have different interfaces,
>for instance OS_WIN has not 'complex.h'. If you want portable
>code, stick to the most common concepts.
>
>
>
>
>-- 
>luigi
>___
>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
>___

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.___
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] strange crash

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 11:59 AM, Lutz Haseloff  wrote:
> luatex --version
> This is LuaTeX, Version 1.0.4 (TeX Live 2017/dev)
hm why luatex 1.0.4 ?
I expected that mtxrun installed luatex 1.0.3

>
> Execute 'luatex --credits' for credits and version details.
>
> There is NO warranty. Redistribution of this software is covered by
> the terms of the GNU General Public License, version 2 or (at your option)
> any later version. For more information about these matters, see the file
> named COPYING and the LuaTeX source.
>
> LuaTeX is Copyright 2017 Taco Hoekwater and the LuaTeX Team.
>
>
> luatex --luaonly test.lua
> number function: 0xa4b7e0
> new function: 0xa4b7e0
> gc function: 0xa4b7e0
> metatype function: 0xa4b7e0
> os
> sizeof function: 0xa4b7e0
> i64 function: 0xa4b7e0
> fill function: 0xa4b7e0
> arch
> debug function: 0xa4b7e0
> istype function: 0xa4b7e0
> abi function: 0xa4b7e0
> load function: 0xa4b7e0
> alignof function: 0xa4b7e0
> cast function: 0xa4b7e0
> offsetof function: 0xa4b7e0
> u64 function: 0xa4b7e0
> string function: 0xa4b7e0
> errno function: 0xa4b7e0
> typeof function: 0xa4b7e0
> cdef function: 0xa4b7e0
> type function: 0xa4b7e0
> copy function: 0xa4b7e0

ok, now if you call one function you should see

The ffi module is available for:\n"

archictures   : ARCH_X86 and ARCH_X64,\n"
operating systems : OS_CE, OS_WIN, OS_LINUX, OS_BSD and OS_POSIX

The ARM processor is currently not supported. There are subtle
differences between this module and the one in luajitTeX
and we hope to be in sync around TeXLive 2018.
Different OS can have different interfaces,
for instance OS_WIN has not 'complex.h'. If you want portable
code, stick to the most common concepts.




-- 
luigi
___
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] strange crash

2017-02-18 Thread Lutz Haseloff
luatex --version
This is LuaTeX, Version 1.0.4 (TeX Live 2017/dev)

Execute  'luatex --credits'  for credits and version details.

There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.

LuaTeX is Copyright 2017 Taco Hoekwater and the LuaTeX Team.


luatex --luaonly test.lua
number  function: 0xa4b7e0
new function: 0xa4b7e0
gc  function: 0xa4b7e0
metatypefunction: 0xa4b7e0
os  
sizeof  function: 0xa4b7e0
i64 function: 0xa4b7e0
fillfunction: 0xa4b7e0
arch
debug   function: 0xa4b7e0
istype  function: 0xa4b7e0
abi function: 0xa4b7e0
loadfunction: 0xa4b7e0
alignof function: 0xa4b7e0
castfunction: 0xa4b7e0
offsetoffunction: 0xa4b7e0
u64 function: 0xa4b7e0
string  function: 0xa4b7e0
errno   function: 0xa4b7e0
typeof  function: 0xa4b7e0
cdeffunction: 0xa4b7e0
typefunction: 0xa4b7e0
copyfunction: 0xa4b7e0

Am 18. Februar 2017 11:45:06 MEZ schrieb luigi scarso :
>On Sat, Feb 18, 2017 at 11:00 AM, Lutz Haseloff 
>wrote:
>> Does that mean, that i can't use the new beta on my phone until linux
>armhf
>> supports lua ffi?
>> btw the new luatex 1.0.4 runs fine here.
>hm, you should have a luatex on your bin folder;
>can you run test.lua
>
>--[=[ test.lua]=]
>for k,v in pairs(ffi) do print(k,v) end
>
>
>$> luatex --version
>$A luatex --luaonly test.lua
>
>and report the result ?
>
>-- 
>luigi
>___
>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
>___

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.___
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] strange crash

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 11:00 AM, Lutz Haseloff  wrote:
> Does that mean, that i can't use the new beta on my phone until linux armhf
> supports lua ffi?
> btw the new luatex 1.0.4 runs fine here.
hm, you should have a luatex on your bin folder;
can you run test.lua

--[=[ test.lua]=]
for k,v in pairs(ffi) do print(k,v) end


$> luatex --version
$A luatex --luaonly test.lua

and report the result ?

-- 
luigi
___
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] strange crash

2017-02-18 Thread Lutz Haseloff
Does that mean, that i can't use the new beta on my phone until linux armhf 
supports lua ffi?
btw the new luatex 1.0.4 runs fine here.

Am 18. Februar 2017 10:50:48 MEZ schrieb luigi scarso :
>On Sat, Feb 18, 2017 at 10:32 AM, Lutz Haseloff 
>wrote:
>> Hi all,
>>
>> it seems that the new ConTeXt on the linux armhf platform is not
>really up
>> to date yet.
>>
>> When i start the update with
>> sh ./first-setup.sh --modules=all --keep
>> I get:
>> -
>> root@localhost:/usr/local/context# sh ./first-setup.sh --modules=all
>> --engine=luatex --keep
>> receiving incremental file list
>> bin/
>> bin/mtxrun
>>
>> sent 51 bytes received 587,352 bytes 391,602.00 bytes/sec
>> total size is 8,621,787 speedup is 14.68
>> ./bin/mtxrun:174: attempt to index global 'ffi' (a string value)
>luaffi not (yet) supported on
>armhf
>--- too many tests fails.
>Hopefully for next context meeting, later this year.
>-- 
>luigi
>___
>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
>___

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.___
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] strange crash

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 10:32 AM, Lutz Haseloff  wrote:
> Hi all,
>
> it seems that the new ConTeXt on the linux armhf platform is not really up
> to date yet.
>
> When i start the update with
> sh ./first-setup.sh --modules=all --keep
> I get:
> -
> root@localhost:/usr/local/context# sh ./first-setup.sh --modules=all
> --engine=luatex --keep
> receiving incremental file list
> bin/
> bin/mtxrun
>
> sent 51 bytes received 587,352 bytes 391,602.00 bytes/sec
> total size is 8,621,787 speedup is 14.68
> ./bin/mtxrun:174: attempt to index global 'ffi' (a string value)
luaffi not (yet) supported on
armhf
--- too many tests fails.
Hopefully for next context meeting, later this year.
-- 
luigi
___
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] strange crash

2017-02-18 Thread Lutz Haseloff
Hi all,

it seems that the new ConTeXt on the linux armhf platform is not really up to 
date yet.

When i start the update with
sh ./first-setup.sh  --modules=all --keep
I get:
-
root@localhost:/usr/local/context# sh ./first-setup.sh --modules=all 
--engine=luatex --keep
receiving incremental file list
bin/
bin/mtxrun

sent 51 bytes  received 587,352 bytes  391,602.00 bytes/sec
total size is 8,621,787  speedup is 14.68
./bin/mtxrun:174: attempt to index global 'ffi' (a string value)

When you want to use context, you need to initialize the tree by typing:

  . /usr/local/context/tex/setuptex

in your shell or add
  "/usr/local/context/tex/texmf-linux-armhf/bin"
to PATH variable if you want to set it permanently.
This can usually be done in .bashrc, .bash_profile
(or whatever file is used to initialize your shell).

root@localhost:/usr/local/context#
-

It seems, there is an error in mtxrun with "ffi"


Greetings Lutz



Am 17. Februar 2017 10:28:48 MEZ schrieb Hans Hagen :
>i uploaded a beta so things should be in sync in a while
>
>-
>   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
>___

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.___
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] a question on setuptex

2017-02-18 Thread Hans Hagen

On 2/17/2017 11:49 PM, Mojca Miklavec wrote:

On 17 February 2017 at 23:38, Pablo Rodriguez wrote:

Hans,

would it be possible that a 32bit ConTeXt Suite can be used with a 64bit
architecture in Linux?

Sorry, but yesterday I was surprised to see that setuptex isn’t able to
find any binaries in Linux if they are 32bit and the processor is 64bit.

Of course, it makes sense in that case that a ConTeXt Suite with 64bit
binaries is preferred. But as a fallback, 32bit binaries should be fine.


It should work in principle. Just set "platform=linux" before calling
mtx-update.lua and disable '--make'. (You could in principle also call
rsync manually.) And then all you need to do is set the PATH to
binaries.

The problem is that unless something changed, mtxrun will most likely
be causing you some troubles and will insist in fetching x86_64 (I'm
not sure how to completely avoid that).


maybe putting 32 bit bins in the 64 bit directory works ..

-
  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] LuaTeX 1.0.3 announcement

2017-02-18 Thread luigi scarso
On Sat, Feb 18, 2017 at 9:11 AM, Henri Menke  wrote:
> On 02/17/2017 08:57 PM, luigi scarso wrote:
> How can I use the FFI?  There is nothing in the latest docs.  Thanks for all 
> the efforts!
luatex ffi is beyond the "experimental state", and aims to  be
compatible with luatexjit ffi.
For luajit ffi see
http://luajit.org/ext_ffi.html

The main difference with standard luajit is that by default jit.off()
in luajittex.

-- 
luigi
___
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] LuaTeX 1.0.3 announcement

2017-02-18 Thread Henri Menke
On 02/17/2017 08:57 PM, luigi scarso wrote:
> ==
> LuaTeX Release 1.0.3  was released 2017021514
> ==
> 
> This is a minor upgrade and probably this version will go on texlive.
> There are a couple
> of fixes and additions.
> - We added a few a few more helpers in the pdf namespace (like
> set|get]gentounicode,
>   [set|get]omitcidset and set|get]decimaldigits. Some helpers were
> moved from the tex
>   to the pdf namespace.
> 
> - We added a build_page_insert callback for inserts so that one can
> for instance adapt
>   spacing on demand.
> 
> - On the agenda has been some more control over word start and end in
> hyphenation and
>   this is now possible via hyphenationbounds. We also updated the
> manual with some more
>   details.
> 
> - An old tracker item with respect to control over spacing around math
> was revived and
>   has resulted in mathsurroundmode (one can wonder how useful this is).
> 
> - We improved the resolution detection in included jpeg images.
> 
> 
> - An ffi library has been added to luatex so that it is more in sync
> with luajittex. This
>   permits easy and flexible loading of libraries. Our policy is to
> make luatex as lean
>   as possible with no dependencies and this is a step towards that.
> Eventually we hope
>   to support all relevant platforms.

How can I use the FFI?  There is nothing in the latest docs.  Thanks for all 
the efforts!

> - The glue and skip register accessors have been improved as a step in
> freeing the user
>   from glue spec management.
> 
> - We added a few more getters and setters for nodes in order to get a
> more consistent
>   set.
> 
> - Irrelevant fields have been removed from the status table and an
> engine identifier
>   has been added.
> 
> - Of course there are numerous fixes and improvements but none of
> these have consequences
>   for the interfaces.
> 
> - The manual has been updated but will be improved over time.
> 
> 
> 
> 
> Have fun,
> Hans, Luigi, 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://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
___