[NTG-context] Callbacks in LuaMetaTeX

2022-05-01 Thread Max Chernoff via ntg-context

Hi list,

I've been playing around with some of the Lua callbacks in LuaMetaTeX,
and I have a few questions/comments.

Context: I'm writing a Plain/LaTeX/ConTeXt module called
"lua-widow-control" that uses Lua callbacks to automatically remove
widows and orphans from documents. The relevant Lua code is at:


https://github.com/gucci-on-fleek/lua-widow-control/blob/master/source/lua-widow-control.lua

in case you're curious about how I'm using these callbacks, but you
shouldn't need to look there since this email is self-contained.

1. In LMTX, calling "tex.linebreak" produces a
   
   luatex warning  > tex: left parfill skip is gone


   warning. I don't get this warning in Plain LuaTeX, LuaLaTeX, or MkIV,
   so I think that it's specific to LuaMetaTeX. The LuaMetaTeX manual
   hardly mentions "left parfill skip"/"parfillleftskip", so I'm not too
   sure what to do to avoid this warning.

   You can reproduce the warning with this code (but any call to
   "tex.linebreak" also works):

   \startluacode
   function test(head)
   tex.linebreak(node.copylist(head))
   
   return head

   end
   
   nodes.tasks.appendaction("processors", "after", "test")

   \stopluacode
   
   \starttext

   Hello!
   \stoptext

2. The LuaMetaTeX manual says that "pre_linebreak_filter" is called
   after the parfillskip glue has been added, but this doesn't seem to
   be the case. With LuaLaTeX/Plain LuaTeX, this is true, but the node
   list passed to the callback in MkXL is missing the parfillskip. (I
   don't have an MkIV installation to test here.)

   This MkXL code:

   \startluacode
   function test(head)
   local last = node.slide(head)
   
   print "START"

   for i=1,3 do
   print(last)
   print(
   node.type(last.id),
   node.subtypes(last.id)[last.subtype],
   last.width,
   last.stretchorder,
   last.stretch
   )
   
   last = last.prev

   end
   print "STOP"
   
   return head

   end
   
   nodes.tasks.appendaction("processors", "after", "test")

   \stopluacode
   
   \starttext

   Hello!
   \stoptext

   produces:

   START
   nil : glue spaceskip>
   gluespaceskip   341648  0   384354
  2258 : glyph unset>
   glyph   nil 213792  nil nil
  2521 : glyph unset>
   glyph   nil 385140  nil nil
   STOP
   START
   nil : glue userskip>
   glueuserskip0   2   65536
  2357 : glyph unset>
   glyph   nil 385140  nil nil
  2611 : rule strut>
   rulestrut   0   nil nil
   STOP

   while this (presumably) equivalent Plain LuaTeX code:

   \directlua{
   function test(head)
   local last = node.slide(head)
   
   print "START"

   for i=1,3 do
   print(last)
   print(
   node.type(last.id),
   node.subtypes(last.id)[last.subtype],
   last.width,
   last.stretch_order,
   last.stretch
   )
   
   last = last.prev

   end
   print "STOP"
   
   return head

   end
   
   callback.register("pre_linebreak_filter", test)

   }
   
   Hello!
   
   \bye


   produces:

   START
   nil : glue 15>
   glueparfillskip 0   2   65536
   298 : penalty 2>
   penalty linepenalty nil nil nil
82 : glyph 0>
   glyph   unset   182045  nil nil
   STOP

   I'm not sure if this is a doc bug, an engine bug, or if I'm just
   doing something wrong.

3. The LuaTeX/LuaMetaTeX engine manuals say that for node callbacks, you
   can return "true" if you don't need to replace the passed node list.
   This works fine with raw LuaTeX callbacks and the luatexbase
   wrappers, but it doesn't work with the ConTeXt "nodes.tasks" wrapper
   functions.

   This Plain example works:

   \directlua{
   callback.register("pre_linebreak_filter", function ()
   return true
   end)
   }
   
   Hello!
   
   \bye


   But this MkXL example doesn't:

   \startluacode
   function test(head)
   return true
   end
   
   nodes

Re: [NTG-context] context module t-account in LMTX

2022-04-28 Thread Heinrich Paeßens via ntg-context
Many thanks Wolfgang, I can see the 'values' in a table like form, nothing but the values — how can I switch on the 'lines' of the table?Best regards, HeinrichI took your file t-taccount.mkxland——% !TEX program = lmtx\usemodule[t][taccount]\startTEXpage[offset=5pt]\starttaccount[title=Bilanz,lefttext=Aktiva,righttext=Passiva]    \startdebits        \debit{Gebäude}  {1.800}        \debit{Maschinen}{1.200}        \debit{Fuhrpark}   {500}        \debit{Rohstoffe}  {100}        \debittotal      {3.600}    \stopdebits    \startcredits        \credit{Eigenkapital}{1.400}        \credit{Schulden}    {2.200}        \credittotal         {3.600}    \stopcredits\stoptaccount\stopTEXpage——

tst-taccount.pdf
Description: Adobe PDF document
the log——resolvers       | formats | executing runner 'run luametatex format': /Users/hp/Library/context-osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./tst-taccount.tex" --fmt=/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:autopdf --c:currentrun=1 --c:directives="system.showerror" --c:fulljobname="./tst-taccount.tex" --c:input="./tst-taccount.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall --c:texmfbinpath="/Users/hp/Library/context-osx-64/tex/texmf-osx-64/bin"system          > system          > ConTeXt  ver: 2022.04.15 20:20 LMTX  fmt: 2022.4.17  int: english/englishsystem          > system          > 'cont-new.mkxl' loadedopen source     > level 1, order 1, name '/Users/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'system          > beware: some patches loaded from cont-new.mkivclose source    > level 1, order 1, name '/Users/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'system          > files > jobname './tst-taccount', input './tst-taccount.tex', result './tst-taccount'fonts           > latin modern fonts are not preloadedlanguages       > language 'en' is activeopen source     > level 1, order 2, name './tst-taccount.tex'modules         > 'taccount' is loadedopen source     > level 2, order 3, name 't-taccount.mkxl'loading         > Context User Module / Miscellaneousclose source    > level 2, order 3, name 't-taccount.mkxl'system          > auto \starttext ... \stoptextfonts           > preloading latin modern fonts (second stage)fonts           > 'fallback modern-designsize rm 12pt' is loadedbackend         > xmp > using file '/Users/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'pages           > flushing realpage 1, userpage 1, subpage 1close source    > level 1, order 3, name './tst-taccount.tex'mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.luamkiv lua stats  > used cache path: /Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32emkiv lua stats  > resource resolver: loadtime 0.010 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 10 found files, scanned paths: mkiv lua stats  > stored bytecode data: 504 modules (0.406 sec), 98 tables (0.020 sec), 602 chunks (0.426 sec)mkiv lua stats  > traced context: maxstack: 1627, freed: 0, unreachable: 1627mkiv lua stats  > cleaned up reserved nodes: 72 nodes, 11 lists of 439mkiv lua stats  > node memory usage: 15 attribute, 3 glue, 67 gluespec, 3 kern, 582 mathspec, 4 penalty, 2 tempmkiv lua stats  > node list callback tasks: 12 unique task lists, 9 instances (re)created, 59 callsmkiv lua stats  > used backend: pdfmkiv lua stats  > jobdata time: 0.002 seconds saving, 0.000 seconds loadingmkiv lua stats  > callbacks: file: 390, saved: 270, direct: 2, function: 1102, value: 2, message: 0, bytecode: 602, late 0, total: 2368 (0 per page)mkiv lua stats  > randomizer: initialized with value 0.56777543833852mkiv lua stats  > loaded tex modules: 1 requested, all found (t-taccount)mkiv lua stats  > loaded patterns: en::1, load time: 0.000mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otfmkiv lua stats  > font engine: otf 3.120, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.237 seconds mkiv lua stats  > font embedding time: 0.004 seconds, 1 fontsmkiv lua stats  > result saved in file: tst-taccount.pdf, compresslevel 1, objectcompresslevel 3mkiv lua stats  > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entriesmkiv lua stats  > used platform: osx-64, type: unix, binary subtree: texmf-osx-64mkiv lua stats  > used engine: luametatex version: 2.0946, functionality level: 20220405, format id: 647, compiler: clangmkiv lua stats  &

[NTG-context] context module t-account in LMTX

2022-04-26 Thread Heinrich Paeßens via ntg-context
Hi there

I just tried to test the use of the t-account module, compiling with LMTX, but 
no avail.

What is wrong? Does the module need a fix for LMTX or is the fault on my side 
(having no experience …)?

Many thanks for your support. Kind regards,
Heinrich

the example is in the file 
tst-account.tex

——
% !TEX program = lmtx

\usemodule[t-account]
\environment TACCOUNT

\startDEBITS
\debit [Auto] {2000}
\debit [Bus]  {5000}


\startCREDITS
\credit [Bank] {1000}
\credit [Kasse] {200}
\credit [Kasse] {200}
\stopCREDITS

\stopACCOUNT
——


leads to error shown in the log:
——
resolvers   | formats | executing runner 'run luametatex format': 
/Users/hp/Library/context-osx-64/tex/texmf-osx-64/bin/luametatex 
--jobname="./tst-account.tex" 
--fmt=/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:autopdf --c:currentrun=1 --c:directives="system.showerror" 
--c:fulljobname="./tst-account.tex" --c:input="./tst-account.tex" 
--c:kindofrun=1 --c:maxnofruns=9 --c:purgeall 
--c:texmfbinpath="/Users/hp/Library/context-osx-64/tex/texmf-osx-64/bin"

system  > 
system  > ConTeXt  ver: 2022.04.15 20:20 LMTX  fmt: 2022.4.17  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/Users/hp/Library/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/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './tst-account', input './tst-account.tex', 
result './tst-account'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './tst-account.tex'
modules > using user prefixed file 't-account'
modules > 't-account' is loaded
open source > level 2, order 3, name 
'/Users/hp/Library/context-osx-64/tex/texmf-modules/tex/context/third/account/t-account.mkiv'
close source> level 2, order 3, name 
'/Users/hp/Library/context-osx-64/tex/texmf-modules/tex/context/third/account/t-account.mkiv'
context report  > file: tst-account-status.html
mtx-context | fatal error: return code: 1
——

and the -status.html says:
——
Error  Undefined control sequence \startDEBITS
File   ./tst-account.tex
Line   7

 1 % !TEX program = lmtx
 2 \usemodule[t-account]
 3 \environment TACCOUNT
 4 
 5 \startACCOUNT[left=S,middle=Bilanz,right=H]
 6 
 7 >>  \startDEBITS
 8 \debit [Auto] {2000}
 9 \debit [Bus]  {5000}
10 \stopDEBITS
11 
12 \startCREDITS
13 \credit [Bank] {1000}
14 \credit [Kasse] {200}
15 \credit [Kasse] {200}
16 \stopCREDITS
17
——



___
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] lua-widow-control module error in LMTX

2022-04-25 Thread Eduardo Bohoyo via ntg-context

Hi, Max:

First things first.  I want to acknowledge and thank you for the tough 
mission that surely involves maintaining this module for the benefit of 
the TeX community and, most especially, for LMTX in particular, due to 
the very reasons you have just explained.


Regarding your remarks, you are right in your assumptions: I didn't have 
the required lua file installed in its corresponding folder. That's what 
I was missing, and, logically, what made my compilation crash.


To make my confusion even worse, I had done a strict search inside the 
mkxl code. It wouldn't take me to line 63 because I had added the 
extension (lua-widow-control.lua, not just lua-widow-control).


Anyway, a mess only due to my ignorance.

Now I finally get the pdf. But unfortunately, this "new" pdf is the same 
with the module uncommented as when I had it commented. There is no 
difference at all. And you're right: even context --make doesn't solve 
the problem. To give you an idea, although my dummy document has 78 
pages, only 55 can really be said to be dummy text that can benefit from 
the module. Well, only in those 55 pages I have 2 orphans, 5 widows and 
6 broken hyphens.


I have read several times all the options of the module in the 
/lua-widow-control.pdf/ document, but I don't even dare to mess with 
those options because it seems to me very radical that my output pdf is 
the same with the module uncommented in my code.


Of course, mtxrun --find-file lua-widow-control.lua yields what you 
would expect:


/opt/luametatex/texmf-modules/tex/luatex/lua-widow-control/lua-widow-control.lua

Thanks again for your work and yours observations.

Edu.

El 25/4/22 a las 22:00, Max Chernoff escribió:

(Please keep me CC'd as I'm not subscribed to the list)

Hi, I'm the lua-widow-control author.

> lua error > lua error on line 74 in file
> 
/opt/luametatex/texmf-modules/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl

>
> The odd thing is that line 75 of the t-lua-widow-control file is empty.

The \setuplwc command ends on line 74, which then triggers 
\everysetuplwc which then calls \ctxlua{lwc.enable_callbacks()}. This 
fails since lwc is undefined because the Lua file isn't loaded because 
ConTeXt can't seem to find the file.


In Plain LuaTeX and LuaLaTeX, a missing Lua file is a fatal error:

    $ luatex "\nonstopmode\directlua{require 'not-a-real-file'}\bye"

    This is LuaTeX, Version 1.13.2 (TeX Live 2021/W32TeX)
 restricted system commands enabled.

    [\directlua]:1: module 'not-a-real-file' not found:
    no field package.preload['not-a-real-file']
    [kpse lua searcher] file not found: 'not-a-real-file'
    stack traceback:
    [C]: in function 'require'
    [\directlua]:1: in main chunk.
    <*> \nonstopmode\directlua{require 'not-a-real-file'}
  \bye
    (see the transcript file for additional information)
    warning  (pdf backend): no pages of output.
    Transcript written on texput.log.

so I'm a little surprised that ConTeXt just issues a warning here when 
it can't find the file:


   resolvers > lua > unknown file 'lua-widow-control.lua'

> when it says it doesn't know the lua-widow-control.lua file. I don't 
see

> any mention of this file within the t-lua-widow-control module.

lua-widow-control.lua is loaded at line 63 of the .mkxl:
    \ctxloadluafile{lua-widow-control}

> Could it be that this module is not yet mature for lmtx

Lua-widow-control is certainly more stable with Plain/LaTeX, but it 
usually runs fine with LMTX. The entire lwc manual is written in 
ConTeXt/LMTX so I (usually) notice pretty quickly when things break.


The only real "issue" with LMTX is that the engine changes pretty 
quickly, so lwc may sometimes be broken for a few days between an 
engine update and whenever I push out a fix. This doesn't happen with 
Plain/LaTeX since the LuaTeX engine is mostly frozen.


Interestingly, the MkXL version of lwc actually predates the MkIV 
version, although only by a few months.


> I have \usemodule[lua-widow-control] in my tex document, and
> I haven't forgotten to do the prescribed mtxrun --generate after
> including the module in my third-party folder of my luametatex
> installation on Arch.

Hmm, that's odd then. I'm not entirely sure why this is happening, so 
I'm going to take a random guess:


Maybe you installed lwc using a zipfile from either GitHub or the 
ConTeXt Garden modules site, then you copied the files into your 
texmf-modules/ folder, *but* you only copied the "tex/context/" folder 
and not all of the folders in the "tex" folder. The 
"lua-widow-control.lua" file is in the "tex/luatex/" folder, so if you 
didn't also copy that across you're going to have problems.


Again, just a random guess.  If that doesn't work, you could maybe try 
running

 

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-25 Thread Max Chernoff via ntg-context

(Please keep me CC'd as I'm not subscribed to the list)

Hi, I'm the lua-widow-control author.

> lua error > lua error on line 74 in file
> 
/opt/luametatex/texmf-modules/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl

>
> The odd thing is that line 75 of the t-lua-widow-control file is empty.

The \setuplwc command ends on line 74, which then triggers 
\everysetuplwc which then calls \ctxlua{lwc.enable_callbacks()}. This 
fails since lwc is undefined because the Lua file isn't loaded because 
ConTeXt can't seem to find the file.


In Plain LuaTeX and LuaLaTeX, a missing Lua file is a fatal error:

$ luatex "\nonstopmode\directlua{require 'not-a-real-file'}\bye"

This is LuaTeX, Version 1.13.2 (TeX Live 2021/W32TeX)
 restricted system commands enabled.

[\directlua]:1: module 'not-a-real-file' not found:
no field package.preload['not-a-real-file']
[kpse lua searcher] file not found: 'not-a-real-file'
stack traceback:
[C]: in function 'require'
[\directlua]:1: in main chunk.
<*> \nonstopmode\directlua{require 'not-a-real-file'}
  \bye
(see the transcript file for additional information)
warning  (pdf backend): no pages of output.
Transcript written on texput.log.

so I'm a little surprised that ConTeXt just issues a warning here when 
it can't find the file:


   resolvers > lua > unknown file 'lua-widow-control.lua'

> when it says it doesn't know the lua-widow-control.lua file. I don't see
> any mention of this file within the t-lua-widow-control module.

lua-widow-control.lua is loaded at line 63 of the .mkxl:
\ctxloadluafile{lua-widow-control}

> Could it be that this module is not yet mature for lmtx

Lua-widow-control is certainly more stable with Plain/LaTeX, but it 
usually runs fine with LMTX. The entire lwc manual is written in 
ConTeXt/LMTX so I (usually) notice pretty quickly when things break.


The only real "issue" with LMTX is that the engine changes pretty 
quickly, so lwc may sometimes be broken for a few days between an engine 
update and whenever I push out a fix. This doesn't happen with 
Plain/LaTeX since the LuaTeX engine is mostly frozen.


Interestingly, the MkXL version of lwc actually predates the MkIV 
version, although only by a few months.


> I have \usemodule[lua-widow-control] in my tex document, and
> I haven't forgotten to do the prescribed mtxrun --generate after
> including the module in my third-party folder of my luametatex
> installation on Arch.

Hmm, that's odd then. I'm not entirely sure why this is happening, so 
I'm going to take a random guess:


Maybe you installed lwc using a zipfile from either GitHub or the 
ConTeXt Garden modules site, then you copied the files into your 
texmf-modules/ folder, *but* you only copied the "tex/context/" folder 
and not all of the folders in the "tex" folder. The 
"lua-widow-control.lua" file is in the "tex/luatex/" folder, so if you 
didn't also copy that across you're going to have problems.


Again, just a random guess.  If that doesn't work, you could maybe try 
running

context --make
but I doubt that that would fix anything here. You could also try 
deleting the filename cache files at:

