Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-08 Thread Floris van Manen via ntg-context



On 08/09/2021 19:08, Henning Hraban Ramm wrote:

I just checked on my Linux laptop with a new installation, and it worked 
exactly like this.

Did you check with --luatex (i.e. MkIV)?

What’s your ConTeXt version? You left out this essential piece of information.



$ context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/home/vm/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv

mtx-context | current version: 2021.09.06 11:47
mtx-context | main context file: 
/home/vm/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl

mtx-context | current version: 2021.09.06 11:47



this is the results form --generate:

$ mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/home/vm/context/tex/texmf-linux-64/bin'
resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/home/vm/context/tex/texmf-linux-64'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
'/home/vm/context/tex'

resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to '/home/vm/context'
resolvers   | resolving | variable 'TEXOS' set to 'texmf-linux-64'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'

resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/home/vm/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/home/vm/context/tex/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/home/vm/context/tex/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/home/vm/context/tex/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/home/vm/context/tex/texmf/web2c' from specification 
'selfautoparent:/texmf/web2c'
resolvers   | resolving | found regular configuration file 
'/home/vm/context/tex/texmf/web2c/texmfcnf.lua'

resolvers   | resolving |
resolvers   | resolving | loading configuration file 
'selfautoparent:/texmf/web2c/texmfcnf.lua'

resolvers   | resolving |
resolvers   | resolving | locating list of '/home/vm/context' 
(runtime) (tree:home/vm/context)
resolvers   | methods | resolving, method 'locators', how 'uri', 
handler 'tree', argument 'tree:home/vm/context'

resolvers   | trees | locator '/home/vm/context' found
resolvers   | resolving | hash '/home/vm/context' appended
resolvers   | resolving |
resolvers   | methods | resolving, method 'generators', how 'uri', 
handler 'file', argument '/home/vm/context'
resolvers   | expansions | scanning path '/home/vm/context', branch 
'/home/vm/context'
resolvers   | expansions | 5750 files found on 358 directories with 
207 uppercase remappings

resolvers   | resolving |
resolvers   | resolving | not saving runtime tree '/home/vm/context'
mtxrun  |
mtxrun  | elapsed lua time: 0.031 seconds



___
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] zint barcode module on LMTX/MacOS

2021-09-08 Thread Henning Hraban Ramm via ntg-context


> Am 07.09.2021 um 23:27 schrieb Floris van Manen :
> 
> Hello Hraban,
> 
> 
> On 07/09/2021 21:03, Henning Hraban Ramm via ntg-context wrote:
>> Since I got zint running (thanks, Hans!), there’s now a wiki page:
>> https://wiki.contextgarden.net/Barcodes
> 
> 
> I followed the instructions on the wiki, but still get an empty page.
> I compiled the libzint.so and installed it into /usr/local/lib/
> 
> Given my local path definitions:
> export TEXMF=$HOME/context
> export LMTXPATH=$TEXMF/tex/texmf-linux-64/bin
> export PATH=$LMTXPATH:$PATH
> export TEXROOT=$TEXMF/ctx
> 
> I placed a symbolic link in the folder
> 
> $LMTXPATH/lib/luametatex/zint/libzint.so -> /usr/local/lib/libzint.so
> 
> did the mtxrun --generate
> 
> Trying the example:
> 
> \usemodule[zint]
> \starttext
> \barcode[alternative=isbn, text=9783865419026, width=4cm]
> \barcode[alternative=qr code, text={https://wiki.contextgarden.net}, 
> width=3cm]
> \stoptext
> 

I just checked on my Linux laptop with a new installation, and it worked 
exactly like this.

Did you check with --luatex (i.e. MkIV)?

What’s your ConTeXt version? You left out this essential piece of information.

Hraban
___
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] zint barcode module on LMTX/MacOS

2021-09-08 Thread Axel Kielhorn via ntg-context


> Am 07.09.2021 um 21:03 schrieb Henning Hraban Ramm via ntg-context 
> :
> 
> Since I got zint running (thanks, Hans!), there’s now a wiki page:
> 
> https://wiki.contextgarden.net/Barcodes

I followed you instructions and got zint running with MacPorts:

Zint version 2.10.0

And it looks like LMTX finds it:

system  > 
system  > ConTeXt  ver: 2021.09.03 18:49 LMTX  fmt: 2021.9.3  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './hw265', input './hw265.tex', result 
'./hw265'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './hw265.tex'
modules > using user prefixed file 'libs-imp-zint'
modules > 'zint' is loaded
open source > level 2, order 3, name 
'/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
resolvers   > lua > loading file 
'/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.lmt'
 succeeded
close source> level 2, order 3, name 
'/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded

optional> using library 
'/usr/local/texlive/LMTX2021/tex/texmf-osx-64/bin/lib/luametatex/zint/libzint.so‘
^^^

backend > xmp > using file 
'/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 1, order 3, name './hw265.tex'
system  > start used files
system  > text: hw265
system  > stop used files
system  > start used files
system  >1: filename=publ-imp-default.lua filetype=lua 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua
 usedmethod=database
system  >2: filename=cont-new.mkxl filetype=tex 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl
 usedmethod=database
system  >3: filename=lang-exc.lua filetype=lua 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua
 usedmethod=database
system  >4: filename=lang-us.lua filetype=lua 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua
 usedmethod=database
system  >5: 
filename=/Users/axel/Documents/Text/Dokumente_ConTeXt/Beispiele 
ConTeXt/hw265.tex format=tex 
foundname=/Users/axel/Documents/Text/Dokumente_ConTeXt/Beispiele 
ConTeXt/hw265.tex 
fullname=/Users/axel/Documents/Text/Dokumente_ConTeXt/Beispiele 
ConTeXt/hw265.tex usedmethod=direct
system  >6: filename=libs-imp-zint.mkxl filetype=tex 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl
 usedmethod=database
system  >7: filename=libs-imp-zint.lmt filetype=tex 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.lmt
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.lmt
 usedmethod=database
system  >8: filename=lm.lfg filetype=tex 
foundname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg
 usedmethod=database
system  >9: filename=lmroman12-regular filetype=otf format=otf 
foundname=/usr/local/texlive/LMTX2021/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 usedmethod=database
system  >   10: filename=latinmodern-math.otf filetype=opentypefonts 
foundname=/usr/local/texlive/LMTX2021/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 
fullname=/usr/local/texlive/LMTX2021/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 usedmethod=database
system  >   11: filename=DejaVuSansMono.ttf 

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-07 Thread Henning Hraban Ramm via ntg-context
Since I got zint running (thanks, Hans!), there’s now a wiki page:

https://wiki.contextgarden.net/Barcodes

Have fun!
Hraban
___
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] zint barcode module on LMTX/MacOS

2021-09-06 Thread Hans Hagen via ntg-context

On 9/6/2021 10:34 AM, Henning Hraban Ramm via ntg-context wrote:



Am 06.09.2021 um 01:13 schrieb Hans Hagen via ntg-context :

On 9/5/2021 7:53 PM, Michal Vlasák wrote:

On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote:

On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote:

Hello Hraban,



"execute" should be a function defined in LuaMetaTeX, that internally
calls zint functions.

does

context libs-imp-zint.mkxl

new upload, maybe better messages


-
  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] zint barcode module on LMTX/MacOS

2021-09-06 Thread Henning Hraban Ramm via ntg-context

> Am 06.09.2021 um 01:13 schrieb Hans Hagen via ntg-context 
> :
> 
> On 9/5/2021 7:53 PM, Michal Vlasák wrote:
>> On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote:
>>> On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote:
 Hello Hraban,
>>> 
 "execute" should be a function defined in LuaMetaTeX, that internally
 calls zint functions.
>>> does
>>> 
>>> context libs-imp-zint.mkxl
>>> 
>>> produce something?
>> Empty page (empty content stream) and Crop/Media/TrimBox is
>> [ 0 0 7.790488 103.5872 ].
>> The line:
>>  local result = zintlib_execute(specification)
>> returns false each time.
> it took me a while to figure it out on a linux box but the following nbeeds 
> to be changed in the texmfcnf.lua file:
> 
> 
>CLUAINPUTS  = ".;$SELFAUTOLOC/lib/$engine//",

I changed it in texmf/web2c/texmfcnf.lua as well as in 
texmf-context/web2c/contextcnf.lua and generated a few times – no change, the 
PDF is still empty.

There’s no other texmfcnf.lua in my trees.

Hraban


$ context --autopdf=auto 
~/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl 

resolvers   | formats | executing runner 'run luametatex format': 
/Users/hraban/lmtx/tex/texmf-osx-64/bin/luametatex 
--jobname="/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl"
 
--fmt=/Users/hraban/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/Users/hraban/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:autopdf="auto" --c:currentrun=1 
--c:fulljobname="/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl"
 
--c:input="/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl"
 --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/Users/hraban/lmtx/tex/texmf-osx-64/bin"
system  > 
system  > ConTeXt  ver: 2021.09.03 18:49 LMTX  fmt: 2021.9.3  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint', 
input 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl',
 result 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
