Re: [NTG-context] Typographical quotes
Oh, but I’m still on ConTeXt ver: 2021.10.24 21:45 I’ll need to check after an update. Denis Von: Maier, Denis Christian (UB) Gesendet: Samstag, 27. November 2021 17:47 An: 'mailing list for ConTeXt users' Cc: Jean-Philippe Rey Betreff: AW: [NTG-context] Typographical quotes Same here, but I get correct results with the –luatex flag Denis Von: ntg-context mailto:ntg-context-boun...@ntg.nl>> Im Auftrag von Jean-Philippe Rey via ntg-context Gesendet: Samstag, 27. November 2021 16:22 An: ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> Cc: Jean-Philippe Rey mailto:jean-philippe@centralesupelec.fr>> Betreff: [NTG-context] Typographical quotes Dear list, When typing a straight quotation mark, I used to get a curly apostrophe. But with a recent version of ConTeXt, I now get a straight apostrophe. Is there a new option to convert automatically straight into curly apostrophes ? \starttext John's \stoptext gives where I used to get Here is my log file resolvers | formats | executing runner 'run luametatex format': /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./mfe-quote.tex" --fmt=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./mfe-quote.tex" --c:input="./mfe-quote.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin" system > system > ConTeXt ver: 2021.11.19 09:31 LMTX fmt: 2021.11.22 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/Users/jprey/Applications/ConTeXt/Current/osx-64/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/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './mfe-quote', input './mfe-quote.tex', result './mfe-quote' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './mfe-quote.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded backend > xmp > using file '/Users/jprey/Applications/ConTeXt/Current/osx-64/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 './mfe-quote.tex' mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.013 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 9 found files, scanned paths: mkiv lua stats > stored bytecode data: 499 modules (0.248 sec), 99 tables (0.013 sec), 598 chunks (0.260 sec) mkiv lua stats > traced context: maxstack: 1607, freed: 0, unreachable: 1607 mkiv lua stats > cleaned up reserved nodes: 71 nodes, 9 lists of 435 mkiv lua stats > node memory usage: 6 attribute, 3 attribute_list, 1 glue, 58 glue_spec, 3 kern, 2 penalty, 2 temp mkiv lua stats > node list callback tasks: 12 unique task lists, 7 instances (re)created, 45 calls mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: file: 57, saved: 146, direct: 2, function: 973, value: 1, message: 0, bytecode: 598, late 0, total: 1777 (0 per page) mkiv lua stats > randomizer: initialized with value 0.051172108195605 mkiv lua stats > loaded patterns: en::1, load time: 0.000 mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf mkiv lua stats > font engine: otf 3.119, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.151 seconds mkiv lua stats > font embedding time: 0.002 seconds, 1 fonts mkiv lua stats > result saved in file: mfe-quote.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entries mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luametatex version: 2.093, functionality level: 2027, format id: 603, compiler: clang mkiv lua stats >
Re: [NTG-context] Typographical quotes
Same here, but I get correct results with the –luatex flag Denis Von: ntg-context Im Auftrag von Jean-Philippe Rey via ntg-context Gesendet: Samstag, 27. November 2021 16:22 An: ntg-context@ntg.nl Cc: Jean-Philippe Rey Betreff: [NTG-context] Typographical quotes Dear list, When typing a straight quotation mark, I used to get a curly apostrophe. But with a recent version of ConTeXt, I now get a straight apostrophe. Is there a new option to convert automatically straight into curly apostrophes ? \starttext John's \stoptext gives where I used to get Here is my log file resolvers | formats | executing runner 'run luametatex format': /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./mfe-quote.tex" --fmt=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./mfe-quote.tex" --c:input="./mfe-quote.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin" system > system > ConTeXt ver: 2021.11.19 09:31 LMTX fmt: 2021.11.22 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/Users/jprey/Applications/ConTeXt/Current/osx-64/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/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './mfe-quote', input './mfe-quote.tex', result './mfe-quote' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './mfe-quote.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded backend > xmp > using file '/Users/jprey/Applications/ConTeXt/Current/osx-64/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 './mfe-quote.tex' mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.013 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 9 found files, scanned paths: mkiv lua stats > stored bytecode data: 499 modules (0.248 sec), 99 tables (0.013 sec), 598 chunks (0.260 sec) mkiv lua stats > traced context: maxstack: 1607, freed: 0, unreachable: 1607 mkiv lua stats > cleaned up reserved nodes: 71 nodes, 9 lists of 435 mkiv lua stats > node memory usage: 6 attribute, 3 attribute_list, 1 glue, 58 glue_spec, 3 kern, 2 penalty, 2 temp mkiv lua stats > node list callback tasks: 12 unique task lists, 7 instances (re)created, 45 calls mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: file: 57, saved: 146, direct: 2, function: 973, value: 1, message: 0, bytecode: 598, late 0, total: 1777 (0 per page) mkiv lua stats > randomizer: initialized with value 0.051172108195605 mkiv lua stats > loaded patterns: en::1, load time: 0.000 mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf mkiv lua stats > font engine: otf 3.119, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.151 seconds mkiv lua stats > font embedding time: 0.002 seconds, 1 fonts mkiv lua stats > result saved in file: mfe-quote.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entries mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luametatex version: 2.093, functionality level: 2027, format id: 603, compiler: clang mkiv lua stats > tex properties: 740046 hash slots used of 2097152, 46674 control sequences, approximate memory usage: 29 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 55 MB, ctx: 53 MB, max: 53 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.500 seconds, 1 processed pages, 1 shipped pages, 1.998 pages/second resolvers | formats | executing runner 'run luametatex format': /Users
[NTG-context] Typographical quotes
Dear list, When typing a straight quotation mark, I used to get a curly apostrophe. But with a recent version of ConTeXt, I now get a straight apostrophe. Is there a new option to convert automatically straight into curly apostrophes ? \starttext John's \stoptext gives GraphiqueCollé-1.pdf Description: Adobe PDF document where I used to get GraphiqueCollé-2.pdf Description: Adobe PDF document Here is my log file resolvers | formats | executing runner 'run luametatex format': /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./mfe-quote.tex" --fmt=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./mfe-quote.tex" --c:input="./mfe-quote.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin" system > system > ConTeXt ver: 2021.11.19 09:31 LMTX fmt: 2021.11.22 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/Users/jprey/Applications/ConTeXt/Current/osx-64/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/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './mfe-quote', input './mfe-quote.tex', result './mfe-quote' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './mfe-quote.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded backend > xmp > using file '/Users/jprey/Applications/ConTeXt/Current/osx-64/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 './mfe-quote.tex' mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.013 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 9 found files, scanned paths: mkiv lua stats > stored bytecode data: 499 modules (0.248 sec), 99 tables (0.013 sec), 598 chunks (0.260 sec) mkiv lua stats > traced context: maxstack: 1607, freed: 0, unreachable: 1607 mkiv lua stats > cleaned up reserved nodes: 71 nodes, 9 lists of 435 mkiv lua stats > node memory usage: 6 attribute, 3 attribute_list, 1 glue, 58 glue_spec, 3 kern, 2 penalty, 2 temp mkiv lua stats > node list callback tasks: 12 unique task lists, 7 instances (re)created, 45 calls mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: file: 57, saved: 146, direct: 2, function: 973, value: 1, message: 0, bytecode: 598, late 0, total: 1777 (0 per page) mkiv lua stats > randomizer: initialized with value 0.051172108195605 mkiv lua stats > loaded patterns: en::1, load time: 0.000 mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf mkiv lua stats > font engine: otf 3.119, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.151 seconds mkiv lua stats > font embedding time: 0.002 seconds, 1 fonts mkiv lua stats > result saved in file: mfe-quote.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entries mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luametatex version: 2.093, functionality level: 2027, format id: 603, compiler: clang mkiv lua stats > tex properties: 740046 hash slots used of 2097152, 46674 control sequences, approximate memory usage: 29 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 55 MB, ctx: 53 MB, max: 53 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.500 seconds, 1 processed pages, 1 shipped pages, 1.998 pages/second resolvers | formats | executing runner 'run luametatex format': /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./mfe-quote.tex" --fmt=/Users/jprey/Applications/ConTeXt/
[NTG-context] Problem with \head inside \itemize
Dear list, The following code worked perfectly well with ConTeXt ver: 2021.01.05 10:45 LMTX but produces an error with the current LMTX version (at least since ConTeXt ver: 2021.09.26 17:00 LMTX). Adding an explicit \par at the end of the \head line allows the example to work. Best regards, JP Here is the minimal failing example : === \starttext \startitemize \head Title text \stopitemize \stoptext === and the corresponding log output : === resolvers | formats | executing runner 'run luametatex format': /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./mfe-head.tex" --fmt=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./mfe-head.tex" --c:input="./mfe-head.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin" system > system > ConTeXt ver: 2021.11.19 09:31 LMTX fmt: 2021.11.22 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/Users/jprey/Applications/ConTeXt/Current/osx-64/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/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './mfe-head', input './mfe-head.tex', result './mfe-head' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './mfe-head.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 8 in file ./mfe-head.tex: The file ended when scanning an argument. Title \par text \stopitemize \stoptext \stoptext 1 \starttext 2 \startitemize 3 \head Title 4 5 text 6 \stopitemize 7 \stoptext 8 >> mtx-context | fatal error: return code: 256 -- Jean-Philippe Rey jean-philippe@centralesupelec.fr 91192 Gif-sur-Yvette Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51 ___ 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] new upload, new trickery
dhbox{\smallinfofont[R #1.3]}}% > % > \samplefile{tufte} > } > > But as this is not really user friendly, there is more: a mechanism for > hooking in handlers. > > \definelocalboxes >[linenumber] >[command=\LeftNumber, > location=left, > width=3em, > style=\bs, > color=darkred] > > \definelocalboxes >[linenumbertwo] >[linenumber] >[command=\RightNumber, > location=right, > width=6em, > style=\bf, > color=darkgreen] > > \definelocalboxes >[linetext] >[command=\LeftText, > location=lefttext, > style=\bs, > color=darkblue] > > \definelocalboxes >[linetexttwo] >[linetext] >[command=\RightText, > location=righttext, > style=\bf, > color=darkgray] > > % just using the content > > % \protected\def\LeftNumber {\hbox to > \localboxesparameter{width}{\strut\box\localboxcontentbox\hss)}} > % \protected\def\RightNumber{\hbox to > \localboxesparameter{width}{\strut(\hss\box\localboxcontentbox)}} > > % using the provided line number: > > % \def\LineNumberL{\the\localboxlinenumber} > % \def\LineNumberR{\the\localboxlinenumber} > > % using a tex counter > > % \newcount\MyLineNumberL > % \newcount\MyLineNumberR > % \def\LineNumberL{\global\advance\MyLineNumberL\plusone\the\MyLineNumberL} > % \def\LineNumberR{\global\advance\MyLineNumberR\plusone\the\MyLineNumberR} > > % using proper counters > > \definecounter[MyLineNumberL] > \definecounter[MyLineNumberR] > > \setupcounter[MyLineNumberL][numberconversion=characters] > \setupcounter[MyLineNumberR][numberconversion=romannumerals] > > > \def\LineNumberL{\incrementcounter[MyLineNumberL]\convertedcounter[MyLineNumberL]} > > \def\LineNumberR{\incrementcounter[MyLineNumberR]\convertedcounter[MyLineNumberR]} > > \protected\def\LeftNumber {\hbox to > \localboxesparameter{width}{\strut(\LineNumberL\hss)}} > \protected\def\RightNumber{\hbox to > \localboxesparameter{width}{\strut(\hss\LineNumberR)}} > > \protected\def\LeftText #1{#1\quad} > \protected\def\RightText#1{\quad#1} > > \showframe > > \starttext > > \start > \localbox[linenumber]{}% > \localbox[linenumbertwo]{}% > \localbox[linetext]{L}% > \startlocalbox[linetexttwo] > R > \stoplocalbox > \dorecurse{100}{ > \samplefile{tufte} > \par > } > \stop > > If you play a bit with these low level mechanism the luametatex / > context combination now permits weird applications (which for sure some > of you will (ab)use). The above example shows how to implement line > numbers (there are drawbacks compared to the existing mechanisms) and > other stuff in the margins and text edges but the most important aspect > is that when the content in these boxes has width, it will be taken into > account in the par builder because that is what this is about: these > local boxes are taken into acount when breaking lines. When the handlers > kick in, you have > > \localboxattribute : more for internal use > \localboxlinenumber: as the par builder sees it > \localboxwidth : the local box width > \localboxoffset: the total distance to the edge > \localboxleftskip : the effective leftskip > \localboxrightskip : the effective rightskip > \localboxlefthang : the current shape related value > \localboxrighthang : the current shape related value > \localboxindent: only first line > \localboxparfillleftskip : effective value (onky last line) > \localboxparfillrightskip : effective value (only last line) > \localboxovershoot : overfull compensation > > most of these relate to normalized lines and as such there is plenty to > play with. Others can be seen in the examples. > > I might add some more control to both these 'injection' mechanism > because directly out of the (pdftex/omega/luatex) they are not that > useful (which is probably also why we don't use them.) These are cheap > extensions so they don't really influence runtime much, so .. when not > used ... no harm done. I really have no clue how useful this is. > > I need to ponder this usage: > > \definelocalboxes >[linetextA] >[command=\LeftTextA, > location=lefttext, > style=\bs, > color=darkblue] > > \protected\def\LeftTextA#1{\llap{#1}\quad} > > \definelocalboxes >[linetextB] >[command=\LeftTextB, > location=left, > style=\bs, > color=darkgreen] > > \protected\def\LeftTextB{\llap{\unhbox\localboxcontentbox}\quad} > > \starttext > > \dorecurse{10}{some text #1
Re: [NTG-context] Bug in lmt_arrow
On 11/15/2021 4:07 AM, Aditya Mahajan wrote: On Sun, 14 Nov 2021, Aditya Mahajan via ntg-context wrote: On Sun, 14 Nov 2021, Hans Hagen wrote: On 11/14/2021 4:33 AM, Aditya Mahajan via ntg-context wrote: Hi, There is a bug in lmt_arrow. If given a "non-cycle" path, lmt_arrow completes the cycle. \starttext \startMPcode newpath p; ahfactor := 5; p := origin .. (1cm, 1cm) .. (2cm, 0); draw lmt_arrow [ path = p, location = "percentage", percentage = 50, alternative = "curved", ] withpen pencircle scaled 1bp; \stopMPcode \stoptext With 2021.11.11, I get the attached file. Note that lmt_arrow has drawn the "cycle" version of the path, even though p does not have a cycle. I have looked at the code and cannot figure out why this is happening. it happens in the 'direct' variant (metapost.registerdirect) where a boolean is passed as signal and that boolean then is also picked up by the (shared) path injector as (old school) signal that a path is closed while it should instead consutl the closed field in a path table (sounds more complex than it is) so in the end it is a nasty side effect of the fast inject code path (shared function with different stack values; i'll probably have to ditch a "low level backward compatibility feature no one uses anyway" some day) i uploaded a fix that you can test when the bins are compiled at https://build.contextgarden.net/#/waterfall?tags=c.luametatex new bins then in: https://dl.contextgarden.net/build/luametatex/ (fyi: in the mp code you see that the path p is 'get' from the lua end where it got passed to by parameter) Thanks! Works perfectly here. Spoke too soon. Now straight lines don't work: new attempt (submitted to build) - 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] Bug in lmt_arrow
On Sun, 14 Nov 2021, Aditya Mahajan via ntg-context wrote: > On Sun, 14 Nov 2021, Hans Hagen wrote: > > > On 11/14/2021 4:33 AM, Aditya Mahajan via ntg-context wrote: > > > Hi, > > > > > > There is a bug in lmt_arrow. If given a "non-cycle" path, lmt_arrow > > > completes the cycle. > > > > > > \starttext > > > > > > \startMPcode > > >newpath p; > > >ahfactor := 5; > > >p := origin .. (1cm, 1cm) .. (2cm, 0); > > >draw lmt_arrow > > > [ > > > path = p, > > > location = "percentage", > > > percentage = 50, > > > alternative = "curved", > > > ] > > > withpen pencircle scaled 1bp; > > > \stopMPcode > > > \stoptext > > > > > > With 2021.11.11, I get the attached file. Note that lmt_arrow has drawn > > > the > > > "cycle" version of the path, even though p does not have a cycle. > > > > > > I have looked at the code and cannot figure out why this is happening. > > > > it happens in the 'direct' variant (metapost.registerdirect) where a boolean > > is passed as signal and that boolean then is also picked up by the (shared) > > path injector as (old school) signal that a path is closed while it should > > instead consutl the closed field in a path table (sounds more complex than > > it > > is) > > > > so in the end it is a nasty side effect of the fast inject code path (shared > > function with different stack values; i'll probably have to ditch a "low > > level > > backward compatibility feature no one uses anyway" some day) > > > > i uploaded a fix that you can test when the bins are compiled at > > > > https://build.contextgarden.net/#/waterfall?tags=c.luametatex > > > > new bins then in: > > > > https://dl.contextgarden.net/build/luametatex/ > > > > (fyi: in the mp code you see that the path p is 'get' from the lua end where > > it got passed to by parameter) > > Thanks! Works perfectly here. Spoke too soon. Now straight lines don't work: \starttext \startMPcode newpath p; ahfactor := 5; p := origin .. (3cm,0); draw lmt_arrow [ path = p, location = "percentage", percentage = 50, alternative = "curved", ] withpen pencircle scaled 1bp; \stopMPcode \stoptext gives metapost> trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode. metapost> trace > metapost> trace > loading metafun for lmtx, including the plain 1.004 base definitions metapost> trace > metafun > log > metafun > log > error: This can't happen (division by zero) metafun > log > metapost> trace > arrowhead -> -> begingroup.save.q,e,r;pair.e;e=point.length(EXPR2)of(EXPR2);path.q;q=gobble((EXPR2)shifted-e.cutafter.makepath(pencircle.scaled(2ahlength)))cuttings;if.ahvariant>0:path.r;r=gobble((EXPR2)shifted-e.cutafter.makepath(pencircle.scaled((1-ahdimple)*2ahlength)))cuttings;fi(q.rotated(ahangle/2)(ahangle/2)if.ahvariant=1:--point0of.r--elseif.ahvariant=2:...point0of.r...else:--fi.cycle)shifted.e.endgroup metapost> trace > endgroup metapost> trace > pushparameters "arrow" ; save a ; string a ; a := getparameter "alternative" ; save l ; string l ; l := getparameter "location" ; save k ; string k ; k := getparameter "kind" ; save p ; path p ; p := getparameter "path" ; interim ahvariant := if a = "dimpled" : 1 elseif a = "curved" : 2 else : 0 fi ; interim ahdimple := getparameter "dimple" ; interim ahscale := getparameter "scale" ; interim ahangle := getparameter "angle" ; interim ahlength := getparameter "length" ; if not getparameter "headonly" : draw p ; fi ; if hasparameter "pen" : if hasoption "pen" "auto" : ahlength := ( getparameter "penscale" ) * boundingradius ( currentpen ) ; else : ahlength := ( getparameter "penscale" ) * boundingradius ( getparameterpen "pen" ) ; fi ; fi ; if k = "draw" : draw elseif k = "both" : filldraw else : fill fi if l = "middle" : midarrowhead p ; elseif l = "percentage" : arrowheadonpath ( p , ( getparameter "percentage" ) / 100 ) ; elseif l = &quo
Re: [NTG-context] Bug in lmt_arrow
On Sun, 14 Nov 2021, Hans Hagen wrote: > On 11/14/2021 4:33 AM, Aditya Mahajan via ntg-context wrote: > > Hi, > > > > There is a bug in lmt_arrow. If given a "non-cycle" path, lmt_arrow > > completes the cycle. > > > > \starttext > > > > \startMPcode > >newpath p; > >ahfactor := 5; > >p := origin .. (1cm, 1cm) .. (2cm, 0); > >draw lmt_arrow > > [ > > path = p, > > location = "percentage", > > percentage = 50, > > alternative = "curved", > > ] > > withpen pencircle scaled 1bp; > > \stopMPcode > > \stoptext > > > > With 2021.11.11, I get the attached file. Note that lmt_arrow has drawn the > > "cycle" version of the path, even though p does not have a cycle. > > > > I have looked at the code and cannot figure out why this is happening. > > it happens in the 'direct' variant (metapost.registerdirect) where a boolean > is passed as signal and that boolean then is also picked up by the (shared) > path injector as (old school) signal that a path is closed while it should > instead consutl the closed field in a path table (sounds more complex than it > is) > > so in the end it is a nasty side effect of the fast inject code path (shared > function with different stack values; i'll probably have to ditch a "low level > backward compatibility feature no one uses anyway" some day) > > i uploaded a fix that you can test when the bins are compiled at > > https://build.contextgarden.net/#/waterfall?tags=c.luametatex > > new bins then in: > > https://dl.contextgarden.net/build/luametatex/ > > (fyi: in the mp code you see that the path p is 'get' from the lua end where > it got passed to by parameter) Thanks! Works perfectly here. > (interesting that it didn't show up sooner, maybe most users have closed paths > and/or most lmt_ features used closed paths) I was reusing two year old code and took me a while to figure out why the output was suddenly wrong. Aditya ___ 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 lmt_arrow
On 11/14/2021 4:33 AM, Aditya Mahajan via ntg-context wrote: Hi, There is a bug in lmt_arrow. If given a "non-cycle" path, lmt_arrow completes the cycle. \starttext \startMPcode newpath p; ahfactor := 5; p := origin .. (1cm, 1cm) .. (2cm, 0); draw lmt_arrow [ path = p, location = "percentage", percentage = 50, alternative = "curved", ] withpen pencircle scaled 1bp; \stopMPcode \stoptext With 2021.11.11, I get the attached file. Note that lmt_arrow has drawn the "cycle" version of the path, even though p does not have a cycle. I have looked at the code and cannot figure out why this is happening. it happens in the 'direct' variant (metapost.registerdirect) where a boolean is passed as signal and that boolean then is also picked up by the (shared) path injector as (old school) signal that a path is closed while it should instead consutl the closed field in a path table (sounds more complex than it is) so in the end it is a nasty side effect of the fast inject code path (shared function with different stack values; i'll probably have to ditch a "low level backward compatibility feature no one uses anyway" some day) i uploaded a fix that you can test when the bins are compiled at https://build.contextgarden.net/#/waterfall?tags=c.luametatex new bins then in: https://dl.contextgarden.net/build/luametatex/ (fyi: in the mp code you see that the path p is 'get' from the lua end where it got passed to by parameter) (interesting that it didn't show up sooner, maybe most users have closed paths and/or most lmt_ features used closed paths) 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 ___
[NTG-context] minimum working example plus (output)
Here is the minium not-working example which I took from the Wikigarden a few minutes ago. \def\T#1{% \startitemize[#1,joinedup] \item This is a bullet of type #1. \stopitemize } \starttext \dorecurse{9}{\T\recurselevel} \stoptext Compiling this into a pdf file with context produces an error. I've pasted the complete context typesetting run to show the error, in hopes that it will shed some light on what's wrong with my setup. I have a feeling that the stand along install is missing some vital part of the installation regarding fonts, and that it's not noticed by the majority of you since those items are still on your system from legacy versions. Regards - * OS: ubuntu 20.04.3 LTS * Context current version: 2021.11.13 20:36 $ context bullet-style-example-iteration.lmtx resolvers | formats | executing runner 'run luametatex format': /opt/context-lmtx/tex/texmf-linux-64/bin/luametatex --jobname="./bullet-style-example-iteration.lmtx" --fmt=/opt/context-lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/opt/context-lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./bullet-style-example-iteration.lmtx" --c:input="./bullet-style-example-iteration.lmtx" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/opt/context-lmtx/tex/texmf-linux-64/bin" system > callbacks > not registering frozen 'local_box_filter' system > system > ConTeXt ver: 2021.11.13 20:36 LMTX fmt: 2021.11.13 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/context-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 '/opt/context-lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './bullet-style-example-iteration', input './bullet-style-example-iteration.lmtx', result './bullet-style-example-iteration' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './bullet-style-example-iteration.lmtx' fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'lmroman12-regular' is not found using lookup 'file' fonts > defining > unable to define 'lmroman12-regular' as 'modern-designsize-12pt-rm-tf-0--0' fonts > defining > forced type 'otf' of 'latinmodern-math-regular' not found fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mr--3' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mr--2' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mr--1' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mb--3' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mb--2' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mb--1' fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 9 in file ./bullet-style-example-iteration.lmtx: \textfont0 is undefined in (text) char, font id 0, character 63) \textormathchar ...ar \scratchcounter \else \ifconditional \prefermathovertextchar \setfontid \fontid \textfont \c_font_fam_mr \fi \iffontchar \font \scratchcounter \char \scratchcounter \else \normalstartimath \char \scratchcounter \normalstopimath \fi \fi \endg ... \symb_place_indeed #1->\settrue \c_symb_found \begingroup \the \everysymbol \csname \??symbol #1\endcsname \relax \endgroup \symb_place_retry #1->\ifcsname \??symbol :#1\endcsname \symb_place_indeed {:#1} \else #1\fi \currentsymbol \setfalse \c_symb_found \the \t_symb_setups \ifconditional \c_symb_found \else \symb_place_retry \currentsymbol \fi \symb_place_argument #1->\dontleavehmode \edef \currentsymbol {#1}\ifcsname \??symbol \currentsymbolset :#1\endcsname \symb_place_indeed {\currentsymbolset :#1}\else \symb_place_normal \fi \symb_place_indeed #1->\settrue \c_symb_found \begingroup \the \everysymbol \csname \??symbol #1\endcsname \relax \endgroup ... \dorecurse{9}{\T\recurselevel} 1 2 \def\T#1{% 3 \startitemize[#1,joinedup] 4 \item This is a bullet of type #1. 5 \stopitemize 6 } 7 8 \starttex
Re: [NTG-context] Concerning \installparameterhashhandler and family
On 11/9/2021 8:01 PM, Jairo A. del Rio via ntg-context wrote: Hi. Reading at mult-aux.mkxl, I've seen command handlers define, among others, \installparameterhashhandler, However, in files such as those related with symbol management, only \installparameterhandler and \installsetuphandler are. When writing basic modules, sometimes only the "raw" macros above are actually needed. So, what are "parameterset", "hashhander", "rootparameterhandler", etc. for? Where would they ease module writing? Thank you a lot and sorry for the long question. The ones you mention are the lowest level ones and mechanisms that use them are oned that don't really have much to manage (like symbols and languages and fonts and so, these are core mechanisms on their own and need additional interfaces. There's also the matter of performance: anything key/value driven can have a performance hit so the more one wraps the worse it can get. (The mkii and mkiv/lmtx methods differe fundamentally, where in principle the mkii approach is faster but in practice mkiv/lmtx works out better. A typical case where usage in the end determines performance more than the implementation.) For modules: don't go too low level. Not all helpers in modules like mult-aux are meant for usage outside well known situations. Just like some low level helpers in syst-aux stay around for compatibility. In fact, one of the ideas behind luametatex/lmtx is to get rid of "complex" middle layers where the language itself can do it, so: \protected\def\foo[#1]{\dosingleempty\dofoo} \def\dofoo[#1]{...} in mkii/mkiv can now be: \tolerant\protected\def\foo[#1]{...} (1) less code (2) somewhat faster (3) looks nicer (for me much is about looks) but I guess that you already know that, 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] Any initial thoughts on luau?
fast. And I don't necessarilly mean calling external C > > functions via FFI, just defining the structures (in C syntax) and using > > them transparently in LuaJIT (like "specialized and fast tables"). > > sure, it's a nice piece of software > > > I wonder how possible and usable would a LuaTeX implementation in pure > > (LuaJIT specific) Lua code would be, if it tried to offer the same API > > as currently described in the LuaTeX manual (hence being compatible). > > personally i would never gamble on that, just as i never gambled on > luajittex for the long run ... it's nice to have around as long as it > works but just as the ffilib used in luatex is 'abandoned by where it > came from', luajit is also stuck in 5.2 and there was even a moment that > it looked like being quit ... for me, anything that depends on low level > cpu specific code at compile time is not worth the effort (it's also why > i discarded libs in luametatex that have cpu specific optimizations that > then in turn demand running scripts to generate files for compilation > ... all not worth the trouble) > > now, keep in mind that (lua)jit involves some runtime analysis and that > is why we don't gain (we did quite some experiments at that time) > > also, often the runtime is not where one thinks (many jit performance > tests are doing math and we hardly do that); also in luatex we had to > patch the string hasher that came with luahit because it was tuned for > urls (think of skipping the first n chars i.e. http://) while for tex > that actually works out bad > > for the record: i have rewritten bits of core tex in lua but in the end > didn't see many benefits (i'll probably pick up that thread when > luametatex is kind of finished) .. i need to update it -) > > > I can see benefits in it being pure Lua (although with some optimized > > structures), most of the interesting things already happen in Lua and > > this would just extend the approachability and openness of the engine. > > as i mentioned, i will pick up that thread but still it will be via > callbacks ... much in tex is about macro handling (efficient in c) and > par building (efficient in c) ... crossing the c boundary is not that > costly in the end (one can sort of measure that) ... it's the cpu cache > (hits and misses) that matter more as lua and tex are jumping around > memory (not crunching numbers or massaging vectors) ... some gain will > come from the upcoming GB level 2 caches for cpu's (i guess) > > > Also the possibilities of having garbage collection (no need to worry > > about memory safety), JIT being viable (since there is no use of C API > > to prevent it), less platform dependence (AFAIK in some cases where PUC > > Lua uses the platform C's functions LuaJIT provides portable > > alternatives). > > jit is cpu dependent > > > There are also arguments against LuaJIT: > > - weird 5.1 / 5.2 mix (probably a matter of preference) > > and politics (one can find not so nice discussions on the web, one > reason for not using luajit btw) > > > - no integer types (but actually LuaJIT internally optimizes integers > > and also provides the bit library, but the surface is "clean double > > only") > > > > - requires certain unidiomatic coding style for achieving performance > > indeed, and this while ffi mix is kind of not-so-lua > > i get the feeling that it also stimulates inefficient code writing .. > the 'jit will do it for me' thing > > > - limited platform support (LuaJIT has to specifically be ported to > > each architecture, but the current support is pretty solid) > > > > - in the past total size of objects was limited to be 2 GiB (this is no > > longer true with GC64 mode) > > also some limitations on what goes on the stack > > > - LuaTeX specifically has had problems with LuaJIT's hash function, I > > don't know the details though > > > > - while the code without C API use would be JITable, the benefits may > > not be large, since TeX runs are not that long, although there are > > critical parts of code that would certainly benefit > > an alternative could be the compilation of (stable) lua code into > modules (the lua folks have articles about that, and it seems to > outperform luajit) > > > Surely I somewhere forgot an important point for or against the > > theoretical idea. But Hans, I would still appreciate your general > > opinion, even though I remember some document saying that you already > > disregarded this possibility. > > one important point is that 'tex is also something knuthian' ... > software legacy ... n
Re: [NTG-context] Any initial thoughts on luau?
On 11/6/2021 5:19 PM, Michal Vlasák wrote: On Fri Nov 5, 2021 at 9:14 PM CET, Hans Hagen via ntg-context wrote: On 11/5/2021 6:23 PM, Ramkumar KB via ntg-context wrote: Hello, Yesterday, Roblox announced - Luau - https://luau-lang.org/why <https://luau-lang.org/why> - mainly adding linting and type-checking features. Being compatible with Lua 5.1 is probably a bummer but nonetheless would be interesting to hear about this from this community. for sure i need more than an email to give a real answer (and some can be read between the lines of the history documents / articles that we ship); that said: the main reasons for choosing lua for luatex has been that it is relatively small, has no dependencies, doesn't need tons of libraries to make it useful, is made for embeded usage, evolves in a proper academic setting, has long-term dedicated (nice) developers, is not part of some religious programming language war/competition, reminds me (in a positive way of pascal and modula), is pretty fast, ... so, no regrest and no need for something else [...] to start with typing: i suppose that a more explicit integer / float separation can give better performance, although on modern cpu's one can wonder (personally i don't see the current mix of integer / float as a benefit over all numbers being floats - which had some charm due to the consistency - but who an i to complain; at least we now have bitwise operators (for a specific application like roblox it makes sense but using a dedicated / patched / extended lua machinery in luatex doesn't); there are articles by the lua authors about typing but these are behind publisher firewalls [...] jitting also costs time and for a single pass process like tex there is no gain (we established that long ago alreadY); the only reason why luajittex is faster than luatex for a tex run is that the vm is faster due to some limitations (that one can actually hit but in context we got around it) ... jitting also is cpu dependent and therefore more fragile futurw wise (more and more complex code too) [...] if better performance is an objective: there are probably spots in the current code that are candidates and one can see from updates that occasionally optimizations happen (keep in mind that lua has to run on a wide range of hardware: small embedded to fast single core) so, I'm pretty okay with lua as it is now (but any influx from spin off languages / engines can be interesting, but i think the authors are aware of all that) ... and ... who knows what (side effects) pallene will bring (also about performance: i know pretty well how to write fast lua code but no one ever comes around asking so that means everyone is satisfied) Hans After Ramkumar's initial e-mail, I reread some of the manuals describing Lua 5.1 / 5. 2 / 5.3 / 5.4 / LuaJIT evolution and evaluation. As I learned more about Lua and LuaTeX I realized that they share (or contrast in) some core concepts (e.g. TeX's hash table vs Lua tables, LuaTeX's sparse arrays vs Lua tables, custom allocation strategies - huge mem array and custom management vs garbage collection). Recently I discovered some of the things LuaJIT does (and it is in many ways incredible piece of software). So the idea of implementing LuaTeX in LuaJIT struck me. The reason why LuaJIT doesn't bring that many benefits for LuaTeX specifically (apart from the faster interpeter, is that LuaTeX heavily uses Lua C API (which is AFAIK slow in LuaJIT since it can't (couldn't?)be JIT compiled and there is the overhead of the API itself - the stack nature). Wile FFI in LuaJIT is fast. And I don't necessarilly mean calling external C functions via FFI, just defining the structures (in C syntax) and using them transparently in LuaJIT (like "specialized and fast tables"). sure, it's a nice piece of software I wonder how possible and usable would a LuaTeX implementation in pure (LuaJIT specific) Lua code would be, if it tried to offer the same API as currently described in the LuaTeX manual (hence being compatible). personally i would never gamble on that, just as i never gambled on luajittex for the long run ... it's nice to have around as long as it works but just as the ffilib used in luatex is 'abandoned by where it came from', luajit is also stuck in 5.2 and there was even a moment that it looked like being quit ... for me, anything that depends on low level cpu specific code at compile time is not worth the effort (it's also why i discarded libs in luametatex that have cpu specific optimizations that then in turn demand running scripts to generate files for compilation ... all not worth the trouble) now, keep in mind that (lua)jit involves some runtime analysis and that is why we don't gain (we did quite some experiments at that time) also, often the runtime is not where one thinks (many jit performance tests are doing math and we hardly do that); also in luatex we had to patch the string hasher that
[NTG-context] new upload, new trickery
the provided line number: % \def\LineNumberL{\the\localboxlinenumber} % \def\LineNumberR{\the\localboxlinenumber} % using a tex counter % \newcount\MyLineNumberL % \newcount\MyLineNumberR % \def\LineNumberL{\global\advance\MyLineNumberL\plusone\the\MyLineNumberL} % \def\LineNumberR{\global\advance\MyLineNumberR\plusone\the\MyLineNumberR} % using proper counters \definecounter[MyLineNumberL] \definecounter[MyLineNumberR] \setupcounter[MyLineNumberL][numberconversion=characters] \setupcounter[MyLineNumberR][numberconversion=romannumerals] \def\LineNumberL{\incrementcounter[MyLineNumberL]\convertedcounter[MyLineNumberL]} \def\LineNumberR{\incrementcounter[MyLineNumberR]\convertedcounter[MyLineNumberR]} \protected\def\LeftNumber {\hbox to \localboxesparameter{width}{\strut(\LineNumberL\hss)}} \protected\def\RightNumber{\hbox to \localboxesparameter{width}{\strut(\hss\LineNumberR)}} \protected\def\LeftText #1{#1\quad} \protected\def\RightText#1{\quad#1} \showframe \starttext \start \localbox[linenumber]{}% \localbox[linenumbertwo]{}% \localbox[linetext]{L}% \startlocalbox[linetexttwo] R \stoplocalbox \dorecurse{100}{ \samplefile{tufte} \par } \stop If you play a bit with these low level mechanism the luametatex / context combination now permits weird applications (which for sure some of you will (ab)use). The above example shows how to implement line numbers (there are drawbacks compared to the existing mechanisms) and other stuff in the margins and text edges but the most important aspect is that when the content in these boxes has width, it will be taken into account in the par builder because that is what this is about: these local boxes are taken into acount when breaking lines. When the handlers kick in, you have \localboxattribute : more for internal use \localboxlinenumber: as the par builder sees it \localboxwidth : the local box width \localboxoffset: the total distance to the edge \localboxleftskip : the effective leftskip \localboxrightskip : the effective rightskip \localboxlefthang : the current shape related value \localboxrighthang : the current shape related value \localboxindent: only first line \localboxparfillleftskip : effective value (onky last line) \localboxparfillrightskip : effective value (only last line) \localboxovershoot : overfull compensation most of these relate to normalized lines and as such there is plenty to play with. Others can be seen in the examples. I might add some more control to both these 'injection' mechanism because directly out of the (pdftex/omega/luatex) they are not that useful (which is probably also why we don't use them.) These are cheap extensions so they don't really influence runtime much, so .. when not used ... no harm done. I really have no clue how useful this is. I need to ponder this usage: \definelocalboxes [linetextA] [command=\LeftTextA, location=lefttext, style=\bs, color=darkblue] \protected\def\LeftTextA#1{\llap{#1}\quad} \definelocalboxes [linetextB] [command=\LeftTextB, location=left, style=\bs, color=darkgreen] \protected\def\LeftTextB{\llap{\unhbox\localboxcontentbox}\quad} \starttext \dorecurse{10}{some text #1 } \leftparbox {\red \bf keyword}HERE\leftparbox{} \dorecurse{10}{some text #1 } \blank {\dorecurse{10}{some text #1 } \leftparbox {\red \bf keyword}test \dorecurse{10}{some text #1 }} \blank {\dorecurse{10}{some text #1 } \localbox[linetextA]{keyword}HERE \dorecurse{10}{some text #1 }} {\dorecurse{10}{some text #1 } \localbox[linetextB]{keyword}HERE \dorecurse{10}{some text #1 }} {\dorecurse{10}{some text #1 } \localbox[linetextB]{keyword 1}HERE1 \dorecurse{10}{some text #1 } \localbox[linetextB]{keyword 2}HERE2 \dorecurse{10}{some text #1 }} \stoptext so there's always so echallenge left. 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] MkIV missing?
It works. I don't know why, but it works now. Best wishes Jörg Am 18.10.21 um 17:27 schrieb Jörg Hofmann via ntg-context: Am 04.10.21 um 15:33 schrieb Taco Hoekwater via ntg-context: We are busy with this off-list. If it is urgent: luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate fixed it for me (you’ll need to adjust the path, of course) Best wishes, Taco But not for me. :( After I set up my PC again, Linux Mint 20.1 Cinnamon, I also reinstalled ConTeXt and since then I have been experiencing the error. Are there any further steps? Besst wishes Jörg On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context wrote: Same problem here, on a linux64, context current version: 2021.09.26 17:00 Greetings Marcus Vinicius On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context wrote: Am 04.10.2021 um 13:06 schrieb Hans Hagen: On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: Hi, since a while, I can’t run MkIV any more, even after several runs of install.sh (and mtxrun --generate, of course). It’s the same on my Mac and my Linux laptop (of course the bin dir is different on the latter): $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.09.26 17:00 mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.09.26 17:00 $ context --version --luatex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context --version --luatex --redirected mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' $ which context /Users/hraban/lmtx/tex/texmf-osx-64/bin/context $ which luatex /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex $ luatex --version This is LuaTeX, Version 1.13.0 (TeX Live 2021) ... $ mtxrun --version mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun | source path I thought that was related to the server/provider move, but I guess it isn’t. It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a call to mtxrun can’t find any configuration. works here ... maybe a --generate issue? I re-ran the install script with a shell ("sh install.sh" instead just ". install.sh"), but that doesn’t change the "unknown script" issue. "mtxrun --generate" seems to work without problems; or do you see something suspicious in the attached log? 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 ___ -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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 ___ — Taco Hoekwater E:t...@bittext.nl genderfluid (all pronouns) ___ 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/contex
Re: [NTG-context] MkIV missing?
Am 04.10.21 um 15:33 schrieb Taco Hoekwater via ntg-context: We are busy with this off-list. If it is urgent: luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate fixed it for me (you’ll need to adjust the path, of course) Best wishes, Taco But not for me. :( After I set up my PC again, Linux Mint 20.1 Cinnamon, I also reinstalled ConTeXt and since then I have been experiencing the error. Are there any further steps? Besst wishes Jörg On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context wrote: Same problem here, on a linux64, context current version: 2021.09.26 17:00 Greetings Marcus Vinicius On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context wrote: Am 04.10.2021 um 13:06 schrieb Hans Hagen : On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: Hi, since a while, I can’t run MkIV any more, even after several runs of install.sh (and mtxrun --generate, of course). It’s the same on my Mac and my Linux laptop (of course the bin dir is different on the latter): $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.09.26 17:00 mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.09.26 17:00 $ context --version --luatex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context --version --luatex --redirected mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' $ which context /Users/hraban/lmtx/tex/texmf-osx-64/bin/context $ which luatex /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex $ luatex --version This is LuaTeX, Version 1.13.0 (TeX Live 2021) ... $ mtxrun --version mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun | source path I thought that was related to the server/provider move, but I guess it isn’t. It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a call to mtxrun can’t find any configuration. works here ... maybe a --generate issue? I re-ran the install script with a shell ("sh install.sh" instead just ". install.sh"), but that doesn’t change the "unknown script" issue. "mtxrun --generate" seems to work without problems; or do you see something suspicious in the attached log? 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 ___ -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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 ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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] new upload
On 10/13/2021 10:37 PM, jbf via ntg-context wrote: In fact, Hans, that was going to be my comment after updating yesterday to the 10-10-21 version: some of the breaks were a bit overdone. Are these changes you indicate as tests actually included in the latest upload, or should I wait a bit? they are in there; but i still need to check multiple notes and spacing before the first (we have some trickery in mkiv and lmtx but maybe i can still make that better / more reliable in lmtx/luametatex) 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 ___
[NTG-context] new upload
Hi, This midweek upload has something new. There has been some discussion about footnotes and one thing I noticed when playing with some new possibilities is that the stretch in topskip (we use a default amount that long ago was derived from plain tex and is relative to the body font size) influences the pagebreaks in relation to inserts (footnotes) in a more significant way than one would expect. I also noticed that this stretch component is one of the reasons why sometimes a side float shape will carry over to a next page in spite of there being room. This relates to \brokenpenalty. At the end of this mail are some tests that demonstrate this. As a consequence we now have a "ntop" parameter as well as a shaping related penalty primitives (parameters): \shapingpenaltiesmode"FF% set all (future) bits (currently 4) \shapingpenalty\plushundred % don't go too high which is currently not enabled by default but might be in upcoming versions; this also depends on user feedback. It's a non intrusive extension the LuaMetaTeX engine. I have this setting in my local preferences file. Hans % test code (for Massimiliano and Hraban to play with) \starttext \showframe % this is the current default behaviour; we have a topskip with % quite some stretch and that stretch is taken into account % when tex calculates the badness; watch the next page \dorecurse{4}{ \bgroup \shapingpenaltiesmode\zerocount \showmakeup[penalty] \placefigure[left]{}{} \input tufte \par \egroup } \page EMPTY \page % the ntop is new and when >= 0 it is a multiplier for the number % of lines stretch, here we have one line; watch the next page \dorecurse{4}{ \bgroup \shapingpenaltiesmode\zerocount \setupinterlinespace[ntop=1] \showmakeup[penalty] \placefigure[left]{}{} \input tufte \par \egroup } \page EMPTY \page % these shaping parameters will discourage a linebreak within a % shape; the placement macro checked available space but that % doesn't mean that there can be no linebreak \dorecurse{4}{ \bgroup \showmakeup[penalty] \shapingpenaltiesmode"FF\relax \shapingpenalty\plushundred \placefigure[left]{}{} \input tufte \par \egroup } \page EMPTY \page % the next pages show the effect of changed topskip on page breaks % with footnotes \dorecurse{10}{ [#1] \input tufte \footnote{\input{tufte}} \par } \page EMPTY \page \setupinterlinespace[ntop=2] \dorecurse{10}{ [#1] \input tufte \footnote{\input{tufte}} \par } \page EMPTY \page \setupinterlinespace[ntop=0] \dorecurse{10}{ [#1] \input tufte \footnote{\input{tufte}} \par } \stoptext - 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] Something smells rotten in the state of luametatex...
On 10/8/2021 6:09 PM, Thomas A. Schmitz via ntg-context wrote: Hi all, I have a document here for one of my classes: xml processed via context, some layers, some two column paragraphs, a bibliography, nothing out of the ordinary. With mkiv, it compiles cleanly: mkiv lua stats > used engine: luatex version: 1.13, functionality level: 7420, banner: this is luatex, version 1.13.0 (tex live 2021) mkiv lua stats > used hash slots: 48846 of 65536 + 25 mkiv lua stats > lua properties: engine: lua 5.3, used memory: 212 MB, ctx: 210 MB, max: unknown MB, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 2.775 seconds, 119 processed pages, 119 shipped pages, 42.883 pages/second system | total runtime: 5.996 seconds When I compile the same document with luametatex, things slow down to a crawl: mkiv lua stats > used engine: luametatex version: 2.0921, functionality level: 20210903, format id: 594, compiler: gcc mkiv lua stats > tex properties: 740039 hash slots used of 2097152, 48372 control sequences, approximate memory usage: 36 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 100 MB, ctx: 93 MB, max: 138 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 27.509 seconds, 119 processed pages, 119 shipped pages, 4.326 pages/second system | total runtime: 139.458 seconds of 139.493 seconds So, it takes more than 20 times as long... The CPU of my computer goes up to 100 %, and the entire machine sometimes becomes unresponsive during the run. Obviously, I can't provide a MWE, but this seems bizarre. One thing I see on my terminal: there are hundreds of lines like this Overfull \hbox (0.8pt too wide) in paragraph at lines 18--18 6:17: [glue][glue][glue][boundary][hlist][penalty][glue][hlist][penalty] >[glue][glue] It's almost like some debug setting has been triggered. But that may be a red herring. Anyway, I just wanted to report this; maybe some bigger problem (with the binary or the format?) is lurking somewhere. no, that's just a more verbose 'overfull box' message ... does adding \dontcomplain help? (After all you can live with .8pt which smells like 2 * .4pt which is the default rule width so maybe some frame stricks out) 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 ___
[NTG-context] Something smells rotten in the state of luametatex...
Hi all, I have a document here for one of my classes: xml processed via context, some layers, some two column paragraphs, a bibliography, nothing out of the ordinary. With mkiv, it compiles cleanly: mkiv lua stats > used engine: luatex version: 1.13, functionality level: 7420, banner: this is luatex, version 1.13.0 (tex live 2021) mkiv lua stats > used hash slots: 48846 of 65536 + 25 mkiv lua stats > lua properties: engine: lua 5.3, used memory: 212 MB, ctx: 210 MB, max: unknown MB, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 2.775 seconds, 119 processed pages, 119 shipped pages, 42.883 pages/second system | total runtime: 5.996 seconds When I compile the same document with luametatex, things slow down to a crawl: mkiv lua stats > used engine: luametatex version: 2.0921, functionality level: 20210903, format id: 594, compiler: gcc mkiv lua stats > tex properties: 740039 hash slots used of 2097152, 48372 control sequences, approximate memory usage: 36 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 100 MB, ctx: 93 MB, max: 138 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 27.509 seconds, 119 processed pages, 119 shipped pages, 4.326 pages/second system | total runtime: 139.458 seconds of 139.493 seconds So, it takes more than 20 times as long... The CPU of my computer goes up to 100 %, and the entire machine sometimes becomes unresponsive during the run. Obviously, I can't provide a MWE, but this seems bizarre. One thing I see on my terminal: there are hundreds of lines like this Overfull \hbox (0.8pt too wide) in paragraph at lines 18--18 6:17: [glue][glue][glue][boundary][hlist][penalty][glue][hlist][penalty] >[glue][glue] It's almost like some debug setting has been triggered. But that may be a red herring. Anyway, I just wanted to report this; maybe some bigger problem (with the binary or the format?) is lurking somewhere. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MkIV missing?
Thank you, Taco Your suggestion resolved the issue for me. Regards Marcus Vinicius On Mon, Oct 4, 2021 at 10:50 AM Taco Hoekwater via ntg-context < ntg-context@ntg.nl> wrote: > Hi, > > Here is what I assume has happened: > > Hans gave LMTX its own "luametatex-cache” directory (around August 20). > Previously, the cache for LMTX still used files under luatex-cache, just > like MKIV. But since that change, the “context -—generate” call no longer > updates files in luatex-cache, only in luametatex-cache. > > > That is not a big problem unless something happens to clear any existing > cache in that folder (like a re-install from scratch, say). > > Normally, one runs “context —-generate” to fix the cache and “context > —-luatex” to run luatex Combined, that would be > “context —-generate —-luatex”. > But the problem is that luatex cannot find “mtx-context.lua” exactly > because of the missing cache that we are actually trying to create with > that command line. Missing “mtx-context.lua” is usually fixed by running > the more basic “mtxrun —generate”. > > However, “mtxrun -—generate” does not currently support a "-—luatex” > argument, so the only way I know of right now to get the luatex-cache > restored|updated is to run the command below. > > (Incidentally, this sort of issue is why the core command is not “context > -—generate” but “mtxrun -—generate”. It is unfortunate that that does not > help in this case). > > Best wishes, > Taco > > > On 4 Oct 2021, at 15:33, Taco Hoekwater via ntg-context < > ntg-context@ntg.nl> wrote: > > > > We are busy with this off-list. > > > > If it is urgent: > > > > luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate > > > > fixed it for me (you’ll need to adjust the path, of course) > > > > Best wishes, > > Taco > > > >> On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context < > ntg-context@ntg.nl> wrote: > >> > >> Same problem here, on a linux64, context current version: 2021.09.26 > 17:00 > >> > >> Greetings > >> > >> Marcus Vinicius > >> > >> On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context < > ntg-context@ntg.nl> wrote: > >> > >>> Am 04.10.2021 um 13:06 schrieb Hans Hagen : > >>> > >>> On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: > >>>> Hi, > >>>> since a while, I can’t run MkIV any more, even after several runs of > install.sh (and mtxrun --generate, of course). > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > > ___ > 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 > > ___ > -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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] MkIV missing?
Hi, Here is what I assume has happened: Hans gave LMTX its own "luametatex-cache” directory (around August 20). Previously, the cache for LMTX still used files under luatex-cache, just like MKIV. But since that change, the “context -—generate” call no longer updates files in luatex-cache, only in luametatex-cache. That is not a big problem unless something happens to clear any existing cache in that folder (like a re-install from scratch, say). Normally, one runs “context —-generate” to fix the cache and “context —-luatex” to run luatex Combined, that would be “context —-generate —-luatex”. But the problem is that luatex cannot find “mtx-context.lua” exactly because of the missing cache that we are actually trying to create with that command line. Missing “mtx-context.lua” is usually fixed by running the more basic “mtxrun —generate”. However, “mtxrun -—generate” does not currently support a "-—luatex” argument, so the only way I know of right now to get the luatex-cache restored|updated is to run the command below. (Incidentally, this sort of issue is why the core command is not “context -—generate” but “mtxrun -—generate”. It is unfortunate that that does not help in this case). Best wishes, Taco > On 4 Oct 2021, at 15:33, Taco Hoekwater via ntg-context > wrote: > > We are busy with this off-list. > > If it is urgent: > > luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate > > fixed it for me (you’ll need to adjust the path, of course) > > Best wishes, > Taco > >> On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context >> wrote: >> >> Same problem here, on a linux64, context current version: 2021.09.26 17:00 >> >> Greetings >> >> Marcus Vinicius >> >> On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context >> wrote: >> >>> Am 04.10.2021 um 13:06 schrieb Hans Hagen : >>> >>> On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: >>>> Hi, >>>> since a while, I can’t run MkIV any more, even after several runs of >>>> install.sh (and mtxrun --generate, of course). — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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] MkIV missing?
We are busy with this off-list. If it is urgent: luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate fixed it for me (you’ll need to adjust the path, of course) Best wishes, Taco > On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context > wrote: > > Same problem here, on a linux64, context current version: 2021.09.26 17:00 > > Greetings > > Marcus Vinicius > > On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context > wrote: > > > Am 04.10.2021 um 13:06 schrieb Hans Hagen : > > > > On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: > >> Hi, > >> since a while, I can’t run MkIV any more, even after several runs of > >> install.sh (and mtxrun --generate, of course). > >> It’s the same on my Mac and my Linux laptop (of course the bin dir is > >> different on the latter): > >> $ context --version > >> mtx-context | ConTeXt Process Management 1.04 > >> mtx-context | > >> mtx-context | main context file: > >> /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv > >> mtx-context | current version: 2021.09.26 17:00 > >> mtx-context | main context file: > >> /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl > >> mtx-context | current version: 2021.09.26 17:00 > >> $ context --version --luatex > >> mtx-context | redirect luametatex -> luatex: luatex --luaonly > >> "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context > >> --version --luatex --redirected > >> mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' > >> $ which context > >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/context > >> $ which luatex > >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex > >> $ luatex --version > >> This is LuaTeX, Version 1.13.0 (TeX Live 2021) > >> ... > >> $ mtxrun --version > >> mtxrun | ConTeXt TDS Runner Tool 1.32 > >> mtxrun | source path > >> I thought that was related to the server/provider move, but I guess it > >> isn’t. > >> It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that > >> a call to mtxrun can’t find any configuration. > > works here ... maybe a --generate issue? > > I re-ran the install script with a shell ("sh install.sh" instead just ". > install.sh"), but that doesn’t change the "unknown script" issue. > > "mtxrun --generate" seems to work without problems; or do you see something > suspicious in the attached log? > > 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 > ___ > > > -- > Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo > nem seus membros, por ser descanso da alma, primavera do coração, distração > do aflito, entretenimento do solitário, e viático do viajante. > > Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) > ___ > 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 > ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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] MkIV missing?
Same problem here, on a linux64, context current version: 2021.09.26 17:00 Greetings Marcus Vinicius On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context < ntg-context@ntg.nl> wrote: > > > Am 04.10.2021 um 13:06 schrieb Hans Hagen : > > > > On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: > >> Hi, > >> since a while, I can’t run MkIV any more, even after several runs of > install.sh (and mtxrun --generate, of course). > >> It’s the same on my Mac and my Linux laptop (of course the bin dir is > different on the latter): > >> $ context --version > >> mtx-context | ConTeXt Process Management 1.04 > >> mtx-context | > >> mtx-context | main context file: > /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv > >> mtx-context | current version: 2021.09.26 17:00 > >> mtx-context | main context file: > /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl > >> mtx-context | current version: 2021.09.26 17:00 > >> $ context --version --luatex > >> mtx-context | redirect luametatex -> luatex: luatex --luaonly > "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context > --version --luatex --redirected > >> mtxrun | unknown script 'mtx-context.lua' or > 'mtx-mtx-context.lua' > >> $ which context > >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/context > >> $ which luatex > >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex > >> $ luatex --version > >> This is LuaTeX, Version 1.13.0 (TeX Live 2021) > >> ... > >> $ mtxrun --version > >> mtxrun | ConTeXt TDS Runner Tool 1.32 > >> mtxrun | source path > >> I thought that was related to the server/provider move, but I guess it > isn’t. > >> It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so > that a call to mtxrun can’t find any configuration. > > works here ... maybe a --generate issue? > > I re-ran the install script with a shell ("sh install.sh" instead just ". > install.sh"), but that doesn’t change the "unknown script" issue. > > "mtxrun --generate" seems to work without problems; or do you see > something suspicious in the attached log? > > 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 > > ___ > -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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] MkIV missing?
> Am 04.10.2021 um 13:06 schrieb Hans Hagen : > > On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: >> Hi, >> since a while, I can’t run MkIV any more, even after several runs of >> install.sh (and mtxrun --generate, of course). >> It’s the same on my Mac and my Linux laptop (of course the bin dir is >> different on the latter): >> $ context --version >> mtx-context | ConTeXt Process Management 1.04 >> mtx-context | >> mtx-context | main context file: >> /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv >> mtx-context | current version: 2021.09.26 17:00 >> mtx-context | main context file: >> /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl >> mtx-context | current version: 2021.09.26 17:00 >> $ context --version --luatex >> mtx-context | redirect luametatex -> luatex: luatex --luaonly >> "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context >> --version --luatex --redirected >> mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' >> $ which context >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/context >> $ which luatex >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex >> $ luatex --version >> This is LuaTeX, Version 1.13.0 (TeX Live 2021) >> ... >> $ mtxrun --version >> mtxrun | ConTeXt TDS Runner Tool 1.32 >> mtxrun | source path >> I thought that was related to the server/provider move, but I guess it isn’t. >> It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a >> call to mtxrun can’t find any configuration. > works here ... maybe a --generate issue? I re-ran the install script with a shell ("sh install.sh" instead just ". install.sh"), but that doesn’t change the "unknown script" issue. "mtxrun --generate" seems to work without problems; or do you see something suspicious in the attached log? Hraban mtxrun-generate.log Description: Binary data ___ 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] MkIV missing?
On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: Hi, since a while, I can’t run MkIV any more, even after several runs of install.sh (and mtxrun --generate, of course). It’s the same on my Mac and my Linux laptop (of course the bin dir is different on the latter): $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.09.26 17:00 mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.09.26 17:00 $ context --version --luatex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context --version --luatex --redirected mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' $ which context /Users/hraban/lmtx/tex/texmf-osx-64/bin/context $ which luatex /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex $ luatex --version This is LuaTeX, Version 1.13.0 (TeX Live 2021) ... $ mtxrun --version mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun | source path I thought that was related to the server/provider move, but I guess it isn’t. It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a call to mtxrun can’t find any configuration. works here ... maybe a --generate issue? - 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] MkIV missing?
Hi, since a while, I can’t run MkIV any more, even after several runs of install.sh (and mtxrun --generate, of course). It’s the same on my Mac and my Linux laptop (of course the bin dir is different on the latter): $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.09.26 17:00 mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.09.26 17:00 $ context --version --luatex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context --version --luatex --redirected mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' $ which context /Users/hraban/lmtx/tex/texmf-osx-64/bin/context $ which luatex /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex $ luatex --version This is LuaTeX, Version 1.13.0 (TeX Live 2021) ... $ mtxrun --version mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun | source path I thought that was related to the server/provider move, but I guess it isn’t. It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a call to mtxrun can’t find any configuration. 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] running tikz
On Thu, 30 Sep 2021, Alain Delmotte via ntg-context wrote: > > Hi! > > I would like to use tikz to benefit of the package "pgf-soroban" I did write > for > LaTeX (after adapting it and before, later, to translate it to metapost). > > I did try the sample program from the tikz manual, but I get an error saying > that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx. How did you install TikZ? The error message seems to suggest that tikz module is not installed. You can check by looking at the output of mtxrun t-pgf.tex On my system, that gives: /opt/luametatex/texmf-modules/tex/context/pgf/basiclayer/t-pgf.tex (which I had installed the texmf-modules tree by copying from the context standalone tree. > How to make all the files in the distribution known to the compiler? By putting them in the right location in the tree (somewhere inside $TEXMF/tex/context ...). Aditya ___ 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On 9/11/2021 1:49 PM, Hugh Fisher via ntg-context wrote: It may be unfair, but my impression is that TeX and typesetting / layout systems based on TeX can do more interesting things than say XML or Sphinx. Moving to a more "universal" markup format might broaden my options, but I don't want a lowest common denominator solution. As soon as documents become more complex and one wants control over th elayout all these alternative-to-tex formats in the end are not better than structured tex input. The simpler the input tagging, the more complex the escaping from that. So in the end it all depends on what kind of documents one has to deal with. And it's all about abstraction and structure: the more, the easier. 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On 9/11/2021 1:19 PM, Hugh Fisher wrote: On Fri, 10 Sept 2021 at 21:47, Hans Hagen wrote: [ munch ] in this area there is nothing in luametatex that luatex can't do As in my earlier reply, I'm thinking about replacing Adobe Illustrator with Metapost, and LuaMetaTEX seems to have better integration? indeed the interfaces in lmtx/luametatex are better than in mkiv/luatex and new things will only be done in lmtx anyway, context users most likely will move to lmtx (mkiv is not really frozen as it is also the test case for luatex, but there will be no fundamental new things added) so, if your source uses a limited set of commands you can write a parser (in any language) This parser would need to understand TeX source files and conventions such as % for comments, recognise commands starting with \ and with arguments/parameters bracketed by [] and {}, and look up command names that might be written in Lua, then call them. Isn't that what LuaMetaTEX does? No, I haven't looked at the actual source code yet, but starting with something that already does most of what you want is always quicker than writing from scratch. sure, any tex engine is better at parsing tex input the main differences between luatex and luametatex (much is disucussed in articles and manuals) is that luametatex has no backend built in and has some better interfaces in the front end; there are extension to the subsystems of the tex engine (fonts, language, math, inserts, marks, alignments, conditionals, macro definition, par handling) that are not in luatex (which is basically frozen in order to permit other macro packages to support it); lua helpers have been cleaned up and there are some more; luametatex has a smaller binary, is more efficient wrt memory and has better performance (if used well) than luatex 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
Collating several suggestions into one: On Fri, 10 Sept 2021 at 21:26, Henning Hraban Ramm wrote: > Did you try pandoc? On Fri, 10 Sept 2021 at 21:47, Hans Hagen wrote: > you can consider coding your documents in xml and convert them to latex > and html .. neutral input so to say On Sat, 11 Sept 2021 at 01:07, T. Kurt Bond wrote: > You might also consider hevea (a LaTeX to HTML translator) and pandoc (which > bills itself as a universal document converter) and can convert into and out > of LaTeX. I use pandoc a lot, although not for LaTeX to HTML translation. > Pandoc can output EPUB, BTW. On Sat, 11 Sept 2021 at 01:34, wrote: > You may want to have a look at the lwarp package as an alternative to tex4ht. Thanks T. Kurt Bond and Denis Maier for the suggestions. A better alternative to tex4ht / tex4ebook would certainly be much easier for me, even if I'm still somewhat offended by the intermediate steps. As for xml or pandoc, I'd rather not because I want to keep print (PDF) as the primary output, and I don't want to lose what TeX/LaTeX can do that most markup languages can't. From what I know of pandoc, it is like Sphinx in that the way it generates PDF output is by translating pandoc into LaTeX/TeX, then running TeX! So instead of my current toolchain where I write the LaTeX I want directly, I'd be examining the pandoc output and if it isn't what I want, poking at pandoc in the hope of making things better. It may be unfair, but my impression is that TeX and typesetting / layout systems based on TeX can do more interesting things than say XML or Sphinx. Moving to a more "universal" markup format might broaden my options, but I don't want a lowest common denominator solution. -- cheers, Hugh Fisher ___ 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On Fri, 10 Sept 2021 at 21:47, Hans Hagen wrote: > [ munch ] > > in this area there is nothing in luametatex that luatex can't do As in my earlier reply, I'm thinking about replacing Adobe Illustrator with Metapost, and LuaMetaTEX seems to have better integration? > > so, if your source uses a limited set of commands you can write a parser > (in any language) This parser would need to understand TeX source files and conventions such as % for comments, recognise commands starting with \ and with arguments/parameters bracketed by [] and {}, and look up command names that might be written in Lua, then call them. Isn't that what LuaMetaTEX does? No, I haven't looked at the actual source code yet, but starting with something that already does most of what you want is always quicker than writing from scratch. -- cheers, Hugh Fisher ___ 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On Fri, 10 Sept 2021 at 21:26, Henning Hraban Ramm wrote: > > No. > > LuaMetaTeX is ConTeXt-only. > You would need a LaTeX -> ConTeXt conversion, and there is none. > Well I am thinking about switching to ConTeX/LuaMetaTEX anyway, because at the moment I draw vector art in the last non-subscription version of Adobe Illustrator, now approaching ten years old. I'll be trying out Metapost as a replacement. My markup isn't that complicated, so at worst I could translate by hand. But it occurs to me that if I get this markup to markup text translation going, I'd be able to write a LaTeX -> ConTeXt converter as a set of LaTeX named Lua functions. -- cheers, Hugh Fisher ___ 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
Oh, as a a more general response I can only reiterate what has been said already: Depending on your particular needs it might be better to start with some neutral input and generate output formats from there. There are plenty of options each with particular up- and downsides, e.g. markdown via pandoc, or asciidoc., or XML with XSLT. In the Racket ecosystem there's also scribble/pollen which looks quite interesting. I have never used that though. Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Denis Maier via > ntg-context > Gesendet: Freitag, 10. September 2021 17:35 > An: ntg-context@ntg.nl > Cc: Maier, Denis Christian (UB) ; > hugo.fis...@gmail.com > Betreff: Re: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler? > > You may want to have a look at the lwarp package as an alternative to tex4ht. > > Denis > > > -Ursprüngliche Nachricht- > > Von: ntg-context Im Auftrag von Hugh > > Fisher via ntg-context > > Gesendet: Freitag, 10. September 2021 13:14 > > An: ntg-context@ntg.nl > > Cc: Hugh Fisher > > Betreff: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler? > > > > I have documents in LaTeX, and would like to generate XHTML (ePub) > > output without going through an intermediate DVI or PDF step. > > Markup to markup, translating or transpiling rather than typesetting. > > > > My use case is that I have two tabletop gaming books, 60 - 80 pages of > > text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very > > happy with LaTeX and the wonderful PDF output for print. > > > > But now I also want to create ePub/XHTML as well as print versions. > > So far I've tried tex4ebook and tex4ht and neither works for me. > > Firstly, some of the LaTeX commands are not recognised or causing errors. > > > > And secondly, when I managed to get a small test section to work, the > > generated XHTML/HTML is very large, full of tiny s. The problem > > seems to be that tex4ht runs TeX which typesets everything into DVI > > with every element carefully placed on a page, and then tex4ht tries > > to reverse that back into HTML. All this extra HTML will slow down / > > interfere with the ebook reader which is doing the final page layout at > runtime on a particular device. > > > > How I would like it to work is directly from LaTeX to HTML without any > > low level typesetting. If I have a LaTex source paragraph > > > > This is some text with \textbf{some parts} in bold. > > > > The TEX will copy the source text to the destination. If > > there's a TeX command, here \textbf, it looks for a Lua function with > > that name and invokes it with whatever argument text is present. > > The Lua function emits , then recursively processes the argument > > text, then emits . Similarly there would be an implied lookup of > > \beginParagraph and \endParagraph which would emit and . > > Plain text just gets copied through unchanged. > > > > > > So (finally) my question: is LuaMetaTEX what I'm looking for? > > > > Yes is the answer I'm hoping for. And any guidance would be much > > appreciated. > > > > No, but best starting point? I've never tried modifying TeX code > > itself, but I am an experienced and sometimes competent programmer. > > who has written a compiler parser and a high level code generator. > > > > No and not a good idea to try? > > > > Any other responses? > > > > > > -- > > > > cheers, > > Hugh Fisher > > > > > ___ > > 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 > > ___ ___ 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
You may want to have a look at the lwarp package as an alternative to tex4ht. Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Hugh Fisher via > ntg-context > Gesendet: Freitag, 10. September 2021 13:14 > An: ntg-context@ntg.nl > Cc: Hugh Fisher > Betreff: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler? > > I have documents in LaTeX, and would like to generate XHTML (ePub) output > without going through an intermediate DVI or PDF step. > Markup to markup, translating or transpiling rather than typesetting. > > My use case is that I have two tabletop gaming books, 60 - 80 pages of text > and > diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very happy with > LaTeX and the wonderful PDF output for print. > > But now I also want to create ePub/XHTML as well as print versions. > So far I've tried tex4ebook and tex4ht and neither works for me. > Firstly, some of the LaTeX commands are not recognised or causing errors. > > And secondly, when I managed to get a small test section to work, the > generated XHTML/HTML is very large, full of tiny s. The problem seems > to be that tex4ht runs TeX which typesets everything into DVI with every > element carefully placed on a page, and then tex4ht tries to reverse that back > into HTML. All this extra HTML will slow down / interfere with the ebook > reader which is doing the final page layout at runtime on a particular device. > > How I would like it to work is directly from LaTeX to HTML without any low > level typesetting. If I have a LaTex source paragraph > > This is some text with \textbf{some parts} in bold. > > The TEX will copy the source text to the destination. If there's a > TeX > command, here \textbf, it looks for a Lua function with that name and invokes > it with whatever argument text is present. > The Lua function emits , then recursively processes the argument text, then > emits . Similarly there would be an implied lookup of \beginParagraph and > \endParagraph which would emit and . > Plain text just gets copied through unchanged. > > > So (finally) my question: is LuaMetaTEX what I'm looking for? > > Yes is the answer I'm hoping for. And any guidance would be much > appreciated. > > No, but best starting point? I've never tried modifying TeX code itself, but > I am > an experienced and sometimes competent programmer. > who has written a compiler parser and a high level code generator. > > No and not a good idea to try? > > Any other responses? > > > -- > > cheers, > Hugh Fisher > > ___ > 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On 9/10/2021 1:13 PM, Hugh Fisher via ntg-context wrote: I have documents in LaTeX, and would like to generate XHTML (ePub) output without going through an intermediate DVI or PDF step. Markup to markup, translating or transpiling rather than typesetting. My use case is that I have two tabletop gaming books, 60 - 80 pages of text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very happy with LaTeX and the wonderful PDF output for print. indeed, stay with what you're happy working with But now I also want to create ePub/XHTML as well as print versions. So far I've tried tex4ebook and tex4ht and neither works for me. Firstly, some of the LaTeX commands are not recognised or causing errors. i suppose that you can define commands that somehow make your own commands export something; i have no experience with latex or tex4ht And secondly, when I managed to get a small test section to work, the generated XHTML/HTML is very large, full of tiny s. The problem seems to be that tex4ht runs TeX which typesets everything into DVI with every element carefully placed on a page, and then tex4ht tries to reverse that back into HTML. All this extra HTML will slow down / interfere with the ebook reader which is doing the final page layout at runtime on a particular device. that's probbaly because there is not enough info in the dvi file ... maybe you can use xslt to sanitize the spans? How I would like it to work is directly from LaTeX to HTML without any low level typesetting. If I have a LaTex source paragraph This is some text with \textbf{some parts} in bold. so kind of interpreting The TEX will copy the source text to the destination. If there's a TeX command, here \textbf, it looks for a Lua function with that name and invokes it with whatever argument text is present. The Lua function emits , then recursively processes the argument text, then emits . Similarly there would be an implied lookup of \beginParagraph and \endParagraph which would emit and . Plain text just gets copied through unchanged. i once played with this (context speak): \def\textbf#1{\type{}#1\type{}} so, you define all the commands that you use (normally a subset of what a macro package provides, you just ignore what doesn't make sense) then you define a very large page (say A1) that you use completely then you typeset the document in verbatim (nil headers and footers) the resulting pdf can then be converted to html with pdftotex or something like that so, basically, you just typeset the html So (finally) my question: is LuaMetaTEX what I'm looking for? in this area there is nothing in luametatex that luatex can't do Yes is the answer I'm hoping for. And any guidance would be much appreciated. as said, i don't know latex but context has an xml export option > No, but best starting point? I've never tried modifying TeX code itself, but I am an experienced and sometimes competent programmer. who has written a compiler parser and a high level code generator. so, if your source uses a limited set of commands you can write a parser (in any language) No and not a good idea to try? Any other responses? you can consider coding your documents in xml and convert them to latex and html .. neutral input so to say 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] If you really absolutely need more capacity, you can ask a wizard to enlarge me
Hi, After perusing the texmfcnf.lua file, I created a file with the same name in my texmf-local folder, changing the settings for the node memory and step size, but it did not affect the compilation of the original MWE (without the enableexperiments switches), which still fails. What am I missing? Below the contents of the file: return { content = { directives = { ["luametatex.nodesize"] = { size = 6000, step = 60 }, } } } Marcus Vinicius On Fri, Sep 10, 2021 at 5:55 AM Marcus Vinicius Mesquita < marcusvinicius.mesqu...@gmail.com> wrote: > Hi, Hans > > The enableexperiments switches you pointed to solved the problem for the > mwe I sent, but I'll take a look at the texmfcnf.lua configuration file to > learn more. > > Thank you for your suggestions. > > Marcus Vinicius > > > On Thu, Sep 9, 2021 at 5:12 AM Hans Hagen wrote: > >> On 9/9/2021 12:52 AM, Marcus Vinicius Mesquita via ntg-context wrote: >> > Dear list, >> > >> > In the MWE below, ConTeXt lmtx throws an error with the message in the >> > title: >> > >> > \starttext >> > \startluacode >> > >> > local upperlimit = 9 >> > >> > context.starttabulate({ "|l|l|l|" }) >> > for i=1,upperlimit do >> > context.NC() >> > context("word 1") >> > context.NC() >> > context("word 2") >> > context.NC() >> > context("word 3") >> > context.NC() >> > context.AR() >> > end >> > context.stoptabulate() >> > >> > \stopluacode >> > \stoptext >> > >> > But it compiles with no problems with MKIV. >> > >> > context version: 2021.09.06 11:47 >> > >> > How to avoid this with lmtx? >> In luatex there is also a max on configured memory usage but because in >> luametatex we have larger nodes you hit limits earlier. Also, the memory >> allocation in luametatex is somewhat different (larger nodes are >> compensated by savings elsewhere so in the end mem usage for this run is >> similar). >> >> luatex luametatex >> >> pages 21962196 >> pps/s 8 11 >> time 278 195 >> mem 1.1G1.1G >> >> now, luametatex reports >> >> tex memory > bumping category 'node' succeeded, details: >> all=40050 | ini=0 | max=5000 | mem=4450 | min=100 | >> ptr=-843956 | set=5000 | stp=50 | top=4399 >> >> you can bump the the max in the configuration file and also the step. As >> you can see, luametatex runs quite a bit faster on this test but that is >> due to other differences between the two engines. >> >> The reason why it does run on my machine is that i have this: >> >> \enableexperiments [tabulatesparseskips] >> \enableexperiments [tabulateusesize] >> >> this makes tabulate a bit more efficient in terms of node usage so i >> stay some 20% below the configured max .. you can try to run with this >> option. Of course adding more text will also demand more mem but then >> you can always bump the max (in a configuration file in texmf-local or >> so; maybe some day i will add a --huge flag to the runner). >> >> 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 >> - >> > > > -- > Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o > corpo nem seus membros, por ser descanso da alma, primavera do coração, > distração do aflito, entretenimento do solitário, e viático do viajante. > > Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) > -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> Am 10.09.2021 um 13:13 schrieb Hugh Fisher via ntg-context > : > > So (finally) my question: is LuaMetaTEX what I'm looking for? No. LuaMetaTeX is ConTeXt-only. You would need a LaTeX -> ConTeXt conversion, and there is none. Did you try pandoc? 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 ___
[NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
I have documents in LaTeX, and would like to generate XHTML (ePub) output without going through an intermediate DVI or PDF step. Markup to markup, translating or transpiling rather than typesetting. My use case is that I have two tabletop gaming books, 60 - 80 pages of text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very happy with LaTeX and the wonderful PDF output for print. But now I also want to create ePub/XHTML as well as print versions. So far I've tried tex4ebook and tex4ht and neither works for me. Firstly, some of the LaTeX commands are not recognised or causing errors. And secondly, when I managed to get a small test section to work, the generated XHTML/HTML is very large, full of tiny s. The problem seems to be that tex4ht runs TeX which typesets everything into DVI with every element carefully placed on a page, and then tex4ht tries to reverse that back into HTML. All this extra HTML will slow down / interfere with the ebook reader which is doing the final page layout at runtime on a particular device. How I would like it to work is directly from LaTeX to HTML without any low level typesetting. If I have a LaTex source paragraph This is some text with \textbf{some parts} in bold. The TEX will copy the source text to the destination. If there's a TeX command, here \textbf, it looks for a Lua function with that name and invokes it with whatever argument text is present. The Lua function emits , then recursively processes the argument text, then emits . Similarly there would be an implied lookup of \beginParagraph and \endParagraph which would emit and . Plain text just gets copied through unchanged. So (finally) my question: is LuaMetaTEX what I'm looking for? Yes is the answer I'm hoping for. And any guidance would be much appreciated. No, but best starting point? I've never tried modifying TeX code itself, but I am an experienced and sometimes competent programmer. who has written a compiler parser and a high level code generator. No and not a good idea to try? Any other responses? -- cheers, Hugh Fisher ___ 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] If you really absolutely need more capacity, you can ask a wizard to enlarge me
Hi, Hans The enableexperiments switches you pointed to solved the problem for the mwe I sent, but I'll take a look at the texmfcnf.lua configuration file to learn more. Thank you for your suggestions. Marcus Vinicius On Thu, Sep 9, 2021 at 5:12 AM Hans Hagen wrote: > On 9/9/2021 12:52 AM, Marcus Vinicius Mesquita via ntg-context wrote: > > Dear list, > > > > In the MWE below, ConTeXt lmtx throws an error with the message in the > > title: > > > > \starttext > > \startluacode > > > > local upperlimit = 9 > > > > context.starttabulate({ "|l|l|l|" }) > > for i=1,upperlimit do > > context.NC() > > context("word 1") > > context.NC() > > context("word 2") > > context.NC() > > context("word 3") > > context.NC() > > context.AR() > > end > > context.stoptabulate() > > > > \stopluacode > > \stoptext > > > > But it compiles with no problems with MKIV. > > > > context version: 2021.09.06 11:47 > > > > How to avoid this with lmtx? > In luatex there is also a max on configured memory usage but because in > luametatex we have larger nodes you hit limits earlier. Also, the memory > allocation in luametatex is somewhat different (larger nodes are > compensated by savings elsewhere so in the end mem usage for this run is > similar). > > luatex luametatex > > pages 21962196 > pps/s 8 11 > time 278 195 > mem 1.1G1.1G > > now, luametatex reports > > tex memory > bumping category 'node' succeeded, details: > all=40050 | ini=0 | max=5000 | mem=4450 | min=100 | > ptr=-843956 | set=5000 | stp=50 | top=4399 > > you can bump the the max in the configuration file and also the step. As > you can see, luametatex runs quite a bit faster on this test but that is > due to other differences between the two engines. > > The reason why it does run on my machine is that i have this: > > \enableexperiments [tabulatesparseskips] > \enableexperiments [tabulateusesize] > > this makes tabulate a bit more efficient in terms of node usage so i > stay some 20% below the configured max .. you can try to run with this > option. Of course adding more text will also demand more mem but then > you can always bump the max (in a configuration file in texmf-local or > so; maybe some day i will add a --huge flag to the runner). > > 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 > - > -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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] If you really absolutely need more capacity, you can ask a wizard to enlarge me
On 9/9/2021 12:52 AM, Marcus Vinicius Mesquita via ntg-context wrote: Dear list, In the MWE below, ConTeXt lmtx throws an error with the message in the title: \starttext \startluacode local upperlimit = 9 context.starttabulate({ "|l|l|l|" }) for i=1,upperlimit do context.NC() context("word 1") context.NC() context("word 2") context.NC() context("word 3") context.NC() context.AR() end context.stoptabulate() \stopluacode \stoptext But it compiles with no problems with MKIV. context version: 2021.09.06 11:47 How to avoid this with lmtx? In luatex there is also a max on configured memory usage but because in luametatex we have larger nodes you hit limits earlier. Also, the memory allocation in luametatex is somewhat different (larger nodes are compensated by savings elsewhere so in the end mem usage for this run is similar). luatex luametatex pages 21962196 pps/s 8 11 time 278 195 mem 1.1G1.1G now, luametatex reports tex memory > bumping category 'node' succeeded, details: all=40050 | ini=0 | max=5000 | mem=4450 | min=100 | ptr=-843956 | set=5000 | stp=50 | top=4399 you can bump the the max in the configuration file and also the step. As you can see, luametatex runs quite a bit faster on this test but that is due to other differences between the two engines. The reason why it does run on my machine is that i have this: \enableexperiments [tabulatesparseskips] \enableexperiments [tabulateusesize] this makes tabulate a bit more efficient in terms of node usage so i stay some 20% below the configured max .. you can try to run with this option. Of course adding more text will also demand more mem but then you can always bump the max (in a configuration file in texmf-local or so; maybe some day i will add a --huge flag to the runner). 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
> 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] modules not found
On 9/8/2021 12:53 PM, Hans van der Meer via ntg-context wrote: Further investigation seems to indicate that the module files are not found when initiating the context run from another directory. Though previously this was no problem. I have moved the whole ConTeXt machinery from $HOME to another volume. Could that cause the problem? Allthough I set their location in the .bashrc. # The current version of the ConTeXt luametatex in use: CONTEXTLMTX=/Volumes/REALM/TeX/context export CONTEXTLMTX PATH=$CONTEXTLMTX/tex/texmf-osx-64/bin:$PATH ; export PATH did you run mtxrun --generate after the move dr. Hans van der Meer On 8 Sep 2021, at 12:46, Hans van der Meer via ntg-context mailto:ntg-context@ntg.nl>> wrote: Here is something I do not understand about \usemodule. My modules are in two places because I wanted development and production separated: (1) Volume/TeX/texmf/modules/ (2) Volume/TeX/texmf/modules-new/ Unexpected and suddenly loading files from the first directory does not occur any longer: modules > 'hvdm-tak' is not found But modules from modules-new load without a hitch: modules > 'hvdm-load' is loaded I have discard the caches and rebuilt them to no avail. Then trying mtxrun --locate filename does not show any location not even from the files that are loaded, just an empty line. What happens inside\usemodule to cause this? I confess being baffled. And how to convince ConTeXt to find all my modules? dr. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl> / http://context.aanhet.net <http://context.aanhet.net> archive : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki : http://contextgarden.net <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 ___ -- - 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] modules not found
Further investigation seems to indicate that the module files are not found when initiating the context run from another directory. Though previously this was no problem. I have moved the whole ConTeXt machinery from $HOME to another volume. Could that cause the problem? Allthough I set their location in the .bashrc. # The current version of the ConTeXt luametatex in use: CONTEXTLMTX=/Volumes/REALM/TeX/context export CONTEXTLMTX PATH=$CONTEXTLMTX/tex/texmf-osx-64/bin:$PATH ; export PATH dr. Hans van der Meer > On 8 Sep 2021, at 12:46, Hans van der Meer via ntg-context > wrote: > > Here is something I do not understand about \usemodule. > > My modules are in two places because I wanted development and production > separated: > (1) Volume/TeX/texmf/modules/ > (2) Volume/TeX/texmf/modules-new/ > > Unexpected and suddenly loading files from the first directory does not occur > any longer: modules > 'hvdm-tak' is not found > But modules from modules-new load without a hitch: modules > 'hvdm-load' is > loaded > > I have discard the caches and rebuilt them to no avail. Then trying mtxrun > --locate filename does not show any location not even from the files that are > loaded, just an empty line. > What happens inside \usemodule to cause this? I confess being baffled. And > how to convince ConTeXt to find all my modules? > > dr. Hans van der Meer > > > ___ > 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] zint barcode module on LMTX/MacOS
> 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/tex
Re: [NTG-context] transparency stopped working in LMTX
On 9/7/2021 11:02 AM, Henning Hraban Ramm via ntg-context wrote: (Latest LMTX, yesterday’s luametatex binary) The MWE shows no transparency with LMTX, it works with MkIV: ''' \setupexternalfigures[location=default] \definetransparency[light][a=1,t=.05] \definelayer[bg][x=0mm,y=0mm] \setupbackgrounds[text][background={bg},state=start] \starttext \starttransparent[light]% \externalfigure[hacker]% \stoptransparent \setlayer[bg][ hoffset=5mm, voffset=5mm, ]{ \starttransparent[light]% \externalfigure[hacker]% \stoptransparent } \stoptext ''' The layer stuff is not "minimal", but I wanted to check if "multiply" works. should work in next upload (not today) - 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] transparency stopped working in LMTX
(Latest LMTX, yesterday’s luametatex binary) The MWE shows no transparency with LMTX, it works with MkIV: ''' \setupexternalfigures[location=default] \definetransparency[light][a=1,t=.05] \definelayer[bg][x=0mm,y=0mm] \setupbackgrounds[text][background={bg},state=start] \starttext \starttransparent[light]% \externalfigure[hacker]% \stoptransparent \setlayer[bg][ hoffset=5mm, voffset=5mm, ]{ \starttransparent[light]% \externalfigure[hacker]% \stoptransparent } \stoptext ''' The layer stuff is not "minimal", but I wanted to check if "multiply" works. 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
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
> 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: 111
Re: [NTG-context] zint barcode module on LMTX/MacOS
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
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
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
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
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
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 ___
Re: [NTG-context] parameters TeX->LuaTeX
On 9/5/2021 10:14 AM, Hans van der Meer via ntg-context wrote: There is something I do not understand in the passing of parameters from TeX to LuaTex. This is my TeX definition: \def\ListSort[#1]#2{\directlua{hvdm.listsort([===[#2]===],[===[#1]===])}} tex haalt de {} rond #2 weg Calling \ListSort[sep={ + }]{} delivers the string 'sep={ + }' into LuaTeX as the printout in the logfile shows and as intended. However in \ListSort[{ + }]{} the braces have disappeared and transferred is nothing more than '+ '. Why is the transfer messing up the character string I am passing by removing the outer braces? Is this a bug or is it an unavoidable consequence of the TeX-LuaTeX interface? \starttext \def\foo#1{\detokenize{#1}} \foo{hvdm has to read the tex book} \def\foo#+{\detokenize{#1}} \foo{hvdm has to read the luametatex manual} \stoptext - 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] update lmtx
Hi, The end of the week update provides: \starttext \startTEXpage[offset=10pt] \starttabulate[|c|c|c|] \NC 1 \NC second column \NC third column \NC \NR \NC 2 \NC second\NC third\NC \NR \NC 3 r \NS[1][r]second & third \NC \NR \NC 3 c \NS[1][c]second & third \NC \NR \NC 3 l \NS[1][l]second & third \NC \NR \stoptabulate \stopTEXpage \stoptext where \NS means that there will be a span over columns (I needed such a span fro a manual but it only covers simple cases). There is also a new lowlevel manual, this time on marks (aka markings), think of running headers and so. I'm considering replacing the marking code by new code that I already have one my machine. In mkiv we;ve always used a more powerful alternative for the marks that than what luatex and friends provide but in luametatex I added a few of the missing pieces to the engine in addition to what already what there for a while. But I need Wolfgang to go over the code in order to identify possible side effects first. Hans ps. Because Dutch telecom (who so far took over all the providers we ever had so we had to change a few times) now completely quits web services we need to switch provider (again; so much for synergy) so the upcoming week there might be glitches in accessing the installer (we don't fallback on the garden yet). - 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] metafun doesn't compile \root 3 \of 2
\starttext \m{\root3\of2} \stoptext works. But \starttext \startMPcode label("\m{\root3\of2}", origin); \stopMPcode \stoptext doesn't. Running `LuaMetaTeX' on `trial' with ``/home/fvleung/ConTeXt/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context trial.tex'' resolvers | formats | executing runner 'run luametatex format': /home/fvleung/ConTeXt/tex/texmf-linux-64/bin/luametatex --jobname="trial" --fmt=/home/fvleung/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/fvleung/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./trial.tex" --c:input="./trial.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/fvleung/ConTeXt/tex/texmf-linux-64/bin" open source > level 1, order 1, name 'cont-yes.mkiv' fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.07.27 19:27 LMTX fmt: 2021.7.28 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 2, order 2, name '/home/fvleung/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/home/fvleung/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './trial', input './trial.tex', result './trial' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name './trial.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as 'metafun.mpxl' using method 'default' metapost> initializing number mode 'scaled' metapost> trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode. metapost> trace > metapost> trace > loading metafun for lmtx, including the plain 1.004 base definitions metapost> trace > tex error > tex error on line 7 in file ./trial.tex: Argument of \root has an extra } 32\normalstopimath \fi \par } } \global \setbox \mptextbox \hbox {\clf_mptexttoks } [[special cmd: end local call]] \relax ... \stopMPcode 1 \starttext 2 3 \startMPcode 4 label("\m{\root3\of2}", origin); 5 \stopMPcode 6 7 >> \stoptext 8 I've run across a '}' that doesn't seem to match anything. For example, '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. mtx-context | fatal error: return code: 256 TeX Output exited abnormally with code 1 at Fri Sep 3 17:44:19 ___ 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] new upload
There's a problem downloading lowlevel-alignments.pdf. Here's a slice of the log of install.sh: mtx-install | updating tex/texmf, 1530 files mtx-install | updating tex/texmf-context, 4130 files mtx-install | changed : 0 % :27550 : tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua mtx-install | changed : 1 % :15493 : tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-tex.lua mtx-install | changed : 1 % :23670 : tex/texmf-context/context/data/scite/context/scite-context-data-context.properties mtx-install | changed : 2 % :13061 : tex/texmf-context/context/data/scite/context/scite-context-data-tex.properties mtx-install | changed : 2 % :27550 : tex/texmf-context/context/data/textadept/context/data/scite-context-data-context.lua mtx-install | changed : 3 % :15493 : tex/texmf-context/context/data/textadept/context/data/scite-context-data-tex.lua mtx-install | changed : 3 % : 150521 : tex/texmf-context/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json mtx-install | added: 7 % : 199 : tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf mtx-install | tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf, trying again: mtx-install | added: 7 % : 199 : tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf mtx-install | tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf, trying again: mtx-install | added: 7 % : 199 : tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf mtx-install | tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf, trying again: mtx-install | added: 7 % : 199 : tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf mtx-install | tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf, trying again: mtx-install | added: 7 % : 199 : tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf mtx-install | tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf, try again later: After 5 unsuccessful trials to download the file, the updating process does not complete. The script ends without errors, but it's clear the update has failed. Massi Il 30/08/21 16:30, Hans Hagen via ntg-context ha scritto: Hi, new in this upload are some features in tabulate (not all enabled yet), like \starttabulate[|lG{.}|cG{,}|rG{=}|cG{x}|] \NC 1.1 \NC 2,2 \NC 3=3 \NC a 0xFF \NC \NR \NC 11.11 \NC 22,22 \NC 33=33 \NC b 0xFFF \NC \NR \NC 111.111 \NC 222,222 \NC 333=333 \NC c 0x \NC \NR \stoptabulate \starttabulate[|lG{}|lG{}|] \NC \showglyphs \setalignmentcharacter{.}1.1 \NC \setalignmentcharacter{.}1.1 \NC\NR \NC \showglyphs \setalignmentcharacter{,}11,11 \NC \setalignmentcharacter{,}11,11 \NC\NR \NC \showglyphs \setalignmentcharacter{=}111=111 \NC \setalignmentcharacter{=}111=111 \NC\NR \stoptabulate \starttabulate[|lG{.}|lG{}|] \NC 1.1 \NC \setalignmentcharacter{.}1.1 \NC\NR \NC 11.11 \NC \setalignmentcharacter{.}11.11 \NC\NR \NC 111.111 \NC \setalignmentcharacter{.}111.111 \NC\NR \stoptabulate \starttabulate[|lG{.}|rG{.}|] \NC foo.bar \NC foo.bar \NC \NR \NC oo.ba \NC oo.ba \NC \NR \NC o.b \NC o.b \NC \NR \stoptabulate \starttabulate[|cG{d}|] \NC \smallcaps abcdefgh \NC \NR \NC xdy \NC \NR \NC \sl xdy \NC \NR \NC \tttf xdy \NC \NR \NC \tfd d \NC \NR \stoptabulate The G option is like g but better so it sort of replaces it. updated: lowlevel-expansion (also discusses luametatex) new : lowlevel-alignments (also discusses luametatex) 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 ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context
[NTG-context] new upload
Hi, new in this upload are some features in tabulate (not all enabled yet), like \starttabulate[|lG{.}|cG{,}|rG{=}|cG{x}|] \NC 1.1 \NC 2,2 \NC 3=3 \NC a 0xFF \NC \NR \NC 11.11 \NC 22,22 \NC 33=33 \NC b 0xFFF \NC \NR \NC 111.111 \NC 222,222 \NC 333=333 \NC c 0x \NC \NR \stoptabulate \starttabulate[|lG{}|lG{}|] \NC \showglyphs \setalignmentcharacter{.}1.1 \NC \setalignmentcharacter{.}1.1 \NC\NR \NC \showglyphs \setalignmentcharacter{,}11,11 \NC \setalignmentcharacter{,}11,11 \NC\NR \NC \showglyphs \setalignmentcharacter{=}111=111 \NC \setalignmentcharacter{=}111=111 \NC\NR \stoptabulate \starttabulate[|lG{.}|lG{}|] \NC 1.1 \NC \setalignmentcharacter{.}1.1 \NC\NR \NC 11.11 \NC \setalignmentcharacter{.}11.11 \NC\NR \NC 111.111 \NC \setalignmentcharacter{.}111.111 \NC\NR \stoptabulate \starttabulate[|lG{.}|rG{.}|] \NC foo.bar \NC foo.bar \NC \NR \NC oo.ba \NC oo.ba \NC \NR \NC o.b \NC o.b \NC \NR \stoptabulate \starttabulate[|cG{d}|] \NC \smallcaps abcdefgh \NC \NR \NC xdy\NC \NR \NC \sl xdy\NC \NR \NC \tttfxdy\NC \NR \NC \tfd d \NC \NR \stoptabulate The G option is like g but better so it sort of replaces it. updated: lowlevel-expansion (also discusses luametatex) new: lowlevel-alignments (also discusses luametatex) 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] Best way to apply a fill-pattern to a closed shape?
Hans, Thank you! Yes, it would be great to learn more about MetaFun - if you can point me to the test suite, then I can document a few good tutorial level examples in the Wiki (beginner & intermediate). MetaFun's turbo charged capabilities are awesome! One idea I am thinking (maybe for a student level project) would be MetaFun library for Figma <https://www.figma.com/> (popular design tool). best regards, Ramkumar On Sun, Aug 29, 2021 at 5:17 PM Hans Hagen wrote: > On 8/29/2021 4:48 AM, Ramkumar KB wrote: > > Hans, > > > > Thank you for the snippets. These are super helpful (I am assuming > > commands like `withpatternscale` are MetaFun extensions and Wow!). > > yes, just metafun, already there for a while ... (often examples show up > first in the test suite) > > (if folks have wished for metafun they can let me know ... doing > metapost things is a nice distraction and with the mp extensions that we > have in luametatex we can do quite a lot) > > 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] Best way to apply a fill-pattern to a closed shape?
On 8/29/2021 4:48 AM, Ramkumar KB wrote: Hans, Thank you for the snippets. These are super helpful (I am assuming commands like `withpatternscale` are MetaFun extensions and Wow!). yes, just metafun, already there for a while ... (often examples show up first in the test suite) (if folks have wished for metafun they can let me know ... doing metapost things is a nice distraction and with the mp extensions that we have in luametatex we can do quite a lot) 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] lmtx update
On 8/23/2021 12:55 AM, Benjamin Buchmuller via ntg-context wrote: Hi, Here is another thing which worked previously for me: ConTeXt ver: 2021.07.30 00:57 LMTX fmt: 2021.8.8 int: english/english Now: ConTeXt ver: 2021.08.22 11:54 LMTX fmt: 2021.8.22 int: english/english Error: lua error: registered function call [396]: ...eXt/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1286: attempt to call a nil value (upvalue 'texgetparstate') stack traceback: ...eXt/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1286: in function <...eXt/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1262> (...tail calls...) 129 \NC \unit{0.88 angstrom} 130 \NC \unit{2.02 angstrom} 131 \NC \unit{2.03 angstrom} 132 \NC \unit{1.90 angstrom} 133 \NC \unit{4.99 angstrom} % rmsd #1/a:14-61 & backbone to #5/a:103-150 & backbone 134 \NC \unit{1.88 angstrom} 135 \NC \unit{5.20 angstrom} % rmsd #1/a:46-55 & backbone to #5/a:135-144 & backbone 136 \NC \NR 137 \HL 138 \stoptabulate The difficulty here is that when I copy the "faulty" part (my table) to another document (including all relevant defs etc.) it just works fine. So, I think it must have to do something with the placement of the float on the page. Any hints what has changed? your luametatex binary seems older than in the lmtx distribution .. what platform? - 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] lmtx update/t-vim (again)
Hi, Thanks for having had a look into the t-vim. At least the document compiles fine (I get a PDF), although multiple complaints from the lua end when I use "$" or "#" in my source, for example #!/usr/bin/bash etc. culminating in Sorry, but I'm not programmed to handle this case; I'll just pretend that you didn''t ask for it. If you're in the wrong mode, you might be able to return to the right one by typing 'I}' or 'I$' or 'I\par'. Seems as if LMTX tried to interpret something literally here … Further, I get a lot of fonts > beware: no fonts are loaded yet, using 'lm mono' in box fonts > checking > char i (U+00069) in font '' with id 0: missing fonts > checking > char n (U+0006E) in font '' with id 0: missing warnings. Maybe some things need to be adjusted? (Second mail with another error in LMTX follows.) Cheers Benjamin > On Aug 20, 2021, at 12:00, ntg-context-requ...@ntg.nl wrote: > > Hi, > > Here are the highlights of todays update: > > - somewhat more compact tuc files, not for all documents, but it can > accumulate; also less memory used then; i could bring down an extreme 2000 > page 5 column doc tuc file down to 5% -- it was 70 MB; for the luametatex > manual it reducec the tuc more than 30%; hard to tell if there will be an > associated performance hit, but i'm sure thomas will complain if that's the > case > > - more mp-tex-lua interfacing upgraded plus extra preliminary chapter for > luametafun about extensions - for taco > > - a slightly more compact cache files for fonts with many (pseudo) ligatures; > hopefully no side effects (nothing that can't be fixed fast if noted); quite > probably no performance hit and maybe even some room for optimization (not > done yet) > > - a split in the cache directory for luametatex so that we can more easilly > experiment without interference (so, although the above works in mkiv it's > not enabled there currently) > > - some minor things (also in the process of splitting the codebase) > > - no real changes in / additions to the luametatex binary (we're in cosmetics > mode 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] lmtx update
On 8/19/2021 10:07 PM, Aditya Mahajan via ntg-context wrote: On Thu, 19 Aug 2021, Hans Hagen via ntg-context wrote: Hi, Here are the highlights of todays update: - somewhat more compact tuc files, not for all documents, but it can accumulate; also less memory used then; i could bring down an extreme 2000 page 5 column doc tuc file down to 5% -- it was 70 MB; for the luametatex manual it reducec the tuc more than 30%; hard to tell if there will be an associated performance hit, but i'm sure thomas will complain if that's the case I never realized that tuc files can grow so big. For big documents, would it make sense to simply read and write zipped tuc files? normally they are not that large but when you enable for instance mechanisms that need positioning they can grow large .. zipping makes for less bytes but still large files and the overhead for serialization stays (to some extend trying to make these things small is like compression but in a different way .. could be a nice topic for a ctx meeting) 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] lmtx update
On Thu, 19 Aug 2021, Hans Hagen via ntg-context wrote: > Hi, > > Here are the highlights of todays update: > > - somewhat more compact tuc files, not for all documents, but it can > accumulate; also less memory used then; i could bring down an extreme > 2000 page 5 column doc tuc file down to 5% -- it was 70 MB; for the > luametatex manual it reducec the tuc more than 30%; hard to tell if > there will be an associated performance hit, but i'm sure thomas will > complain if that's the case I never realized that tuc files can grow so big. For big documents, would it make sense to simply read and write zipped tuc files? Aditya ___ 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] lmtx update
Hi, Here are the highlights of todays update: - somewhat more compact tuc files, not for all documents, but it can accumulate; also less memory used then; i could bring down an extreme 2000 page 5 column doc tuc file down to 5% -- it was 70 MB; for the luametatex manual it reducec the tuc more than 30%; hard to tell if there will be an associated performance hit, but i'm sure thomas will complain if that's the case - more mp-tex-lua interfacing upgraded plus extra preliminary chapter for luametafun about extensions - for taco - a slightly more compact cache files for fonts with many (pseudo) ligatures; hopefully no side effects (nothing that can't be fixed fast if noted); quite probably no performance hit and maybe even some room for optimization (not done yet) - a split in the cache directory for luametatex so that we can more easilly experiment without interference (so, although the above works in mkiv it's not enabled there currently) - some minor things (also in the process of splitting the codebase) - no real changes in / additions to the luametatex binary (we're in cosmetics mode 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] Failure when loading variable font
On 8/14/2021 5:56 PM, Marcel Krüger via ntg-context wrote: Hi, the latest ConTeXt version fails for the following document: \definefontfeature [default:test] [default] [axis={Weight=100}] \definefont [SomeFont] [file:Fraunces.ttf*default:test] \starttext \SomeFont Abcdef \stoptext and the font from https://github.com/undercasetype/Fraunces/raw/master/fonts/Fraunces%5BSOFT%2CWONK%2Copsz%2Cwght%5D.ttf renamed to Fraunces.ttf with the error message otf reader > user instance: weight=100, factors: 0 -1.0 0 0 otf reader > fatal error in file 'Fraunces.ttf': ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:274: attempt to index a nil value (local 'p1') stack traceback: ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2339: in metamethod 'index' ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:274: in upvalue 'applyaxis' ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:1428: in field 'gvar' ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:1155: in local 'reader' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2084: in upvalue 'readtable' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2197: in upvalue 'readdata' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2252: in function <...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2235> [C]: in function 'xpcall' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2341: in upvalue 'loadfont' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2396: in field 'loadfont' ...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:160: in field 'load' ...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:599: in upvalue 'otftotfm' ...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:627: in function <...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:626> (...tail calls...) ...mtx/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:377: in function <...mtx/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:365> (...tail calls...) ...mtx/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:483: in field 'read' ...mtx/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in function <...mtx/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193> (...tail calls...) fonts > otf loading > loading failed due to read error (This run used luametatex, but the same issue occurs when using luatex) The same font worked correctly with the ConTeXt version from 2021-05-20. that's because since then we check for the cycle (otherwise artifacts) it probably relates to these extra points (the 'standard' is somewhat fuzzy in that respect also because some fonts have them and some don't so it's the usual wait till we run into something issue) we can check for bounds for i=1,nofpoints do local d1, d2, d3 = find(i) local p2 = points[i] if d2 then xv[i] = xvalues[d2] yv[i] = yvalues[d2] else local n1 = dpoints[d1] local n3 = dpoints[d3] if n1 > nofpoints then n1 = nofpoints end if n3 > nofpoints then n3 = nofpoints end no crash then (the resulting shapes look good enough to me, assumign that the weird f is intended) 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 ___
[NTG-context] Failure when loading variable font
Hi, the latest ConTeXt version fails for the following document: \definefontfeature [default:test] [default] [axis={Weight=100}] \definefont [SomeFont] [file:Fraunces.ttf*default:test] \starttext \SomeFont Abcdef \stoptext and the font from https://github.com/undercasetype/Fraunces/raw/master/fonts/Fraunces%5BSOFT%2CWONK%2Copsz%2Cwght%5D.ttf renamed to Fraunces.ttf with the error message otf reader > user instance: weight=100, factors: 0 -1.0 0 0 otf reader > fatal error in file 'Fraunces.ttf': ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:274: attempt to index a nil value (local 'p1') stack traceback: ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2339: in metamethod 'index' ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:274: in upvalue 'applyaxis' ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:1428: in field 'gvar' ...e0dde776fb1556f32e/formats/luametatex/font-ttf-macro.lua:1155: in local 'reader' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2084: in upvalue 'readtable' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2197: in upvalue 'readdata' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2252: in function <...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2235> [C]: in function 'xpcall' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2341: in upvalue 'loadfont' ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:2396: in field 'loadfont' ...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:160: in field 'load' ...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:599: in upvalue 'otftotfm' ...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:627: in function <...mtx/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:626> (...tail calls...) ...mtx/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:377: in function <...mtx/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:365> (...tail calls...) ...mtx/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:483: in field 'read' ...mtx/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in function <...mtx/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193> (...tail calls...) fonts > otf loading > loading failed due to read error (This run used luametatex, but the same issue occurs when using luatex) The same font worked correctly with the ConTeXt version from 2021-05-20. Best regards, Marcel ___ 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] Both pdfinfo & exiftool have trouble with 1.0.4 but works with 1.0.3
Hi, We use PDF tools like mutool, pdfinfo (from poppler) and exiftool in our workflow (once the PDFs are created by ConTeXt). But looks like we have hit upon some regression issue between 1.0.3 and 1.0.4 versions. Both pdfinfo (from poppler) and exiftool are able to read PDFs created from 1.0.3 but have trouble reading PDFs created with 1.0.4. Please see below logs for details. Our 1.0.4 is from April-2021. We will try to upgrade to the latest 1.0.4 and try again. mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /ConTeXt/apr2021/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.04.21 11:39 mtx-context | main context file: /ConTeXt/apr2021/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.04.21 11:39 mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: /ConTeXt/sep2020/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2020.09.20 23:02 mtx-context | main context file: /ConTeXt/sep2020/tex/texmf-context/tex/context/base/mkiv/context.mkxl mtx-context | current version: 2020.09.20 23:02 *pdfinfo (from Poppler)* ~/TeX$ pdfinfo Hello-world_1.0.4.pdf Syntax Error: Missing 'endstream' or incorrect stream length Syntax Error: Missing 'endstream' or incorrect stream length Title: Hello world! Subject:A ConTeXt template Keywords: template Author: Mickey Mouse Creator:LuaMetaTeX 2.09 20210418 + ConTeXt LMTX 2021.04.21 11:39 Producer: LuaMetaTeX-2.09 CreationDate: Tue Aug 10 10:18:36 2021 +08 ModDate:Tue Aug 10 10:18:36 2021 +08 Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 2 Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 39062 bytes Optimized: no PDF version:1.7 ~/TeX$ pdfinfo Hello-world_1.0.3.pdf Title: Hello world! Subject:A ConTeXt template Keywords: template Author: Mickey Mouse Creator:LuaTeX 2.07 20200920 + ConTeXt MkIV 2020.09.20 23:02 Producer: LuaTeX-2.07 CreationDate: Tue Aug 10 09:16:30 2021 +08 ModDate:Tue Aug 10 09:16:30 2021 +08 Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 2 Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 39861 bytes Optimized: no PDF version:1.7 *exiftool* ~/exiftool/Image-ExifTool-12.29/exiftool Hello-world_1.0.4.pdf ExifTool Version Number : 12.29 File Name : Hello-world_1.0.4.pdf Directory : . File Size : 38 KiB File Modification Date/Time : 2021:08:10 10:19:52+08:00 File Access Date/Time : 2021:08:10 10:20:17+08:00 File Inode Change Date/Time : 2021:08:10 10:19:52+08:00 File Permissions: -rwxr-x--- File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.7 Linearized : No Warning : Error reading stream data ~/exiftool/Image-ExifTool-12.29/exiftool Hello-world_1.0.3.pdf ExifTool Version Number : 12.29 File Name : Hello-world_1.0.3.pdf Directory : . File Size : 39 KiB File Modification Date/Time : 2021:08:10 09:17:51+08:00 File Access Date/Time : 2021:08:10 09:18:00+08:00 File Inode Change Date/Time : 2021:08:10 09:17:51+08:00 File Permissions: -rwxr-x--- File Type : PDF File Type Extension : pdf MIME Type : application/pdf Linearized : No Author : Mickey Mouse Con Te Xt Jobname : Hello-world Con Te Xt LMTX : 0.10 Con Te Xt Support : contextgarden.net Con Te Xt Time : 2021-08-10 09:16 Con Te Xt Url : www.pragma-ade.com Con Te Xt Version : 2020.09.20 23:02 Create Date : 2021:08:10 09:16:30+08:00 ID : Hello-world | 2021-08-10T09:16:30+08:00 Keywords: template Modify Date : 2021:08:10 09:16:30+08:00 Subject : A ConTeXt template Te X Support: tug.org Language: en Format : application/pdf Creator : Mickey Mouse Description : A ConTeXt template Title : Hello world! Id : Hello-world | 2021-08-10T09:16:30+08:00 Con Te Xt Jobname : Hello-world Con Te Xt Time : 2021:08:10 09:16 Con Te Xt Url : www.pragma-ade.com Con Te Xt Support : contextgarden.net
Re: [NTG-context] ECMAscript
On Sat Aug 7, 2021 at 9:57 AM CEST, Henning Hraban Ramm via ntg-context wrote: > for running the ECMAscript part of the CG journal, I cloned the repo > from https://github.com/ccxvii/mujs/ and executed "make release". > I copied the resulting files to my TeX tree: > > ll ~/lmtx/tex/texmf-osx-64/bin/lib/luametatex/mujs/ > total 2832 > -rw-r--r-- 1 hraban staff 517K 7 Aug 09:49 libmujs.o > -rw-r--r-- 1 hraban staff 9,2K 7 Aug 09:49 main.o > -rwxr-xr-x 1 hraban staff 413K 7 Aug 09:49 mujs* > -rwxr-xr-x 1 hraban staff 408K 7 Aug 09:49 mujs-pp* > -rw-r--r-- 1 hraban staff 2,9K 7 Aug 09:49 pp.o > > But apparently I need a libmujs.so – how do I make this? Try `make shared` to make a shared library (.so file). `make release` compiles the "shell" executable. Michal Vlasák ___ 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] ECMAscript
On 8/7/2021 9:57 AM, Henning Hraban Ramm via ntg-context wrote: Hi Taco (et al.), for running the ECMAscript part of the CG journal, I cloned the repo from https://github.com/ccxvii/mujs/ and executed "make release". I copied the resulting files to my TeX tree: ll ~/lmtx/tex/texmf-osx-64/bin/lib/luametatex/mujs/ total 2832 -rw-r--r-- 1 hraban staff 517K 7 Aug 09:49 libmujs.o -rw-r--r-- 1 hraban staff 9,2K 7 Aug 09:49 main.o -rwxr-xr-x 1 hraban staff 413K 7 Aug 09:49 mujs* -rwxr-xr-x 1 hraban staff 408K 7 Aug 09:49 mujs-pp* -rw-r--r-- 1 hraban staff 2,9K 7 Aug 09:49 pp.o But apparently I need a libmujs.so – how do I make this? looks like there are packages for linux but I don't know about osx (maybe mojca has is or can make it with one of these these port-to-osx kits) 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 ___
[NTG-context] ECMAscript
Hi Taco (et al.), for running the ECMAscript part of the CG journal, I cloned the repo from https://github.com/ccxvii/mujs/ and executed "make release". I copied the resulting files to my TeX tree: ll ~/lmtx/tex/texmf-osx-64/bin/lib/luametatex/mujs/ total 2832 -rw-r--r-- 1 hraban staff 517K 7 Aug 09:49 libmujs.o -rw-r--r-- 1 hraban staff 9,2K 7 Aug 09:49 main.o -rwxr-xr-x 1 hraban staff 413K 7 Aug 09:49 mujs* -rwxr-xr-x 1 hraban staff 408K 7 Aug 09:49 mujs-pp* -rw-r--r-- 1 hraban staff 2,9K 7 Aug 09:49 pp.o But apparently I need a libmujs.so – how do I make this? 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] footnote not appearing
You are correct Hans, I was using Mk IV luatex as the engine, though I could use lmtx. It's just that in a production environment I need to be absolutely sure things work (printers deadlines and that sort of thing!) and I know that the MkIV luatex scene always works. But I'll give the lmtx a run on this particular text without postponing and see how it goes, since I already have a working result from the other. Julian On 28/7/21 5:32 pm, Hans Hagen wrote: On 7/27/2021 11:46 PM, jbf via ntg-context wrote: No, in fact I discovered that \startpostponingnotes is what is needed. localfootnotes does work but places the footnote immediately below the framed text, and I wanted it to appear in the usual footnote location, which is achieved with startpostponingnotes I assume that you use(d) mkiv/luatex and not lmtx/luametatex. Footnotes are in tex speak 'inserts' and at some point they are filtered and added to the datastructure (list) that is taken into account when breaking a page. When tex was written, the main application was books like those of Don Knuth where inserts like notes occur at the outer level. However, a macro package like context has all kind of complex deeply nested elements and there these notes just disappear. The main (and valid) reason is that it becomes kind of unpredictable what inserts are and where they have to go. (This is one reason why as soon as a macro package provides more functionality and control it also becomes much larger deep down.) For this footnote-text-getting-lost problem, in mkii a solution became local notes and postponing. In mmkiv it became a bit more clever and there is also an automigration features although in some cases that gives other side effects so it's not turned on by default. In lmtx we use some new insert related features in luametatex so that's what I'll discuss next. (One can quit reading if not interested.) Although it is still not trivial to deal with these things (keep in mind that users combine all mechanism which means that all mechanisms should be able to cooperate) in luametatex the inserts can bubble up which means that footnotes eventually will end up at the outer level. So, if you use lmtx, ideally there is no need to use postponing (you can try your exapmle in lmtx without postponing). For the curious ... the low level mechanisms involved in this can also be used for other purposes although currently this is not done. There is plenty of relative new functionality that can/will be applied some day. Here is an example: \setbox0\hbox{\strut this is just a test} \setprelistbox 0\hbox{\strut \quad before} \setpostlistbox0\hbox{\strut \quad after} test \par \box0 \par test Here \setprelistbox and \setpostlistbox are macros that (ab)use these hooks into lists. They will stay but keep in mind that when you use them they can interfere with for instance already present inserts. Take this: \starttext \setbox0\hbox{\strut this is just a\footnote{oeps} test} \setbox2\hbox{\strut this is just a\footnote{oeps} test} \setprelistbox 0\hbox{\strut \quad before: \prelistbox0} \setpostlistbox0\hbox{\strut \quad after: \postlistbox0} \setprelistbox 2\hbox{\strut \quad before} \setpostlistbox2\hbox{\strut \quad after} test \par \box0 \par \box2 \par test \stoptext If you look carefully you'll see / can deduce what happens with inserts in luamatetatex. Boxes are a major thing in tex, paragraphs are too, so here's another (already described elsewhere) trick with hooks, (\wrapuppar{)}some text and some more text and ... (\wrapuppar{\removeunwantedspaces)}some text and some more text and ... test\wrapuppar{\crlf\ignorepars} test test\wrapuppar{\ignorepars} test test\wrapuppar{\removeunwantedspaces\ignorepars} test These are actually features that are already around and (so far) have proven to work ok. Especially the last examples are real tricky because you don't know if other mechanisms also use these (some already do) but all this box and pas stuff might eventually come with more high level interfaces (there is already one for the par stuff, not yet for the box stuff). But as with other such mechanism, one cannot rely on a naive approach and just assume the single case usage, only the user knows where it might interfere. On the other hand, low level box magick like the above will work ok because it's just that box. Welcome to the world of (new) low level context trickery, which is and eventually will be described in the lowlevel-* manuals (after all I need topics for occasional presentations and those need to be new and if possible challenging.) Hans Julian On 27/7/21 7:42 pm, Henning Hraban Ramm via ntg-context wrote: Am 27.07.2021 um 06:07 schrieb jbf via ntg-context : Is there any reason why the following MWE does not produce the footnote at the bottom of the page? It seems like the use of framedtext is preventing it, but am not sure why. Can I get around
Re: [NTG-context] ligature exceptions
On 7/28/2021 7:24 PM, Thomas A. Schmitz via ntg-context wrote: Hi all, just two quick questions: a couple of weeks ago, there was a long discussion on ligature exceptions in, e.g., German. Hans provided an elegant new mechanism (\startlanguageoptions). So my two questions: 1. Is the old mechanism (\replaceword[eg][Auflage][Au{fl}age]) now obsolete? I tried using it, but unwanted ligatures still occurred. If it is indeed deprecated, I'll add a note to the wiki (this would mean that the current texlive version does not have the new mechanism and the latest lmtx doesn't use the old one, so that's somewhat problematic). it's not too hard to make it work, see attached, but the new one is nicer because it permits more detailed control in luametatex you can do things like Au{\norightligaturing f}lage that is: each character can have a set of options; ok, one can do that with attributes but that is less efficients options have been introduced for ligatures, kerns, expansion etc (you can diff the attached lmt file with the lua file of the same name to see the difference in approach 2. Both mechanisms only work for complete words, is that right? So I can't just provide a pattern such as "uf|forder," I have to provide a full list with all inflected forms: auf|fordern auf|fordert auf|fordernd Auf|forderung Auf|forderungen and for 1-3 also the forms with a capital letter. just lowercase will do if you look at the example files you can see that there are pre/post snippets possibel so basically you can create something pre [a|b|c] post which saves some definitions (make we can have pre/post lists which will nicely explode into huge lists but memory is not the issue here) while the replacement works by running over the node list, the second mechanism is using a callback at the hyphenation level (so per language) where each word is anyway checked against an exception list, so in addition that word can now be fed into a function and depending on outcome be fed back into the machinery (there are trackers that give insight in the process) 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 not modules then modules = { } end modules ['lang-rep'] = { version = 1.001, comment = "companion to lang-rep.mkiv", author= "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } -- A BachoTeX 2013 experiment, probably not that useful. Eventually I used a simpler -- more generic example. I'm sure no one ever notices of even needs this code. -- -- As a follow up on a question by Alan about special treatment of dropped caps I wonder -- if I can make this one more clever (probably in a few more dev steps). For instance -- injecting nodes or replacing nodes. It's a prelude to a kind of lpeg for nodes, -- although (given experiences so far) we don't really need that. After all, each problem -- is somewhat unique. local type, tonumber, next = type, tonumber, next local gmatch, gsub = string.gmatch, string.gsub local utfbyte, utfsplit = utf.byte, utf.split local P, C, U, Cc, Ct, Cs, lpegmatch = lpeg.P, lpeg.C, lpeg.patterns.utf8character, lpeg.Cc, lpeg.Ct, lpeg.Cs, lpeg.match local find = string.find local zwnj = 0x200C local grouped = P("{") * ( Ct((U/utfbyte-P("}"))^1) + Cc(false) ) * P("}")-- grouped local splitter = Ct(( #P("{") * ( P("{}") / function() return zwnj end + Ct(Cc("discretionary") * grouped * grouped * grouped) + Ct(Cc("noligature")* grouped) ) + U/utfbyte )^1) local stripper = P("{") * Cs((1-P(-2))^0) * P("}") * P(-1) local trace_replacements = false trackers.register("languages.replacements", function(v) trace_replacements = v end) local trace_details = false trackers.register("languages.replacements.details", function(v) trace_details = v end) local report_replacement = logs.reporter("languages","replacements") local glyph_code = nodes.nodecodes.glyph local glue_code = nodes.nodecodes.glue local spaceskip_code = nodes.gluecodes.spaceskip local xspaceskip_code= nodes.gluecodes.xspaceskip local nuts = nodes.nuts local getnext= nuts.getnext local getprev= nuts.getprev local getattr= nuts.getattr local getid = nuts.get
Re: [NTG-context] footnote not appearing
On 7/27/2021 11:46 PM, jbf via ntg-context wrote: No, in fact I discovered that \startpostponingnotes is what is needed. localfootnotes does work but places the footnote immediately below the framed text, and I wanted it to appear in the usual footnote location, which is achieved with startpostponingnotes I assume that you use(d) mkiv/luatex and not lmtx/luametatex. Footnotes are in tex speak 'inserts' and at some point they are filtered and added to the datastructure (list) that is taken into account when breaking a page. When tex was written, the main application was books like those of Don Knuth where inserts like notes occur at the outer level. However, a macro package like context has all kind of complex deeply nested elements and there these notes just disappear. The main (and valid) reason is that it becomes kind of unpredictable what inserts are and where they have to go. (This is one reason why as soon as a macro package provides more functionality and control it also becomes much larger deep down.) For this footnote-text-getting-lost problem, in mkii a solution became local notes and postponing. In mmkiv it became a bit more clever and there is also an automigration features although in some cases that gives other side effects so it's not turned on by default. In lmtx we use some new insert related features in luametatex so that's what I'll discuss next. (One can quit reading if not interested.) Although it is still not trivial to deal with these things (keep in mind that users combine all mechanism which means that all mechanisms should be able to cooperate) in luametatex the inserts can bubble up which means that footnotes eventually will end up at the outer level. So, if you use lmtx, ideally there is no need to use postponing (you can try your exapmle in lmtx without postponing). For the curious ... the low level mechanisms involved in this can also be used for other purposes although currently this is not done. There is plenty of relative new functionality that can/will be applied some day. Here is an example: \setbox0\hbox{\strut this is just a test} \setprelistbox 0\hbox{\strut \quad before} \setpostlistbox0\hbox{\strut \quad after} test \par \box0 \par test Here \setprelistbox and \setpostlistbox are macros that (ab)use these hooks into lists. They will stay but keep in mind that when you use them they can interfere with for instance already present inserts. Take this: \starttext \setbox0\hbox{\strut this is just a\footnote{oeps} test} \setbox2\hbox{\strut this is just a\footnote{oeps} test} \setprelistbox 0\hbox{\strut \quad before: \prelistbox0} \setpostlistbox0\hbox{\strut \quad after: \postlistbox0} \setprelistbox 2\hbox{\strut \quad before} \setpostlistbox2\hbox{\strut \quad after} test \par \box0 \par \box2 \par test \stoptext If you look carefully you'll see / can deduce what happens with inserts in luamatetatex. Boxes are a major thing in tex, paragraphs are too, so here's another (already described elsewhere) trick with hooks, (\wrapuppar{)}some text and some more text and ... (\wrapuppar{\removeunwantedspaces)}some text and some more text and ... test\wrapuppar{\crlf\ignorepars} test test\wrapuppar{\ignorepars} test test\wrapuppar{\removeunwantedspaces\ignorepars} test These are actually features that are already around and (so far) have proven to work ok. Especially the last examples are real tricky because you don't know if other mechanisms also use these (some already do) but all this box and pas stuff might eventually come with more high level interfaces (there is already one for the par stuff, not yet for the box stuff). But as with other such mechanism, one cannot rely on a naive approach and just assume the single case usage, only the user knows where it might interfere. On the other hand, low level box magick like the above will work ok because it's just that box. Welcome to the world of (new) low level context trickery, which is and eventually will be described in the lowlevel-* manuals (after all I need topics for occasional presentations and those need to be new and if possible challenging.) Hans Julian On 27/7/21 7:42 pm, Henning Hraban Ramm via ntg-context wrote: Am 27.07.2021 um 06:07 schrieb jbf via ntg-context : Is there any reason why the following MWE does not produce the footnote at the bottom of the page? It seems like the use of framedtext is preventing it, but am not sure why. Can I get around this problem and still have framed text? Julian \setupframed[location=middle] \startframedtext[width=.77\makeupwidth,corner=round] The poems of St John of the Cross have been important for me in recent years. This is John’s prayer from a verse in his Spiritual Canticle:\footnote{John of the Cross, {\em Spiritual Canticle}, stanza 32. } \startblockquote You looked with love upon me, and deep within, your eyes imprinted grace. This mercy set me free, held in your
[NTG-context] new lmtx upload
Hi, I uploaded a new version that mostly concerns documentation files (checking them for lmtx and so). I (partly) updated the primitives manual (for hans vd meer) and added followingup-expressions (for pablo). The expressions stuff (was already in previous uploads) is a side effect of finalizing some luametatex code. Part of it had been there in commented form as I had not yet made up my mind about how much is needed. In the end I decided to *not* integrate it in the \numexpr an d\dimexpr primitives because of potential compatibility issues (although that is unlikely given the way we use them in the core, I don't know to what extend users use these primitives). The long ago - one of the first things in luametatex - introtroduced integer division : probably went unnoticed (of course not by ws) which is an indication that this extension has been is rather safe. Anyway, more about expressions can be found in the mentioned documents. Think of (one can of course also use the usual tex variables): \starttext \the\dimexpression 2 * 10pt + 2pt \relax \the\dimexpression 2 * 10pt > 2pt \relax \number\dimexpression 2 * 10pt + 2pt \relax \number\dimexpression 2 * 10pt > 2pt \relax \ifboolean\dimexpression 2 * 10pt > 2pt \relax yes \else nop \fi \ifboolean\dimexpression 2 * 10sp > 2pt \relax yes \else nop \fi \ifdimexpression 2 * 10pt > 2pt \relax yes \else nop \fi \ifdimexpression 2 * 10sp > 2pt \relax yes \else nop \fi % alias \ifexpression : \ifnumexpression (2 * 10) + (3 << 4) > (4 & 5) \relax yes \else no \fi \stoptext Performance wise it is comparable to \dimexpr and \numexpr (these are a bit faster in luametatex than in luatex), the final \relax is mandate (so no lookahead side effects), and these don't suffer from some of the somewhat weird properties of their ancestors. The main difference is that they support comparison and bitwise operators. I can add more but it probably doesn't make sense. With \tracingexpressions1 \tracingonline1 you get info like this: 1:4: {dimenexpression rpn: 2 655360 * 131072 +} 1:4: {dimenexpression rpn: 2 655360 * 131072 >} 1:4: {dimenexpression rpn: 2 655360 * 131072 +} 1:4: {dimenexpression rpn: 2 655360 * 131072 >} 1:4: {dimenexpression rpn: 2 655360 * 131072 >} 1:4: {dimenexpression rpn: 2 2 * 131072 >} 1:4: {dimenexpression rpn: 2 655360 * 131072 >} 1:4: {dimenexpression rpn: 2 2 * 131072 >} 1:4: {numexpression rpn: 2 10 * 3 4 << + 4 5 band >} Of course (maybe for sure) there can be bugs but then, only a few will ever use this (I bet hvdm is one of them, as he also uses the other new \if* features). Other hidden 'pearls' (bachotex speak) will be revealed in due time, 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 ___
[NTG-context] MP keyword function: string parameters no longer accept string variables directly
Hi--- Here's another apparent change on the MP side---for keyword functions, string parameters no longer accept string variables directly. They do seem to register them (hasparameter => true) but don't capture the value (getparameter => 0). Thus: system > ConTeXt ver: 2021.07.16 22:03 LMTX fmt: 2021.7.21 int: english/english metapost> trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode. metapost> trace > metapost> trace > loading metafun for lmtx, including the plain 1.004 base definitions metapost> trace > metapost> trace > >> "string constant fuschia ..." metapost> trace > >> true metapost> trace > >> "fuschia" metapost> trace > >> "string variable fuschia = fuschia ..." metapost> trace > >> true metapost> trace > >> 0 metapost> trace > >> "expression containing string variable fuschia = fuschia ..." metapost> trace > >> true metapost> trace > >> "fuschia" String constant: succeeds String variable: fails String expression with string variable: succeeds Here's the MWE: % system > ConTeXt ver: 2021.07.16 22:03 LMTX fmt: 2021.7.21 int: english/english \startMPdefinitions presetparameters "parameters_Test" [ ] def Test = applyparameters "parameters_Test" "do_Test" enddef; def do_Test = pushparameters "parameters_Test"; show hasparameter "color"; show getparameter "color"; enddef; \stopMPdefinitions \starttext hello \startalignment[center] \startplacefigure \startMPcode string fuschia; fuschia = "fuschia"; show "string constant fuschia ..."; Test [ color = "fuschia" ]; show "string variable fuschia = " & fuschia & " ..."; Test [ color = fuschia ]; show "expression containing string variable fuschia = " & fuschia & " ..."; Test [ color = "" & fuschia ]; \stopMPcode \stopplacefigure \stopalignment goodbye \stoptext Kevin W. Rudd, Ph.D. CAPT, USN (Ret) Computer Architecture & Computer Engineering Advanced Computing Systems (ACS) Research Program Laboratory for Physical Sciences (LPS) 443-654-7878 ke...@lps.umd.edu<mailto:ke...@lps.umd.edu> Visiting Research Professor United States Naval Academy r...@usna.edu<mailto:r...@usna.edu> ___ 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] MP boxes: boxjoin not recognized?
Hi--- All of my figures that use MP boxes are now failing. It looks like "boxjoin" (from the MP "boxes" macros) is not being recognized. Also, apparently unrelated, I wonder if the comparison in "boxes.mp" is correct as it appears that lmtx loads "mp-xbox.mpiv" instead of "mp-xbox.mpxl". Here is some log output and a (mostly) MWE. Thanks for any suggestions, ---K % system > ConTeXt ver: 2021.07.16 22:03 LMTX fmt: 2021.7.21 int: english/english % metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' % metapost> loading 'metafun' as 'metafun.mpxl' using method 'default' % metapost> initializing number mode 'scaled' % metapost> trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode. % metapost> trace > % metapost> trace > loading metafun for lmtx, including the plain 1.004 base definitions % metapost> trace > % metapost> trace > >> 2 % metafun > log > % metafun > log > error: Isolated expression % metafun > log > % metapost> trace > >> boxjoin % metapost> trace > % metapost> trace > <*> show metapostversion; boxjoin( % metafun > log > % metafun > log > I couldn't find an '=' or ':=' after the expression that is shown above this % error message, so I guess I'll just ignore it and carry on. % metafun > log > % metapost> trace >); boxit.a("a"); boxit.bb("bb"); boxit.ccc("ccc"); drawboxed(a,bb,ccc); ; % metapost> trace > \startMPdefinitions input boxes \stopMPdefinitions \starttext hello \startalignment[center] \startplacefigure \startMPcode%{aaa} show metapostversion; % boxes.mp: scantokens("input mp-xbox.mp" & (if metapostversion > 2 : "xl" else : "iv" fi)) ; % => loads mp-xbox.mpiv in lmtx rather than mp-xbox.mpxl as i would have expected boxjoin(); % boxjoin(a.se<http://a.se/>=b.sw; a.ne=b.nw); boxit.a("a"); boxit.bb("bb"); boxit.ccc("ccc"); drawboxed(a,bb,ccc); \stopMPcode \stopplacefigure \stopalignment goodbye \stoptext Kevin W. Rudd, Ph.D. CAPT, USN (Ret) Computer Architecture & Computer Engineering Advanced Computing Systems (ACS) Research Program Laboratory for Physical Sciences (LPS) 443-654-7878 ke...@lps.umd.edu<mailto:ke...@lps.umd.edu> Visiting Research Professor United States Naval Academy r...@usna.edu<mailto:r...@usna.edu> ___ 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] Problem getting lmtx version up
Jdh, Can you please try again with this binary? https://dl.contextgarden.net/build/luametatex/aarch64-linux/ On Fri, 16 Jul 2021 at 22:16, Alan Braslau wrote: > > Freebsd on arm64 is now a Tier 1 architecture. ;-) I figured out that there are should-be-working-out-of-the-box images for FreeBSD for RPi. Maybe we just need to fetch another one for the farm ;) I installed https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RELEASE/aarch64/Latest/ inside https://github.com/utmapp/UTM but I had some issues figuring out how to install packages. Maybe something for another weekend. I also got Debian 10 working inside UTM and it resulted in pretty fast compilation. (I still need to set up automatic start-up after the power outage.) Tests with Windows ARM64 come next. The installation procedure seems to have started at least, I guess that the support is much better now than what it used to be when M1 got released. Mojca ___ 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] Problem getting lmtx version up
On Sat Jul 17, 2021 at 7:30 AM CEST, Lutz Haseloff wrote: > both binaries work in my system. > (Galaxy A50, Userland, Kali Linux) On Sat Jul 17, 2021 at 10:47 AM CEST, jdh wrote: > Both binaries you provided ran successufully. I ran them both and they > both exited with a 0 return code, when invoked with only the --help > options. > > System ran on: > HW: Raspberry Pi 4 Model B Rev 1.4 > CPU: ARM aarch64 > RAM: 8GB > SSD: 1TB > > OS: aarch64 - Raspberry Pi 64 bit OS. Based on Debian/Linux 10 Lutz, jdh, thanks for testing, great to hear that it works! Although now it remains to apply this technique to LuaMetaTeX. Without access to source code I can't try anything, but the general ideas should apply: I used Zig for cross compiling. While Zig is a full fledged programming language in its own right, it also has the ability to compile C/C++ (with built-in Clang). The more interesting part is that it also bundles different C libraries for the different targets it supports for cross compilation. This is a great match for Lua(Meta)TeX, because standard C library is the only "external" dependency. Depending on the chosen target (CPU+OS+ABI triple), the binary can then be fully statically linked or dynamically linked against the target's system C library. Zig exposes the "C compiler" functionality with two interfaces: the Zig build system and the "zig cc" command. In theory "zig cc" should be a drop-in replacement for "clang" or "gcc" [1] and therefore should be usable with existing build systems used by LuaTeX/LuaMetaTeX. In practice it is not that easy, because some "compiler feature detections" of these build systems often try to run compiled results (and fail). But in the best case (like with Lua) cross compilation may be as easy as: # "bsd" is almost like "linux", but doesn't link "readline" make CC="zig cc -target aarch64-linux-musl" bsd The result is a fully statically linked executable, that can be used on all Linux distributions. But because it is statically linked, dynamic loading of external Lua libraries written in C is not possible. The following will result in a binary that is dynamically linked against (the target system) glibc and should be able to load even Lua libraries written in C: make CC="zig cc -target aarch64-linux-gnu.2.28" bsd (Note that Zig support all relevant glibc versions, that means that compiling for older Linux distributions can be done from any OS, not just ancient Debian or CentOS. Here "2.28" is old enough to support jdh's Raspberry Pi OS -- and anything newer.) Applying this to LuaMetaTeX may or may not be hard. Frankly I don't know much about CMake. But I have experience converting LuaTeX (or rather its subset) to another build systems: 1) https://github.com/vlasakm/mmtex/blob/ltex/build.zig This was used to produce the two binaries I sent previously. Usage (no setup required): wget 'https://github.com/vlasakm/mmtex/archive/refs/tags/cross-test2.zip' unzip cross-test2.zip cd mmtex-cross-test2/ wget 'https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz' tar xf zig-linux-x86_64-0.8.0.tar.xz zig-linux-x86_64-0.8.0/zig build -Dtarget=aarch64-linux-musl qemu-aarch64 zig-out/bin/mmtex --help Something similar should work on Windows/Mac and for other targets (see `zig targets`). 2) https://github.com/vlasakm/mmtex/blob/master/mmtex/files/meson.build This one compiles full LuaTeX, although it doesn't support cross compilation and links to system zlib, libpng and zzliplib. The Zig cross compilation is sadly limited (https://ziglang.org/download/0.8.0/release-notes.html#Tier-1-Support), but not because more exotic systems will never be supported, it's just that nobody did the required work, yet. The support for Linux (various architectures), macOS (aarch64+x86_64) + Windows (x86_64) should be very good. I don't think there is other cross compiler that is able to target the M1 Macs. The Zig build you download from their website [2] is kind of huge, but note that it includes LLVM+Clang+Zig in one single dependency free binary + (efficiently packed) C libraries for many targets. I.e. this is all you need for all your C/C++/Zig. Provided that you (as of now) don't need anything other than Linux/Mac/Windows. Hans, Mojca, is this something worth pursuing for LuaMetaTeX before "native" compilation is available? I am interested in trying. Michal Vlasák [1]: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html [2]: https://ziglang.org/download/ ___ 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] Problem getting lmtx version up
Hello Michal, both binaries work in my system. (Galaxy A50, Userland, Kali Linux) Greetings Lutz Am 17. Juli 2021 02:21:08 MESZ schrieb "Michal Vlasák" : >On Fri Jul 16, 2021 at 12:46 AM CEST, jdh wrote: >> # My system has GLIBC 2.28, but I don't know how to upgrade it for >RPis > >Can you jdh or anyone with a similar setup try to run the following two >binaries? Run with '--help' only, other than that not much works. > >https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-gnu.2.28 >https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-musl > >If I didn't mistake the architecture, these should work. At least I can >confirm that the second (fully statically linked) one works on my >x86_64 >linux with: > >chmod +x ./ltex-aarch64-linux-musl >qemu-aarch64 ./ltex-aarch64-linux-musl --help > >The above are cross compiled (debug) builds of very stripped down >version of LuaTeX, that I have been experimenting with. They won't >solve >the immediate problem, but the cross compiling procedure could be used >to generate luametatex binaries for this target until a better option >is >available. Of course, depending on whether it even works. :) > >Michal Vlasák >___ >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] Problem getting lmtx version up
On Fri Jul 16, 2021 at 12:46 AM CEST, jdh wrote: > # My system has GLIBC 2.28, but I don't know how to upgrade it for RPis Can you jdh or anyone with a similar setup try to run the following two binaries? Run with '--help' only, other than that not much works. https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-gnu.2.28 https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-musl If I didn't mistake the architecture, these should work. At least I can confirm that the second (fully statically linked) one works on my x86_64 linux with: chmod +x ./ltex-aarch64-linux-musl qemu-aarch64 ./ltex-aarch64-linux-musl --help The above are cross compiled (debug) builds of very stripped down version of LuaTeX, that I have been experimenting with. They won't solve the immediate problem, but the cross compiling procedure could be used to generate luametatex binaries for this target until a better option is available. Of course, depending on whether it even works. :) Michal Vlasák ___ 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] weekend upload - stacking and animation
On 13/07/2021 15:14, Hans Hagen wrote: How about: \startuseMPgraphic{demo} for i=1 upto 10: draw fullcircle scaled (i*cm/3) withcolor (i*red/10) withpen pencircle scaled (bp/2) withstacking i ; endfor ; \stopuseMPgraphic \unprotect \tolerant\protected\def\useMPanimation[#1]#2% {\begingroup \scratchtoks\emptytoks \dorecurse{10}{\etoksapp\scratchtoks{{\useMPgraphic[\c!stacking={\recurselevel}]{#2% \expanded{\startanimation[#1]\the\scratchtoks\stopanimation}% \endgroup} \protect \setupinteraction[state=start] \usemodule[animation] \starttext \useMPanimation[menu=yes]{demo} \stoptext Placing this excerpt in a file and compiling it I get an error: $ context animation.tex resolvers | formats | executing runner 'run luametatex format': /home/vm/context/tex/texmf-linux-64/bin/luametatex --jobname="animation" --fmt=/home/vm/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/vm/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./animation.tex" --c:input="./animation.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/vm/context/tex/texmf-linux-64/bin" open source > level 1, order 1, name 'cont-yes.mkiv' fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.07.10 21:51 LMTX fmt: 2021.7.12 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 2, order 2, name '/home/vm/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/home/vm/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './animation', input './animation.tex', result './animation' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name './animation.tex' modules > 'animation' is not found fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 31 in file ./animation.tex: Undefined control sequence \startanimation [menu=yes]{\useMPgraphic [stacking={1}]{demo}}{\useMPgraphic [stacking={2}]{demo}}{\useMPgraphic [stacking={3}]{demo}}{\useMPgraphic [stacking={4}]{demo}}{\useMPgraphic [stacking={5}]{demo}}{\useMPgraphic [stacking={6}]{demo}}{\useMPgraphic [stacking={7}]{demo}}{\useMPgraphic [stacking={8}]{demo}}{\useMPgraphic [stacking={9}]{demo}}{\useMPgraphic [stacking={10}]{demo}} \startanimation [menu=yes]\the \scratchtoks \stopanimation \expanded #1->\xdef \m_syst_helpers_expanded {\noexpand #1 }\m_syst_helpers_expanded \useMPanimation [#1]#2->\begingroup \scratchtoks \emptytoks \par \dorecurse {10}{\etoksapp \scratchtoks {{\useMPgraphic [\c!stacking ={\recurselevel }]{#2\expanded {\startanimation [#1]\the \scratchtoks \stopanimation } \endgroup \useMPanimation[menu=yes]{demo} 21\expanded{\startanimation[#1]\the\scratchtoks\stopanimation}% 22\endgroup} 23 24 \protect 25 26 \setupinteraction[state=start] 27 28 \usemodule[animation] 29 30 \starttext 31 >> \useMPanimation[menu=yes]{demo} 32 \stoptext 33 The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 256 ___ 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] Rolling out a pandoc-context publication workflow in an organization
On 7/2/2021 9:38 AM, Jan U. Hasecke wrote: Am 02.07.21 um 01:07 schrieb Bruce Horrocks: One option you might try, if your cooperative has a web-server available to editors, is to store your own ConTeXt repository. That way you can update the LMTX version when you are ready to. This works because "install.sh" can have a "--server" parameter supplied. By default it goes to lmtx.pragma-ade.com/install-lmtx but if you were to copy the install-lmtx directory and host the copy on your own server at the same path, then you could 'freeze' your LMTX version until you were ready to change. Thanks for this hint. This might solve one more problem. We would like to pin the installation to a version that is known too work. BTW: Are there plans to use a GitHub repository or an alternative to it? As that would ease pinning a bit. All uploads end up here too alsk kind of an archive: official: https://bitbucket.org/phg/context-mirror/src/beta/ experimental : https://github.com/mojca/context2 The official oen can be checked out, the experimental one is a playground because for quite a while Mojca and I have some ideas for a more extensive install on github which would then involve: -- core context code (with luametatex in source tree too: tex/texmf-context in the distribution -- the minimal set of resources: tex/texmf in the distribution -- binaries (which is the more complex part) -- modules: texmf/modules So, basically several repositories alongside (totaling to the amoutn we now have in the zips). We then have doif-it-yourself-zips, the garden installer, the lmtx self updater and install-from-github as alternatives. I have a sort of proof of concept for it. We looked into the binary bit and things have changed a bit over the years so maybe it's more doable now. One of the complications is always that it depends on helper programs: - zips are easy as all systems have it (ok, some linux distributions don't install unzip but one can easily add it) - the garden install needs a matching rsync (we need to ship on for windows and sometimes a mismatch will require an update on other platforms); it reminds me that we have to swap the cygwin bins by mingw bins; anyway. one problem is that organizations block the port - the lmtx installer needs a (luametatex) binary which is no big deal; it uses http and there might be organizations that demand https and ssl keeps evolving so in the long run it can fail to update older installations (it anyway means that we need to also ship e.g. curl or libcurl (the later works ok for us); no big deal but more work) - a github install demands that git is installed; that itself is a big piece of software (a small git binary for windows is already 200 MB due to all the dependencies while actually we only need a stupid fetch); the gh binary is still 25M but might be a solution, apart from the fact that we then expect users to have a recent bin ... will a 5 year old installation update?); of course users can also decide to completely do it themselves (check out etc) but for a local project-specific run one doesn't want all those gigs So, each approach has pros and cons, and we need to prevent lock into some specific technology. 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] hyphenate nothyphenated
On 6/29/2021 12:06 PM, Steffen Wolfrum wrote: When running this mwe with luatex, the command \- could be used to manually break the line, even though it is set up nothyphenated. When running luametatex the word does not break: \setuppapersize[A10] \showframe \setuphead[chapter][align={nothyphenated}] \starttext \chapter{abc\-def} \stoptext Is this intended? well, you ask for nothyphenated; we could define \permanent\protected\def\-% {\begingroup \hyphenationmode\explicithyphenationmodecode\explicitdiscretionary \endgroup} i will ponder this 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 ___
[NTG-context] error luatex exceptions
While luametatex works fine, running this mwe with luatex ends in an error: \startexceptions con-text \stopexceptions \starttext context \stoptext ...-64/tex/texmf-context/tex/context/base/mkiv/lang-ini.lua:198: attempt to call a nil value (global 'sortedhash') stack traceback: ...-64/tex/texmf-context/tex/context/base/mkiv/lang-ini.lua:198: in upvalue 'sethjcodes' ...-64/tex/texmf-context/tex/context/base/mkiv/lang-ini.lua:551: in upvalue 'collecthjcodes' ...-64/tex/texmf-context/tex/context/base/mkiv/lang-ini.lua:570: in function <...-64/tex/texmf-context/tex/context/base/mkiv/lang-ini.lua:566> (...tail calls...) 1 % engine=luatex 2 %!TEX TS-program = ConTeXt LMTX 3 4 \startexceptions 5 6 con-text 7 8 >> \stopexceptions 9 10 \starttext 11 12 context 13 14 \stoptext mtx-context | fatal error: return code: 256 Steffen ___ 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] hyphenate nothyphenated
When running this mwe with luatex, the command \- could be used to manually break the line, even though it is set up nothyphenated. When running luametatex the word does not break: \setuppapersize[A10] \showframe \setuphead[chapter][align={nothyphenated}] \starttext \chapter{abc\-def} \stoptext Is this intended? Steffen ___ 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] color conversion eats note
Steffen Wolfrum schrieb am 27.06.2021 um 15:55: uncommenting the following \setupcolors changes magenta to black when running luatex. but when running luametatex the footnote is crippled to «error»: \starttext \definestartstop[UL][color=magenta] %\setupcolors[state=stop,conversion=never]% <- bw with lualatex, but «error» with luametatex? \input ward \footnote{foo foo \startUL{}foo\stopUL{} foo foo foo foo foo \startUL{}foo\stopUL{} error} \stoptext Don't use extra stuff (e.g. footnotes) when they aren't necessary to reproduce the error. %\setupcolors[cmyk=no,rgb=no,conversion=no] %\setupcolors[state=stop,conversion=no] \setcolormodel[none] \starttext \dorecurse{20}{\convertnumber{word}{#1} }% \color[red]{not a number} \dorecurse{20}{\convertnumber{word}{#1} } \stoptext Wolfgang ___ 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] color conversion eats note
uncommenting the following \setupcolors changes magenta to black when running luatex. but when running luametatex the footnote is crippled to «error»: \starttext \definestartstop[UL][color=magenta] %\setupcolors[state=stop,conversion=never]% <- bw with lualatex, but «error» with luametatex? \input ward \footnote{foo foo \startUL{}foo\stopUL{} foo foo foo foo foo \startUL{}foo\stopUL{} error} \stoptext Steffen ___ 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] Invalid keyword \spaceskip
On 6/27/2021 11:36 AM, Steffen Wolfrum wrote: Am 27.06.2021 um 09:16 schrieb Hans Hagen : On 6/26/2021 11:56 PM, Wolfgang Schuster wrote: Steffen Wolfrum schrieb am 26.06.2021 um 23:38: Am 26.06.2021 um 22:43 schrieb Wolfgang Schuster : Steffen Wolfrum schrieb am 26.06.2021 um 22:26: PS: with % engine=luatex it works fine. Add \relax after the last skip value, i.e. \spaceskip = 1pt plus 1pt minus 1.5pt\relax LMTX allows multiple plus and minus values for a skip value and the M in Matilda starts the scan for an additional minus value. Wow, this sounds interesting. Is there an example of how to use multiple values? I think the only examples are in mails from Hans. When you set multiple plus or minus values (as far as i remember) only the last setting is used and all previous ones are ignored. Maybe in some article. Anyway, here is an example: \starttext test \skip0=10pt plus 10pt minus 10pt plus 20pt test \skip0=10pt plus 10pt plus 20pt minus 10pt test \vrule width 10pt height 10pt depth 10pt depth 10pt height 10pt % test \hbox to 10pt to 10pt {x} \stoptext compare pdftex and luametatex. ok. but why does this run fine \starttext Test \spaceskip = 1.0pt plus 1pt minus 1.5pt Wolfgang \stoptext while this ends in an error message? \starttext Test \spaceskip = 1.0pt plus 1pt minus 1.5pt Matilda \stoptext because scanning is case insensitive so the m triggeres the keyword error ... keep in mind that by omitting a \relax you've always been lucky so far (probably no follow up texts that had plus or minus) .. luametatex just warns earlier 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] Invalid keyword \spaceskip
> Am 27.06.2021 um 09:16 schrieb Hans Hagen : > > On 6/26/2021 11:56 PM, Wolfgang Schuster wrote: >> Steffen Wolfrum schrieb am 26.06.2021 um 23:38: >>>> Am 26.06.2021 um 22:43 schrieb Wolfgang Schuster >>>> : >>>> >>>> Steffen Wolfrum schrieb am 26.06.2021 um 22:26: >>>>> PS: with >>>>> >>>>> % engine=luatex >>>>> >>>>> it works fine. >>>> Add \relax after the last skip value, i.e. >>>> >>>> \spaceskip = 1pt plus 1pt minus 1.5pt\relax >>>> >>>> LMTX allows multiple plus and minus values for a skip value and the M in >>>> Matilda starts the scan for an additional minus value. >>> Wow, this sounds interesting. Is there an example of how to use multiple >>> values? >> I think the only examples are in mails from Hans. When you set multiple plus >> or minus values (as far as i remember) only the last setting is used and all >> previous ones are ignored. > Maybe in some article. Anyway, here is an example: > > \starttext > test \skip0=10pt plus 10pt minus 10pt plus 20pt > > test \skip0=10pt plus 10pt plus 20pt minus 10pt > > test \vrule width 10pt height 10pt depth 10pt depth 10pt height 10pt > > % test \hbox to 10pt to 10pt {x} > > \stoptext > > compare pdftex and luametatex. ok. but why does this run fine \starttext Test \spaceskip = 1.0pt plus 1pt minus 1.5pt Wolfgang \stoptext while this ends in an error message? \starttext Test \spaceskip = 1.0pt plus 1pt minus 1.5pt Matilda \stoptext Steffen ___ 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] Invalid keyword \spaceskip
On 6/26/2021 11:56 PM, Wolfgang Schuster wrote: Steffen Wolfrum schrieb am 26.06.2021 um 23:38: Am 26.06.2021 um 22:43 schrieb Wolfgang Schuster : Steffen Wolfrum schrieb am 26.06.2021 um 22:26: PS: with % engine=luatex it works fine. Add \relax after the last skip value, i.e. \spaceskip = 1pt plus 1pt minus 1.5pt\relax LMTX allows multiple plus and minus values for a skip value and the M in Matilda starts the scan for an additional minus value. Wow, this sounds interesting. Is there an example of how to use multiple values? I think the only examples are in mails from Hans. When you set multiple plus or minus values (as far as i remember) only the last setting is used and all previous ones are ignored. Maybe in some article. Anyway, here is an example: \starttext test \skip0=10pt plus 10pt minus 10pt plus 20pt test \skip0=10pt plus 10pt plus 20pt minus 10pt test \vrule width 10pt height 10pt depth 10pt depth 10pt height 10pt % test \hbox to 10pt to 10pt {x} \stoptext compare pdftex and luametatex. 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] Invalid keyword \spaceskip
PS: with % engine=luatex it works fine. Steffen > Am 26.06.2021 um 22:12 schrieb Steffen Wolfrum : > > This mwe gives the error below: > > > \starttext > > {\spaceskip=1.0pt plus1pt minus1.5pt Matilda, 24, 345, 348, 361, 366} > > \stoptext > > > Steffen > > ––– > > … $ ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script context > --autogenerate /Users/steffen/Desktop/error_1.tex > > resolvers | formats | executing runner 'run luametatex format': > /Users/steffen/context-osx-64/tex/texmf-osx-64/bin/luametatex > --jobname="error_1" > --fmt=/Users/steffen/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt > > --lua=/Users/steffen/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui > --c:autogenerate --c:currentrun=1 > --c:fulljobname="/Users/steffen/Desktop/error_1.tex" > --c:input="/Users/steffen/Desktop/error_1.tex" --c:kindofrun=1 > --c:maxnofruns=9 > --c:texmfbinpath="/Users/steffen/context-osx-64/tex/texmf-osx-64/bin" > fonts > beware: no fonts are loaded yet, using 'lm mono' in box > system > > system > ConTeXt ver: 2021.06.25 22:49 LMTX fmt: 2021.6.26 int: > english/english > system > > system > 'cont-new.mkxl' loaded > open source > level 1, order 1, name > '/Users/steffen/context-osx-64/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/steffen/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' > system > files > jobname 'error_1', input > '/Users/steffen/Desktop/error_1', result 'error_1' > fonts > latin modern fonts are not preloaded > languages > language 'en' is active > open source > level 1, order 2, name '/Users/steffen/Desktop/error_1.tex' > fonts > preloading latin modern fonts (second stage) > fonts > 'fallback modern-designsize rm 12pt' is loaded > tex error > tex error on line 4 in file > /Users/steffen/Desktop/error_1.tex: Valid keyword expected, likely 'minus' > > {\spaceskip=1.0pt plus1pt minus1.5pt Ma > tilda, 24, 345, 348, 361, 366} > 1 > 2 \starttext > 3 > 4 >> {\spaceskip=1.0pt plus1pt minus1.5pt Matilda, 24, 345, 348, 361, 366} > 5 > 6 \stoptext > You started a keyword but it seems to be an invalid one. The first > character(s) > might give you a clue. You might want to quit unwanted lookahead with \relax. > mtx-context | fatal error: return code: 256 > > > ___ > 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 ___
[NTG-context] Invalid keyword \spaceskip
This mwe gives the error below: \starttext {\spaceskip=1.0pt plus1pt minus1.5pt Matilda, 24, 345, 348, 361, 366} \stoptext Steffen ––– … $ ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script context --autogenerate /Users/steffen/Desktop/error_1.tex resolvers | formats | executing runner 'run luametatex format': /Users/steffen/context-osx-64/tex/texmf-osx-64/bin/luametatex --jobname="error_1" --fmt=/Users/steffen/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/steffen/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:autogenerate --c:currentrun=1 --c:fulljobname="/Users/steffen/Desktop/error_1.tex" --c:input="/Users/steffen/Desktop/error_1.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/Users/steffen/context-osx-64/tex/texmf-osx-64/bin" fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.06.25 22:49 LMTX fmt: 2021.6.26 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/Users/steffen/context-osx-64/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/steffen/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname 'error_1', input '/Users/steffen/Desktop/error_1', result 'error_1' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name '/Users/steffen/Desktop/error_1.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 4 in file /Users/steffen/Desktop/error_1.tex: Valid keyword expected, likely 'minus' {\spaceskip=1.0pt plus1pt minus1.5pt Ma tilda, 24, 345, 348, 361, 366} 1 2 \starttext 3 4 >> {\spaceskip=1.0pt plus1pt minus1.5pt Matilda, 24, 345, 348, 361, 366} 5 6 \stoptext You started a keyword but it seems to be an invalid one. The first character(s) might give you a clue. You might want to quit unwanted lookahead with \relax. mtx-context | fatal error: return code: 256 ___ 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] lmtx upload
On 6/25/2021 12:18 AM, luigi scarso wrote: On Thu, Jun 24, 2021 at 7:29 PM Hans Hagen <mailto:j.ha...@xs4all.nl>> wrote: Hi, I uploaded a new version. I got sidetracked by an experiment. We can read from zip files, but as I had some tar archives I wondered if we could read from them. They happened to be compressed. It uses an already present infrastructure (early mkiv I played a bit with reading from zip files). libarchive looks quite useful http://libarchive.org/ <http://libarchive.org/> (see https://docs.microsoft.com/en-us/virtualization/community/team-blog/2017/20171219-tar-and-curl-come-to-windows <https://docs.microsoft.com/en-us/virtualization/community/team-blog/2017/20171219-tar-and-curl-come-to-windows>) But it's huge and add lots of dependencies and thereby complications; often these libs have special platform optimizations (so one needs to run configure scripts) ... in luametatex i try to stay away from that .. but loading as external lib is of course an option; we already support zip, gz, tar, lz4, lzma (xz), lzo, xstd but i doubt if in practice they are used often (zip we need for pdf, gz for some graphics, xz because it's used in texlive but most of it is also kind of fun to play with: as less code as possible and then lua support code). 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 ___
[NTG-context] lmtx upload
Hi, I uploaded a new version. I got sidetracked by an experiment. We can read from zip files, but as I had some tar archives I wondered if we could read from them. They happened to be compressed. It uses an already present infrastructure (early mkiv I played a bit with reading from zip files). \starttext \dorecurse{100}{ \input {tar:///e:/temporary/test/foo.tar?name=test.tex}\par \input {tar:///e:/temporary/test/foo.tar.xz?name=test.tex}\par \input {tar:///e:/temporary/test/foo.tar.gz?name=test.tex}\par } \stoptext The tar files are handled by lmtx itself, the gzipped variant uses the basic decompressor of the engine (different in lmtx than in mkiv but that should not matterl i only tested lmtx). The xz one is a bit more special as it uses the external xz program unless one has limlzma installed, e.g. in: tex/texmf-win64/bin/lib/luametatex/lzma/liblzma.dll (mtxrun --generate makes it locatable). In all three examples performance is quite ok. It might a nice solution for cases where one has many small files cluttering the system. It actually might be more efficient to use tar.xz instead of zip files but then we also need to ship the lib and that is not on the agenda. I'm in no hurry with such alternatives (most of todays bandwidth is wasted with ads and related crap anyway). Concerning math we have several fonts, and the public ones don't really play the game like cambria does. So, th emore bugs become features, the more we're stuck with it. Now, once fonts are stable (including bugs) we cna think of goodie files that fix things but an other option is to tell the math machinery in what aspects as font is not really opentype. Read: when to follow a traditional code path. For the moment that is just an experiment and mostly meant for myself to explore things but it is likely to stay. Contrary to other variabls that control the math engine, here we have a bitset (adding dozens more commands makes no sense): \setupbodyfont[newcomputermodern-book] \starttext \startTEXpage[offset=10pt] $ \showglyphs\showmakeup[math] f = 10 $ $ \mathcontrolmode\plusone \bitwiseflip\mathfontcontrol\orditalickernmathcontrolcode \bitwiseflip\mathfontcontrol\charitalicnoreboxmathcontrolcode \bitwiseflip\mathfontcontrol\orditalickernmathcontrolcode \bitwiseflip\mathfontcontrol\charitalicnoreboxmathcontrolcode \bitwiseflip\mathfontcontrol\overrulemathcontrolcode \bitwiseflip\mathfontcontrol\underrulemathcontrolcode \bitwiseflip\mathfontcontrol\radicalrulemathcontrolcode \bitwiseflip\mathfontcontrol\fractionrulemathcontrolcode \bitwiseflip\mathfontcontrol\accentskewhalfmathcontrolcode \bitwiseflip\mathfontcontrol\accentskewapplymathcontrolcode \bitwiseflip\mathfontcontrol\accentitalickernmathcontrolcode \bitwiseflip\mathfontcontrol\delimiteritalickernmathcontrolcode \bitwiseflip\mathfontcontrol\charitalicwidthmathcontrolcode \bitwiseflip\mathfontcontrol\boxednoitalickernmathcontrolcode \bitwiseflip\mathfontcontrol\nostaircasekernmathcontrolcode \bitwiseflip\mathfontcontrol\textitalickernmathcontrolcode \showglyphs\showmakeup[math] f = 10 $ \stopTEXpage \stoptext Here, when \mathcontrolmode larger than zero, the \mathfontcontrol bitset will control code paths. When the value is zero, a normal opentype font is assumed. There might be some more options but it's a bit tricky (maybe I already introduced some issues, who knows). A font can also communicate a bitset and this is supported by a font feature in lmtx: % \definefontfeature[newcm-mathextra][mathcontrol={% % over_rule,% % under_rule,% % radical_rule,% % fraction_rule,% % accent_skew_half,% % accent_skew_apply,% % accent_italic_kern,% % delimiter_italic_kern,% % ord_italic_kern,% % char_italic_width,% % char_italic_no_rebox,% % boxed_no_italic_kern,% % no_staircase_kern,% % text_italic_kern,% % }] the newcm-mathextra is for instance applied with that font when defined (as usual with features), Again there is some detailed control and more can be added. So we have a control variable at the tex end and one that goes with a font. The 'bits' have funny names but such are the internals. Eventually I'll wrap this up in a progress article. In addition to the above there are a few fixes for issues discussed on the mailing list. I'm still trying to get tracing a bit nicer, so here is another trick: \starttext \def\MyPrimitiveCommandA#1{\hbox to 3cm{#1}} \untraced\def\MyPrimitiveCommandB#1{\hbox to 3cm{#1}} \bgroup \tracingall \MyPrimitiveCommandA{oeps} \MyPrimitiveCommandB{oeps} \egroup The first one gives: 2:3: \MyPrimitiveCommandA #1->\hbox to 3cm{#1} 2:3: #1<-oeps 2:4: {\hbox} 2:5: {entering adjusted hbox group (level 2) at line 10} and the second one: 2:3: \MyPrimitiveCommandB 2:4: {\hbox} 2:5: {entering adjusted hbox group (level 2) at l
Re: [NTG-context] Functionnames disappearing (sometimes)
Hi Hans, Many thanks ! Yes the new engine fixes the issues. Best regards: Otared > On 19 Jun 2021, at 23:27, Hans Hagen wrote: > > On 6/19/2021 10:01 PM, Otared Kavian wrote: >> Hi, >> I don’t know whether the issue reported by Mikael S. is related to the >> following: since last week (I guess) some math sympbols are not shown >> either, such as \bigcap and \bigcup, even using version 2021.06.18 23:37. An >> example is: >> \starttext >> $A \cup B = X \cap Y$ >> \startformula >> A \bigcup B = X \bigcap Y >> \stopformula >> \stoptext > it's a bug i introduced in the engine .. you can try a newer bin from: > > https://dl.contextgarden.net/build/luametatex/ > > > - > 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] Functionnames disappearing (sometimes)
On 6/19/2021 10:01 PM, Otared Kavian wrote: Hi, I don’t know whether the issue reported by Mikael S. is related to the following: since last week (I guess) some math sympbols are not shown either, such as \bigcap and \bigcup, even using version 2021.06.18 23:37. An example is: \starttext $A \cup B = X \cap Y$ \startformula A \bigcup B = X \bigcap Y \stopformula \stoptext it's a bug i introduced in the engine .. you can try a newer bin from: https://dl.contextgarden.net/build/luametatex/ - 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] new upload lmtx
Hi, End of the week so time to wrap up. (1) As follow up on the primt/quote discussions I played a bit with additional font features. We already had a partial case feature but that one is also better. The camelcaser is more an experiment (and example). % \definefontfeature[primes] [primes=yes] % \definefontfeature[uppercasing][uppercasing=yes] % \definefontfeature[lowercasing][lowercasing=yes] % \definefontfeature[camelcasing][camelcasing=yes] \setupbodyfont[dejavu] \starttext \startTEXpage[align={tolerant,stretch},offset=1ex] {\addff{camelcasing} \samplefile{tufte}\par} {\addff{uppercasing} \samplefile{tufte}\par} {\addff{lowercasing} \samplefile{tufte}\par} {\addff{primes} 123'345''\par} \stopTEXpage \stoptext (2) (Pablo:) There is some pogress with facing floats that Thomas will check out for real usage. So, still experimental. (3) Already for some 'mails' I mention playing with modifiers in math. The openup varianst are now a bit more tolerant in the sense that they work for more classes. For a while I hav ebeen wondering about the prescripts and to what extend they should be controlled independent. For instance, we can mess with \Umathsupshiftup and such to get some displacement and it can even be done local, but still ... these are normally kind of font drive. So I decided to add a few more parameters, like \Umathextrasupshift for each of the four possible scripts. For convenience I added \supsubscr, \subsupscr, \supscr, and \subscr commands with an optional argument. Basically we can now control quite a lot also because all defaults can be also influenced with \Umath*variant if needed; I probably need to check again if there are any (traditional tex math) hardwired properties. I know that not all of that is really needed (also because much of tex math is chisseled in stone and not supposed to be controlled although in context i suppose we have a bit more freedom) but it simply fit in the luametatex effort to do so. Of course there might be math fields that need such things (so I might add some more modifiers, also because it's kind of fun to do). Hans test file for math stuff \setupbodyfont[newcomputermodern-book] \enableexperiments[math.extensibles] \starttext % \displaylimits % \limits % \nolimits % \ordlimits (maybe replace that one now or maybe no longer needed anyway) % \Umathadapttoleft \Umathadapttoright % \Umathaxis \Umathnoaxis % \Umathphantom \Umathvoid % \Umathopenupheight \Umathopenupdepth % \Umathlimits \Umathnolimits % we can influence the location of sript with the open up modifiers but % how about a different pre/post scripts anchoring ... as a first step % i added these \Umathextra..shift parameters but maybe we need some more % (we have this script control mode already, so maybe we need one for the % prescripts too .. next todo i guess) .. we need examples of usage (like % chemistry) .. maybe we also need a way to set the whole lot of styles % at once .. again user demand driven) \startTEXpage $ x^1_2^^3__4 = \normalmathop{x}^1_2^^3__4 = \normalmathop{x}\Umathopenupheight5mm^1_2^^3__4 = x\Umathopenupheight5mm\Umathopenupdepth2mm^1_2^^3__4 = {\frozen\Umathsupshiftup\textstyle10pt x^1} = {x\frozen\Umathsupshiftup\textstyle10pt^1} = {\frozen\Umathsupshiftup\textstyle12pt x^1_2^^3__4} = {\frozen\Umathsupshiftup\textstyle12pt x\Umathopenupheight5mm^1_2^^3__4} $ \stopTEXpage \startTEXpage $ x^1_2^^3__4 = \frozen\Umathextrasupshift \textstyle2pt \frozen\Umathextrasubshift \textstyle4pt \frozen\Umathextrasuppreshift\textstyle6pt \frozen\Umathextrasubpreshift\textstyle8pt x^1_2^^3__4 \frozen\Umathextrasupshift \textstyle\zeropoint \frozen\Umathextrasubshift \textstyle\zeropoint \frozen\Umathextrasuppreshift\textstyle\zeropoint \frozen\Umathextrasubpreshift\textstyle\zeropoint = \mathord { \frozen\Umathextrasupshift \textstyle2pt \frozen\Umathextrasubshift \textstyle4pt \frozen\Umathextrasuppreshift\textstyle6pt \frozen\Umathextrasubpreshift\textstyle8pt x^1_2^^3__4 } = x^1_2^^3__4 $ \stopTEXpage % a few helpers ... do we need more like that ... we realy want to avoid % ugly low level messing around (these \, etc are also kind of ugly) \startTEXpage $ x\supscr [2pt]{1} \subscr [3pt]{2} = x\supsubscr[2pt]{1}{2} = x\supsubscr[2pt]{1}{2}\supsubprescr{1}{2} = x\supsubscr[2pt]{1}{2}\supsubprescr[5pt]{1}{2} = x\subsupscr[2pt]{2}{1} = x\supscr{1} \subscr [2pt]{2} = x\supsubscr {1}{2} = x\subsupscr {2}{1} $ \stopTEXpage \startTEXpage[offset=5mm] \startformula x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm width 5mm} = x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm width 5mm} = x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm width 5mm} = x = \integral^1_2