{CONTEXT}/texmf-cache/luametatex-cache/context/*/trees/*.lu?
then rerunning
mtxrun --generate
I've never deleted those files before, but it's in a folder called 
"cache" so it's _probably_ safe to delete (make a backup just in case 
though).


If none of that works, then the issue could be something else on your 
end, or I could have screwed something up in lwc. In that case, try running

find /opt/luametatex/texmf-modules/ -path '*widow*' -print
and
mtxrun --find-file lua-widow-control.lua
and reply with the output.

Oh, and one more note. ConTeXt version "2022-04-11 19:20" renamed some 
of the engine Lua functions, so make sure to update to lwc v2.0.6 (if 
you're using a recent ConTeXt version). Otherwise after you fix the 
"unknown file" error, you would get an "attempt to call a nil value" 
error which isn't any better.


Let me know if you have any other issues.

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

2022-04-16 Thread Pablo Rodriguez via ntg-context
On 4/15/22 20:24, Hans Hagen via ntg-context wrote:
> Hi,
>
> I uploaded a new lmtx. Apart from a experimental intersection feature in
> the mp library (and metafun, more will be revealed when MS an I are okay
> with it) there is not that much news.

Many thanks for the new upload, Hans.

I’m afraid I get compilation error with your sample:

 lua error:
  callback error: .../base/mkxl/typo-ada.lmt:78:
attempt to call a nil value (upvalue 'traverseleader')
stack traceback:
  .../base/mkxl/typo-ada.lmt:78: in upvalue 'nodes_adaptive_handle'
[string "local tonut  = nodes.tonut..."]:10: in function
<[string "local tonut  = nodes.tonut..."]:7>
(...tail calls...)
  .../base/mkxl/typo-bld.lmt:208: in function
<.../base/mkxl/typo-bld.lmt:204>

I got the same error message with a brand new installation.

Just in case it might help,

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

2022-04-01 Thread Rik Kabel via ntg-context


On 2022-04-01 12:20, Hans Hagen via ntg-context wrote:

Hi,

Normally when we're in the 2022 TeXlive code freeze period, there is a 
snapshot release but because there hasn't been that many changes, 
maybe a few patches, in MKIV there is no real snapshot this year. But 
for the sake of consistency we can consider today's version that 
snapshot.


It basically means that MKIV has been frozen and is even more frozen 
now. All new stuff goes in MKXL (aka LMTX) and I suppose that next 
year we let that end up in TeXlive alongside frozen MKII and MKIV. Of 
course bugs will be fixed as usual.


So, today is the day we kind of formally freeze MKIV.

Hans


With the freeze of MKIV, how will modules be managed? LMTX still ships 
without. A while back 
(https://www.mail-archive.com/ntg-context@ntg.nl/msg100179.html) it was 
suggest that this would, at some point, change.


--
Rik

___
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

2022-04-01 Thread Hans Hagen via ntg-context

Hi,

Normally when we're in the 2022 TeXlive code freeze period, there is a 
snapshot release but because there hasn't been that many changes, maybe 
a few patches, in MKIV there is no real snapshot this year. But for the 
sake of consistency we can consider today's version that snapshot.


It basically means that MKIV has been frozen and is even more frozen 
now. All new stuff goes in MKXL (aka LMTX) and I suppose that next year 
we let that end up in TeXlive alongside frozen MKII and MKIV. Of course 
bugs will be fixed as usual.


So, today is the day we kind of formally freeze MKIV.

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] mathcal generates error in ConTeXt

2022-03-26 Thread A A via ntg-context
Hi Jan,

Thanks, I was starting to think pandoc is not yet mature enough to handle
these conversions, but it looks like that might not be the case.

\mathcal works now, but I actually ran into another issue in my real
document. I have the following defined in my LaTeX:

*$C = ``\textrm{dad}``$*

It looks like context has a hard time compiling the above, even with
\starttext and \stoptext commands generated with the pandoc -s flag. Here's
the error:

*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: 1*

How can I include quotes in math expressions the same way I do in LaTeX?

Regards,

Amine




On Sat, 26 Mar 2022 at 08:32, Jan-Erik Hägglöf 
wrote:

> HI!
>
> It generates no \starttext \stoptext tag
>
> It works with this though
>
> \starttext
>
> $\mathcal{A}$
>
> \stoptext
>
> But with the -s option you get a standalone version of the document
>
> *pandoc -s -f latex -t context -o test_context.tex test.tex*
>
> */Janne*
>
> 26 mars 2022 kl. 06:39 skrev A A via ntg-context :
>
> Dear All,
>
> I am using pandoc to covert a file called test.tex from LaTeX to ConTeXt.
> Here are the contents of test.tex:
>
> *\documentclass{article}*
>
> *\begin{document}*
>
> *\mathcal{A}*
>
> *\end{document}*
>
> The file compiles OK with the following command and I see a resulting pdf:
>
>
> *latexmk -pdflatex test.tex*
>
> Then I try to convert with pandoc:
>
> *pandoc -f latex -t context -o test_context.tex test.tex*
>
> Pandoc appears to successfully generate a file test_context.tex containing
> the following:
>
> *\mathcal{A}*
>
> Then I try to compile the test_context.tex file:
>
> *context test_context.tex*
>
> Which unfortunately results in an error:
>
>
> *resolvers   | formats | executing runner 'run luametatex format':
> C:/context/tex/texmf-win64/bin/luametatex --jobname="./test_context.tex"
> --fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
> --lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
>  --c:currentrun=1 --c:fulljobname="./test_context.tex"
> --c:input="./test_context.tex" --c:kindofrun=1 --c:maxnofruns=9
> --c:texmfbinpath="C:/context/tex/texmf-win64/bin"*
>
>
> *system  > callbacks > not registering frozen 'local_box_filter'*
> *system  >*
> *system  > ConTeXt  ver: 2021.11.02 10:03 LMTX  fmt: 2021.11.4
>  int: english/english*
> *system  >*
> *system  > 'cont-new.mkxl' loaded*
> *open source > level 1, order 1, name
> 'C:/context/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
> 'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'*
> *system  > files > jobname './test_context', input
> './test_context.tex', result './test_context'*
> *fonts   > latin modern fonts are not preloaded*
> *languages   > language 'en' is active*
> *open source > level 1, order 2, name './test_context.tex'*
> *tex error   > tex error on line 1 in file ./test_context.tex:
> \textfont0 is undefined in (text) char, font id 0, character 63)*
>
>
> **
> *$\mathcal{A}$*
>
>
> *1 >>  $\mathcal{A}$*
> *2*
> *Somewhere in the math formula just ended, you used the stated character
> from an*
> *undefined font family. For example, plain TeX doesn't allow \it or \sl in*
> *subscripts. Proceed, and I'll try to forget that I needed that character.*
> *mtx-context | fatal error: return code: 1*
>
>
> Why does ConTeXt not accept mathcal? Why does pandoc not account for this?
> How can I remedy this with a reasonable amount of effort?
>
> Regards,
>
> Amine
>
>
>
> ___
> 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] mathcal generates error in ConTeXt

2022-03-26 Thread Jan-Erik Hägglöf via ntg-context
HI!

It generates no \starttext \stoptext tag

It works with this though

\starttext

$\mathcal{A}$

\stoptext

But with the -s option you get a standalone version of the document

pandoc -s -f latex -t context -o test_context.tex test.tex

/Janne

> 26 mars 2022 kl. 06:39 skrev A A via ntg-context :
> 
> Dear All,
> 
> I am using pandoc to covert a file called test.tex from LaTeX to ConTeXt.  
> Here are the contents of test.tex:
> 
> \documentclass{article}
> \begin{document}
> \mathcal{A}
> \end{document}
> 
> The file compiles OK with the following command and I see a resulting pdf:
> 
> latexmk -pdflatex test.tex
> 
> Then I try to convert with pandoc:
> 
> pandoc -f latex -t context -o test_context.tex test.tex
> 
> Pandoc appears to successfully generate a file test_context.tex containing 
> the following:
> 
> \mathcal{A}
> 
> Then I try to compile the test_context.tex file:
> 
> context test_context.tex
> 
> Which unfortunately results in an error:
> 
> resolvers   | formats | executing runner 'run luametatex format': 
> C:/context/tex/texmf-win64/bin/luametatex --jobname="./test_context.tex" 
> --fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
>  
> --lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
>   --c:currentrun=1 --c:fulljobname="./test_context.tex" 
> --c:input="./test_context.tex" --c:kindofrun=1 --c:maxnofruns=9 
> --c:texmfbinpath="C:/context/tex/texmf-win64/bin"
> 
> system  > callbacks > not registering frozen 'local_box_filter'
> system  >
> system  > ConTeXt  ver: 2021.11.02 10:03 LMTX  fmt: 2021.11.4  int: 
> english/english
> system  >
> system  > 'cont-new.mkxl' loaded
> open source > level 1, order 1, name 
> 'C:/context/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 
> 'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
> system  > files > jobname './test_context', input 
> './test_context.tex', result './test_context'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> open source > level 1, order 2, name './test_context.tex'
> tex error   > tex error on line 1 in file ./test_context.tex: \textfont0 
> is undefined in (text) char, font id 0, character 63)
> 
> 
> $\mathcal{A}$
> 
> 1 >>  $\mathcal{A}$
> 2
> Somewhere in the math formula just ended, you used the stated character from 
> an
> undefined font family. For example, plain TeX doesn't allow \it or \sl in
> subscripts. Proceed, and I'll try to forget that I needed that character.
> mtx-context | fatal error: return code: 1
> 
> Why does ConTeXt not accept mathcal? Why does pandoc not account for this? 
> How can I remedy this with a reasonable amount of effort?
> 
> Regards,
> 
> Amine
> 
> ___
> 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] Fwd: mathcal generates error in ConTeXt

2022-03-26 Thread A A via ntg-context
And, by consequence test_context.tex looks like this

*$\mathcal{A}$*


-- Forwarded message -
From: A A 
Date: Sat, 26 Mar 2022 at 08:07
Subject: Fwd: mathcal generates error in ConTeXt
To: 


Sorry, there was a typo in my question below. test.tex looks like this:

*\documentclass{article}*

*\begin{document}*

*$\mathcal{A}$*

*\end{document}*


-- Forwarded message -
From: A A 
Date: Sat, 26 Mar 2022 at 06:39
Subject: mathcal generates error in ConTeXt
To: 


Dear All,

I am using pandoc to covert a file called test.tex from LaTeX to ConTeXt.
Here are the contents of test.tex:

*\documentclass{article}*

*\begin{document}*

*\mathcal{A}*

*\end{document}*

The file compiles OK with the following command and I see a resulting pdf:


*latexmk -pdflatex test.tex*

Then I try to convert with pandoc:

*pandoc -f latex -t context -o test_context.tex test.tex*

Pandoc appears to successfully generate a file test_context.tex containing
the following:

*\mathcal{A}*

Then I try to compile the test_context.tex file:

*context test_context.tex*

Which unfortunately results in an error:


*resolvers   | formats | executing runner 'run luametatex format':
C:/context/tex/texmf-win64/bin/luametatex --jobname="./test_context.tex"
--fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./test_context.tex"
--c:input="./test_context.tex" --c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="C:/context/tex/texmf-win64/bin"*


*system  > callbacks > not registering frozen 'local_box_filter'*
*system  >*
*system  > ConTeXt  ver: 2021.11.02 10:03 LMTX  fmt: 2021.11.4
 int: english/english*
*system  >*
*system  > 'cont-new.mkxl' loaded*
*open source > level 1, order 1, name
'C:/context/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
'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'*
*system  > files > jobname './test_context', input
'./test_context.tex', result './test_context'*
*fonts   > latin modern fonts are not preloaded*
*languages   > language 'en' is active*
*open source > level 1, order 2, name './test_context.tex'*
*tex error   > tex error on line 1 in file ./test_context.tex:
\textfont0 is undefined in (text) char, font id 0, character 63)*


**
*$\mathcal{A}$*


*1 >>  $\mathcal{A}$*
*2*
*Somewhere in the math formula just ended, you used the stated character
from an*
*undefined font family. For example, plain TeX doesn't allow \it or \sl in*
*subscripts. Proceed, and I'll try to forget that I needed that character.*
*mtx-context | fatal error: return code: 1*


Why does ConTeXt not accept mathcal? Why does pandoc not account for this?
How can I remedy this with a reasonable amount of effort?

Regards,

Amine
___
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] Fwd: mathcal generates error in ConTeXt

2022-03-26 Thread A A via ntg-context
Sorry, there was a typo in my question below. test.tex looks like this:

*\documentclass{article}*

*\begin{document}*

*$\mathcal{A}$*

*\end{document}*


-- Forwarded message -
From: A A 
Date: Sat, 26 Mar 2022 at 06:39
Subject: mathcal generates error in ConTeXt
To: 


Dear All,

I am using pandoc to covert a file called test.tex from LaTeX to ConTeXt.
Here are the contents of test.tex:

*\documentclass{article}*

*\begin{document}*

*\mathcal{A}*

*\end{document}*

The file compiles OK with the following command and I see a resulting pdf:


*latexmk -pdflatex test.tex*

Then I try to convert with pandoc:

*pandoc -f latex -t context -o test_context.tex test.tex*

Pandoc appears to successfully generate a file test_context.tex containing
the following:

*\mathcal{A}*

Then I try to compile the test_context.tex file:

*context test_context.tex*

Which unfortunately results in an error:


*resolvers   | formats | executing runner 'run luametatex format':
C:/context/tex/texmf-win64/bin/luametatex --jobname="./test_context.tex"
--fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./test_context.tex"
--c:input="./test_context.tex" --c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="C:/context/tex/texmf-win64/bin"*


*system  > callbacks > not registering frozen 'local_box_filter'*
*system  >*
*system  > ConTeXt  ver: 2021.11.02 10:03 LMTX  fmt: 2021.11.4
 int: english/english*
*system  >*
*system  > 'cont-new.mkxl' loaded*
*open source > level 1, order 1, name
'C:/context/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
'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'*
*system  > files > jobname './test_context', input
'./test_context.tex', result './test_context'*
*fonts   > latin modern fonts are not preloaded*
*languages   > language 'en' is active*
*open source > level 1, order 2, name './test_context.tex'*
*tex error   > tex error on line 1 in file ./test_context.tex:
\textfont0 is undefined in (text) char, font id 0, character 63)*


**
*$\mathcal{A}$*


*1 >>  $\mathcal{A}$*
*2*
*Somewhere in the math formula just ended, you used the stated character
from an*
*undefined font family. For example, plain TeX doesn't allow \it or \sl in*
*subscripts. Proceed, and I'll try to forget that I needed that character.*
*mtx-context | fatal error: return code: 1*


Why does ConTeXt not accept mathcal? Why does pandoc not account for this?
How can I remedy this with a reasonable amount of effort?

Regards,

Amine
___
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] mathcal generates error in ConTeXt

2022-03-25 Thread A A via ntg-context
Dear All,

I am using pandoc to covert a file called test.tex from LaTeX to ConTeXt.
Here are the contents of test.tex:

*\documentclass{article}*

*\begin{document}*

*\mathcal{A}*

*\end{document}*

The file compiles OK with the following command and I see a resulting pdf:


*latexmk -pdflatex test.tex*

Then I try to convert with pandoc:

*pandoc -f latex -t context -o test_context.tex test.tex*

Pandoc appears to successfully generate a file test_context.tex containing
the following:

*\mathcal{A}*

Then I try to compile the test_context.tex file:

*context test_context.tex*

Which unfortunately results in an error:


*resolvers   | formats | executing runner 'run luametatex format':
C:/context/tex/texmf-win64/bin/luametatex --jobname="./test_context.tex"
--fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./test_context.tex"
--c:input="./test_context.tex" --c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="C:/context/tex/texmf-win64/bin"*


*system  > callbacks > not registering frozen 'local_box_filter'*
*system  >*
*system  > ConTeXt  ver: 2021.11.02 10:03 LMTX  fmt: 2021.11.4
 int: english/english*
*system  >*
*system  > 'cont-new.mkxl' loaded*
*open source > level 1, order 1, name
'C:/context/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
'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'*
*system  > files > jobname './test_context', input
'./test_context.tex', result './test_context'*
*fonts   > latin modern fonts are not preloaded*
*languages   > language 'en' is active*
*open source > level 1, order 2, name './test_context.tex'*
*tex error   > tex error on line 1 in file ./test_context.tex:
\textfont0 is undefined in (text) char, font id 0, character 63)*


**
*$\mathcal{A}$*


*1 >>  $\mathcal{A}$*
*2*
*Somewhere in the math formula just ended, you used the stated character
from an*
*undefined font family. For example, plain TeX doesn't allow \it or \sl in*
*subscripts. Proceed, and I'll try to forget that I needed that character.*
*mtx-context | fatal error: return code: 1*


Why does ConTeXt not accept mathcal? Why does pandoc not account for this?
How can I remedy this with a reasonable amount of effort?

Regards,

Amine
___
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 module on LMTX

2022-03-25 Thread Lutz Haseloff via ntg-context
Hi all,

with the new upload, for me on Win64 the zint module does not work yet.

>cmd /c context test.tex && start sumatrapdf test.pdf

test.log:

resolvers   | formats | executing runner 'run luametatex format': 
C:/context/tex/texmf-win64/bin/luametatex --jobname="./test.tex" 
--fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="C:/context/tex/texmf-win64/bin"
system  >
system  > ConTeXt  ver: 2022.03.24 21:18 LMTX  fmt: 2022.3.25  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'C:/context/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 
'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './test', input './test.tex', result './test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.tex'
modules > using user prefixed file 'libs-imp-zint'
modules > 'zint' is loaded
open source > level 2, order 3, name 
'C:/context/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
resolvers   > lua > loading file 
'C:/context/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.lmt' succeeded
close source> level 2, order 3, name 
'C:/context/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
error (lmt library): unable to load 
'C:/context/tex/texmf-win64/bin/lib/luametatex/zint/libzint.dll', quitting

mtx-context | fatal error: return code: 1
>Exit code: 1


Greetings Lutz

Am 17. März 2022 16:26:21 MEZ schrieb Pablo Rodriguez via ntg-context 
:
>On 3/16/22 22:32, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> On Windows, I need to check the issue further.
>
>Using latest binary from SF (which is Win32, btw), I get the following
>error message:
>
>  error (lmt library): unable to load 'D:/utilidades/context/tex/
>texmf-win64/bin/lib/luametatex/zint/libzint.dll', quitting
>
>  mtx-context | fatal error: return code: 1
>
>So, latest version in Windows breaks compilation on my computer.
>
>What am I doing wrong?
>
>Many thanks for your help,
>
>Pablo
>___
>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] help with facing page image

2022-03-11 Thread Wolfgang Schuster via ntg-context

jbf schrieb am 09.03.2022 um 23:02:
Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
facing page challenge. The exploration has included a look at 
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) 
where I see immediately that the approach is experimental and where it 
says also that 'probably more alternatives will be added'. I wonder if 
that last phrase also includes the ability to manipulate the image(s) 
either generally or in individual cases?


Keep your expectations low. I wrote the code (with some changes from 
Hans) to include full page images in novels and the code hasn't changed 
much since 2013.


So, for example., say I need (and in fact I do!) to change some aspect 
of individual images, e.g. I might want to scale=500, or fiddle with 
width/height of a particular image. At the moment I cannot see a way 
of doing this for each image. I wondered if the commented out setups 
in the response to this question might be a clue, but so far haven't 
been able to get that to have any effect.


You have to use a custom alternative (see below) to place the image on 
the page because the default alternative scales the image to fit on the 
available space. The best solution to change orientation, size etc. of 
the included images is to use the \useexternalfigure command and make 
all changes in the style file.



\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow] [orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

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


Re: [NTG-context] help with facing page image

2022-03-10 Thread jbf via ntg-context
Using your example, Sreeram, but adapting it to my own set of images 
(which are not cows or spiders!) I can now see clearly how to make use 
of all the essential information that had initially been provided by 
Wolfgang, and also the important hint, which I had clumsily and 
unsuccessfully been trying anyway before he offered it, from Aditya, 
about passing key value parameters along the lines of Wolfgang's 'name 
='. It simply did not occur to me to do this using 'factor= '. But there 
was much more about the example I would not have worked out by myself as 
well!


Thank you (all) for your patience.

Julian

On 10/3/22 17:51, śrīrāma wrote:

On Thursday, March 10, 2022 3:32 AM jbf via ntg-context wrote:

Am endeavouring to explore Wolfgang's very 'elegant' solution to this
facing page challenge. The exploration has included a look at
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where
I see immediately that the approach is experimental and where it says
also that 'probably more alternatives will be added'. I wonder if that
last phrase also includes the ability to manipulate the image(s) either
generally or in individual cases?


The following example is based on Wolfgang's solution using injections: I have 
modified the setup slightly to hook into \externalfigure's {width, height, 
orientation} using user-variables. With this I think you can place any kind of 
image (portrait or landscape) correctly by using width, height, and rotation.

I picked up some images of cows, 'spider', 'hacker' and 'mill' and have them 
renamed as {chap-cover-1, ... chap-cover-6} for a total of 6 chapter images.

%%% start example
\definepageinjectionalternative
[chapter:image]
[renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
\clip
   [width=\framedwidth,height=\framedheight]
   {\centerbox{%
  \externalfigure
 [\dummyparameter{name}]
 [%factor=,
  width=\structureuservariable{width},
  height=\structureuservariable{height},
  orientation=\structureuservariable{rotation}]%
   }}
\stopsetups

\definepageinjection
[chapter:start]
[empty]
[page=left]

\definepageinjection
[chapter:insert]
[previouspage]
[alternative=chapter:image,
   pagestate=stop]

\setuphead
[chapter]
[beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}]

\setuphead
[chapter]
[beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name={chap-cover-\namedheadnumber{chapter}}]}]


\setuppagenumbering
[alternative=doublesided]

\setupexternalfigures
[location=default]

\starttext
   \startchapter [title={Mill}] [rotation=90,width=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
   \dorecurse{11}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=90,width=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=-45,width=\paperwidth]
   \dorecurse{11}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [height=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter
\stoptext
%%% end example

Sreeram



___
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] help with facing page image