resolvers   > lua > loading file 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.lmt' 
succeeded
system  > continuing input file 'libs-imp-zint.mkxl'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
optional> using library 
'/Users/hraban/lmtx/tex/texmf-osx-64/bin/lib/luametatex/zint/libzint.so'
backend > xmp > using file 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 1, order 2, name 
'/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/Users/hraban/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 13 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 498 modules (0.342 sec), 100 tables 
(0.018 sec), 598 chunks (0.360 sec)
mkiv lua stats  > traced context: maxstack: 1596, freed: 0, unreachable: 1596
mkiv lua stats  > cleaned up reserved nodes: 68 nodes, 9 lists of 434
mkiv lua stats  > node memory usage: 10 attribute, 5 attribute_list, 3 glue, 58 
glue_spec, 3 kern, 4 penalty, 2 temp
mkiv lua stats  > node list callback tasks: 10 unique task lists, 7 instances 
(re)created, 34 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: file: 121, saved: 175, direct: 4, function: 1110, 
value: 1, message: 0, bytecode: 598, late 0, total: 2009 (2009 per page)
mkiv lua stats  > randomizer: resumed with value 0.032879785206596
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 3 files: latinmodern-math.otf, 
lmroman12-regular.otf, dejavusansmono.ttf
mkiv lua stats  > font 

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Hans Hagen via ntg-context

On 9/5/2021 7:53 PM, Michal Vlasák wrote:

On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote:

On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote:

Hello Hraban,



"execute" should be a function defined in LuaMetaTeX, that internally
calls zint functions.

does

context libs-imp-zint.mkxl

produce something?


Empty page (empty content stream) and Crop/Media/TrimBox is
[ 0 0 7.790488 103.5872 ].

The line:

local result = zintlib_execute(specification)

returns false each time.
it took me a while to figure it out on a linux box but the following 
nbeeds to be changed in the texmfcnf.lua file:



CLUAINPUTS  = ".;$SELFAUTOLOC/lib/$engine//",

kind of subtle ... so no lua path in there (one needs to run mtxrun 
--genenate after changing this)


(it went unnoticed because i have that in my texmf-local tree and as i 
had patched some files when testing an update i did was fooled by newer 
timestamps so i ended up in the wrong cache)