2022-03-09 Thread śrīrāma via ntg-context
On Thursday, March 10, 2022 3:32 AM jbf via ntg-context wrote:
> Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
> facing page challenge. The exploration has included a look at 
> base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where 
> I see immediately that the approach is experimental and where it says 
> also that 'probably more alternatives will be added'. I wonder if that 
> last phrase also includes the ability to manipulate the image(s) either 
> generally or in individual cases?
> 

The following example is based on Wolfgang's solution using injections: I have 
modified the setup slightly to hook into \externalfigure's {width, height, 
orientation} using user-variables. With this I think you can place any kind of 
image (portrait or landscape) correctly by using width, height, and rotation.

I picked up some images of cows, 'spider', 'hacker' and 'mill' and have them 
renamed as {chap-cover-1, ... chap-cover-6} for a total of 6 chapter images.

%%% start example
   \definepageinjectionalternative
   [chapter:image]
   [renderingsetup=pageinjection:chapter:image]

   \startsetups [pageinjection:chapter:image]
   \clip
  [width=\framedwidth,height=\framedheight]
  {\centerbox{%
 \externalfigure
[\dummyparameter{name}]
[%factor=,
 width=\structureuservariable{width},
 height=\structureuservariable{height},
 orientation=\structureuservariable{rotation}]%
  }}
   \stopsetups

   \definepageinjection
   [chapter:start]
   [empty]
   [page=left]

   \definepageinjection
   [chapter:insert]
   [previouspage]
   [alternative=chapter:image,
  pagestate=stop]

   \setuphead
   [chapter]
   [beforesection={\pageinjection[chapter:start]},
  
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}]

   \setuphead
   [chapter]
   [beforesection={\pageinjection[chapter:start]},
  
insidesection={\pageinjection[chapter:insert][name={chap-cover-\namedheadnumber{chapter}}]}]


   \setuppagenumbering
   [alternative=doublesided]

   \setupexternalfigures
   [location=default]

   \starttext
  \startchapter [title={Mill}] [rotation=90,width=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
  \dorecurse{11}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=90,width=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=-45,width=\paperwidth]
  \dorecurse{11}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [height=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter
   \stoptext
%%% end example

Sreeram


___
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] help with facing page image

2022-03-09 Thread jbf via ntg-context

If you mean

\setuphead

[chapter]

[beforesection={\pageinjection[chapter:start]},

insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}][name=\structureuservariable{scale}]}]

\starttext

\startchapter[title={My title}] [image=Chapter1.jpg][scale=500]

\setups[pageinjection:chapter:image]

\dorecurse{7}{\samplefile{lorem}}

\stopchapter

I tried that (and a few other combinations of the kind) but to no effect.

Julian

On 10/3/22 16:35, Aditya Mahajan via ntg-context wrote:

On Thu, 10 Mar 2022, jbf via ntg-context wrote:


Am endeavouring to explore Wolfgang's very 'elegant' solution to this
facing page challenge. The exploration has included a look at
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where
I see immediately that the approach is experimental and where it says
also that 'probably more alternatives will be added'. I wonder if that
last phrase also includes the ability to manipulate the image(s) either
generally or in individual cases?

So, for example., say I need (and in fact I do!) to change some aspect
of individual images, e.g. I might want to scale=500, or fiddle with
width/height of a particular image. At the moment I cannot see a way of
doing this for each image. I wondered if the commented out setups in the
response to this question might be a clue, but so far haven't been able
to get that to have any effect.

Couldn't you just pass scale as a key-value parameter, similar to how `name` is 
passed in Wolfgang's solution?

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
__
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] help with facing page image

2022-03-09 Thread Aditya Mahajan via ntg-context
On Thu, 10 Mar 2022, jbf via ntg-context wrote:

> Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
> facing page challenge. The exploration has included a look at 
> base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where 
> I see immediately that the approach is experimental and where it says 
> also that 'probably more alternatives will be added'. I wonder if that 
> last phrase also includes the ability to manipulate the image(s) either 
> generally or in individual cases?
> 
> So, for example., say I need (and in fact I do!) to change some aspect 
> of individual images, e.g. I might want to scale=500, or fiddle with 
> width/height of a particular image. At the moment I cannot see a way of 
> doing this for each image. I wondered if the commented out setups in the 
> response to this question might be a clue, but so far haven't been able 
> to get that to have any effect.

Couldn't you just pass scale as a key-value parameter, similar to how `name` is 
passed in Wolfgang's solution?

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] help with facing page image

2022-03-09 Thread jbf via ntg-context
Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
facing page challenge. The exploration has included a look at 
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where 
I see immediately that the approach is experimental and where it says 
also that 'probably more alternatives will be added'. I wonder if that 
last phrase also includes the ability to manipulate the image(s) either 
generally or in individual cases?


So, for example., say I need (and in fact I do!) to change some aspect 
of individual images, e.g. I might want to scale=500, or fiddle with 
width/height of a particular image. At the moment I cannot see a way of 
doing this for each image. I wondered if the commented out setups in the 
response to this question might be a clue, but so far haven't been able 
to get that to have any effect.


Julian

On 8/3/22 05:35, Wolfgang Schuster wrote:

jbf via ntg-context schrieb am 07.03.2022 um 09:27:
Appreciate your assistance. I'll do my best with what you offer here. 
Of course, I've always said these images are at the beginning, not 
"the end of their respective chapters" and I've already indicated how 
the images are named, simply as Chapter1.jpg  and so on, so I'll need 
to work around these differences in your example. But with trial and 
error, let's hope I get there!


The example below uses a different mechanism to add images at the 
start of a chapter. In the example you have to pass the name of image 
as userdata argument of \startchapter but in the commented \setuphead 
setting you can see how this can be automated.


 begin example
% \definepageinjectionalternative
%   [chapter:image]
%   [renderingsetup=pageinjection:chapter:image]
%
% \startsetups [pageinjection:chapter:image]
%   \clip
% [width=\framedwidth,height=\framedheight]
% {\centerbox{\externalfigure[\dummyparameter{name}][factor=min]}}
% \stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [%alternative=chapter:image,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}] 



% \setuphead
%   [chapter]
%   [beforesection={\pageinjection[chapter:start]},
% 
insidesection={\pageinjection[chapter:insert][name={chapter\namedheadnumber{chapter}}]}]


\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\starttext

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext
 end example

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
___


Re: [NTG-context] What’s wrong with installation?

2022-03-08 Thread Keith McKay via ntg-context

Hi,

I had the same issue on an old laptop running Ubuntu 21.04, but after 
the server reboot the update was successful.


Running context -version now gives:

mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/myPath/context-linux-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv 


mtx-context | current version: 2022.01.21 20:13
mtx-context | main context file: 
/myPath/context-linux-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl 


mtx-context | current version: 2022.01.21 20:13

Best Wishes

Keith McKay



On 08/03/2022 13:03, Hans Hagen via ntg-context wrote:

On 3/8/2022 12:55 PM, Stephen Gaito via ntg-context wrote:

Hans,

I am having the same problem on an XUbuntu 21.10 :

hm, maybe the server has some issue ... i rebooted the machine

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.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] Problems with itemize with several columns

2022-02-23 Thread Luis Montgomery via ntg-context
Try joinedup option in \startitemize.

Space problem?

L.  Montgomery

El mié., 23 de febrero de 2022 3:09, Xavier B. via ntg-context <
ntg-context@ntg.nl> escribió:

> Hi,
>
> I try to solve this, but I could not. Can you please help me.
> I make a math problem sheet. In "Exercici 1.2", I put a itemize with three
> columns, but the 'c' exercise jumps to second column. I want that a, b, c
> remains in the first column, d, e, f in the second and g, h, i in the third.
>
> I tried \column command but it's worse.
>
> I attached the source and generated pdf.
>
> My version of context is:
>  context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file:
> /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.03.05 19:11
> mtx-context | main context file:
> /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.03.05 19:11
>
>
> Thanks in advance,
>
> Xavier
>
> PS: Please CCme
>
>
> ___
> 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] Problems with itemize with several columns

2022-02-23 Thread Xavier B. via ntg-context
In my previous post 
[https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know 
the reason, but the attached code des not display very well in mailing list. I 
put it here:

\defineenumeration
  [exercici]
  [alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, 
stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, 
headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, 
left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, 
prefixsegments=section, way=section]

\starttext

\section{Operacions amb fraccions}

\subject{Preguntes}

\startexercici[exercici:operacions-amb-fraccions-1]{suma i resta} Opereu:
\startitemize[a, columns, three]
\item \startformula \frac{2}{7} + \frac{6}{7} - \frac{1}{7} \stopformula
\item \startformula \frac{5}{8} + \frac{9}{8} \stopformula
\item \startformula \frac{1}{4} + 5 - \frac{1}{4} \stopformula
\item \startformula \frac{3}{5} - \frac{2}{5} + \frac{11}{5} \stopformula
\item \startformula \frac{2}{3} + \frac{1}{4} \stopformula
\item \startformula 5 + \frac{4}{5} \stopformula
\item \startformula \frac{2}{3} + \frac{5}{8} - \frac{1}{9} \stopformula
\item \startformula 10 - \frac{1}{6} + \frac{6}{8} \stopformula
\item \startformula \frac{3}{10} + \frac{7}{12} \stopformula
\stopitemize
\stopexercici

\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} 
Opereu:
\startitemize[a, columns, three]
\item \startformula 3 \cdot \frac{5}{3} \stopformula
\item \startformula \frac{3}{4} \cdot \frac{2}{5} \stopformula
\item \startformula \frac{1}{3} \cdot \frac{3}{4} \div \frac{1}{5} \stopformula
%\column
\item \startformula 5 \div \frac{7}{10} \cdot 7 \div \frac{2}{5} \stopformula
\item \startformula \frac{1}{2} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{3}{2} \div \frac{2}{3} \div \frac{5}{4} \stopformula
%\column
\item \startformula \frac{2}{3} \colon \frac{2}{5} \stopformula
\item \startformula \frac{3}{4} \colon \frac{1}{2} \cdot 6 \stopformula
\item \startformula \frac{2}{3} \colon \frac{3}{4} \cdot \frac{1}{2} 
\stopformula
\stopitemize
\stopexercici

\startexercici[exercici:operacions-amb-fraccions-3]{operacions combinades}
\startitemize[a, columns, three]
\item \startformula \frac{3}{4} + \frac{2}{5} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{2}{5} \div \frac{3}{5} - \frac{1}{4} \stopformula
\item \startformula \left( 2 + \frac{3}{5} \right) \div \frac{4}{3} \stopformula
\item \startformula \frac{2}{3} - \frac{5}{6}\cdot 8 \stopformula
\item \startformula 4 + \frac{3}{5} - \left(2 - \frac{1}{2}\right) \stopformula
\item \startformula 4 \cdot \left(\frac{5}{6} - \frac{1}{4} + 
\frac{4}{9}\right) \stopformula
\item \startformula \frac{5}{6} - \left(\frac{1}{5} + \frac{1}{3}\right) 
\stopformula
\item \startformula \frac{5}{6} \div \left( \frac{2}{5} - \frac{1}{10}\right) 
\stopformula
\item \startformula 4 \cdot \frac{2}{3} \cdot \left(\frac{2}{4} \div 
\frac{8}{10}\right) \stopformula
\item \startformula \frac{3}{4} + \frac{1}{2} \cdot \frac{4}{10} \stopformula
\item \startformula \frac{10}{12} - \left(\frac{1}{10} + \frac{3}{8}\right) 
\stopformula
\item \startformula \left(\frac{1}{2} + 2\right) \cdot \left(2 - 
\frac{1}{4}\right) \stopformula
\item \startformula \left(\frac{3}{4} + \frac{1}{4}\right) \div 
\left(\frac{5}{6} - \frac{1}{3}\right) \stopformula
\item \startformula 5 + 10 - \frac{1}{10} + 25 \stopformula
\item \startformula \frac{1}{3} + \frac{1}{2} - \frac{2}{5} \stopformula
\item \startformula \left(\frac{1}{2} + \frac{2}{10}\right) \cdot \frac{2}{6} 
\stopformula
\item \startformula 5 + \frac{1}{3} \cdot \frac{5}{3} \stopformula
\item \startformula \left( 5 + \frac{1}{3} \right) \cdot \frac{5}{3} 
\stopformula
\stopitemize
\stopexercici

\stoptext


I re-attach the resulting pdf

Thanks,



On Wed, 23 Feb 2022 09:59:58 +0100
"Xavier B."  ha escrit:

> Hi,
> 
> I try to solve this, but I could not. Can you please help me.
> I make a math problem sheet. In "Exercici 1.2", I put a itemize with three 
> columns, but the 'c' exercise jumps to second column. I want that a, b, c 
> remains in the first column, d, e, f in the second and g, h, i in the third.
> 
> I tried \column command but it's worse.
> 
> I attached the source and generated pdf.
> 
> My version of context is:
>  context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.03.05 19:11
> mtx-context | main context file: 
> /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.03.05 19:11
> 
> 
> Thanks in advance,
> 
> Xavier
> 
> PS: Please CCme
> 


a.pdf
Description: Adobe PDF document
___

[NTG-context] Problems with itemize with several columns

2022-02-23 Thread Xavier B. via ntg-context
Hi,

I try to solve this, but I could not. Can you please help me.
I make a math problem sheet. In "Exercici 1.2", I put a itemize with three 
columns, but the 'c' exercise jumps to second column. I want that a, b, c 
remains in the first column, d, e, f in the second and g, h, i in the third.

I tried \column command but it's worse.

I attached the source and generated pdf.

My version of context is:
 context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.03.05 19:11
mtx-context | main context file: 
/usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.03.05 19:11


Thanks in advance,

Xavier

PS: Please CCme



a.context
Description: Binary data


a.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Custom Table of Contents

2022-01-20 Thread Hans Hagen via ntg-context

On 1/20/2022 3:45 PM, andrei--- via ntg-context wrote:

Hi! I’m new to ConTeXt.

I need to make a custom table of contents that looks like this:

https://imgur.com/a/Ca3By6X <https://imgur.com/a/Ca3By6X>

Each row in the table corresponds to an item that has following data to 
print in the table of contents: page, total number of pages which the 
item spans, name of the item and a custom text metadata field which is 
defined by the item. Each item will have its own regular table of 
content and own structure. So we can think of this TOC as kind of a mega 
table of content one level above.


It needs to be fully automatic.

The actual table is going to be anxtable(which I was blown away by after 
using LaTeX godawful tables for years, it’s soo good).


After digging into the documentation (again, wow, it’s soo detailed and 
approachable after LaTeX), I found out that\completecontentdoesn't 
provide such extreme level of customization. Therefore I need 
reimplement at least some parts of the default content forming 
mechanism. After digging in the source a bit, I found something 
relevant: 
https://source.contextgarden.net/tex/context/base/mkxl/strc-lst.mklx 
<https://source.contextgarden.net/tex/context/base/mkxl/strc-lst.mklx>.


there are some examples in the test suite ... if you look into the 
stc-lst files you'll see that one has access to fields and can use setups


What I need is some guidance on what would be the best course of action, 
in particular, which API should I use and roughly how should I approach it


Should I create my own counters for each item and somehow reference 
those manually in the TOC?


How would I save additional text metadata field and the item name to 
show it in the TOC?


The source code mentions a concept of list renderers. This sounds like 
the correct API to plug in, but it’s hard for me to grasp how exactly it 
works.


The problem with tables is that they are multipass and store 
(unexpanded) data so it has not enough info. Attached is an example of 
how to circumvent this (the helpers can be found in the lua file).


(You can then try to add it to the wiki so that it gets documented. The 
lua-context interface wrt TABLE can do the same from the lua end as in 
tex. There are examples of 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
-\definelistalternative
  [whatever]
  [renderingsetup=whatever]

\setuplist
  [chapter]
  [alternative=whatever]

\startsetups whatever
\framed [offset=overlay,frame=off] {
\framed [width=25mm,align=flushleft,frame=off,offset=0pt] {
number: \currentlistentrynumber
}
\framed [width=4cm,align=normal,frame=off,offset=0pt] {
title: \currentlistentrytitle
}
\framed [width=2cm,align=flushleft,frame=off,offset=0pt] {
page: \currentlistentrypagenumber
}
\framed [width=4cm,align=normal,frame=off,offset=0pt] {
author: \structurelistuservariable{more}
}
}
\stopsetups

\starttext

\starttitle[title={Tabulated Table of Contents}]
\placelist[chapter]
\blank[2*big]
\determinelistcharacteristics[chapter]
\startluacode
local result = structures.lists.result
context.bTABLE()
for i=1,#result do
local entry = result[i]
inspect(entry)
context.bTR()
context.bTD()
structures.lists.number(entry.metadata.name,i)
context.eTD()
context.bTD()
 -- context(entry.titledata.title)
structures.lists.title(entry.metadata.name,i)
context.eTD()
context.bTD()
context(entry.userdata.more)
context.eTD()
context.eTR()
end
context.eTABLE()
\stopluacode
\stoptitle

\startchapter[title=One]  [more=ONE]   \samplefile{ward} \stopchapter
\startchapter[title=Two]  [more=TWO]   \samplefile{ward} \stopchapter
\startchapter[title=Three][more=THREE] \samplefile{ward} \stopchapter

\stoptext
___
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] Custom Table of Contents

2022-01-20 Thread andrei--- via ntg-context
Hi! I’m new to ConTeXt.

I need to make a custom table of contents that looks like this:

https://imgur.com/a/Ca3By6X

Each row in the table corresponds to an item that has following data to print 
in the table of contents: page, total number of pages which the item spans, 
name of the item and a custom text metadata field which is defined by the item. 
Each item will have its own regular table of content and own structure. So we 
can think of this TOC as kind of a mega table of content one level above.

It needs to be fully automatic.
The actual table is going to be an xtable (which I was blown away by after 
using LaTeX godawful tables for years, it’s soo good).

After digging into the documentation (again, wow, it’s soo detailed and 
approachable after LaTeX), I found out that \completecontent doesn't provide 
such extreme level of customization. Therefore I need reimplement at least some 
parts of the default content forming mechanism. After digging in the source a 
bit, I found something relevant: 
https://source.contextgarden.net/tex/context/base/mkxl/strc-lst.mklx 
<https://source.contextgarden.net/tex/context/base/mkxl/strc-lst.mklx>.


What I need is some guidance on what would be the best course of action, in 
particular, which API should I use and roughly how should I approach it

Should I create my own counters for each item and somehow reference those 
manually in the TOC?

How would I save additional text metadata field and the item name to show it in 
the TOC?

The source code mentions a concept of list renderers. This sounds like the 
correct API to plug in, but it’s hard for me to grasp how exactly it works.



Any help will be appreciated! Thank you in advance!

Stay safe,
Andrei Borisov.___
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] STIX2 font issues with freshly installed LMTX

2022-01-05 Thread Heinrich Paeßens via ntg-context
Hi there

Issue solved by deleting the context-internal fonts and recurring on the 
system-wide installed fonts … never mind ;-)

 
<https://www.dropbox.com/s/g31kwg14tcs5621/Untitled_Test%20-compressed.pdf?dl=0>

Happy New Year
Heinrich

> 
>> On 3 Jan 2022, at 21:46, Heinrich Paeßens > <mailto:paess...@me.com>> wrote:
>>> 
>>> Hi there
>>> 
>>> as a newcomer in ConTeXt I installed according to 
>>> 
>>> https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/ 
>>> <https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/>
>>> 
>>> and using TeXShop on macos as advised.
>>> 
>>> However, I like to use STIX2-Fonts for Text and Math and hence my MWE to 
>>> test which fonts are going to be embedded (CLI pdffonts):
>>> 
>>> -
>>> \setupbodyfont[stixtwo]
>>> \starttext
>>> 
>>> Test ß 1lIjJuQ \% § \& ?! VERSAL-ẞ- \|> --- 1234567890 --- //
>>> 
>>> \placeformula[eqn:def-m]
>>> \startformula
>>> m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
>>> \stopformula
>>> \stoptext
>>> -
>>> 
>>> Unfortunately the compiler throws an error — why is there a check of 
>>> STIX2-fonts versions, why is that important?
>>> 
>>> I checked and found 
>>> 
>>> /Users/hp/Library/Fonts/STIXTwoText-Regular.otf Version 2.12 b168
>>> /Users/hp/Library/context-osx-64/tex/texmf/fonts/opentype/public/stix2-otf/STIXTwoText-Regular.otf
>>>  Version 2.11 b159
>>> 
>>> Could you please advise for a work around?
>>> 
>>> from the log:
>>> 
>>> -
>>> fonts   > otf loading > loading 'stixtwotext-regular.otf', hash 
>>> 'stixtwotext-regular'
>>> otf reader  > unknown version '
>>> 
>>> 
>>> 
>>> ' in file 'stixtwotext-regular.otf'
>>> fonts   > otf loading > loading done
>>> fonts   > otf loading > saving 'stixtwotext-regular.otf' in cache
>>> system  > lua > compiling 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
>>>  into 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
>>> system  > lua > dumping 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
>>>  into 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
>>>  stripped
>>> fonts   > otf loading > loading, optimizing, packing and caching 
>>> time 0.002
>>> lua error   > lua error on line 1 in file ./Untitled.tex:
>>> 
>>> registered function call [1129]: 
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: attempt to 
>>> index a nil value (upvalue 'descriptions')
>>> stack traceback:
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: in 
>>> local 'prepare_ligature'
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:770: in 
>>> upvalue 'addfeature'
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:899: in 
>>> local 'enhancer'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1269: in 
>>> upvalue 'enhance'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1291: in 
>>> field 'apply'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:263: in 
>>> field 'load'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:602: in 
>>> upvalue 'otftotfm'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:630: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:629>
>>> (...tail calls...)
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:378: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:366>
>>> (...tail calls...)
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:484: in 
>>> field 'read'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193>
>>> (...tail calls...)
>>>  1 >>  \setupbodyfont[stixtwo]
>>> -
>>> 
>>> Many thanks for your support.
>>> Kind regards
>>> 
>>> Heinrich Paeßens 
>>> Mobile +49 1512 123 9876 
>>> Business Card 
>>> <https://www.paessens.tel/img/heinrich-paessens_bc-2021-03-11_signed.pdf>
>>> 
>> 
> 

___
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] STIX2 font issues with freshly installed FMTX

2022-01-03 Thread Heinrich Paeßens via ntg-context
Hi there

as a newcomer in ConTeXt I installed according to 

https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/

and using TeXShop on macos as advised.

However, I like to use STIX2-Fonts for Text and Math and hence my MWE to test 
which fonts are going to be embedded (CLI pdffonts):

-
\setupbodyfont[stixtwo]
\starttext

Test ß 1lIjJuQ \% § \& ?! VERSAL-ẞ- \|> --- 1234567890 --- //

\placeformula[eqn:def-m]
\startformula
m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
\stopformula
\stoptext
-

Unfortunately the compiler throws an error — why is there a check of 
STIX2-fonts versions, why is that important?

I checked and found 

/Users/hp/Library/Fonts/STIXTwoText-Regular.otf Version 2.12 b168
/Users/hp/Library/context-osx-64/tex/texmf/fonts/opentype/public/stix2-otf/STIXTwoText-Regular.otf
 Version 2.11 b159

Could you please advise for a work around?

from the log:

-
fonts   > otf loading > loading 'stixtwotext-regular.otf', hash 
'stixtwotext-regular'
otf reader  > unknown version '



' in file 'stixtwotext-regular.otf'
fonts   > otf loading > loading done
fonts   > otf loading > saving 'stixtwotext-regular.otf' in cache
system  > lua > compiling 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
 into 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
system  > lua > dumping 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
 into 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
 stripped
fonts   > otf loading > loading, optimizing, packing and caching time 
0.002
lua error   > lua error on line 1 in file ./Untitled.tex:

registered function call [1129]: 
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: attempt to 
index a nil value (upvalue 'descriptions')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: in 
local 'prepare_ligature'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:770: in 
upvalue 'addfeature'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:899: in 
local 'enhancer'
    ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1269: in 
upvalue 'enhance'
    ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1291: in 
field 'apply'
    ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:263: in 
field 'load'
    ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:602: in 
upvalue 'otftotfm'
    ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:630: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:629>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:378: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:366>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:484: in 
field 'read'
...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193>
(...tail calls...)
 1 >>  \setupbodyfont[stixtwo]
-

Many thanks for your support.
Kind regards

Heinrich Paeßens 
Mobile +49 1512 123 9876 
Business Card 
<https://www.paessens.tel/img/heinrich-paessens_bc-2021-03-11_signed.pdf>

___
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] Malayalam conjuncts

2021-12-31 Thread Ajith R via ntg-context
Hi,
I am trying to prepare a moderate sized document in Malayalam using
Context. Overall I have been successful. However, there are a few rough
edges for which I need help. This is the first problem I face.

When I use the font RIT-Rachana from https://rachana.org.in/, my
preferred font, one set of conjuncts are not formed correctly, while
the rest are formed properly. The conjuncts that are not formed
correctly are those where the second component is ര U+0D30, followed by
a symbol that is shown on the right side of the conjunct viz ാ U+0D3E,
ി U+0D3F, ീ U+0D40, ു  U+0D41, ൂ U+0D42. If no symbols follow, or
symbols follow on the left or on both sides, the conjunct is well
formed.In the minimum working example given 5 is well formed, while the
first conjunct in 6 is well formed and second ill formed conjunct. The
conjuncts are well formed when used in Libre Office with the same font.
Also, other fonts, for example, those from smc.org don't have this
problem. Unfortunately, they don't support all symbols. One of the
developers of the font thinks that this is probably a bug in Context.
Hence, the reason for posting here.

\definefontfamily [malayalam]
  [rm]
  [RIT-Rachana]
  [features=malayalam-two]
\setupbodyfont [malayalam]
\starttext
1. ശ്രീ
2. അശ്രു
3. ശുശ്രൂഷ
4. പ്രാസം
5. പ്രേയസി
6. പ്രോഗ്രാം
 \stoptext

I am working on Debian 11. The font version is the latest 1.3. The
command context --version gives 
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
/home/ajith/Downloads/context-linux-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.12.25 00:58 mtx-context |
main context file:
/home/ajith/Downloads/context-linux-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.12.25 00:58

Thanks,
ajith
___
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] upload

2021-12-24 Thread Hans Hagen via ntg-context

On 12/24/2021 11:08 PM, Jairo A. del Rio wrote:

Hi, Hans. In Ubuntu 20.04:

resolvers       > lua > loading file 
'/home/coragyps/lmtx/tex/texmf-context/tex/context/base/mkxl/node-cmp.lmt' 
succeeded


fatal error: storage cannot be marked

strange ... must be a mismatch in binary ... i'll reupload


-
  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] upload

2021-12-24 Thread Rik Kabel via ntg-context

Same with W64 on W11.

On 2021-12-24 17:08, Jairo A. del Rio via ntg-context wrote:

Hi, Hans. In Ubuntu 20.04:

resolvers       > lua > loading file 
'/home/coragyps/lmtx/tex/texmf-context/tex/context/base/mkxl/node-cmp.lmt' 
succeeded


fatal error: storage cannot be marked

Jairo


El vie, 24 dic 2021 a la(s) 13:45, Hans Hagen via ntg-context 
(ntg-context@ntg.nl) escribió:


Hi,

When wrapping up before the weekend I uploaded a new lmtx (bottom
floats
fixed afaiks, but hat mechanism might see some improvements anyway
next
year; exit codes more reliable; some low level tracing; side float
coming loose from section head issue solved; ...).

I'm experimenting with some more efficient low level state info
and in
the process ran into an issue / interference with (also low level)
attributes. I'm not sure if I solved it (work in progress, i need
to run
into another border case first which may take ages) but the test
suite
runs ok so ...

Hans

-
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl
<http://www.pragma-ade.nl> | www.pragma-pod.nl
<http://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.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] upload

2021-12-24 Thread Jairo A. del Rio via ntg-context
Hi, Hans. In Ubuntu 20.04:

resolvers   > lua > loading file
'/home/coragyps/lmtx/tex/texmf-context/tex/context/base/mkxl/node-cmp.lmt'
succeeded

fatal error: storage cannot be marked

Jairo


El vie, 24 dic 2021 a la(s) 13:45, Hans Hagen via ntg-context (
ntg-context@ntg.nl) escribió:

> Hi,
>
> When wrapping up before the weekend I uploaded a new lmtx (bottom floats
> fixed afaiks, but hat mechanism might see some improvements anyway next
> year; exit codes more reliable; some low level tracing; side float
> coming loose from section head issue solved; ...).
>
> I'm experimenting with some more efficient low level state info and in
> the process ran into an issue / interference with (also low level)
> attributes. I'm not sure if I solved it (work in progress, i need to run
> into another border case first which may take ages) but the test suite
> runs ok so ...
>
> 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.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] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
Check if your *.tex file is recognized as a context file and not a plaintex 
file. 

I’ve struggelled a lot with macvim before I got what I want.

I recommend following places learning everything in vim and many nice plugins 
that helps a lot.

If you want I can provide my .vimrc as an inspiration and starting point. Se 
below.

https://wiki.contextgarden.net/Vim <https://wiki.contextgarden.net/Vim>

https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1) 
<https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)>

https://devhints.io/vim <https://devhints.io/vim> a cheatsheet


In the MacVim application it took some time to figure out why my *.tex files 
never recognizes as context files and the hardcoded solution was to comment out 
the following in

/Applications/MacVim.app/Contents/Resources/vim/runtime/filetype.vim

" TeX
"au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl  setf tex
"au BufNewFile,BufRead *.texcall dist#ft#FTtex()

and instead adding

" ConTeXt
au BufNewFile,BufRead *.tex,*.ctx,*.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx   setf 
context

It works for Me who only using context as a typesetting engine.

Normally you do not need to do this but it seems that my own filetype.vim on 
upstart never reads.

Here is my .vimrc if you find it useful, enjoy. 

set lines=68
set columns=140
set guifont=Monaco:h16

" Install vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  "autocmd VimEnter * PlugInstall
  "autocmd VimEnter * PlugInstall | source $MYVIMRC
endif

call plug#begin()
" Better Syntax Support
Plug 'sheerun/vim-polyglot'
" File Explorer
Plug 'scrooloose/NERDTree'
" Auto pairs for '(' '[' '{'"call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'jiangmiao/auto-pairs'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug '907th/vim-auto-save'
call plug#end()

" Settings for Ultisnips
let g:UltiSnipsExpandTrigger=""
let g:UltiSnipsJumpForwardTrigger=""
let g:UltiSnipsJumpBackwardTrigger=""

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

" set leader key
let g:mapleader = "\"
" enable AutoSave on Vim startup
let g:auto_save = 1
set number  " Line numbers
set cmdheight=2 " More space for displaying messages
set cursorline  " Enable highlighting of the current 
line

set clipboard=unnamed

syntax enable   " Enables syntax highlighing

let g:AutoPairsShortcutFastWrap = ""


" Better nav for omnicomplete
" inoremap   ("\")
" inoremap   ("\")

" Use alt + hjkl to resize windows
nnoremap :resize -2
nnoremap :resize +2
nnoremap :vertical resize -2
nnoremap :vertical resize +2

" I hate escape more than anything else
inoremap jk 
inoremap kj 

" Easy CAPS
inoremap  viwUi
nnoremap  viwU

" TAB in general mode will move to text buffer
nnoremap  :bnext

" SHIFT-TAB will go back
nnoremap  :bprevious

" Alternate way to save
nnoremap  :w

" Alternate way to quit
nnoremap  :wq!

" Use control-c instead of escape
nnoremap  


" Better window navigation
nnoremap  h
nnoremap  j
nnoremap  k
nnoremap  l

nnoremap o o^Da
nnoremap O O^Da

nnoremap  :NERDTreeToggle $HOME

Regards

Jan-Erik


> 14 dec. 2021 kl. 15:37 skrev Jeong Dal via ntg-context :
> 
> Dear Nicola, Jan-Erik, and John,
> 
> Although you have explained about the way out of my problem, 
> I am still in the problem.
> 
> I need to learn more about vim.
> I’ll do more try following your advice and  the explanation in wiki.
> 
> Thank you again for your help.
> 
> Best regards,
> 
> Dalyoung
> 
>> 2021. 12. 14. 오전 8:56, ntg-context-requ...@ntg.nl 작성:
>> 
>> Send ntg-context mailing list submissions to
>>  ntg-context@ntg.nl
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>>  ntg-context-requ...@ntg.nl
>> 
>> You can reach the person managing the list at
>>  ntg-context-ow...@ntg.nl
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>> 
>> 
>> Today's Topics:
>> 
>>  1. Re: how to setup path of ConTeXtLMTX for MacVim?
>> (Jan-Erik Hägglöf)
>>  2. Re: circuitikz module seems broken (Hans H

Re: [NTG-context] Typo in m-tikz

2021-12-13 Thread Aditya Mahajan via ntg-context
On Mon, 13 Dec 2021, Hans Hagen wrote:

> On 12/13/2021 7:19 PM, Aditya Mahajan via ntg-context wrote:
> > On Mon, 13 Dec 2021, Aditya Mahajan via ntg-context wrote:
> > 
> > > Hi,
> > > 
> > > There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex).
> > > The module ends with a spurious `\stopmodule`:
> > > 
> > > https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113
> > > 
> > > (Or rather, the corresponding `\startmodule` is missing).
> > > [...]
> > > And since tikz is a latex module, in the true LaTeX spirit, the error goes
> > > away (for obvious reasons) if I move the \usemodule[tikz] to after the
> > > font definitions. It took quite a while to figure out what is happening.
> > 
> > Actually, the missing \startmodule is not a culprit for this error. Even
> > after fixing that, something goes wrong. Here is a minimal example:
> > 
> > \permanent\protected\def\starttikzinput
> >{\pushoverloadmode
> > \pushcatcodetable
> > \setcatcodetable\texcatcodes
> > \unprotect
> > \catcode`\@=11
> > \catcode`\|=12
> > \catcode`\!=12
> > \autoparagraphmode\zerocount}
> > 
> > \permanent\protected\def\stoptikzinput
> >{\autoparagraphmode\plusone
> > \protect
> > \popcatcodetable
> > \popoverloadmode}
> > 
> > \starttikzinput
> > \input t-pgf
> > \stoptikzinput
> > 
> > 
> > \usetypescriptfile[euler]
> > \definetypeface[mainfont][rm][serif][pagella][default]
> > \definetypeface[mainfont][mm][math] [pagellaovereuler][default]
> > \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8,
> > features=none]
> > \setupbodyfont[mainfont,11pt]
> > 
> > \starttext
> > $\dfrac{1}{2}$
> > \stoptext
> > 
> > which gives the same error: parameter 'fractionrule' in style 2 is not set
> > 
> > Not sure what is happening here.
> 
> can you test with the \protect \unprotect removed from these definitions?

That fixes the issue, both in the test file and in my bigger document.

Thanks,
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] Typo in m-tikz

2021-12-13 Thread Hans Hagen via ntg-context

On 12/13/2021 7:19 PM, Aditya Mahajan via ntg-context wrote:

On Mon, 13 Dec 2021, Aditya Mahajan via ntg-context wrote:


Hi,

There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). The 
module ends with a spurious `\stopmodule`:

https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113

(Or rather, the corresponding `\startmodule` is missing).
[...]
And since tikz is a latex module, in the true LaTeX spirit, the error goes away 
(for obvious reasons) if I move the \usemodule[tikz] to after the font 
definitions. It took quite a while to figure out what is happening.


Actually, the missing \startmodule is not a culprit for this error. Even after 
fixing that, something goes wrong. Here is a minimal example:

\permanent\protected\def\starttikzinput
   {\pushoverloadmode
\pushcatcodetable
\setcatcodetable\texcatcodes
\unprotect
\catcode`\@=11
\catcode`\|=12
\catcode`\!=12
\autoparagraphmode\zerocount}

\permanent\protected\def\stoptikzinput
   {\autoparagraphmode\plusone
\protect
\popcatcodetable
\popoverloadmode}

\starttikzinput
\input t-pgf
\stoptikzinput


\usetypescriptfile[euler]
\definetypeface[mainfont][rm][serif][pagella][default]
\definetypeface[mainfont][mm][math] [pagellaovereuler][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,11pt]

\starttext
$\dfrac{1}{2}$
\stoptext

which gives the same error: parameter 'fractionrule' in style 2 is not set

Not sure what is happening here.


can you test with the \protect \unprotect removed from these definitions?



--

-
  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] Typo in m-tikz

2021-12-13 Thread Aditya Mahajan via ntg-context
On Mon, 13 Dec 2021, Aditya Mahajan via ntg-context wrote:

> Hi,
> 
> There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). The 
> module ends with a spurious `\stopmodule`:
> 
> https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113
> 
> (Or rather, the corresponding `\startmodule` is missing). 
> [...]
> And since tikz is a latex module, in the true LaTeX spirit, the error goes 
> away (for obvious reasons) if I move the \usemodule[tikz] to after the font 
> definitions. It took quite a while to figure out what is happening.

Actually, the missing \startmodule is not a culprit for this error. Even after 
fixing that, something goes wrong. Here is a minimal example:

\permanent\protected\def\starttikzinput
  {\pushoverloadmode
   \pushcatcodetable
   \setcatcodetable\texcatcodes
   \unprotect
   \catcode`\@=11
   \catcode`\|=12
   \catcode`\!=12
   \autoparagraphmode\zerocount}

\permanent\protected\def\stoptikzinput
  {\autoparagraphmode\plusone
   \protect
   \popcatcodetable
   \popoverloadmode}

\starttikzinput
\input t-pgf
\stoptikzinput


\usetypescriptfile[euler]
\definetypeface[mainfont][rm][serif][pagella][default]
\definetypeface[mainfont][mm][math] [pagellaovereuler][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,11pt]

\starttext
$\dfrac{1}{2}$
\stoptext

which gives the same error: parameter 'fractionrule' in style 2 is not set

Not sure what is happening here.

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] Typo in m-tikz

2021-12-13 Thread Aditya Mahajan via ntg-context
Hi,

There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). The 
module ends with a spurious `\stopmodule`:

https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113

(Or rather, the corresponding `\startmodule` is missing). 

This causes an interesting error message on the following test file:

\usemodule[tikz]

\usetypescriptfile[euler]
\definetypeface[mainfont][rm][serif][pagella][default]
\definetypeface[mainfont][mm][math] [pagellaovereuler][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,11pt]

\starttext
$\dfrac{1}{2}$
\stoptext

which gives:

system  > module wrapping error in 'tikz'
close source> level 2, order 67, name 
'/opt/luametatex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl'
open source > level 2, order 68, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-euler.mkiv'
open source > level 3, order 69, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source> level 3, order 69, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
open source > level 3, order 70, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv'
close source> level 3, order 70, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv'
suggestion  > use \withcedilla instead of \c
suggestion  > use \withcaron instead of \v
close source> level 2, order 70, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-euler.mkiv'
open source > level 2, order 71, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source> level 2, order 71, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
fonts   > typescripts > unknown library 'pagellaovereuler'
open source > level 2, order 72, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv'
close source> level 2, order 72, name 
'/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv'
fonts   > defining > font with asked name 'unknown' is not found using 
lookup 'file'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-rm-tf-0--0'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-mm-mr--3'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-mm-mr--2'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-mm-mr--1'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-mm-mb--3'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-mm-mb--2'
fonts   > defining > unable to define 'unknown' as 
'mainfont-11pt-mm-mb--1'
tex error   > tex error on line 10 in file ./test.tex: Math error: 
parameter 'fractionrule' in style 2 is not set

 
$\dfrac{1}{2}$

And since tikz is a latex module, in the true LaTeX spirit, the error goes away 
(for obvious reasons) if I move the \usemodule[tikz] to after the font 
definitions. It took quite a while to figure out what is happening.

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] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context

Dear all,

I made an exam form by the help of the experts in this list.
However, it was not working after recent update.
Here is a code which I made for the test.
If I use “\startcolumns \stopcolumns”, then it has no problem.
But using “\startcolumnset[exam] … \stopcolumnset” produces error message 
“return code 11”.
It loads “m-newcolumnset.tex” without problem.

What is the cause of this error?

Thank you for reading.

Best regards,

Dalyoung

\startuseMPgraphic{verticalrule0}
  if CurrentColumn < NOfColumns :
draw rightboundary OverlayBox shifted (4mm,0);
setbounds currentpicture to OverlayBox enlarged 2.5mm;
  fi;
\stopuseMPgraphic

\startuseMPgraphic{squareBox}
   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic
\defineoverlay
  [headerBox]
  [\useMPgraphic{squareBox}]

\startuseMPgraphic{verticalrule3}
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic

\defineoverlay
  [verticalrule]
  [\useMPgraphic{verticalrule3}]

\definecolumnset
  [exam]
  [n=2,
   background=verticalrule]


\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, background=headerBox, 
align=lohi]%topframe=
\setupbackgrounds[footer][text][frame=off, background=screen]

\define[3]\headTitle{\setupheadertexts[][\bf #1  \hfill #2  \hfill #3  \hfill 
ID:  \hskip 2cm Name: \hskip 2cm]}

\setupmathematics[autopunctuation=no, integral=nolimits]

\setupbodyfont[rm,10pt]
\setuppagenumbering[location=footer]
\setupcolors[state=start]
%\setupexternalfigure[directory={/Users/graph/Documents/figures,}]

\headTitle{2021. 12. 9.}{Set Theory}{Final Exam}

\usemodule[newcolumnsets]

\starttext

\startcolumns[rule=on,n=2,leftframe=on]
%\startcolumnset[exam]

\startitemize[n]
  \item The first problem.
  \vfill
  \column

  \item The second problem.
  \vfill
  \column

  \item The third problem.
  \vfill
  \column

\stopitemize

%\stopcolumnset
\stopcolumns
\stoptext


error messages:
system  > ConTeXt  ver: 2021.11.30 19:49 LMTX  fmt: 2021.12.1  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/Users/graph/ConTeXtL/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/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest', input 
'/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex', result 
'/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex'
fonts   > preloading latin modern fonts (third stage)
fonts   > 'fallback modern-designsize rm 10pt' is loaded
colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
modules > 'newcolumnsets' is loaded
open source > level 2, order 3, name 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
close source> level 2, order 3, name 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
mtx-context | fatal error: return code: 11
The terminal process "zsh '-c', 'export 
PATH=~/ConTeXtL/tex/texmf-osx-64/bin:$PATH;mtxrun --autogenerate --script 
context --autopdf --purge '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated with exit 
code: 1.

___
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] [DKIM] Re: [DKIM] circuitikz module seems broken

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

On 12/6/2021 6:39 PM, Aditya Mahajan via ntg-context wrote:

On Mon, 6 Dec 2021, Aditya Mahajan via ntg-context wrote:


Something is still not working correctly though. With the simple example that 
Hans sent, I get error messages:

tex error   > tex error on line 76 in file m-circuitikz.mkxl: Package 
pgfkeys Error: I do not know the key '/tikz/resistor', to which you passed 
'american', and I am going to ignore it. Perhaps you misspelled it

which are weird because tikz is looking at keys tikz/resistor rather than 
tikz/circuittikz/resistor. But I don't understand why this is the case.


Here is a minimal example to show the error.

\usemodule[m][tikz]

\tikzinputfile{pgfcirc.defines.tex}
\tikzinputfile{pgfcircbipoles.tex}

\starttext
\bgroup
\loggingall
\ctikzset{resistor=american}
\egroup
\stoptext

which gives the error

tex error   > tex error on line 10 in file ./t2.tex: Package pgfkeys Error: 
I do not know the key '/tikz/resistor', to which you passed 'american', and I am 
going to ignore it. Perhaps you misspelled it


different error here ... i need to load more files


The file pgfcirc.defines.tex has:

\def\circuitikzbasekey{/tikz/circuitikz}
\pgfkeys{\circuitikzbasekey/.is family}
\def\circuitikzset{\expandafter\pgfqkeys\expandafter{\circuitikzbasekey}}
\let\ctikzset\circuitikzset


The file pgfcircbipoles.tex has the code:

\newif\ifpgf@circuit@europeanresistor
\ctikzset{resistor/.is choice}
\ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
\ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
\tikzset{american resistors/.style = {\circuitikzbasekey/resistor = american}}
\tikzset{european resistors/.style = {\circuitikzbasekey/resistor = european}}%

So, the key which is defined is \circuitikzbasekey/resistor. Not sure why 
pgfkeys is searching for tikz/resistor.


don't worry ... i'm even less sure ... one needs a bit different mindset 
for that kind of tex code (all can be fixed i guess but when it's not 
context specific it makes more sense to let the maintainer do it)


ths only difference wrt tikz between mkiv and mkxl is that we have 
different defaults wrt par handling (afaik both have the same catcode 
settings here) and i don't think tikz uses anything low level context



@Hans, does the above code work correctly for you? If so, then we can wait 
until the next upload and test again.

with the attached:

\usemodule[m][circuitikz]

\starttext
\starttikzsettings % to be sure
\ctikzset{resistor=american}
\stoptikzsettings
\stoptext

that works (tons of files loaded) here but nothing graphic

(for those whio try: make sure that the t-* variants are gone)

i see it loading other t-* files so maybe we should more that code to 
the m-* files too ... easier to maintain that way .. and if we have a 
few (not too slow) test files in the test suite it's easier to see when 
/ why something fails


if it doesn't at your end we need to define 'how to install the right 
(circuit)tikz stuff' and 'from where'


(btw, does it all work ok in mkiv? after all, that hasn't changed for a 
while)


Hans


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
-%D \module
%D   [   file=m-tikz,
%Dversion=2021.07.12,
%D  title=\CONTEXT\ Extra Modules,
%D   subtitle=TIKZ support,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D A fixed variant of the t-tikz module distributed with tikz. For
%D practical reasons per 2021 we split the module for \MKIV\ and
%D \LMTX. (Maybe some day I'll optimize TIKZ a bit.)

\ifdefined\pdflastxpos \else
\unprotect

\frozen\overloaded\protected\def\pdflastxpos{\numexpr\clf_lastxpos\relax}

\frozen\overloaded\protected\def\pdflastypos{\numexpr\clf_lastypos\relax}
\protect
\fi

\permanent\protected\def\starttikzinput
  {\pushoverloadmode
   \pushcatcodetable
   \setcatcodetable\texcatcodes
   \unprotect
   \catcode`\@=11
   \catcode`\|=12
   \catcode`\!=12
   \autoparagraphmode\zerocount}

\permanent\protected\def\stoptikzinput
  {\autoparagraphmode\plusone
   \protect
   \popcatcodetable
   \popoverloadmode}

\permanent\protected\def\tikzinputfile#1%
  {\starttikzinput
   \input{#1}\relax
   \stoptikzinput}

\tikzinputfile{t-pgf.tex}
\tikzinputfile{t-pgffor.tex}
\tikzinputfile{tikz.code.tex}

\permanent\protected\def\tikzerrormessage#1#2#3%
  {\writestatus{#1}{#2}}

% For now we need this but we need to educate the user to wrap settings in the
% wrappers. So some day the next line will 

Re: [NTG-context] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-06 Thread Aditya Mahajan via ntg-context
On Sat, 4 Dec 2021, Jan-Erik Hägglöf via ntg-context wrote:

> I did replace the attached .mkxl files now in the correct directory tree 
> together with the rest of all m-xyz.mkxl module files.
> 
> The same error message appears and i’m back at square one.

After a bit of digging, I think that you are not using the latest version of 
tikz. In particular, in your log messages, there are a bunch of messages like

system  > module wrapping error in 'tikz'

while these errors have been fixed in the latest release on ctan. 

Something is still not working correctly though. With the simple example that 
Hans sent, I get error messages:

tex error   > tex error on line 76 in file m-circuitikz.mkxl: Package 
pgfkeys Error: I do not know the key '/tikz/resistor', to which you passed 
'american', and I am going to ignore it. Perhaps you misspelled it


which are weird because tikz is looking at keys tikz/resistor rather than 
tikz/circuittikz/resistor. But I don't understand why this is the case.

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] [DKIM] Re: [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-05 Thread Aditya Mahajan via ntg-context
On Sun, 5 Dec 2021, Hans Hagen via ntg-context wrote:

> On 12/4/2021 10:37 PM, Jan-Erik Hägglöf via ntg-context wrote:
> > I did replace the attached .mkxl files now in the correct directory tree
> together with the rest of all m-xyz.mkxl module files.
> > 
> > The same error message appears and i’m back at square one.
> hm, here i did:
> 
> - install tikz from ctan
> - install curcuitikz from ctan
> - copy the m-files to context/base ...
> 
> ran mtxrun --generate
> 
> there is not much more I can do (esp if it also runs ok at Aditya's place)

Things are not working correctly at my end either. The whole tikz/pgf code 
needs some cleaning up. There are a bunch of errors of the form:

system  > module wrapping error in 'tikz'

because the many of the modules in tikz have a \stopmodule but not a 
\startmodule. I'll try to clean it up, but tikz is a rabbit hole 

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] [DKIM] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-05 Thread Jan-Erik Hägglöf via ntg-context
Ok so I did all the tips, installed from ctan without any success so it is 
interesting to know how it worked out for some and not for me.

Well that is a good question.

Thanks for your help anyway

Regards

Jan-Erik

> 5 dec. 2021 kl. 16:35 skrev Hans Hagen :
> 
> On 12/4/2021 10:37 PM, Jan-Erik Hägglöf via ntg-context wrote:
>> I did replace the attached .mkxl files now in the correct directory tree 
>> together with the rest of all m-xyz.mkxl module files.
>> The same error message appears and i’m back at square one.
> hm, here i did:
> 
> - install tikz from ctan
> - install curcuitikz from ctan
> - copy the m-files to context/base ...
> 
> ran mtxrun --generate
> 
> there is not much more I can do (esp if it also runs ok at Aditya's place)
> 
> 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] [DKIM] Re: [DKIM] Re: [DKIM] circuitikz module seems broken

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

On 12/4/2021 10:37 PM, Jan-Erik Hägglöf via ntg-context wrote:

I did replace the attached .mkxl files now in the correct directory tree 
together with the rest of all m-xyz.mkxl module files.

The same error message appears and i’m back at square one.

hm, here i did:

- install tikz from ctan
- install curcuitikz from ctan
- copy the m-files to context/base ...

ran mtxrun --generate

there is not much more I can do (esp if it also runs ok at Aditya's place)

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] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-04 Thread Jan-Erik Hägglöf via ntg-context
I did replace the attached .mkxl files now in the correct directory tree 
together with the rest of all m-xyz.mkxl module files.

The same error message appears and i’m back at square one.



asdf-error.log
Description: Binary data


asdf.log
Description: Binary data


asdf.tex
Description: Binary data



> 4 dec. 2021 kl. 10:05 skrev Henning Hraban Ramm via ntg-context 
> :
> 
> Am 04.12.21 um 00:27 schrieb Aditya Mahajan via ntg-context:
>> Not placed at the right place. From your log file:
>> open source > level 2, order 3, name 
>> '/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-local/m-circuitikz.mkxl'
>> (I am surprised it gets found! The should be texmf-local/tex/context/ 
>> sub-dir)
> 
> Well, if the database is made, ConTeXt will find files in *all* the texmf 
> trees.
> 
> BTW OT, I wouldn’t suggest to use texmf-local or texmf-project; while these 
> are never overwritten by an update, you must copy them to a new installation. 
> I prefer ~/texmf for my personal fonts, modules etc., because it’s 
> independent of the ConTeXt installation I’m currently using, while it’s still 
> a valid texmf tree searched by default.
> 
> 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
> ___

___
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] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-03 Thread Aditya Mahajan via ntg-context

On Fri, 3 Dec 2021, Jan-Erik Hägglöf via ntg-context wrote:

> The result of testing, different error messages in MKIV and LMTX.
> 
> The attached files belongs to LMTX run with the attached m-circuitikz.mkxl 
> and m-tikz.mkxl in texmf-local

Not placed at the right place. From your log file:

open source > level 2, order 3, name 
'/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-local/m-circuitikz.mkxl'

(I am surprised it gets found! The should be texmf-local/tex/context/ sub-dir)

open source > level 3, order 4, name 
'/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl'

(I am guessing that this is the old m-tikz.mkxl).

For such experiments, it is simplest if you place the files in the current 
directory.

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] circuitikz module seems broken

2021-12-02 Thread Jan-Erik Hägglöf via ntg-context
Dear List!

I’ve been struggeling with the circuitikz module since my upgrade to LMTX.

The following test of installation failed, running file 

circuitikz-context.tex in ../modules/t-tikz/ directory 

% Copyright 2018-2021 by Romano Giannetti
% Copyright 2015-2021 by Stefan Lindner
% Copyright 2013-2021 by Stefan Erhardt
% Copyright 2007-2021 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.


\usemodule[circuitikz]

\starttext

A simple example to test the installation.

\startcircuitikz[scale=1.2]
\draw
  (0,2) to[I=1\milli\ampere] (2,2)
to[R, l_=2\kilo\ohm, *-*] (0,0)
to[R, l_=2\kilo\ohm] (2,0)
to[V, v_=2\volt] (2,2)
to[cspst, l=$t_0$] (4,2) -- (4,1.5)
to [generic, i=$i_1$, v=$v_1$] (4,-.5) -- (4,-1.5)
  (0,2) -- (0,-1.5) to[V, v_=4\volt] (2,-1.5)
to [R, l=1\kilo\ohm] (4,-1.5)
  (5,2) node[dipchip, anchor=pin 1]{}
  (5,-2) node[flipflop JK, anchor=pin 1]{};

\stopcircuitikz

\stoptext

with this error message

pgfcircutils.tex|103 error| Undefined control sequence \undefined 

Below is a snippet from pgfcircutils.tex

%%
%% subcircuits (experimental)
%%
%% introduced by Romano Giannetti around April 2021
%% changes suggested by Jonathan P. Spratte
%%
\newbox\ctikz@scratchbox
\pgfutil@protected\def\ctikzsubcircuitdef#1#2#3{%
\expandafter\gdef\csname #1@Anchor\endcsname{}%
\expandafter\gdef\csname #1@setanchors\endcsname{%
\setbox\ctikz@scratchbox=\hbox{%
\begin{circuitikz}
\draw (0,0) \csname#1\endcsname{T-#1}{};
\foreach [count=\i] \anchor in {#2}
% reference anchor is -center
\draw (0,{2-\i/2}) let \p1 = ($(T-#1-subckt@reference)-(T-#1-\anchor)$) 
in
node[right]{\anchor: \x1,\y1 \expandafter\xdef\csname 
#1@Anchor\anchor\endcsname{++(\x1,\y1)}};
\end{circuitikz}%
}%
}%
\expandafter\gdef\csname#1\endcsname##1##2{%
\csname #1@Anchor##2\endcsname coordinate(##1-subckt@reference)#3%
}%
}
\long\def\ctikzsubcircuitactivate#1{\csname #1@setanchors\endcsname}

My installation info:

context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.10.28 10:19
mtx-context | main context file: 
/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.10.28 10:19

Because of my lack of knowledge in this matter, I have no idea what is wrong 
here.

Many thanks in advance

Jan-Erik Hägglöf

___
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] Typographical quotes

2021-11-27 Thread Denis Maier via ntg-context
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

2021-11-27 Thread Denis Maier via ntg-context
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

2021-11-27 Thread Jean-Philippe Rey via ntg-context
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

2021-11-22 Thread Jean-Philippe Rey via ntg-context
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
___


[NTG-context] minimum working example plus (output)

2021-11-13 Thread skyhorse--- via ntg-context

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] LMTX error processing Adobe Arabic Naskh font

2021-11-13 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
Problems I and II are apparently solved in the latest update. As for III,  
the following works:


\definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\noheaderandfooterlines
\setupwhitespace[big]

% \starttext
\startTEXpage[offset=1ex]
% \setupdirections[bidi=global,method=one]
\righttoleft
% \setupalign[r2l]
% \dontleavehmode \setupalign[r2l]
\ARABICFONT

\utfchar{"062E}\utfchar{"064E}\utfchar{"200D}
\stopTEXpage
% \stoptext

As Hans explained off-list, TEXpage interacts with hmode and vmode in ways  
that may appear unpredictable in some circumstances. In this case the  
circumstance is


% \setupdirections[bidi=global,method=one]

Uncommenting this line will bring the bidi issue back, but it's not needed  
for the desired result.


Best wishes
Idris

On Wed, 10 Nov 2021 09:00:26 -0700, Idris Samawi Hamid ادريس سماوي حامد  
via ntg-context  wrote:



Dear Hans and gang,

Consider the following MWE:

==
\definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt]
% \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\disabledirectives[filters.utf.reorder]
\noheaderandfooterlines

\setupwhitespace[big]
% \setupinterlinespace[line=4.2ex]

\starttext
% \startTEXpage[offset=1ex]
\setupdirections[bidi=global,method=one]
\righttoleft
\ARABICFONT

خَ‍ % a

خَل

% \stopTEXpage
\stoptext
==

Three bugs:

I. If we use start|stoptex and comment start|stopTeXpage, then both  
lines 19 and 21 give an error:


===
tex error   > tex error on line 20 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

10 \setupwhitespace[big]
11 % \setupinterlinespace[line=4.2ex]
12
13 \starttext
14 % \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍
20 >>
21 خَل
22
23 % \stopTEXpage
24 \stoptext
===

Comment line 19 and yu will get virtually the same error.

II. Using start|stopTeXpage, only line 21 gives the error:

===
tex error   > tex error on line 22 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

12
13 % \starttext
14 \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍ % a
20
21 خَل
22 >>
23 \stopTEXpage
24 % \stoptext
===

III Let us switch to almfixed:

If you comment line 21 and use only line 19, then there is no tex error,  
but the result is rendered incorrectly - see test-broken.pdf.


For the correct result, see test-correct.pdf (add a space and any letter  
- uncomment the end of line 19).


Adobe Naskh is not publicly available. The four commented fonts are  
publicly available and generate no tex errors.


Best wishes
Idri

Re: [NTG-context] LMTX error processing Adobe Arabic Naskh font

2021-11-10 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

For III: See attached!

On Wed, 10 Nov 2021 09:00:26 -0700, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Dear Hans and gang,

Consider the following MWE:

==
\definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt]
% \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\disabledirectives[filters.utf.reorder]
\noheaderandfooterlines

\setupwhitespace[big]
% \setupinterlinespace[line=4.2ex]

\starttext
% \startTEXpage[offset=1ex]
\setupdirections[bidi=global,method=one]
\righttoleft
\ARABICFONT

خَ‍ % a

خَل

% \stopTEXpage
\stoptext
==

Three bugs:

I. If we use start|stoptex and comment start|stopTeXpage, then both  
lines 19 and 21 give an error:


===
tex error   > tex error on line 20 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

10 \setupwhitespace[big]
11 % \setupinterlinespace[line=4.2ex]
12
13 \starttext
14 % \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍
20 >>
21 خَل
22
23 % \stopTEXpage
24 \stoptext
===

Comment line 19 and yu will get virtually the same error.

II. Using start|stopTeXpage, only line 21 gives the error:

===
tex error   > tex error on line 22 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

12
13 % \starttext
14 \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍ % a
20
21 خَل
22 >>
23 \stopTEXpage
24 % \stoptext
===

III Let us switch to almfixed:

If you comment line 21 and use only line 19, then there is no tex error,  
but the result is rendered incorrectly - see test-broken.pdf.


For the correct result, see test-correct.pdf (add a space and any letter  
- uncomment the end of line 19).


Adobe Naskh is not publicly available. The four commented fonts are  
publicly available and generate no tex errors.


Best wishes
Idris



--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

test-broken.pdf
Description: Adobe PDF document


test-correct.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] LMTX error processing Adobe Arabic Naskh font

2021-11-10 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

Dear Hans and gang,

Consider the following MWE:

==
\definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt]
% \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\disabledirectives[filters.utf.reorder]
\noheaderandfooterlines

\setupwhitespace[big]
% \setupinterlinespace[line=4.2ex]

\starttext
% \startTEXpage[offset=1ex]
\setupdirections[bidi=global,method=one]
\righttoleft
\ARABICFONT

خَ‍ % a

خَل

% \stopTEXpage
\stoptext
==

Three bugs:

I. If we use start|stoptex and comment start|stopTeXpage, then both lines  
19 and 21 give an error:


===
tex error   > tex error on line 20 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to index  
a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string "local  
tonut  = nodes.tonut..."]:12>

(...tail calls...)  

10 \setupwhitespace[big]
11 % \setupinterlinespace[line=4.2ex]
12
13 \starttext
14 % \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍
20 >>
21 خَل
22
23 % \stopTEXpage
24 \stoptext
===

Comment line 19 and yu will get virtually the same error.

II. Using start|stopTeXpage, only line 21 gives the error:

===
tex error   > tex error on line 22 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to index  
a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string "local  
tonut  = nodes.tonut..."]:12>

(...tail calls...)  