anyway, zint works on linux (one needs to copy the file to the 
texm-platform tree and get rid of the version number in the name; long 
ago i dealt with that so maybe i need to reintroduce that ugly hackery 
again; installing zint in linux didn't create a simple .so link) so ... 
i've added some error messages in the process (so that "result, message 
= ..." can handle it) but no upload yet


when it works, you will see some mp magick kicking in (becvause we use 
the vectorized output) ... if you are bored you can try to make a simple 
cmake file for compiling zint (i couldn't compile because of some 
depedencies, i.e. gcc not found by cmake; we don't need all that qt 
stuff anyway but i didn't want to waste time on that now)


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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Henning Hraban Ramm via ntg-context


> Am 05.09.2021 um 19:53 schrieb Michal Vlasák via ntg-context 
> :
> 
> On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote:
>> does
>> 
>> context libs-imp-zint.mkxl
>> 
>> produce something?
> 
> Empty page (empty content stream) and Crop/Media/TrimBox is
> [ 0 0 7.790488 103.5872 ].
> 
> The line:
> 
>   local result = zintlib_execute(specification)
> 
> returns false each time.

Same here.

HR
___
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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Michal Vlasák via ntg-context
On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote:
> On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote:
> > Hello Hraban,
>
> > "execute" should be a function defined in LuaMetaTeX, that internally
> > calls zint functions.
> does
>
> context libs-imp-zint.mkxl
>
> produce something?

Empty page (empty content stream) and Crop/Media/TrimBox is
[ 0 0 7.790488 103.5872 ].

The line:

local result = zintlib_execute(specification)

returns false each time.

Michal
___
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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Hans Hagen via ntg-context

On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote:

Hello Hraban,



"execute" should be a function defined in LuaMetaTeX, that internally
calls zint functions.

does

context libs-imp-zint.mkxl

produce something?

-
  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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Michal Vlasák via ntg-context
On Sun Sep 5, 2021 at 6:30 PM CEST, Henning Hraban Ramm via ntg-context wrote:
> > Am 05.09.2021 um 17:51 schrieb Michal Vlasák :
> > "execute" should be a function defined in LuaMetaTeX, that internally
> > calls zint functions.
>
> Hm, ok, but where are the zint API calls defined?

Sorry, do you mean what zint functions luametatex calls to implement
"execute"? Then I don't know. And a quick reverse engineering try didn't
turn up anything either.

Michal
___
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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Henning Hraban Ramm via ntg-context
Hi Michal, thank you!

> Am 05.09.2021 um 17:51 schrieb Michal Vlasák :
> 
> On Sun Sep 5, 2021 at 4:15 PM CEST, Henning Hraban Ramm via ntg-context wrote:
>> Hi again,
>> 
>> the LMTX zint module uses libzint, while MkIV calls the zint binary.
>> The latter works for me, the first not.
>> 
>> On MacOS, the library is "/opt/local/lib/libzint.dylib"*.
>> I changed that in the source and the file appears to be found.
>> Could you add that, Hans?
> 
> From libraries-mkiv:
> 
>It is best to keep libraries in a place where you can keep an eye on
>them being updated, like
> 
> c:/data/tex-context/tex/texmf-win64/bin/lib/luametatex/foo/libfoo.dll

Oh, yes, I should still know that from mujs. Works with a symlink.
I.e. no need to change that in the module.

>> But then still zintlib.execute returns nothing.
> 
> I can confirm this as well.
> 
>> I wonder if this works on Windows?
>> The API docs don’t mention an "execute" function.
>> https://www.zint.org.uk/manual/chapter/5
> 
> "execute" should be a function defined in LuaMetaTeX, that internally
> calls zint functions.

Hm, ok, but where are the zint API calls defined?


Hraban
___
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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Michal Vlasák via ntg-context
Hello Hraban,

On Sun Sep 5, 2021 at 4:15 PM CEST, Henning Hraban Ramm via ntg-context wrote:
> Hi again,
>
> the LMTX zint module uses libzint, while MkIV calls the zint binary.
> The latter works for me, the first not.
>
> On MacOS, the library is "/opt/local/lib/libzint.dylib"*.
> I changed that in the source and the file appears to be found.
> Could you add that, Hans?

From libraries-mkiv:

It is best to keep libraries in a place where you can keep an eye on
them being updated, like

 c:/data/tex-context/tex/texmf-win64/bin/lib/luametatex/foo/libfoo.dll

You could of course use the ones provided by the system or maybe use
symbolic links so that you still keep en eye on changes.

On Linux I get:

resolvers   > libraries > library 'libzint' resolved via 'tds lib' path 
to 
'/home/michal/src/context/tex/texmf-linux-64/bin/lib/luametatex/zint/libzint.so'

where the file is a copy of the system library. You probably need a
similar setup (but you should prefer symlink), also with a ".so"
extension as that's what ConTeXt uses on non Windows systems.

> *) Previously, zint for MacOS was only available via HomeBrew; I don’t
> know where that would install libzint, probably in /usr/local/lib/ like
> on Linux. Yesterday a MacPorts port was added that I used; MacPorts
> install everything under /opt/.

In libs-ini.lua essentially three ways are tried:

1) TDS search, thats what I used above
2) PATH search (but this will try paths like "/usr/local/bin" not
"/usr/local/lib").
3) Current directory

Copying the library file as I did is probably not the best idea in
general, since the library can have dependencies (zint requires libpng
which in turn needs zlib) and those get loaded from the system paths
anyways:


 28099: 
file=/home/michal/src/context/tex/texmf-linux-64/bin/lib/luametatex/zint/libzint.so
 [0];  dynamically loaded by 
/home/michal/src/context/tex/texmf-linux-64/bin/luametatex [0]
 28099: file=libpng16.so.16 [0];  needed by 
/home/michal/src/context/tex/texmf-linux-64/bin/lib/luametatex/zint/libzint.so 
[0]
 28099: file=libz.so.1 [0];  needed by /usr/lib/libpng16.so.16 [0]

and one would want to ensure ABI compatibility. But then again, same
issue applies to the luametatex -> optional library ABI.

> But then still zintlib.execute returns nothing.

I can confirm this as well.

> I wonder if this works on Windows?
> The API docs don’t mention an "execute" function.
> https://www.zint.org.uk/manual/chapter/5

"execute" should be a function defined in LuaMetaTeX, that internally
calls zint functions.

Michal
___
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] zint barcode module on LMTX/MacOS

2021-09-05 Thread Henning Hraban Ramm via ntg-context
Hi again,

the LMTX zint module uses libzint, while MkIV calls the zint binary.
The latter works for me, the first not.


On MacOS, the library is "/opt/local/lib/libzint.dylib"*.
I changed that in the source and the file appears to be found.
Could you add that, Hans?


*) Previously, zint for MacOS was only available via HomeBrew; I don’t know 
where that would install libzint, probably in /usr/local/lib/ like on Linux. 
Yesterday a MacPorts port was added that I used; MacPorts install everything 
under /opt/.


But then still zintlib.execute returns nothing.

I wonder if this works on Windows?
The API docs don’t mention an "execute" function.
https://www.zint.org.uk/manual/chapter/5


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