12
13 % \starttext
14 \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍ % a
20
21 خَل
22 >>
23 \stopTEXpage
24 % \stoptext
===

III Let us switch to almfixed:

If you comment line 21 and use only line 19, then there is no tex error,  
but the result is rendered incorrectly - see test-broken.pdf.


For the correct result, see test-correct.pdf (add a space and any letter -  
uncomment the end of line 19).


Adobe Naskh is not publicly available. The four commented fonts are  
publicly available and generate no tex errors.


Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] upload

2021-10-22 Thread Michal Vlasák via ntg-context
,18 @@ implement {
 }
 
 local n = R("09")^1 / tonumber
+local sign = S("+-") / function(s) return tonumber(s.."1") end
 
 local p = Cf( Ct("")
 * Cg(Cc("year")  * (n   )) * P("-")^-1
 * Cg(Cc("month") * (n + Cc(   1))) * P("-")^-1
-* Cg(Cc("day")   * (n + Cc(   1))) * whitespace^-1
+* Cg(Cc("day")   * (n + Cc(   1))) * (whitespace + P("T"))^-1
 * Cg(Cc("hour")  * (n + Cc(   0))) * P(":")^-1
-* Cg(Cc("min")   * (n + Cc(   0)))
+* Cg(Cc("min")   * (n + Cc(   0))) * P(":")^-1
+* Cg(Cc("sec")   * (n + Cc(   0)))^-1
+*(Cg(Cc("tzsgn") * sign)
+* Cg(Cc("tzh")   * (n + Cc(   0))) * P(":")^-1
+* Cg(Cc("tzm")   * (n + Cc(   0^-1
 , rawset)
 
 function converters.totime(s)
@@ -1987,7 +1992,13 @@ function converters.totime(s)
 elseif type(s) == "table" then
 return s
 elseif type(s) == "string" then
-return lpegmatch(p,s)
+local t = lpegmatch(p,s)
+if t.tzh then
+local localtzh, localtzm = ostimezone(true, true)
+t.hour = t.hour + localtzh - t.tzsgn * t.tzh
+t.min  = t.min  + localtzm - t.tzsgn * t.tzm or 0
+end
+return t
 end
 local n = tonumber(s)
 if n and n >= 0 then
--- a/tex/context/base/mkiv/l-os.lua
+++ b/tex/context/base/mkiv/l-os.lua
@@ -26,10 +26,10 @@ if not modules then modules = { } end modules ['l-os'] = {
 -- 
math.randomseed(tonumber(string.sub(string.reverse(tostring(math.floor(socket.gettime()*1))),1,6)))
 
 local os = os
-local date, time = os.date, os.time
+local date, time, difftime = os.date, os.time, os.difftime
 local find, format, gsub, upper, gmatch = string.find, string.format, 
string.gsub, string.upper, string.gmatch
 local concat = table.concat
-local random, ceil, randomseed = math.random, math.ceil, math.randomseed
+local random, ceil, randomseed, modf = math.random, math.ceil, 
math.randomseed, math.modf
 local type, setmetatable, tonumber, tostring = type, setmetatable, tonumber, 
tostring
 
 -- This check needs to happen real early on. Todo: we can pick it up from the 
commandline
@@ -434,15 +434,22 @@ end
 
 do
 
-local d
-
-function os.timezone(delta)
-d = d or ((tonumber(date("%H")) or 0) - (tonumber(date("!%H")) or 0))
+-- http://lua-users.org/wiki/TimeZone
+-- +02:00
+function os.timezone(delta, diff)
 if delta then
-if d > 0 then
-return format("+%02i:00",d)
+local t = time()
+local utcdate   = os.date("!*t", t)
+local localdate = os.date("*t", t)
+localdate.isdst  = false
+local timediff  = os.difftime(time(localdate), time(utcdate))
+local hour, min = math.modf(timediff / 3600)
+min = min * 60
+
+if diff then
+return hour, min
 else
-return format("-%02i:00",-d)
+return format("%+03d:%02d", hour, min)
 end
 else
 return 1
@@ -450,10 +457,12 @@ do
 end
 
 local timeformat = format("%%s%s",os.timezone(true))
-local dateformat = "!%Y-%m-%d %H:%M:%S"
+local dateformat = "%Y-%m-%d %H:%M:%S"
 local lasttime   = nil
 local lastdate   = nil
 
+-- localtime + timezone
+-- 2021-10-22 10:22:54+02:00
 function os.fulltime(t,default)
 t = t and tonumber(t) or 0
 if t > 0 then
@@ -474,6 +483,8 @@ do
 local lasttime   = nil
 local lastdate   = nil
 
+-- localtime without timezone
+-- 2021-10-22 10:22:54
 function os.localtime(t,default)
 t = t and tonumber(t) or 0
 if t > 0 then
@@ -503,8 +514,10 @@ do
 return date("!*t") -- table with values
 end
 
+-- utc time without timezone
+-- 2021-10-22 08:22:54
 function os.now()
-return date("!%Y-%m-%d %H:%M:%S") -- 2011-12-04 14:59:12
+return date("!%Y-%m-%d %H:%M:%S")
 end
 
 end
--- a/tex/context/base/mkxl/lpdf-xmp.lmt
+++ b/tex/context/base/mkxl/lpdf-xmp.lmt
@@ -151,7 +151,7 @@ local function pdfsetmetadate(n,both)
 if n then
 n = converters.totime(n)
 if n then
-creationdate = osdate("%Y-%m-%dT%X",ostime(n)) .. ostimezone(true)
+creationdate = osdate("%Y-%m-%dT%H:%M:%S",ostime(n)) .. 
ostimezone(true)
 if both then
 modificationdate = creationdate
 end
@@ -190,7 +190,7 @@ local function setdates(v)
 end
 end
 if toboolean(v) then
-creationdate = osdate("%Y-%m-%dT%X") .. ostimezone(true)
+

Re: [NTG-context] setting date in \setupinteraction

2021-10-20 Thread Hans Hagen via ntg-context

On 10/19/2021 10:38 PM, Michal Vlasák via ntg-context wrote:


I don't know how official these interfaces are. But you can try adapting
the following to your use case.

 \setupinteraction[state=start]
 
 %\luacode{lpdf.settime("2020-02-02 12:00")}

 %\luacode{lpdf.settime(1580641221)}
 
 \startluacode
 
 local Y, M, D, h, m, s, Zs, Zh, Zm = string.match("D:20200202120021+02'00'", "^D:(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)([%+%-])(%d%d)%'(%d%d)%'$")
 
 local time = os.time{year=Y,month=M,day=D,hour=h,min=m,sec=s}

 lpdf.settime(time)
 \stopluacode
 
 \starttext

 This document is from 02.02.2020 at 12:00:21.
 \stoptext

The pattern doesn't catch all the PDF spec cases, but should match what
ConTeXt emits. The timezone info gets overwritten by current timezone
though.

Requires the below patch.

Michal

--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -1991,7 +1991,7 @@ function converters.totime(s)
  end
  local n = tonumber(s)
  if n and n >= 0 then
-return date("*t",n)
+return osdate("*t",n)
  end
  end
  
diff --git a/tex/context/base/mkxl/lpdf-ini.lmt b/tex/context/base/mkxl/lpdf-ini.lmt

index 7979b80..9703ac0 100644
--- a/tex/context/base/mkxl/lpdf-ini.lmt
+++ b/tex/context/base/mkxl/lpdf-ini.lmt
@@ -1123,7 +1123,7 @@ do
  n = converters.totime(n)
  if n then
  converters.settime(n)
-timestamp = osdate("%Y-%m-%dT%X") .. ostimezone(true) -- 
probably not ok
+timestamp = osdate("%Y-%m-%dT%X", ostime(n)) .. 
ostimezone(true) -- probably not ok
  end
  end
  if metadata then

i'll fix it but also clean up the existing code a bit

(much has to do with omitting date and is for comparison reasons)

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] setting date in \setupinteraction

2021-10-19 Thread Michal Vlasák via ntg-context
On Tue Oct 19, 2021 at 8:51 PM CEST, Pablo Rodriguez via ntg-context wrote:
> On 10/19/21 6:23 PM, Michal Vlasák via ntg-context wrote:
> > On Tue Oct 19, 2021 at 5:47 PM CEST, Pablo Rodriguez via ntg-context wrote:
> > [...]
> > So this works:
> >
> >
> > \setupinteraction[state=start,
> >   date={2022-02-02T12:00:21+02:00}]
> > \starttext
> > This document is from 02.02.2020 at 12:00:21.
> > \stoptext
> >
> > This parameter sets the "ModDate" is that what you are after?
>
> Hi Michal,
>
> many thanks for your fast reply.
>
> I would like to import both metadata values (CreationDate and ModDate)
> from another file (such as https://pdf.ousia.tk/metadata.pdf).
>
> Besides from the fact that LMTX doesn’t work with this (only MkIV does
> [already reported]), isn’t no simpler way to get ISO 8601 formatting
> from doc.Info.ModDate than the following one?
>
> \starttext
> \startluacode
> function document.transfer_metadata(name)
> local main_doc = lpdf.epdf.load(name)
> context.setupinteraction{ title = main_doc.Info.Title }
> context.setupinteraction{ date = main_doc.Info.ModDate:sub(3,6) ..
> "-" .. main_doc.Info.ModDate:sub(7,8) .. "-" ..
> main_doc.Info.ModDate:sub(9,10) .. "T" ..
> main_doc.Info.ModDate:sub(11,12) .. ":" ..
> main_doc.Info.ModDate:sub(13,14) .. ":" ..
> main_doc.Info.ModDate:sub(15,22):gsub("'", ":") }
> context(main_doc.Info.Title .. "\\par")
> lpdf.epdf.unload(name)
> end
> \stopluacode
> \unexpanded\def\TransferMetadata#1%
> {\ctxlua{document.transfer_metadata("#1")}}
> \startTEXpage[offset=1em, align=center]
> \TransferMetadata{metadata.pdf}
> \stopTEXpage
> \stoptext
>
> > Seems that "CreationDate" could be set by the SOURCE_DATE_EPOCH
> > environment variable, but I am not succesfull with it right now.
>
> It would be fine to ble able to set CreationDate. Otherwise, having a
> ModDate prior to CreationDate gives a weird impression.

I don't know how official these interfaces are. But you can try adapting
the following to your use case.

\setupinteraction[state=start]

%\luacode{lpdf.settime("2020-02-02 12:00")}
%\luacode{lpdf.settime(1580641221)}

\startluacode

local Y, M, D, h, m, s, Zs, Zh, Zm = 
string.match("D:20200202120021+02'00'", 
"^D:(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)([%+%-])(%d%d)%'(%d%d)%'$")

local time = os.time{year=Y,month=M,day=D,hour=h,min=m,sec=s}
lpdf.settime(time)
\stopluacode

\starttext
This document is from 02.02.2020 at 12:00:21.
\stoptext

The pattern doesn't catch all the PDF spec cases, but should match what
ConTeXt emits. The timezone info gets overwritten by current timezone
though.

Requires the below patch.

Michal

--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -1991,7 +1991,7 @@ function converters.totime(s)
 end
 local n = tonumber(s)
 if n and n >= 0 then
-return date("*t",n)
+return osdate("*t",n)
 end
 end
 
diff --git a/tex/context/base/mkxl/lpdf-ini.lmt 
b/tex/context/base/mkxl/lpdf-ini.lmt
index 7979b80..9703ac0 100644
--- a/tex/context/base/mkxl/lpdf-ini.lmt
+++ b/tex/context/base/mkxl/lpdf-ini.lmt
@@ -1123,7 +1123,7 @@ do
 n = converters.totime(n)
 if n then
 converters.settime(n)
-timestamp = osdate("%Y-%m-%dT%X") .. ostimezone(true) -- 
probably not ok
+timestamp = osdate("%Y-%m-%dT%X", ostime(n)) .. 
ostimezone(true) -- probably not ok
 end
 end
 if metadata then
___
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?

2021-10-19 Thread Jörg Hofmann via ntg-context

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?

2021-10-18 Thread 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/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Update error on Raspberry Pi

2021-10-16 Thread Mojca Miklavec via ntg-context
Hi,

On Sat, 16 Oct 2021 at 22:43, J. Hagen via ntg-context wrote:
>
> Looks like the pi bins and an osx one are behind (mojca then needs to kick 
> those vm's) ... I 'll check it tomorrow.

I'm sorry, the new binaries have been uploaded to the usual place
(Hans probably needs to regenerate the packages before they can be
used out-of-the-box again).

For some completely mysterious reason the new ISP's modem doesn't like
the virtual machine running Debian 10 and I have no clue how to
convince it to get network connectivity back.

(After reading the initial email from Luis I decided to try to connect
the main computer via my phone's hotspot and that worked, but I need
to find a permanent solution. Maybe I'll just set up some hardware
again. It's much slower than the VM, but better than not working at
all.)

Mojca

> Op 16 okt. 2021 15:12 schreef Luis Montgomery via ntg-context 
> :
>
> Hi,
> I try to update LMTX and the script sends me this error:
>
>
> resolvers   > lua > loading file 
> '/home/monty/context/tex/texmf-context/tex/context/base/mkxl/spac-par.lmt' 
> succeeded
> tex error   > tex error on line 41 in file spac-par.mkxl: Undefined 
> control sequence \undefined
>
> 
>   + \shapingpenaltiesfrozenparcode
>
> 
> 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.
>
> What has changed here?
>
> L. Montgomery
___
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] Update error on Raspberry Pi

2021-10-16 Thread J. Hagen via ntg-context
Looks like the pi bins and an osx one are behind (mojca then needs to kick those vm's) ... I 'll check it tomorrow.Op 16 okt. 2021 15:12 schreef Luis Montgomery via ntg-context :Hi,I try to update LMTX and the script sends me this error:resolvers       > lua > loading file '/home/monty/context/tex/texmf-context/tex/context/base/mkxl/spac-par.lmt' succeededtex error       > tex error on line 41 in file spac-par.mkxl: Undefined control sequence \undefined        + \shapingpenaltiesfrozenparcodeThe 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.What has changed here?L. Montgomery
___
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 error on Raspberry Pi

2021-10-16 Thread Luis Montgomery via ntg-context
Hi,
I try to update LMTX and the script sends me this error:


resolvers   > lua > loading file
'/home/monty/context/tex/texmf-context/tex/context/base/mkxl/spac-par.lmt'
succeeded
tex error   > tex error on line 41 in file spac-par.mkxl:
Undefined control sequence \undefined


  + \shapingpenaltiesfrozenparcode


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.

What has changed here?

L. Montgomery
___
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] undefined command in current latest

2021-10-11 Thread mf via ntg-context
It looks like the argument of \getmarking is not expanded, since you get 
"\it knuth" instead of an italicized "knuth" in the headers of this MWE:


\definemarking[myheader]
\setupheadertexts[{\getmarking[myheader][last]}]
\starttext
  \dorecurse{10}{\samplefile{knuth}\marking[myheader]{\it knuth}\par}
\stoptext

context version: 2021.10.10 23:43

Massi


Il 11/10/21 09:06, Alexandre Christe via ntg-context ha scritto:
Indeed I can report similar issues with \getmarking after updating to 
the latest version of Context. Did something change regarding its 
definition / use recently?


context -version
mtx-context     | ConTeXt Process Management 1.04
mtx-context     |
mtx-context     | main context file: 
/Users/aleks/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv

mtx-context     | current version: 2021.10.08 20:18
mtx-context     | main context file: 
/Users/aleks/context-osx-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl

mtx-context     | current version: 2021.10.08 20:18

Alex


___
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] undefined command in current latest

2021-10-11 Thread Alexandre Christe via ntg-context
Indeed I can report similar issues with \getmarking after updating to the 
latest version of Context. Did something change regarding its definition / use 
recently?

context -version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/Users/aleks/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.10.08 20:18
mtx-context | main context file: 
/Users/aleks/context-osx-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.10.08 20:18

Alex___
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?

2021-10-04 Thread 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

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

2021-10-04 Thread Marcus Vinicius Mesquita via ntg-context
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?

2021-10-04 Thread Henning Hraban Ramm via ntg-context

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

2021-10-04 Thread Hans Hagen via ntg-context

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?

2021-10-04 Thread Henning Hraban Ramm via ntg-context
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] Weird error when using \startformula inside lua

2021-09-12 Thread Sylvain Hubert via ntg-context
The problem also concerns \starttyping:

\starttext
.
\startluacode
context([[
\starttyping
\stoptyping
]])
\stopluacode
\stoptext

tex error   > runaway error: end of file encountered
mtx-context | fatal error: return code: 256

%

\starttext
.
\startluacode
context([[
\starttyping

foobar
\stoptyping
]])
\stopluacode
\stoptext

tex error   > tex error on line 5 in file ./test.tex:

lua error:

registered function call [1041]:
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: invalid
value (nil) at index 3 in table for '
concat'
stack traceback:
[C]: in function 'table.concat'
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: in
upvalue 'pickup'
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:677: in
function <...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:668>
(...tail calls...)


Sylvain

On Sat, 11 Sept 2021 at 05:12, Aditya Mahajan via ntg-context <
ntg-context@ntg.nl> wrote:

> I sometimes define lua functions for showing out worked out calculations.
> The following minimal example shows that
>
>   context([[\startformula ... \stopformula]])
>
> fails in LMTX with an error message:
>
> tex error   > tex error on line 3 in file ./test.tex: Undefined
> control sequence \undefined
>
> MWE:
>
> \startluacode
>   thirddata = thirddata or {}
>
>   local comment = [[
> This is a famous formula
> \startformula
>   a^2 + b^2 = c^2
> \stopformula
>   ]]
>
>   function thirddata.explanation()
>   context(comment)
>   end
>
> \stopluacode
>
> \starttext
> \ctxlua{thirddata.explanation()}
> \stoptext
>
> The actual use case is more complicated (where I use templates, so I don't
> want to convert everything to context.startformula() etc.). The example
> compiles with MkIV but not LMTX.
>
> Any idea what is going on?
>
> Thanks,
> 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
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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

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



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

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

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

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



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

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

mtx-context | current version: 2021.09.06 11:47



this is the results form --generate:

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

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

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

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

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

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

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



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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

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


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

I followed you instructions and got zint running with MacPorts:

Zint version 2.10.0

And it looks like LMTX finds it:

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

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

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

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

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

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

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

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

Hraban


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

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

[NTG-context] metafun doesn't compile \root 3 \of 2

2021-09-03 Thread fv leung via ntg-context
\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
___


[NTG-context] "$==$ this" producing = with another = through the t

2021-08-29 Thread Paul Dostert via ntg-context
My Minimal:

\starttext
$==$ this

$f(x)= x^2$

\switchtobodyfont[times]
$==$ this

$f(x)= x^2$

\switchtobodyfont[modern]
$==$ this

$f(x)= x^2$

\stoptext


This is producing an =, a large space (about two characters wide), then an
= through the start of the word "this". See pdf here:

https://pdfhost.io/v/a0WMsyE9E_untitled2.pdf

Also notice the odd spacing in between the f and ( in $f(x)$ for times (but
not modern). It all works perfectly fine on https://live.contextgarden.net/.

I'm in Windows and here is the version output:

mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
C:/context/context-win64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.08.24 22:16
mtx-context | main context file:
C:/context/context-win64/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.08.24 22:16


It's been happening for a good two weeks now. I've trashed the Context
folder, reinstalled two different times over the past couple of weeks, and
the result is the same each time. I've also reloaded my fonts using

mtxrun --script fonts --reload --force

as I kind of assumed this is some sort of font-spacing issue. I also had an
issue where double f's were producing a single f (stuff was outputted as
stuf) but that went away after my last update.


I'm likely doing something stupid, but just can't seem to find it. Sorry to
bother you all, but $==$ ends up being a good portion of my lecture on
Boolean expressions. Thank you for the help.

Regards,

Paul
___
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 broke between 2021.07.23 and 2021.08.19

2021-08-23 Thread Bruce Horrocks via ntg-context
I re-processed a previous issue of a journal and found that it no longer 
compiled. It worked fine in versions up to and including 2021.07.23 but fails 
by version 2021.08.19 19:48. It may have failed a little earlier than this - I 
don't always refresh every release.

The error in the console log is:

[...]
open source > level 2, order 9, name 'covers/inside-front-cover.tex'
tex error   > tex error on line 24 in file covers/inside-front-cover.tex: 

lua error:

registered function call [396]: 
...-64/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1286: attempt to 
call a nil value (upvalue 'texgetparstate')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1286: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1262>
(...tail calls...)  
[...]

Unfortunately I can't create an MWE any smaller than a project with about 3 
sub-directories and half a dozen files. I don't really want to post it all here 
but happy to send a zip to Hans. (When it works it only creates a two page PDF 
so 'minimal' in that sense.)


Secondly, something a bit specific to Macos also broke for the latest version. 
Previously I had:
  \definefont [RPN] [Menlo*bold at 12pt]

but had to change that to 
  \definefont [RPN][file:Menlo.ttc at 12pt]

to get it compile. I thought it was something odd about Menlo (which is a Macos 
system font) at first which is why I changed to using the name: syntax but when 
this other problem came up I realised it too had worked previously.

—
Bruce Horrocks
Hampshire, UK

___
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

2021-08-23 Thread Hans Hagen via ntg-context

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

2021-08-22 Thread Benjamin Buchmuller via ntg-context
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?

Thanks!


Benjamin

> On Aug 20, 2021, at 12:00, ntg-context-requ...@ntg.nl wrote:
> 
> lmtx update

___
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

2021-08-14 Thread Hans Hagen via ntg-context

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

2021-08-14 Thread Marcel Krüger via ntg-context
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
___


Re: [NTG-context] Both pdfinfo & exiftool have trouble with 1.0.4 but works with 1.0.3

2021-08-13 Thread Ramkumar KB via ntg-context
Hans,

To close this thread, both poppler and exiftool worked properly after I
upgraded to the latest version (details below). I will add a section in the
wiki about these tools, as they are mighty useful when working with PDFs.

mtx-context | ConTeXt Process Management 1.04 mtx-context |
mtx-context | main context file:
/home/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context
 | current version: 2021.08.10 12:42 mtx-context | main context file:
/home/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context
 | current version: 2021.08.10 12:42

Thanks again!

best regards,
Ramkumar

On Tue, Aug 10, 2021 at 7:01 PM Ramkumar KB  wrote:

> Hans,
>
> Thanks for the feedback. I will update to the latest version and run some
> tests again.
>
> mtxrun does not list the custom attributes unlike the others. From our
> (limited) experience, mutool / poppler / exiftool all excel in different
> areas. Dealing with different tools and keeping them upto date is
> something we have internalized.
>
> We did observe that mutool did not give errors with version 1.0.4 but
> others did. In the ConTeXt development workflow, are there any tests with
> such external tools (to possibly catch regression issues)?
>
> We have experienced (reasonable) success with tools like diff-pdf
> <https://vslavik.github.io/diff-pdf/> to catch regression in our workflow.
>
> Thank you as always!
>
> best regards,
> Ramkumar
>
>
> On Tue, Aug 10, 2021 at 3:19 PM Hans Hagen  wrote:
>
>> On 8/10/2021 6:33 AM, Ramkumar KB via ntg-context wrote:
>> > 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.
>> hard to say without files but indeed updating might help
>>
>> btw, there is (kind of old but still ok):
>>
>> mtxrun --script pdf --info filename.pdf
>>
>> 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] JavaScript in multimedia PDF

2021-08-11 Thread Michal Vlasák via ntg-context
More context is in previous messages, but here is the patch for ConTeXt
to make scripting multimedia possible:

--- a/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/tex/context/base/mkxl/lpdf-wid.lmt
@@ -649,6 +649,7 @@ local function insertrenderingwindow(specification)
 Subtype = pdfconstant("Screen"),
 P   = pdfreference(pdfpagereference(page)),
 A   = a, -- needed in order to make the annotation clickable 
(i.e. don't bark)
+T   = pdfunicode(label), -- title (for JS)
 Border  = bs,
 C   = bc,
 AA  = actions,
@@ -693,7 +694,7 @@ local function insertrendering(specification)
  -- }
  -- }
 local parameters = pdfdictionary {
-Type = pdfconstant(MediaPermissions),
+Type = pdfconstant("MediaPermissions"),
 TF   = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT 
TEMPACCESS TEMPALWAYS / needed for acrobat/wmp
 }
 local descriptor = pdfdictionary {
@@ -723,7 +724,7 @@ local function insertrendering(specification)
 local rendition = pdfdictionary {
 Type = pdfconstant("Rendition"),
 S= pdfconstant("MR"),
-N= label,
+N= pdfunicode(label),
 C= pdfreference(pdfflushobject(clip)),
 }
 mf[label] = pdfreference(pdfflushobject(rendition))
@@ -761,6 +762,20 @@ function codeinjections.processrendering(label)
 end
 end

+-- needed mapping for access from JS
+local function flushrenderings()
+if next(mf) then
+local r = pdfarray()
+for label, reference in sortedhash(mf) do
+r[#r+1] = pdfunicode(label)
+r[#r+1] = reference -- already a reference
+end
+
lpdf.addtonames("Renditions",pdfreference(pdfflushobject(pdfdictionary{ Names = 
r })))
+end
+end
+
+lpdf.registerdocumentfinalizer(flushrenderings,"renderings")
+
 function codeinjections.insertrenderingwindow(specification)
 local label = specification.label
 codeinjections.processrendering(label)

The patch is also be available here
https://github.com/vlasakm/context-mirror/commit/99f81beae0d13f1aecc20be187ada9eb88a2aa68
until it is applied (for full file download, which is available under
the three dots next to the file name).

The created Screen annotation will be given the title, that corresponds
to the second \placerenderingwindow parameter. So here:

\definerenderingwindow[soundplace]
  [width=0pt, height=0pt]

\useexternalrendering[mainsound][audio/mp3][sound.mp3][embed=yes]

\placerenderingwindow[soundplace][mainsound]

both the screen annotation and rendition are available under the name
"mainsound". The name "soundplace" can be anything (even "mainsound"),
it doesn't propagate to the PDF file in any way.

And here is the patch required to make Pablo's example work:

--- a/pablo.tex
+++ b/pablo.tex
@@ -7,8 +7,10 @@
 function GoToFirstSlide(label) {
 this.pageNum = 0 ;
 var rendition = this.media.getRendition(label) ;
+var screen = this.media.getAnnot({nPage: 0, cAnnotTitle: label}) ;
 var player = app.media.openPlayer({
 rendition: rendition,
+annot: screen,
   });
 }

The second possibility I proposed previously is not as general, and
implementing it is not worth, until it is really needed (which I presume
won't happen).

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
___


[NTG-context] Both pdfinfo & exiftool have trouble with 1.0.4 but works with 1.0.3

2021-08-09 Thread Ramkumar KB via ntg-context
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] New error "page order problem in tree at page"

2021-08-05 Thread Rik Kabel via ntg-context


On 8/5/2021 18:04, Hans Hagen wrote:

On 8/4/2021 9:26 PM, Rik Kabel via ntg-context wrote:

With today's LMTX release I see the warning:

    backend > tags > beware: page order problem in tree at 
page 1


This appears to be recently introduced to the code.

Should it be a concern? If so, where should I look to remedy it?


mwe ...


Here it is:

   \setuptagging [state=start]
   \starttext
 The problem involves tagging.
   \stoptext

This produces, in relevant part:

   system  >
   system  > ConTeXt  ver: 2021.08.06 01:21 LMTX  fmt:
   2021.8.5  int: english/english
   system  >
   system  > 'cont-new.mkxl' loaded
   open source > level 1, order 1, name
   'C:/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
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
   system  > files > jobname 'G:/order', input 'G:/order.tex',
   result 'G:/order'
   fonts   > latin modern fonts are not preloaded
   languages   > language 'en' is active
   open source > level 1, order 2, name
   'G:/Projects/Quotations/ConTeXt version/development/order.tex'
   fonts   > preloading latin modern fonts (second stage)
   fonts   > 'fallback modern-designsize rm 12pt' is loaded
   *backend > tags > beware: page order problem in tree at page 1*
   backend > xmp > using file
   'C:/ConTeXt_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 'G:/order.tex'
   system  > start used files
   system  > text: order
   system  > stop used files
   system  > start used files

--
Rik

___
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] multimedia PDF in ConTeXt

2021-07-31 Thread Pablo Rodriguez via ntg-context
On 7/30/21 11:57 PM, Michal Vlasák via ntg-context wrote:
> On Fri Jul 30, 2021 at 8:53 PM CEST, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Although I don’t read Czech, just out of curiosity, is your bachelor
>> thesis available on the net, Michal? Thanks to theses.cz, I found
>> https://is.muni.cz/th/t8qpp/DP_Vlasak_Michal_2015.pdf (only a name
>> coincidence, I guess).
>
> Sorry, should have shared the link at the first place.
>
> https://dspace.cvut.cz/handle/10467/95065

Many thanks for your fast reply and the link to your thesis, Michal.

>> [...]
>> Is there no way to have the video as an embedded file in the PDF
>> document? (I mean, that the file is listed when the attachment panel is
>> displayed.)
>
> Currently, only attachments are added as "embedded files" (either as
> "hidden", ending up in /EmbeddedFiles, or as "annotation" ending up as
> /FileAttachment annotation).
>
> Maybe "codeinjections.embedfile" can have the option to force the
> reference, so that the file also ends up in /EmbeddedFiles? Should it be
> default for all \externalrenderings?
> [...]
> --- a/tex/context/base/mkxl/lpdf-wid.lmt
> +++ b/tex/context/base/mkxl/lpdf-wid.lmt
> [...]

Many thanks for the patch.

It would be also great to have an option not to list some files as
embedded (adding a option "list" to "\useexternalrendering" such as in
"\useexternalrendering[myvideo][video/mp4][video.mp4][embed=yes, list=no]").

Being the default to yes, I’m thinking of cases where there is a risk
distributing the multimedia file without the embedding document, because
of the lack of context (no pun indented)

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] multimedia PDF in ConTeXt

2021-07-30 Thread Michal Vlasák via ntg-context
On Fri Jul 30, 2021 at 8:53 PM CEST, Pablo Rodriguez via ntg-context wrote:
> Hi Michal and Hans,
>
> many thanks for your patch to fix multimedia objects in PDF and your
> extremely interesting and in-depth explanation about multimedia in PDF.
> Many thanks to Hans for the release of an updated latest with also
> updated documentation.

By the way, Pablo, your issue
https://www.mail-archive.com/ntg-context@ntg.nl/msg88204.html was also
solved in the last upload. Unfortunately it will probably not help you,
because Acrobat no longer supports this.

\useexternalsoundtrack
  [myaudio][audio.mp3]

\checksoundtrack{myaudio}

\goto{PLAY SOUND}[StartSound{myaudio}]


But, you can use renderings instead:

\useexternalrendering[myaudiorendering]
  [audio/mp3][audio.mp3][embed=yes]

\definerenderingwindow[audiowindow]
  [width=0sp, height=0sp]

\definelayer[resources]
\setupbackgrounds[page][background=resources]
\setlayer[resources]{\placerenderingwindow[audiowindow][myaudiorendering]}

\goto{PLAY SOUND}[StartRendering{myaudiorendering}]


This is basically the example from "/back-swf.mkiv". Works in Acrobat.
And one can use either of the three possible file methods (embedded,
external, URL), not just external files. The layer is so that the empty
frame doesn't interfere with normal page content. No frame is drawn when
both dimensions are 0, not sure if that is a behaviour one can take as
granted. But currenntly the dimensions can't be zero.

Hans, I would omit the check for 0 dimensions of rendering window (as
already noted in the source, it is useful for sound). See patch below.

Michal Vlasák

--- a/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/tex/context/base/mkxl/lpdf-wid.lmt
@@ -655,9 +655,6 @@ local function insertrenderingwindow(specification)
 }
 local width = specification.width or 0
 local height = specification.height or 0
-if height == 0 or width == 0 then
--- todo: sound needs no window
-end
 context(nodeinjections.annotation(width,height,0,d(),r)) -- save ref
 return pdfreference(r)
 end
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] multimedia PDF in ConTeXt

2021-07-30 Thread Michal Vlasák via ntg-context
On Fri Jul 30, 2021 at 8:53 PM CEST, Pablo Rodriguez via ntg-context wrote:
> Hi Michal and Hans,
>
> many thanks for your patch to fix multimedia objects in PDF and your
> extremely interesting and in-depth explanation about multimedia in PDF.
> Many thanks to Hans for the release of an updated latest with also
> updated documentation.
>
> Although I don’t read Czech, just out of curiosity, is your bachelor
> thesis available on the net, Michal? Thanks to theses.cz, I found
> https://is.muni.cz/th/t8qpp/DP_Vlasak_Michal_2015.pdf (only a name
> coincidence, I guess).

Sorry, should have shared the link at the first place.

https://dspace.cvut.cz/handle/10467/95065

(PLNY_TEXT) links to the full text.

(PRILOHA) is almost all files I had for the thesis. Most notably the
testing files I used. (Some were handcoded, so no sources, but these
should be readable in text editors).

> Using your sample, I have two questions:
>
> \starttext
> \setupinteraction[state=start]
>
> \useexternalrendering[myvideo][video/mp4][video.mp4][embed=yes]
>
> \definerenderingwindow[myrenderingwindow]
> [width=\textwidth, height=\textwidth]
>
> \placerenderingwindow[myrenderingwindow][myvideo]
> \stoptext
>
> Is there no way to have the video as an embedded file in the PDF
> document? (I mean, that the file is listed when the attachment panel is
> displayed.)

Currently, only attachments are added as "embedded files" (either as
"hidden", ending up in /EmbeddedFiles, or as "annotation" ending up as
/FileAttachment annotation).

Maybe "codeinjections.embedfile" can have the option to force the
reference, so that the file also ends up in /EmbeddedFiles? Should it be
default for all \externalrenderings?

My try:

https://github.com/contextgarden/context-mirror/commit/681c36d0ecfd30c05ed588eb0f37a06dd19f3492

(the full file can be located by clicking on the three dots after the
file name, then "View file" and then "Raw", resulting in:

https://github.com/contextgarden/context-mirror/blob/681c36d0ecfd30c05ed588eb0f37a06dd19f3492/tex/context/base/mkxl/lpdf-wid.lmt,

Patch can be obtained by adding .diff to the URL:

https://github.com/contextgarden/context-mirror/commit/681c36d0ecfd30c05ed588eb0f37a06dd19f3492.diff

I will probably not keep the commit on GitHub forever, it just seems
like a nice way to send quick patches -- it is visual and allows full
file/patch download. So this time full patch also included below for
future reference.)

Michal


--- a/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/tex/context/base/mkxl/lpdf-wid.lmt
@@ -259,7 +259,7 @@ local function flushembeddedfiles()
 for tag, reference in sortedhash(filestreams) do
 if not reference then
 report_attachment("unreferenced file, tag %a",tag)
-elseif referenced[tag] == "hidden" then
+elseif referenced[tag] == "hidden" or referenced[tag] == "forced" 
then
 e[#e+1] = pdfstring(tag)
 e[#e+1] = reference -- already a reference
 f[#f+1] = reference -- collect all file description references
@@ -369,6 +369,9 @@ function codeinjections.embedfile(specification)
 }
 local r = pdfreference(pdfflushobject(d))
 filestreams[hash] = r
+if specification.forcereference == true then
+referenced[hash] = "forced"
+end
 return r
 end
 end
@@ -705,9 +708,10 @@ local function insertrendering(specification)
 descriptor = pdfreference(pdfflushobject(descriptor))
 elseif option[v_embed] then
 descriptor = codeinjections.embedfile {
-file = filename,
-mimetype = mimetype, -- yes or no
-compress = false,
+file   = filename,
+mimetype   = mimetype, -- yes or no
+compress   = false,
+forcereference = true,
 }
 end
 local clip = pdfdictionary {
___
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] Multimedia, PDF and ConTeXt

2021-07-26 Thread Michal Vlasák via ntg-context
  \noindent
\placerenderingwindow[myrenderingwindow][myvideo]

\goto{START}[StartRendering{myvideo}]
\goto{STOP} [StopRendering{myvideo}]
\goto{PAUSE}[PauseRendering{myvideo}]

\vfil\break\noindent
\placerenderingwindow[myrenderingwindow][myvideo2]

\vfil\break\noindent
\placerenderingwindow[myrenderingwindow][myvideo3]

\stoptext

All three file source types are demonstrated. Any "video.mp4" in the
directory you compile in will do. (Works as expected in Okular on
Linux.)


This was a dump of knowledge that I gained from writing my thesis.
Sadly its in Czech, but part of it is PDF code snippets and tables
summarizing viewer support, that I can translate and provide if there is
interest. But a large part of what I deem practical today is implemented
and documented here:
http://mirrors.ctan.org/macros/luatex/optex/pdfextra/pdfextra-doc.pdf.
The source is probably hard to read, because of the "_" and "." prefixes
in the control sequences, but those can be ignored. I posted some "real"
documents in [3] and [5].

If more documents / snippets / explanations are needed I hope I can
provide them.

Sadly, while working on this, I didn't have access to the PDF 2.0
standard. My information mostly comes from the PDF 1.7 standard and
publicly known information about PDF 2.0 - the Rich Media mechanism got
included in PDF 2.0, but I am not sure in what extent did the Flash part
get included. I also don't know if there really is anything new, but
nothing suggests it. Regardless, viewer support isn't complete for
something standardized over 20 years ago, I don't expect revolution in
the PDF viewers, considering the price of the standard(s).


[1]: https://bugs.kde.org/show_bug.cgi?id=436709
[2]: https://invent.kde.org/graphics/okular/-/merge_requests/426
[3]: https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/855
[4]: 
https://tex.stackexchange.com/questions/516029/media9-is-becoming-obsolete-dec-2020-any-alternatives-for-embedding-video-audio/516102
[5]: https://gitlab.com/agrahn/media9/-/issues/9
[6]: https://wiki.contextgarden.net/Command/externalfigure
[7]: https://www.mail-archive.com/ntg-context@ntg.nl/msg88639.html


Best regards,
Michal Vlasák


--- a/tex/texmf-context/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/tex/texmf-context/tex/context/base/mkxl/lpdf-wid.lmt
@@ -689,22 +689,26 @@
  --  B = start,
  -- }
  -- }
- -- local parameters = pdfdictionary {
- -- Type = pdfconstant(MediaPermissions),
- -- TF   = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT 
TEMPACCESS TEMPALWAYS
- -- }
+local parameters = pdfdictionary {
+Type = pdfconstant("MediaPermissions"),
+TF   = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT 
TEMPACCESS TEMPALWAYS
+-- TEMPALWAYS - allows temporary files (needed for Acrobat / 
Windows Movie Player)
+}
 local descriptor = pdfdictionary {
 Type = pdfconstant("Filespec"),
 F= filename,
 }
 if isurl then
 descriptor.FS = pdfconstant("URL")
+descriptor = pdfreference(pdfflushobject(descriptor))
 elseif option[v_embed] then
-descriptor.EF = codeinjections.embedfile {
+descriptor = codeinjections.embedfile {
 file = filename,
 mimetype = mimetype, -- yes or no
 compress = false,
 }
+else
+descriptor = pdfreference(pdfflushobject(descriptor))
 end
 local clip = pdfdictionary {
 Type = pdfconstant("MediaClip"),
@@ -712,8 +716,8 @@
 N= label,
 CT   = mimetype,
     Alt  = pdfarray { "", "file not found" }, -- language id + message
-D= pdfreference(pdfflushobject(descriptor)),
- -- P= pdfreference(pdfflushobject(parameters)),
+D= descriptor,
+P= pdfreference(pdfflushobject(parameters)),
 }
 local rendition = pdfdictionary {
 Type = pdfconstant("Rendition"),
--- a/tex/texmf-context/tex/context/base/mkxl/scrn-wid.mklx
+++ b/tex/texmf-context/tex/context/base/mkxl/scrn-wid.mklx
@@ -649,6 +649,7 @@
 \letrenderingwindowparameter\c!closepageaction\empty
 \setrenderingwindowparameter\c!width  {\d_scrn_rendering_width }%
 \setrenderingwindowparameter\c!height {\d_scrn_rendering_height}%
+\setrenderingwindowparameter\c!align  {\v!flushleft}% don't center 
annotation whatsit
 \to \everypresetrenderingwindow
 
 
\permanent\tolerant\protected\def\placerenderingwindow[#window]#spacer[#rendering]%
 do all in lua
___
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 under LMTX, was Re: Use of lettrine module in LMTX

2021-07-25 Thread Aditya Mahajan
On Sun, 25 Jul 2021, Rik Kabel wrote:

> Perhaps a list of modules known to run correctly with LMTX is called 
> for, and perhaps a classification of modules to indicate which ConTeXt 
> versions each supports, and a way to download a distribution-appropriate 
> subset.

For some of my modules, I *.mkii, *.mkiv, *.mkxl so that the engine-appropriate 
version is selected. Note that if there is LMTX prefers mkxl but will select 
mkiv if mkxl is not available. 

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] weekend upload - stacking and animation

2021-07-13 Thread Floris van Manen



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] Invalid keyword \spaceskip

2021-06-26 Thread Steffen Wolfrum
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

2021-06-26 Thread 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
___


Re: [NTG-context] upload / some new math stuff

2021-06-11 Thread Fabrice Couvreur
Hi Hans,
I am not a font specialist and I use pagella and modern.
I'm curious so I installed this new font in
/home/viserion/LMTX/tex/texmf/fonts/opentype/public/newcomputermodern
I tested your file and I get the following message
Thank you Fabrice

Running `lmtx' on `hans-33' with
``/home/viserion/LMTX/tex/texmf-linux-64/bin/mtxrun --autogenerate --script
context --autopdf --purgeall hans-33''

resolvers   | formats | executing runner 'run luametatex format':
/home/viserion/LMTX/tex/texmf-linux-64/bin/luametatex --jobname="hans-33"
--fmt=/home/viserion/LMTX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=/home/viserion/LMTX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:autopdf --c:currentrun=1 --c:fulljobname="./hans-33"
--c:input="./hans-33" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall
--c:texmfbinpath="/home/viserion/LMTX/tex/texmf-linux-64/bin"
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
system  >
system  > ConTeXt  ver: 2021.06.10 23:13 LMTX  fmt: 2021.6.11  int:
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name
'/home/viserion/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
'/home/viserion/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 'hans-33', input './hans-33', result
'hans-33'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './hans-33.tex'
open source > level 2, order 3, name
'/home/viserion/LMTX/tex/texmf-context/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv'
close source> level 2, order 3, name
'/home/viserion/LMTX/tex/texmf-context/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv'
fonts   > defining > forced type 'otf' of 'newcm10-regular' not
found
fonts   > defining > unable to define 'newcm10-regular.otf' as
'newcomputermodern-12pt-rm-tf-0--0'
fonts   > defining > font with asked name 'newcmmath-regular' is
not found using lookup 'file'
fonts   > defining > unable to define 'newcmmath-regular' as
'newcomputermodern-12pt-mm-mr--3'
fonts   > defining > unable to define 'newcmmath-regular' as
'newcomputermodern-12pt-mm-mr--2'
fonts   > defining > unable to define 'newcmmath-regular' as
'newcomputermodern-12pt-mm-mr--1'
fonts   > defining > unable to define 'newcmmath-regular' as
'newcomputermodern-12pt-mm-mb--3'
fonts   > defining > unable to define 'newcmmath-regular' as
'newcomputermodern-12pt-mm-mb--2'
fonts   > defining > unable to define 'newcmmath-regular' as
'newcomputermodern-12pt-mm-mb--1'
tex error   > tex error on line 12 in file ./hans-33.tex: Math error:
parameter 'quad' in style 0 is not set

 \p_distance \endgroup \stopimath

 \p_distance \stopforceddisplaymath
\egroup \d_strc_math_number_width \wd \b_strc_formulas_number \ifcase
\mathnumberstatus \setfalse \c_strc_math_has_number \or \ifzeropt
\d_strc_math_number_width \setfalse \c_strc_math_has_number \else \settrue
\c_strc_math_has
 \p_distance \endgroup \ifcase \c_strc_formulas_mode
\Ucheckedstopdisplaymath \or \normalUstopmath \egroup
\strc_formulas_flush_content_and_number \else \expandafter \stopinnermath
\fi
\afterdisplayspace \egroup

 \p_distance \strc_formulas_place_number \strc_formulas_flush_number
\dostarttagged \t!formulacontent \empty \dotagregisterformula
\c_strc_formulas_n \csname \e!stop \formulaparameter \c!alternative
\v!formula \endcsname
\dostoptagged \dostoptagged \nonoindentati

 \stopformula

 2 % \setupbodyfont[cambria]
 3
 4 \starttext
 5
 6 \startformula
 7  x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm
width 5mm} =
 8  x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm
width 5mm} =
 9  x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm
width 5mm} =
10  x = \integral^1_2 \mathinner{x} =
11  x = \integral^1_2 x
12 >>  \stopformula
13
14 \startformula
15  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth
16 10mm width 5mm} =
17  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth
18 20mm width 5mm} =
19  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth
20 30mm width 5mm} =
21  x = \int\Umathadaptsize^1_2 \mathinner{x} =
22  x = \int\Umathadaptsize^1_2 x
Sorry, but I can't typeset math unless various parameters have been set.
This is
normally done by loading special math fonts into the ma

Re: [NTG-context] new page before xtable with repeated headers

2021-05-31 Thread Hans Hagen

On 5/31/2021 10:50 AM, Werner Hennrich wrote:
I still rely in all my installations on this bit at the bottom to be in 
cont-new.mkxl.

Is there a way to make this patch update-safe?

There are comments 
in ./tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl:


%D This file is loaded at runtime, thereby providing an excellent
place for hacks,
%D patches, extensions and new features. There can be local
overloads in cont-loc
%D (which has always been the case) and experimental code in
cont-exp (which is also
%D so old that I need to remind myself to check it occasionally, so
here is the
%D reminder).

I tried the mentioned local overload methods but didn't get them to work.
Did I mess up somehow or is the comment above outdated?
Are there any better ways - update-safe though?

Thanks a lot, Werner


Am 23.04.21 um 21:28 schrieb Hans Hagen:

You can put this on cont-new.mkxl as test:

\unprotect

\defcsname\??xtableflushsplit\v!repeat\endcsname
  {\doloop
 {\clf_x_table_flush
    method {\v!split}%
    height 
\ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal\relax\fi

  \relax
  \ifcase\c_tabl_x_state
    \exitloop
  \else
    \page
  \fi}}

\protect 
cont-new will be overwritten so when you put a patch in there you need 
to check a next upload if that patch is permanent


you can also put patched in a cont-loc file (make sure that you run 
mtxrun --generate after making one) and out that file in your 
texmf-local tree  (or project tree) as these will not be replaced


you can wrap such a patch in:

\ifcsname\??xtableflushsplit\v!repeat\endcsname \else

\fi

to make sure that it's not overloading something built in

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] new page before xtable with repeated headers

2021-05-31 Thread Werner Hennrich

I still rely in all my installations on this bit at the bottom to be in
cont-new.mkxl.
Is there a way to make this patch update-safe?

There are comments
in ./tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl:

   %D This file is loaded at runtime, thereby providing an excellent
   place for hacks,
   %D patches, extensions and new features. There can be local
   overloads in cont-loc
   %D (which has always been the case) and experimental code in
   cont-exp (which is also
   %D so old that I need to remind myself to check it occasionally, so
   here is the
   %D reminder).

I tried the mentioned local overload methods but didn't get them to work.
Did I mess up somehow or is the comment above outdated?
Are there any better ways - update-safe though?

Thanks a lot, Werner


Am 23.04.21 um 21:28 schrieb Hans Hagen:

You can put this on cont-new.mkxl as test:

\unprotect

\defcsname\??xtableflushsplit\v!repeat\endcsname
  {\doloop
 {\clf_x_table_flush
    method {\v!split}%
    height
\ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal\relax\fi
  \relax
  \ifcase\c_tabl_x_state
    \exitloop
  \else
    \page
  \fi}}

\protect



___
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 and my custom typescripts

2021-05-28 Thread Michael Guravage
Yesterday I installed a new LMTX instance *ex nihilo*. Unfortunately, the
new instance will not load my typescripts. My several commercial fonts and
the typescripts I wrote for them reside in the texmf-project tree, along
with a style file that loads them. I load the style file in my source files
with the \environment command.

The files in texmf-project are properly indexed. I know this, because the
style file's name appears in the log, because I can list the fonts with mtxrun
--script fonts --list --files --all --pattern=Dolly*, and because he style
file evokes \showframe and \showgrid; the result of which I see in the
typeset results.

Regardless of whether a typescript files, e.g. type-DollyPro.tex, is in the
texmf-tree or in the same directory as the ConTeXt source file, evoking
\usetypescriptfile[type-DollyPro] fails. The log says:

fonts   > typescripts > unknown library 'DollyPro'
fonts   > typescripts > unknown library 'DollyPro'

However, including the typescripts in the ConTeXt source file succeeds;
which would seem to imply that my typescript definitions are correct.

Using an old instance: LMTX LuaTeX 2.03 20191227 + ConTeXt MkIV 2019.12.27
19:26, loading the typescript via the style file works as expected.

I regret that my mwe remains academic, since you need the Dolly font to run
it.

Any encouragement in how to resolve this would be much appreciated.

Cheers,

Michael

% \starttypescript [serif] [DollyPro]
%   \definefontsynonym [Regular]   [file:DollyPro-Regular.otf]
%   \definefontsynonym [Bold]  [file:DollyPro-Bold.otf]
%   \definefontsynonym [Italic][file:DollyPro-RegularItalic.otf]
%   \definefontsynonym [SmallCaps] [file:DollyPro-RegularSmallCaps.otf]
% \stoptypescript

% \starttypescript [serif] [DollyPro]
%   \setups[font:fallback:serif]
%   \definefontsynonym [Serif]   [Regular]   [features=default]
%   \definefontsynonym [SerifBold]   [Bold]  [features=default]
%   \definefontsynonym [SerifItalic] [Italic][features=default]
%   \definefontsynonym [SerifCaps]   [SmallCaps] [features=default]
% \stoptypescript

% \definefontfeature
%   [hz] [default]
%   [protrusion=quality, expansion=quality, mode=node, script=latn]

% \starttypescript[DollyPro]
%   \definetypeface [DollyPro] [rm] [serif] [DollyPro] [default] [features=hz]
% \stoptypescript

\usetypescriptfile[type-DollyPro]
\setupbodyfont[DollyPro]

\starttext
  \input tufte
\stoptext% Regular

\starttypescript [serif] [DollyPro]
  \definefontsynonym [Regular]   [file:DollyPro-Regular.otf]
  \definefontsynonym [Bold]  [file:DollyPro-Bold.otf]
  \definefontsynonym [Italic][file:DollyPro-RegularItalic.otf]
  \definefontsynonym [SmallCaps] [file:DollyPro-RegularSmallCaps.otf]
\stoptypescript

\starttypescript [serif] [DollyPro]
  \setups[font:fallback:serif]
  \definefontsynonym [Serif]   [Regular]   [features=default]
  \definefontsynonym [SerifBold]   [Bold]  [features=default]
  \definefontsynonym [SerifItalic] [Italic][features=default]
  \definefontsynonym [SerifCaps]   [SmallCaps] [features=default]
\stoptypescript

\definefontfeature
  [hz] [default]
  [protrusion=quality, expansion=quality, mode=node, script=latn]

\starttypescript[DollyPro]
  \definetypeface [DollyPro] [rm] [serif] [DollyPro] [default] [features=hz]
\stoptypescript

% finis
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
system  > 
system  > ConTeXt  ver: 2021.05.27 14:15 LMTX  fmt: 2021.5.28  int: english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name '/opt/_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/_lmtx_/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 'mwe', input './mwe', result 'mwe'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './mwe.tex'
fonts   > typescripts > unknown library 'DollyPro'
fonts   > typescripts > unknown library 'DollyPro'
fonts   > preloading latin modern fonts (third stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
open source > level 2, order 3, name 'tufte.tex'
close source> level 2, order 3, name 'tufte.tex'
backend > xmp > using file '/opt/_lmtx_/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 './mwe.tex'
system  > start used files
system  > text: mwe
system  > stop used files
system  > start used files
system  >1: filename=char-prv.lua filetype=tex format=tex foundname=/opt/_lmtx_/tex/texmf-contex

Re: [NTG-context] t-vim module: no highlighting for custom filetypes

2021-05-27 Thread Nicola
On 2021-05-27, Aditya Mahajan  wrote:
> On Thu, 27 May 2021, Nicola wrote:
>
>> On 2021-05-24, Aditya Mahajan  wrote:
>> > On Fri, 21 May 2021, Nicola wrote:
>> >
>> >> I have only a minor annoyance: I have just noticed that -- is typeset as
>> >> an en-dash in LMTX (but not in MKIV, as documented). Could you look into
>> >> that?
>> >
>> > Fixed in the new release.
>>
>> Thanks. I have updated to version 2021.05.23 and run `mtxrun
>> --generate`. Syntax highlighting is fine, but with LMTX I'm still
>> getting an en-dash. Below, a MWE.
>
> Can you test if the file tests/vim/21-en-dash.tex works fine at your end:
>
> https://github.com/adityam/filter/blob/dev/tests/vim/21-en-dash.tex

No, I get an en-dash with that, too. Log included below.

Nicola

fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
system  >
system  > ConTeXt  ver: 2021.05.27 14:15 LMTX  fmt: 2021.5.27  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/Users/me/Applications/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/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 'en-dash', input './en-dash', result 'en-dash'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './en-dash.tex'
modules > 'vim' is loaded
open source > level 2, order 3, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-vim.tex'
loading > Vim syntax highlighting (ver: 2021.05.23)
modules > 'filter' is loaded
open source > level 3, order 4, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv'
loading > Filter (ver: 2020.06.29)
modules > 'module-catcodes' is loaded
open source > level 4, order 5, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv'
loading > Module Catcodes (ver: 2018.04.16)
close source> level 4, order 5, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv'
close source> level 3, order 5, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv'
modules > 'syntax-highlight' is loaded
open source > level 3, order 6, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkxl'
loading > Code syntax highlighting (ver: 2021.05.24)
modules > 'syntax-groups' is loaded
open source > level 4, order 7, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.mkiv'
loading > Syntax highlighting groups (ver: 2021.05.23)
modules > 'module-catcodes' is already loaded
close source> level 4, order 7, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.mkiv'
modules > 'filter' is already loaded
close source> level 3, order 7, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkxl'
suggestion  > use \withcedilla instead of \c
close source> level 2, order 7, name 
'/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-vim.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
open source > level 2, order 8, name 'en-dash-temp-LUA-0.vimout'
close source> level 2, order 8, name 'en-dash-temp-LUA-0.vimout'
backend > xmp > using file 
'/Users/me/Applications/context-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 8, name './en-dash.tex'
system  > start used files
system  > text: en-dash
system  > stop used files
system  > start used files
system  >1: filename=char-prv.lua filetype=tex format=tex 
foundname=/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/char-prv.lua
 
fullname=/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/char-prv.lua
 usedmethod=database
system  >2: filename=lmmono10-regular filetype=otf format=otf 
foundname=/Users/me/Applications/context-osx-64/tex/texmf/fonts/opentype/public

Re: [NTG-context] Luatex format error

2021-05-24 Thread Hans Åberg

> On 23 May 2021, at 23:41, Hans Hagen  wrote:
> 
> On 5/23/2021 9:28 PM, Hans Åberg wrote:
>> Using TexLive 2021, I got the error below. How to fix it? What input file 
>> should one give?
>> % context math_style.tex
>> resolvers   | formats | executing runner 'run luatex format': 
>> /usr/local/texlive/2021/bin/universal-darwin/luatex --jobname="math_style" 
>> --fmt=/Users//Library/texlive/2021/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.fmt
>>  
>> --lua=/Users//Library/texlive/2021/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui
>>   --c:currentrun=1 --c:fulljobname="./math_style.tex" 
>> --c:input="./math_style.tex" --c:kindofrun=1 --c:maxnofruns=9 
>> --c:texmfbinpath="/usr/local/texlive/2021/bin/universal-darwin"
>> This is LuaTeX, Version 1.13.2 (TeX Live 2021)
>>  system commands enabled.
>> **
>> Please type the name of your input file.
>> **
> So this is not lmtx (which also has luatex) but the regular installation 
> right?

% context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/usr/local/texlive/2021/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.03.05 19:11
mtx-context | main context file: 
/usr/local/texlive/2021/texmf-dist/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.03.05 19:11

% which context
/usr/local/texlive/2021/bin/universal-darwin/context

> Does that file have \starttext ... \stoptext ?

Yes, the example from another thread on math style.

\starttext
   \m{f = \beta}
\stoptext

> 
> There is something missing:
> 
>   ..cont-en.lui cont-yes.mkiv --c:currentrun=1
> 
> in mkiv the input is loaded indirectly (via cont-yes.mkiv) but in lmtx we 
> don't pass that one (not needed as we start up a bit different)

Should one use anything else than just 'context'?


___
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] t-vim module: no highlighting for custom filetypes

2021-05-23 Thread Aditya Mahajan
On Sun, 23 May 2021, Hans Hagen wrote:

> On 5/22/2021 6:15 PM, Aditya Mahajan wrote:
> > On Sat, 22 May 2021, Hans Hagen wrote:
> > 
> > > On 5/21/2021 9:37 PM, Nicola wrote:
> > 
> > > > I have only a minor annoyance: I have just noticed that -- is typeset as
> > > > an en-dash in LMTX (but not in MKIV, as documented). Could you look into
> > > > that?
> > > 
> > > best is that the module uses:
> > > 
> > > \the\everyinitializeverbatim
> > > 
> > > because there we disable all kind of non verbatim stuff
> > 
> > Thanks. It took a few trial and error that \the\everyinitializeverbatim
> > must come after \usealignparameter. However, using \nohypencollapsing after
> > \usealignparameter means that I cannot get hypenated lines (something which
> > had been requested in the past for t-vim). See the attached file.
> > 
> > BTW, shouldn't we have `features=none` in the default mono font setup so
> > that this doesn't happen anyways?
> afaik we already do that
> 
> (i'll add some more control, already added \setuphyphenation[hyphen=no] here)
> 
> I need to find a reasonable way to provide control over all these things ...
> real low level btw is \hyphenationmode\zerocount ... look in lang-ini.mkxl for
> all possible flags)

Thanks. I guess, it is time to freeze the mkiv version of the module and 
introduce a mkxl version.

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] [metafun example does not compile]

2021-05-21 Thread Taco Hoekwater
Hi,

It looks like textext.dflt is undefined in the latest lmtx because it is now
renamed to textext.dlft :)


> On 21 May 2021, at 14:03, Floris van Manen  wrote:
> 
> Using the example from the wiki
> https://wiki.contextgarden.net/textext_positioning
> 
> then using the latest version of lmtx
> 
> $ context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /home/vm/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.05.20 16:06
> mtx-context | main context file: 
> /home/vm/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.05.20 16:06
> 
> 
> it will produce an error (and an empty page)
> 
> 
> 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'
> metafun > log >
> metafun > log > error: Unknown relation will be considered false
> metafun > log >
> metapost> log >
> metapost> log > 
> metapost> log >)
> metapost> log > 
> thetextext->...FIX2)(rawtextext(ddecimal(EXPR3)),(EXPR4))else:if.anchortextexts>0:image(draw(EXPR3)withprescript"tx_anchor="(EXPR4))else:(EXPR3)fi.if(mfun_labtype(SUFFIX2)>=10)
> metapost> log > :shifted(0,y...
> metapost> log > 
> thetextext->begingroup.if.string(EXPR3):thetextext(SUFFIX2)(rawtextext((EXPR3)),(EXPR4))
> metapost> log > 
> elseif.numeric(EXPR3):thetextext(SUFFIX2)(rawtextext(decimal(EXPR3)),(EXPR4))elseif.pair(EXPR3):thetextext(SU...
> metapost> log > 
> textext->begingroup.thetextext(SUFFIX2)((EXPR3),origin)
> metapost> log >   endgroup
> metapost> log > <*> ...A; draw PA withpen pencircle scaled 1.5mm 
> withcolor red; pair PB ; PB := PA shifted decal ; draw textext.drt ("DRT-" & 
> MonTexte) shifted PB; draw textext.dflt("DFLT-" & MonTexte)
> metafun > log >
> metafun > log > Oh dear. I can't decide if the expression above is 
> positive, negative, or zero.
> So this comparison test won't be 'true'.
> 
> 
> 
> 
> As in most of the cases with software, there is (probably) a reason to it ;-)
> 
> 
> .F
> ___
> 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
___


<    1   2   3   4   >