Re: [NTG-context] filling buffers in cld documents

2022-11-27 Thread Hans Hagen via ntg-context

On 11/27/2022 1:05 PM, damien thiriet via ntg-context wrote:

Hi,


I am used to giving very extensive feedbacks to my pupils.
These are buffers with xtables flushing lua vectors.
Here is their basic structures:

* an environment that stores xtables. Turned into MWE, look like:

    \startenvironment env_corrige.mkiv

    \startluacode
   userdata = userdata or {}
    function userdata.Critere (commentaire,note,notemax)
   context.startxcell {"width=11cm","height=2.75cm"}
  context(Eleve[commentaire])
   context.stopxcell ()
   context.startxcell {"width=1.5cm","align=flushright"}
  context(Eleve[note])
  context("/")
  context(notemax)
   context.stopxcell ()
    end
    \stopluacode

    \startbuffer [grille]
    \startxtable
   \startxrow
  \startxcell
     \ctxlua {userdata.Critere ("structure","NoteStructure",2)}
  \stopxcell
   \stopxrow
    \stopxtable
    \stopbuffer
    \stopenvironment

* The main file is divided in subjects, each one of them
being the feedback to one pupil. In a MWE fashion

    \useenvironment [env_corrige]
    \starttext
    \startsubject[title={Astérix}]
    \startluacode
    Eleve = {
   structure = "analyse très fine",
   NoteStructure = 2,
    }
    \stopluacode
    \getbuffer [grille]
    \stopsubject

    \startsubject[title={Obélix}]
    Eleve = {
   structure = "le détail doit être travaillé. Pensez à la finesse 
de vos menhirs…"

   NoteStructure = 1,
    }
    \stopsubject
    \getbuffer [grille]
    \stoptext

Since whatever I fill in those files is written
inside luacode environment, I tried to switch to
cld documents.

Here is my main file in cld version

    context.useenvironment({"env_corrige"})

    context.starttext()

    context.startsubject({title="Asterix"})

    Eleve = {
   structure = "analyse très fine",
   NoteStructure = 2,
    }
    context.getbuffer({"ExoCorrection"})
    context.stopsubsubject()

    context.startsubject({title="Obélix"})

    Eleve = {
   structure = "le détail doit être travaillé. Pensez à la finesse 
de vos menhirs…"

   NoteStructure = 1,
    }
    context.getbuffer({"ExoCorrection"})
    context.stopsubsubject()
    context.stoptext()

The troubles is that buffers are filled with
the last version of Eleve table.
I guess this is because the whole file
is parsed and then filled in buffers.
My understanding of the cld manuel is that
context.tobuffer()
and
context.direct()

should be used, but couldn't figure out how.
Tried several times, also with context.step but
all failed.
I think I didn't properly understand the "temp"
and str of context.tobuffer description in manual.

What changes should I introduce to my cld files?
see attached ... it's more that you overload Eleve ... an alternative is 
to make a function that gets that table as (then local) argument but I 
don't want to touch your code too much


the function wrapper sort of delays (immediate evaluation is a general 
problem, of function driven typesetting, which is why in the end a pure 
function driven one is not better / easier than tex)



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
-
\startenvironment env_corrige

\startluacode

userdata = userdata or {}

function userdata.Critere (commentaire,note,notemax)
  context.startxcell { "width=11cm", "height=2.75cm" }
 context(userdata.Eleve[commentaire])
  context.stopxcell ()
  context.startxcell { "width=1.5cm", "align=flushright" }
 context("%s/%s",userdata.Eleve[note], notemax)
  context.stopxcell ()
end

\stopluacode

\startbuffer [ExoCorrection]
\startxtable
  \startxrow
 \startxcell
\ctxlua {userdata.Critere ("structure", "NoteStructure", 2)}
 \stopxcell
  \stopxrow
\stopxtable
\stopbuffer

\stopenvironment
context.useenvironment { "env_corrige" }

context.starttext()

context(function()
   context.startsubject { title = "Asterix" }
   userdata.Eleve = {
  structure = "analyse très fine",
  NoteStructure = 2,
   }
   context.getbuffer { "ExoCorrection" }
   context.stopsubsubject()
end)

context(function()
context.startsubject { title = "Obélix" }
userdata.Eleve = {
  structure = "le détail doit être travaillé. Pensez à la finesse 
de vos menhirs…",
  NoteStructure = 1,
}
   context.getbuffer {

Re: [NTG-context] Heisenbug in current?

2022-11-23 Thread Hans Hagen via ntg-context

On 11/23/2022 11:01 PM, Thomas A. Schmitz via ntg-context wrote:

Hi all,

I'm very hesitant to report this because I can't reproduce it 
consistently: some of my files don't compile with bizarre font errors, 
sometimes. At first I thought it may be a hardware problem on my laptop, 
but I've seen more or less the same error on 3 different computers now, 
intermittently. The offending call is always similar:


fonts   > otf loading > loading 
'/mnt/shared/lmtx/tex/texmf/fonts/data/public/dejavu/DejaVuSansMono.ttf', hash 'dejavusansmono'
otf reader  > fatal error in file 
'/mnt/shared/lmtx/tex/texmf/fonts/data/public/dejavu/DejaVuSansMono.ttf': ...e0dde776fb1556f32e/formats/luametatex/font-otr-macro.lua:1040: attempt to call a nil value (field 'to16dot16')


It concerns several fonts, both my own and (as here) from the 
installation, and the first error is always this "field 'to16dot16.'" 
Has anybody else seen this? Do the developers have any idea what this 
could be? Has there been a change in the code concerning this field?


Sorry for being so vague, but I'm pulling my hair  because this error 
crops up totally at random, AFAICS.

probably not that random ... can you put this on top of font-otr.lua

local number = number

and see if that helps .. if so you can then spend the rest of the 
evening figuring out where 'number' gets defined global


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Font expansion enabled by default with the latest upload

2022-11-21 Thread Hans Hagen via ntg-context

On 11/21/2022 10:20 AM, Max Chernoff via ntg-context wrote:

Hi Hans,

Font expansion (hz) seems to be enabled by default with the latest
upload.

If I compile this document locally with ConTeXt "2022.11.18 13:22":

\showframe

% \definefontfeature[default][default][expansion=quality]

% \usetypescript[modern-base]
% \setupbodyfont[reset,modern]
% \setupalign[hz]

\starttext

Hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello hello hello hello hello
hello hello hello.
\stoptext

I get slightly different spacing than I do when I compile the same
document on live.contextgarden.net. If I compile the document with the
lines uncommitted on live.contextgarden.net, I get the same results as I
do on my local installation with the lines commented.

Personally, I think that enabling hz expansion by default is probably a
good thing, but this change will affect a very large number of documents
and you never mentioned it in the announcement email, so I suspect that
it was accidentally added when you added the math hz.
what you observe is likely a side effect of an increase in accuracy 
which gives a bit less drift in the pdf; expansion is turned off (it 
would increase runtime if turned on)


(increased accuracy was indeed a side effect of math but more to get rid 
of an annoyance at extreme resolutions)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] annotated equations

2022-11-18 Thread Hans Hagen via ntg-context

On 11/18/2022 5:25 PM, Aditya Mahajan via ntg-context wrote:

On Thu, 17 Nov 2022, Henning Hraban Ramm via ntg-context wrote:


Here’s an interesting example for annotated equations, done with LaTeX/TikZ:
https://mastodon.social/@sibin/109349703357749846

I guess something similar is possible with node anchors in ConTeXt/MetaPost?


Yes, this is possible using node anchors and \hpos etc. The interface is 
slightly cumbersome, mainly because you have to make sure that anchors are 
unique.

I sometimes use such constructs in my presentations, but not often enough to 
build a nice interface as the latex package provides.
eventually there will be something as part of the math upsate (we also 
have some stuff for matrices already) but only documenting can make if 
final (as then we check consistency); the problem is not the interface 
but to *not* mess up the math spacing that we want to be 'perfect' if 
such features are used without the need to interfere


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \autoinsertedspace fails following \nbsp under LMTX

2022-11-17 Thread Hans Hagen via ntg-context

On 11/17/2022 6:43 AM, Rik Kabel via ntg-context wrote:

ConTeXt  ver: 2022.11.14 22:58 LMTX on W11 x64

I have been testing the recently added \autoinsertedspace, and I found 
an odd failure.

fixed n next upload


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] annotated equations

2022-11-17 Thread Hans Hagen via ntg-context

On 11/17/2022 1:46 PM, Henning Hraban Ramm via ntg-context wrote:
Here’s an interesting example for annotated equations, done with 
LaTeX/TikZ:

https://mastodon.social/@sibin/109349703357749846

I guess something similar is possible with node anchors in 
ConTeXt/MetaPost?
Mikael and I played plenty with annotating formulas as part of all this 
math stuff (part of exploring interference with spacing which is 
something we don't want cq. bother users with); for inline, display and 
matrices


but as usual it's demand driven so it is pending 'documenting' and 
'interface improvements' ... it's not like users are screaming for these 
features and there are no projects that drive them so "yes, it's there, 
but you need to check the examples (in the source)"


the priorities are currently: math tweaks (+ fixing some fonts), new 
math manual, additional trickery, mixed with stimulating metafun


(attached a quick and dirty copy of one of our many todo docs)

Hans

(who every time he sees something called 'mastodon' has to smile and 
remember reading 
https://eu.palmbeachdailynews.com/story/entertainment/2020/10/16/carl-hiaasen-writes-pythons-palm-beach-and-potus-new-book/3667047001/) 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


demo.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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Xml filtering in Lua

2022-11-17 Thread Hans Hagen via ntg-context

On 11/16/2022 8:56 PM, mf via ntg-context wrote:

This works:

local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id 
.. '"]')


also this:

local lpath = string.format('../../topics/topic[@t:id=="%s"]', ch_id)

local metadata = xml.filter (t, lpath)


It looks like xml.filter supports only 2 arguments (see lxml-tex.lua), 
and so it doesn't let you use string formatting patterns like the 
"context" command does.


You can write:

context('the value of @t:id is "%s"', ch_id)

but you can't write:

xml.filter (t, '../../topics/topic[@t:id=="%s"]', ch_id)

In Thomas example this is also an approach:

\startxmlsetups xml:document
\xmlfunction{#1} {document}
\xmlflush{#1}
\stopxmlsetups

with

\startluacode
local topics   = { }
local chapters = { }

function xml.functions.document(t)
for c in xml.collected(t,"/topics/topic") do
topics[c.at.t_id] = c
end
 -- for c in xml.collected(t,"/chapters/chapter") do
 -- chapters[c.at.ch_id] = c
 -- -- or flush here
 -- end
end

function xml.functions.chapter (t)
local ch_id = t.at.ch_id
local metadata = topics[ch_id]
lxml.command(t, ".", "xml:chapter:content")
context.par ()
context (ch_id)
context.par ()
end
\stopluacode

so, basically you collect data and use it later ... for huge datasets 
that saves some time


if you have only chapters to process you can even decide to flush in 
that function


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Hans Hagen via ntg-context

On 11/16/2022 10:09 PM, Thomas A. Schmitz via ntg-context wrote:

On 11/16/22 21:51, Denis Maier via ntg-context wrote:

Just a quick question regarding this?
Is xml.filter equivalent to \xmlfilter? If so, how do you pass the 
match to a command as you'd do with \xmlfilter?


I'm still digesting and playing with Massi's reply; will probably be 
back with more questions :-)


Anyway:

If you've filtered something out like this

local tree = xml.filter (t, "../chapter[@title='mytitle'")


always keep in mind that some expressions return a list of matches, that 
can be looped over and some commands just process the first


anyway, it can sometimes help to add

print(tstring(tree))

so see what you got

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] new upload

2022-11-14 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version. New is that we can apply hz to math, although 
currently we have configured it as experiment.


\setupbodyfont[pagella]

% \startluacode
% fonts.expansions.vectors.math = {
% [0x002B] = { 4, 0 }, -- +
% [0x2212] = { 4, 0 }, -- -
% [0x003C] = { 8, 0 }, -- <
% [0x003D] = { 8, 0 }, -- =
% [0x003E] = { 8, 0 }, -- >
% [0x002F] = { 2, 0 }, -- /
% [0x0028] = { 2, 0 }, -- (
% [0x0029] = { 2, 0 }, -- )
% [0x005B] = { 2, 0 }, -- [
% [0x005D] = { 2, 0 }, -- ]
% }
% \stopluacode

\setupmathematics[hz=yes]

\startbuffer \showglyphs
\dorecurse{20}{\strut test $x + y/2 - w = 10$ }\unskip
\stopbuffer

\definecolor[tgreen][g=1,t=.5,a=1]
\definecolor[tred]  [r=1,t=.5,a=1]

\startTEXpage[offset=5dk]
\startoverlay
  {\ruledvbox to 5cm{\setupalign 
[tolerant,stretch]\tgreen\getbuffer\vss}}
  {\ruledvbox to 
5cm{\setupalign[hz,tolerant,stretch]\tred\getbuffer\vss}}

\stopoverlay
\stopTEXpage

\stoptext

Normally an expansion factor is small and used for both stretch and 
shrink, but we can have them independendent. So, here we stretch rather 
extreme but don't shrink.


\setupmathematics[hz=yes]

only kicks in when we have hz enabled as alignment option. We can of 
course configure more 'stretchable symbols' but first we want to know if 
it makes sense at all. We can also imagine to disable it in specific cases.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \xmldocument vs #1 in \xmlsetsetup

2022-11-14 Thread Hans Hagen via ntg-context

On 11/14/2022 7:28 PM, Pablo Rodriguez via ntg-context wrote:

On 11/14/22 14:00, Denis Maier via ntg-context wrote:

Hi,

most examples in the mkiv-xml manual use #1 with \xmlsetsetup, e.g.

\startxmlsetups xml:demo:base
   \xmlsetsetup{#1}{document|section|p}{xml:demo:*}
\stopxmlsetups

However, in quite a few occasions I’ve noticed the usage of \xmldocument
instead of #1.

What exactly is the difference ?


Hi Denis,

I have just found the following explanation
(https://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#search=xmlself):

   The macro \xmldocument expands to the current document id. There is
   also \xmlself which expands to the current node number (#1 in setups).

Now I think that I have abused \xmldocument too much, since I should
have used #1. But I’m afraid I haven’t got much different results.

I must also confess that a proper explanation would be helpful (to me in
order) to understsand when \xmldocument should not be used.
if you load a main xmkl file that is then xml document; there can be 
many xml files loaded at the same time (which you can then access bu 
{whatever} you used and once in the tree nodes are #1)


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Context crashes using Iosevka v16.3.6 typeface

2022-11-14 Thread Hans Hagen via ntg-context

On 11/12/2022 12:02 PM, Werner Schmidt via ntg-context wrote:

Dear list,

I like to use the Iosevka as mono typeface. It worked in the past, but sadly 
context crashes now with the following error.

 fatal error: /font-dsp-macro.lua:2336: attempt to index a nil value (local 
'sequence')

Plese see MWE below.

Any ideas how debug / solve this issue?


i'll intercept it

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX: reimplementing texquotes as OTF feature

2022-11-11 Thread Hans Hagen via ntg-context

On 11/11/2022 10:19 PM, Leah Neukirchen via ntg-context wrote:

Hi,

as Hans recommended in the last video meeting, I tried to implement
the texquotes feature using OTF features, and hit two problems:

1) To support German quotes as well, I have two ligatures that end
up as the same glyph:
   `` -> “
   "' -> “
This can't be in the same ligature feature, as it will overwrite
the table entry with a duplicate key.

After some fiddling, I decided to map "' to a Unicode PUA symbol
and then add a second feature that maps this symbol to “ using
the substitute feature.  This works for TeX Gyre Schola.
But perhaps someone knows a nicer way.

2) This approach doesn't work for lmodern or palatino, I still
get "' as inch-sign/quote there... anything else I need to tweak
for these fonts?


\startluacode
 fonts.handlers.otf.addfeature {
 name = "texlig",
 type = "ligature",
 data = {
 ['“'] = { "`", "`" },
 ['”'] = { "'", "'" },
 ['„'] = { '"', "`" },
 [''] = { '"', "'" },
 ['‘'] = { "`" },
 ['’'] = { "'" }
 }
 }
 fonts.handlers.otf.addfeature {
 name = "texsub",
 type = "substitute",
 data = {
 [''] = '“',
 }
 }
\stopluacode

% with lmodern or palatino it breaks
\setupbodyfont[schola]

\definefontfeature[ltest][texlig=yes,texsub=yes,trep=no]
\addff{ltest}

\starttext

``foo'' `foo' "`foo"' 19" rack

\stoptext

can you show what is wrong and what it should be with

fonts.handlers.otf.addfeature {
name = "germantexlig",
type = "ligature",
data = {
['“'] = { "`", "`" },
['”'] = { "'", "'" },
['„'] = { '"', "`" },
['“'] = { '"', "'" },
['‘'] = { "`" },
['’'] = { "'" }
}
}

best not use an existign feature because we accumulate ... features come 
in order (you can force order if needed as you probably saw in one of 
the test files)


\definefontfeature[ltest][germantexlig=yes,trep=no] \addff{ltest}


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] how to simulate \hss in luametatex?

2022-11-11 Thread Hans Hagen via ntg-context

On 11/11/2022 10:53 AM, Max Chernoff via ntg-context wrote:

Hi,


I want to  simulate \hss  in lua end in ConTeXt/luametatex environment.
For example,

```ConTeXt
a{\raise 1.5ex\hbox to 0pt{\hss b}}c
```



And in lua, I do as follows(part of my app seen in attachment):


Your code doesn't compile as is. I think that this is the same thing
though:

\starttext
\startluacode
local a = node.new"glyph"
a.char = string.byte("a")
a.font = font.current()

local b = node.new"glyph"

b.char = string.byte("b")
b.font = font.current()

local c = node.new"glyph"

c.char = string.byte("c")
c.font = font.current()

local hss = node.new("glue")

hss.stretch = 65536
hss.stretchorder = 2
hss.shrink = 65536
hss.shrinkorder = 2
hss.width = 0
b = node.insertbefore(b, b, hss)

local box = node.new("hlist", "box")

box.head = b
box.width = 0
box.shift = -tex.sp("1ex")

tex.forcehmode()

node.write(a + box + c)
\stopluacode
\stoptext


And got 'b' on top of 'c' in pdf as follows:

```pdf
   b
ac
```


The \hss isn't the problem here. The problem is actually with the box.
When you manually make the \hbox like that, I think (although I could be
wrong) that you're bypassing all of TeX's glue calculations. You should
probably use "node.hpack" instead:

\starttext
\startluacode
local a = node.new"glyph"
a.char = string.byte("a")
a.font = font.current()

local b = node.new"glyph"

b.char = string.byte("b")
b.font = font.current()

local c = node.new"glyph"

c.char = string.byte("c")
c.font = font.current()

local hss = node.new("glue")

hss.stretch = 65536
hss.stretchorder = 2
hss.shrink = 65536
hss.shrinkorder = 2
hss.width = 0

local box = node.hpack(hss + b, "exactly", 0)

box.shift = -tex.sp("1ex")

tex.forcehmode()

a.next = box
box.next = c
node.write(a)
\stopluacode
\stoptext

indeed, an dafter that you can check it

 box.glueorder  : 2
 box.glueset: 6.6683349609375
 box.gluesign   : 2

which will be applied (in the backend) to glues

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] node.setglue broken in LuaMetaTeX

2022-11-07 Thread Hans Hagen via ntg-context

On 11/7/2022 11:40 AM, Max Chernoff via ntg-context wrote:

Hi Hans,

Using node.setglue in LuaMetaTeX sets all of the glue components to
zero.

This example:

\startluacode
local stretch_order = "stretch_order"
local shrink_order = "shrink_order"
if status.luatex_engine == "luametatex" then
stretch_order = "stretchorder"
shrink_order  ="shrinkorder"
end

local glue = node.new "glue"

print(node.getglue(glue))
node.setglue(glue, 1, 2, 3, 4, 5)
print(node.getglue(glue))
glue.width = 1
glue.stretch = 2
glue.shrink = 3
glue[stretch_order] = 4
glue[shrink_order] = 5
print(node.getglue(glue))
node.setglue(glue, 1, 2, 3, 4, 5)
print(node.getglue(glue))
\stopluacode

produces this output in MkIV:

0   0   0   0   0
1   2   3   4   5
1   2   3   4   5
1   2   3   4   5

but this output in MkXL:


0   0   0   0   0
0   0   0   0   0
1   2   3   4   5
0   0   0   0   0
it is unrelated to luametatex in the sense that it doesn't have that 
setter, so we emulate it in node-cmp.lmt:


function node.setglue   (n,...) return setglue   (todirect(n),...) end

but even then you won't get the '5' as bad values are intercepted ... 
i'll also add some extra checks to those field setters


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \jobname and \doifelse

2022-11-06 Thread Hans Hagen via ntg-context

On 11/5/2022 4:30 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

using current latest (2022.10.22 11:23), I have the following sample:

   \starttext
   \doifelse{\jobname}{a}
 {yes}{no}
   \jobname

   \startluacode
   if tex.jobname == "a" then
 context("yes")
   else
 context("no")
   end
   \stopluacode
   \stoptext

I get "no" as in TeX and "yes" with Lua, being "a.tex" the source file.

The TeX conditional used to work before.

Am I missing something or have I hit a bug?

I’m on Linux64 (if this may be relevant).

More relevan tis that you'r on TeX where catcodes matter
(here letter vs other)

  \doifelse{\inputfilebarename}{oeps}
{yes}{no}

  \doifelse{\detokenize\expandafter{\jobname}}{\detokenize{oeps}}
{yes}{no}


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] OpenBSD binaries

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

On 11/4/2022 9:24 AM, damien thiriet via ntg-context wrote:

Hi,


I have two question regarding OBSD binaries:

1)
the building farm holds two binaries: current -stable version (or 
-release?) and the previous version.
Since upgrading OBSD with sysupgrade is very easy, but AFAIU works only 
to upgrade from version (n-1) to n where n is current relase number, I 
wonder if it wouldn't easier to maintain binaries only for the current 
version: keeping the OS up to date is strongly recommended.


Wasn't it you who actually suggested to have the two versions?


https://www.openbsd.org/faq/faq5.html#Flavors

This might ease OBSD binaries management.
What do other OBSD users think about it?

2) AFAIU, sources are now available for downloading.
I understand it would be possible to make a package build for my system, 
so that I can upgrade OBSD without having to wait for the next binaries 
upload.
* binaries are quite small, so they should compile quite quickly. Am I 
right?

* I believe Mojca has already a compiling script. Where can I find it?
* which adress should I point to fetch the sources for compilation?

the sources are in the distribution as is build.sh

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \definemeasure / \dimexpr

2022-11-03 Thread Hans Hagen via ntg-context

On 11/3/2022 9:32 PM, Henning Hraban Ramm via ntg-context wrote:
I’m constantly struggling with dimension calculations. Is there anything 
I can read about the possibilities and limitations?


e.g. with
\definemeasure[PageWidth][132mm]
none of the following works:
\definemeasure[FlapWidth][0.8 * \measure{PageWidth}]


use \measured (with a "d" to get a dimension)


\definemeasure[FlapWidth][.8\measure{PageWidth}]
\definemeasure[FlapWidth][\measure{PageWidth} * 0.8]
\definemeasure[FlapWidth][\measure{PageWidth}*8/10]
\definemeasure[FlapWidth][8\measure{PageWidth}/10]

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


maillist : ntg-context@ntg.nl / 
https://www.ntg.nl/mailman/listinfo/ntg-context

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


--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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


Re: [NTG-context] font features

2022-11-03 Thread Hans Hagen via ntg-context

On 11/3/2022 2:03 PM, Thomas A. Schmitz via ntg-context wrote:

On 11/3/22 13:27, Henning Hraban Ramm via ntg-context wrote:
If it works for you, then it’s a problem of my installation, otherwise 
a regression in current LMTX...


No, I get the same error message, this looks promising but doesn't work.

And at the risk of sounding grumpy, but all of this is too much manual 
intervention; I would like to have a completely automated script. So 
I'll show what I have and add a few comments:


local Feature_Table = { }
local Parsed_Features = { }

local My_Font = environment.arguments["font"]

local Font_Features = os.resultof("otfinfo -f " .. My_Font)

for Feature_Sigla, Feature_Name in
   string.gmatch(Font_Features, "(%S-)\t(.-)\n") do
   Feature_Table[Feature_Sigla] = Feature_Name
end

COMMENTS

Expectation: this should return a list of all features and their 
descriptions as a lua table. If you run the file as


context test.cld --font="/path/to/font"

this works, and you get a table

Feature_Table={
  ["aalt"]="Access All Alternates",
  ["c2sc"]="Small Capitals From Capitals"} etc.

CODE

for name, _ in pairs(Feature_Table) do
   Context_Name = "f:" .. name
   Parsed_Features[name] = Context_Name
   context.definefontfeature( { Context_Name }, { name="yes" } )
end

COMMENTS

This should produce a lua table with ConTeXt fontfeatures and define 
those features. The table appears to be correct:


Parsed_Features={
  ["aalt"]="f:aalt",
  ["c2sc"]="f:c2sc"} etc.

So I expected that this should be equivalent to

\definefontfeature [f:aalt] [aalt=yes]

and return a list of defined features.

CODE

local Test_String = [[
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890 1/4 2/8 
3/9 ffi ft fi fl ffl

]]

local Font_Name =  os.resultof("otfinfo -a " .. My_Font)

context.definefontfamily( { "Test" }, { "serif" }, { Font_Name }, {} )

context.setupbodyfont{ "Test, 12pt" }

COMMENTS

Again, this works; the font is set as bodyfont.

CODE

context.starttext()

for name, feature in pairs(Feature_Table) do
   context.start ()
   context.addfeature { Parsed_Features[name] }
   context.midaligned (feature)
   context.bold (Parsed_Features[name])
   context.par ()
   context.blank{ "medium" }
   context(Test_String)
   context.par ()
   context.stop ()
end

context.stoptext()

COMMENTS

And this doesn't work: the names are picked up, but the font features 
are not defined; the sample text does not reflect any features. So this 
is what I've got... maybe one of the wizards can help.
You're going way too complex. Access to features and info has alwaye 
been part of mkic (and therefore lmtx). You can peek into the s-font* 
styles for all kind of ways to get overviews. Anyway, the following 
helper operates on the current font:


\starttext

\startluacode
function document.ShowFeatures(script)
local test = [[
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890
1/4 2/8 3/9
ffi ft fi fl ffl
]]

local font = fonts.hashes.identifiers[true]
local features = font.resources.features
 -- inspect(features)
for name, detail in table.sortedhash(features.gsub) do
if #name == 4 then
context.type(name)
context.quad()
if script then
context.type(script)
context.quad()
end
-- this should be doen once in order to save memory
-- not too hard to do ..
context.definefontfeature(
  { "f:"..name },
  { [name] = "yes", script = script }
)
context.start()
context.addff("f:"..name)
context(test)
context.stop()
context.blank()
end
end
end
\stopluacode

\definedfont[LibertinusSerif-Regular.otf*always]

\ctxlua{document.ShowFeatures()}
% \ctxlua{document.ShowFeatures("latn")}
% \ctxlua{document.ShowFeatures("grek")}

\stoptext

But, be aware that (1) features can combine in weird ways, (2) some 
features are only meant to be applied to a sunset of characters, (3) 
some are driven by script and/or language. Also, (4) you need to load 
the font without any features except the ones that enable node mode.


So, now you need to wikify ...

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
-

_

Re: [NTG-context] font features

2022-11-03 Thread Hans Hagen via ntg-context
 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   locl cyrl mkd srb
mtx-fonts   |latn aze crt fin ism kaz lsm nor nsm 
sks ssm sve tat trk

mtx-fonts   |   mark cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   onum cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   pnum cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   salt cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   smcp cyrl dflt
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn aze crt dflt kaz tat trk
mtx-fonts   |   ss01 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ss02 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ss03 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ss04 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ss05 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ss06 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ss07 cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   subs cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   sups cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   tnum cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   zero cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl

Re: [NTG-context] context --autopdf and --showdirectives

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

On 10/31/2022 11:01 PM, Henning Hraban Ramm via ntg-context wrote:
I’d like to configure the default behaviour of "context --autopdf"; 
since on my Mac I must always write "--autopdf=auto", otherwise context 
tries to call


wine "sumatrapdf.exe" -reuse-instance -bg-color 0xCC

instead of e.g. "open".

There’s a hint about "directives_pdfview_method", so I wanted to find 
out more about directives:

"context --showdirectives" looks promising;
it tells me "result saved in file: 
.../texmf-context/tex/context/base/mkiv/mtx-context-setters.pdf", but 
that file isn’t there; it is actually in the current directory, but broken.


it's more a side effect, we need to run context to get them

 > * How can I configure the command for --autopdf ? (Something in

texmfcnf.lua?)

* Can we add additional options ("pdfview methods: auto default okular 
pdfxcview sumatra"), e.g. open (should be default on Mac), xdg-open 
(could be default on Linux)...


you can try to set it in the cnf:

 -- ["pdfview.method"]   = "sumatra",


* What’s wrong with --showdirectives?


i'll fix the show variant, just use --directives

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] something’s wrong with \definefontfallback

2022-10-30 Thread Hans Hagen via ntg-context

On 10/30/2022 4:43 PM, Henning Hraban Ramm via ntg-context wrote:

This used to work:

\definefontfallback[seguiFB]
   [file:seguisym.ttf]
   [0x0-0xF]
   [check=yes,force=no]

\definetypeface [contextstart] [ss] [sans]  [segoe] 
[default][fallbacks=seguiFB]


(Intention is to take all missing characters from this symbol font.)


But with current LMTX, I get:



tex error   > tex error on line 48 in file env_contextstart.tex:

lua error:

 registered function call [1145]: 
...-14/tex/texmf-context/tex/context/base/mkxl/math-act.lmt:2339: 
attempt to perform arithmetic on a nil value (field 'depth')
Your example is too minimal so i can't test it. Do you also set those 
fallbacks on a math font (as the error has to do with math fallbacks).


Btw, 0x0-0xF is a bit over the top,

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] "true" units in LuaMetaTeX

2022-10-27 Thread Hans Hagen via ntg-context

On 10/27/2022 10:22 AM, Max Chernoff via ntg-context wrote:


Hi Hans,


Anyway, I'll check it. Is anyone still using this "true" actually?


I've been playing around with LuaMetaLaTeX/LuaMetaPlain recently

https://github.com/zauguin/luametalatex

and plain.tex uses truein for typesetting the footnote rule. It's trivial

to fix that specific case, but I'm finding 140 other files in TeX Live that
use the "true" dimensions, 69 of which that have been updated in the past 3
years. I doubt that anyone in ConTeXt uses the "true" dimensions though.
well, we can keep it as depricated feature (as there is no measurable 
overhead when it's not used) .. although i might come up with some plain 
mode in lmtx (when i'm really bored as it makes little sense) i'm not 
going to worry much about / cq. follow old-school usage and 
compatibility wrt dvi driver related features (i'm not even sure if 
luametatex makes sense for other macro packages but we'll see, these 
things happens outside my scope anyway)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \autoinsertnextspace regression / discrepancy, mkiv to lmtx

2022-10-27 Thread Hans Hagen via ntg-context

On 10/26/2022 3:35 PM, Rik Kabel via ntg-context wrote:


On 2022-10-26 07:43, Hans Hagen via ntg-context wrote:

On 10/26/2022 1:52 AM, Rik Kabel via ntg-context wrote:
The following example produces different results when processed by 
LMTX and MkIV. In particular, a space between the X and Y is not 
auto-inserted by LMTX, while it is by MkIV.


    \starttexdefinition TEST #1
   #1\autoinsertnextspace
    \stoptexdefinition
    \tt
    \starttext
   \TEST{X} \emph{Y}
    \stoptext

The MkIV result is the correct result (in my opinion).

more a side effect ... we lookahead and \emph is not some character

I made a variants that does abetter job on that

\starttexdefinition TEST #1
    #1%
    \autoinsertedspace % subtle name change
\stoptexdefinition

but you have to wait till we update,

Hans



Thank you in advance for the upcoming fix.

Can you tell us (me) why you chose to create a new macro, 
\autoinsertedspace, instead of changing the code for 
\autoinsertnextspace in LMTX? Do you see a circumstance under which the 
current LMTX behavior of \autoinsertnextspace is desirable or required? 


compatibility .. it also uses a different mechanism for which that name 
suits better



Will the new macro be available under MkIV?

I suppose I can do that if needed,

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] "true" units in LuaMetaTeX

2022-10-27 Thread Hans Hagen via ntg-context

On 10/27/2022 8:11 AM, Max Chernoff via ntg-context wrote:

Hi Hans,

The unit scanner in LuaMetaTeX fails for any of the "true" dimensions.

With this test file:

\starttext
\vrule width 1truein height 1pt depth 0pt\relax

\vrule width 1in height 1pt depth 0pt\relax

\stoptext

I get this output:

tex error   > tex error on line 2 in file ./lmtx-true.tex: Valid 
keyword expected, likely 'true'



\vrule width 1truei
n height 1pt depth 0pt\relax

1 \starttext

2 >>  \vrule width 1truein height 1pt depth 0pt\relax
3
4 \vrule width 1in height 1pt depth 0pt\relax
5 \stoptext
6

I was able to fix this with the patch at the end of the email.

(Also, how do you want patches sent? Via email to the mailing list,
emailed directly to you, as a pull request on GitHub, or something
else?)


In a way 'true' has been dropped becauswe it doesn't do anything and I 
will likely remove that check completely (as \mag is also gone, although 
the performance hit for scanning true is neglectable in luametatex).


Anyway, I'll check it. Is anyone still using this "true" actually?

I don't check github, it's mostly there for the compile farm and 
intermediate testing (e.g. math stuff) so sending me a mail is ok. When 
there is some serious issue a mwe to the list is good enough.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \autoinsertnextspace regression / discrepancy, mkiv to lmtx

2022-10-26 Thread Hans Hagen via ntg-context

On 10/26/2022 1:52 AM, Rik Kabel via ntg-context wrote:
The following example produces different results when processed by LMTX 
and MkIV. In particular, a space between the X and Y is not 
auto-inserted by LMTX, while it is by MkIV.


\starttexdefinition TEST #1
   #1\autoinsertnextspace
\stoptexdefinition
\tt
\starttext
   \TEST{X} \emph{Y}
\stoptext

The MkIV result is the correct result (in my opinion).

more a side effect ... we lookahead and \emph is not some character

I made a variants that does abetter job on that

\starttexdefinition TEST #1
#1%
\autoinsertedspace % subtle name change
\stoptexdefinition

but you have to wait till we update,

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] never add a hyphen to break a URL

2022-10-25 Thread Hans Hagen via ntg-context

On 10/25/2022 11:05 AM, Steffen Wolfrum via ntg-context wrote:

This does not open the right link.

At least on my machine nothing happens when clicking on 
«litteraturbanken.se <http://litteraturbanken.se/>».


(And it looks as the link was cropped, only reads the first line?)


\setupinteraction[state=start]

\useurl
  [litteraturbanken]
  [https://litteraturbanken.se]

[författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only]
  [https://litteraturbanken.se]

\starttext

before \goto{\url[litteraturbanken]}[url(litteraturbanken)] after

before \from[litteraturbanken] after

\stoptext

beware of viewer behaviour: some viewers parse the displayed 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Fwd: Hyphenation in multi-language projects

2022-10-24 Thread Hans Hagen via ntg-context

On 10/24/2022 3:08 PM, Steffen Wolfrum wrote:




Anfang der weitergeleiteten Nachricht:

*Von: *Pablo Rodriguez via ntg-context <mailto:ntg-context@ntg.nl>>

*Betreff: **Aw: [NTG-context] Hyphenation in multi-language projects*
*Datum: *14. September 2022 um 19:40:53 MESZ
*An: *Denis Maier via ntg-context <mailto:ntg-context@ntg.nl>>

*Kopie: *Pablo Rodriguez mailto:oi...@gmx.es>>
*Antwort an: *mailing list for ConTeXt users <mailto:ntg-context@ntg.nl>>


On 9/14/22 16:54, Denis Maier via ntg-context wrote:

[...]
Isn’t there a way to list exceptions that will work in *all*
languages?


I thought that \hyphenation would work like that, or \startexceptions
without a language code. Apparently that's not the case.


\hyphenation only works for the given language:

 \hyphenation{macOS}
 \starttext
 \startTEXpage[offset=1em]
 \currentlanguage:
 \hyphenatedword{macOS}

 \startlanguage[fr]
 \currentlanguage:
 \hyphenatedword{macOS}
 \stoplanguage
 \stopTEXpage
 \stoptext

But I’d say that \registerhyphenationexception[macOS] was
language-independent for me some time ago. (Now it seems to work like
\hyphenation.)

In any case, \registerhyphenationexception seems to have issues with
ligatures:

 \setuphyphenation[method=traditional]
 \registerhyphenationexception[steff-en macOS]
 \registerhyphenationexception[it][steff-en macOS]

 \starttext
 \startTEXpage[offset=1em]
 \currentlanguage:
 \hyphenatedword{steffen macOS}

 \startlanguage[it]
 \currentlanguage:
 \hyphenatedword{steffen macOS}
 \stoplanguage
 \stopTEXpage
 \stoptext

If there isn’t a command to add language-indepented hyphenation
exceptions or patterns, one for proper names (for people, products or
companies) would be really useful.

Just in case Hans or other wizard may take a look at this,

Pablo



Hans, is there any news regarding Pablos wish?

no, because I'm in a different tex mode ...

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Backgrounds has changed in latest lmtx

2022-10-23 Thread Hans Hagen via ntg-context

On 10/23/2022 10:10 PM, Thomas A. Schmitz via ntg-context wrote:

On 10/23/22 21:54, Leah Neukirchen wrote:

FWIW I get the error too on linux64.


OK, found it. File 
lmtx/tex/texmf-context/tex/context/fonts/mkiv/xits-math.lfg


is missing the lines

local common  = fonts.goodies.load("common-math.lfg")
local presets = common.mathematics.tweaks.presets

at the beginning of the file. However, math is typeset in Latin Modern. 
But that's for the math people to see...
Mikael: we have to make mkxl variants of typescript where we replace 
xits by stix .. for the todo.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] upload

2022-10-21 Thread Hans Hagen via ntg-context

Hi,

I updated lmtx ... there are a few fixes for issues reported on the 
list. In the perspective of updating math the - otherwise unchanged - 
mkiv variant has also been updated a little. No new commands, just some 
(already old) experimental font related features gone and replaced by a 
combined one inspired by what we do in lmtx. In our opinion on the 
average it should not come out worse.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Setting the size of \small

2022-10-21 Thread Hans Hagen via ntg-context

On 10/21/2022 12:59 AM, Leah Neukirchen via ntg-context wrote:

Hi,

playing around with \definebodyfontenvironment with latest LMTX,
I found this possibly buggy behavior:

\definebodyfontenvironment[12pt][small=6pt] % x=6pt works here
\setupbodyfont[12pt]
\starttext
normal {\tx tx} {\small small}
\stoptext

With \definebodyfontenvironment[12pt][x=6pt] I can resize \tx fine,
but for \small it doesn't work.
it has to do with the fact that we have font clases and some parameters 
are bound to it.


\setupbodyfontenvironment
  [pagella]
  [12pt]
  [x=4pt,
   small=4pt]

\setupbodyfont[pagella,12pt]

\starttext
normal {\tx tx} {\small small}
\stoptext

that will work. You can say \fontclass to see what you got after a 
\setupbodyfont.


I'll add

\setupbodyfontenvironment
  [all]
  [12pt]
  [x=4pt,
   small=4pt]

as option (assuming we have no performance hit).

x xx  : dynamic
small big : more static (trigger some definitions)

when we decide to go 'compact fonts' we can review this. We can then 
also decide to get rid of the old design size subsystem (only lm uses it 
unless one does 'modern' and there are other ways.)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \showstruts displaces text in LMTX

2022-10-19 Thread Hans Hagen via ntg-context

On 10/19/2022 8:48 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

compiling the following sample with current latest (2022.10.15 10:37):

   \showframe
   \showstruts
   \setuppapersize[A6]
   \setupnotation[footnote]
 [alternative=serried]
   \starttext
a\footnote{\input zapf}
   \stoptext

I get the text in the footnote is displaced. It only happens with LMTX
(not with MkIV) and not with previous latest.

Could anyone confirm the issue?

fixed in next upload (side effect of horizontal strut variant)

-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing parinitskips in \normalizelinemode=0

2022-10-19 Thread Hans Hagen via ntg-context

On 10/19/2022 3:01 AM, Max Chernoff via ntg-context wrote:

Hi Hans,

When running in \normalizelinemode=0, the \parinitleftskip and
\parinitrightskip nodes are either nonexistant or invisible from Lua,
causing tex.linebreak to not work correctly.

This sample file:

\enabledirectives[system.callbacks.permitoverloads]

\normalizelinemode=0

\directlua{

callback.register("pre_linebreak_filter", function(head)
tex.preparelinebreak(head)
local list, info = tex.linebreak(head)
print(info)

return head

end)
}

\starttext

   \input knuth
\stoptext

Produces this output:

luatex warning  > linebreak: list seems already prepared
luatex warning  > linebreak: [ leftinit | rightinit | leftfill | rigthfill 
] expected
nil

i'll bypass that warnign when the mode is zero

btw, you need to work with a copy of the list

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new upload

2022-10-17 Thread Hans Hagen via ntg-context

On 10/17/2022 7:12 PM, Pablo Rodriguez via ntg-context wrote:

On 10/15/22 11:28, Hans Hagen via ntg-context wrote:

[…]
just run twice as the script will pick up


Hi Hans,

I have tried updating ConTeXt in Windows this morning and I’m afraid it
hasn't worked.

Until I can manage this, I think I will download (to the extend that is
possible [and if this works at all]) a Win64 distribution using Linux64
with "--platform=win64".

The problem is clearly not the speed of the internet connection. I use
internet with the standard speed.

There are two things that strike me as possible causes.

1. Depending of which update is pending, the script announces a
different number of files to be downloaded.

The problem is that each individual file download seems to require a
complete connection.

I mean, it takes about ten seconds to establish a connection for each
file. It is irrelevant how big the file actually is.

After that, it isn’t much harder to download the LMTX binary than a tiny
text file.


so then just do a complete install


For most files, they aren’t downloaded in the first connection (they may
require more than three downloads). It doesn’t seem to depend on size.

This is what makes it hard to reach even 10% in the download.

And even if some files may have been downloaded, once the script quits,
the already downloaded files need to be downloaded again (since the main
download process wasn’t completed).

2. The whole download is http instead of https.


sure, but if you have the curl(lib) installed in principle one could do 
a secure install (I didn't really test it but it's in there)



Sorry, but this may be causing the delay in the connections (because
they may be being filtered by the company proxy [and I don’t want to ask]).

https://lmtx.pragma-ade.nl seems to be the only source used (in Windows)
and its certificate is only valid for lmtx.pragma-ade.com (according to
Firefox).


hm, you can change the url in the install script (maybe i can set up the 
server differently but not now)



Even using "./install.sh --secure --platform=win64" (I’m on Linux now,
no Windows here), I get:

mtx-install | instance : install-lmtx
mtx-install | platform : windows
mtx-install | system   : unix
mtx-install | fetching
'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip'
  […]
mtx-install | fetching
'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip'

I don’t know whether this is a bug or it is intended.

BTW, "local function checkurl()" on line 52 of mtx-install.lua ends with:

   and find(s,"rotocols")


not important (p P)


I think it might read (although this doesn’t seem to change anything in
my case):

   and find(s,"protocols")

Is there anything that I could to to improve the download process?
If per-file is slow at you end you can try to just install the whole lot 
(just delete the tex tree or at least the tma file that stores the 
hashes) because then the zip is downloaded and installed (one fetch).


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new upload

2022-10-17 Thread Hans Hagen via ntg-context

On 10/17/2022 3:38 AM, Aditya Mahajan via ntg-context wrote:

On Sun, 16 Oct 2022, Mikael Sundqvist via ntg-context wrote:


Hi,

On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
 wrote:


On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:


Hi,

I uploaded a new version. Apart from a few fixes / extensions already
mentioned here (or known to those who wanted it) the main changes are in
the math goodie files (work in progress, we will clean them up later) as
part of improving the rendering of math.


Something is wrong with the placement of limits around an integral with 
NeoEuler:

\usetypescriptfile[euler]

\definetypeface[mainfont][rm][specserif][CharisSil][default]
\definetypeface[mainfont][mm][math] [eulernova][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,10pt]

\starttext
\startTEXpage[offset=1mm]
   $\displaystyle \int_{0}^{1} f(x) dx$
\stopTEXpage
\stoptext

gives the attached result.


This is because the integral "sits wrong" in its boundingbox. Almost
all fonts have the glyph centered around the math axis, but there are
a few that doesn't. In euler-math.lfg, add the tweak

{
tweak = "fixoldschool",
},


This fixes the issue with eulernova, but not with pagellaovereuler. 
pagellaovereuler uses euler-with-pagella-math as a goodie file, but that is 
missing from the distribution. (I simply copied euler-math.lfg for my use case).

With tweak=fixoldschool, \startcases doesn't work correctly (see attached):

\usetypescriptfile[euler]

\definetypeface[mainfont][rm][specserif][CharisSil][default]
\definetypeface[mainfont][mm][math] [eulernova][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,10pt]

\starttext
\startTEXpage[offset=1mm]
   \startformula
 \startcases
   \NC A \NC B \NR
   \NC C \NC D \NR
 \stopcases
   \stopformula
\stopTEXpage
\stoptext


Looks like some older experimental value is wrong:

   parameters = {
-- DelimiterPercent=  901,
DelimiterShortfall  =  500,
},

(that whole lfg is a todo)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new upload

2022-10-17 Thread Hans Hagen via ntg-context

On 10/17/2022 8:43 AM, Otared Kavian via ntg-context wrote:


I use Lucida in my documents and did not notice any problem with the integrals 
and other large operators.
Do you mean in the future I have to update to a new version of Lucida (and pay 
again…) or will future versions of LuaMetaTeX handle correctly large operators 
typeset in Lucida ?


I think there is some free upgrade policy. In general the old font 
should work ok given that one can live with the (current) inaccuracies 
(ance it's done there will be an article about the improvemnets that 
clarifies things).


We already concluded long ago that the suite of math fonts is somewhat 
inconsistent (between and within fonts). We try to deal with that as 
good as possible and believe that we have found the right mixed 
approach. If needed we can catch averythign in the goodie files but we 
try to minimize it so once this is all settled down, we can improve 
specific font related issues based on {\em realistic} user mwe's as we go.


Concerning large operators .. it worked before so ... the main reason 
why in e.g. euler it failed was a configuration option (euler fonts will 
be fixed too) which is a side effect of more advanced script anchoring 
in lmtx.



The issue I observed with the new upload of 2022.10.15 is that the 
presentations I typeset with the simpleslides module are broken after three 
pages, but could not set up a minimal working example to send to the list. 
Those presentations are typeset correctly with previous versions.
Has Metapost changed some crucial settings ?
some mp->tex interfacing macros were upgraded but that should not really 
matter much so i need an example of what goes wrong (quite some month 
ago we fixed some left/right page related interfacing but that should 
not affect single sided documents)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new upload

2022-10-15 Thread Hans Hagen via ntg-context

On 10/15/2022 10:48 AM, Pablo Rodriguez via ntg-context wrote:

On 10/15/22 09:41, Hans Hagen via ntg-context wrote:

On 10/14/2022 4:14 PM, Pablo Rodriguez via ntg-context wrote:

[...]
Many thanks for the new version, Hans.

I have discovered that it includes in
tex/texmf-context/source/luametatex what should be the LMTX source
(about 11MB).


It zips to 2 MB and totals to less of a picture on a fancy phone ...


Many thanks for your reply, Hans.

At least on my system, I think every file is downloaded uncompressed.

With a low speed connection (here, the service isn’t great all the
time), having to download over 400 files is a killer.


as has been pointed out, you only download the changed files and those 
are not many


when sources are not included some complain, when they are others 
com-plain ...



The storage space on disk is irrelevant, I totally agree with you.

I wish I could say that large updates such as these weren’t a problem in
some cases. But sometimes this isn’t true here.

With incremental updates, the downloading process takes way shorter in
subsequent updates (as Alan pointed out). But the first time it might
take too much (so the script quits).


just run twice as the script will pick up


the idea is to provide the user with all he needs as archive so no
dependencies (apart from a compiler). Also by including the source we
can sort of guaranteed that you get what you expect to work with the tex
files (no interference with distribution patches our of our control). It
has always been part of the plan with luametatex. So ... it will not be
optional.


I asked to make this optional not to avoid having the source, but to be
able to complete the update process.


i guess a few extra fonts are more demanding, actually the number of 
fonts in the installation dropped (for now) so that compensates the 
larger source tree



I’m not extremely confident, but I hope I will manage to update ConTeXt
at the office (next working day).

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] ToC filler dots not aligned

2022-10-15 Thread Hans Hagen via ntg-context

On 10/14/2022 9:50 PM, Pablo Rodriguez via ntg-context wrote:

On 10/14/22 17:29, Schister, Roman via ntg-context wrote:

Hi,

If I typeset a table of contents with the latest version of ConTeXt
on my computer (2022.09.11 20:44 LMTX), the filler dots used in list
alternative C aren’t aligned [...]

Hi Roman,

I compiled your code with version from 2022.09.11 20:44.

I attach an overlay of the results from both LuaMeTaTeX (in red) and
LuaTeX (in darkgreen).

It seems that MkIV is doing fine, but LMTX isn’t aligning the dots (for
some reason unknown to me).

Latest from 2022.10.14 10:16 gives exactly the same result for LMTX, and
MkIV doesn’t work for me.

fixed in next upload

-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] (any) neovim users?

2022-10-15 Thread Hans Hagen via ntg-context

On 10/14/2022 5:00 PM, Alan Braslau via ntg-context wrote:

A recent upgrade of the editor neovim leads to the following error
when using % identification at the head of .tex source files.


Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: 
/usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: attempt to 
index local 'format' (a number
  value)
stack traceback:
 /usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: in 
function 'ft'
 vim/filetype.lua:2362: in function 'dispatch'
 vim/filetype.lua:2522: in function 'match'
 /usr/local/share/nvim/runtime/filetype.lua:12: in function


Has anyone encountered this? (perhaps it has been fixed upstream?)

looks like some wrong alias elsewhere ... add

local format = string.format

before that error line

-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new upload

2022-10-15 Thread Hans Hagen via ntg-context

On 10/14/2022 4:14 PM, Pablo Rodriguez via ntg-context wrote:

On 10/14/22 10:21, Hans Hagen via ntg-context wrote:

Hi,

I uploaded a new version. Apart from a few fixes / extensions already
mentioned here (or known to those who wanted it) the main changes are in
the math goodie files (work in progress, we will clean them up later) as
part of improving the rendering of math.


Many thanks for the new version, Hans.

I have discovered that it includes in
tex/texmf-context/source/luametatex what should be the LMTX source
(about 11MB).
It zips to 2 MB and totals to less of a picture on a fancy phone .. tre 
idea is to provide the user with all he needs as archive so no 
dependenccies (apart from a compiler). Also by including the source we 
can sort of guaranteed that you get what you expect to work with the tex 
files (no interference with distribution patches our of our control). It 
has always been part of the plan with luametatex.  So .. it wil not be 
optional.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] issues with current latest

2022-10-15 Thread Hans Hagen via ntg-context

On 10/15/2022 12:33 AM, Max Chernoff via ntg-context wrote:

Hi Alan,

On Fri, 2022-10-14 at 16:20 -0600, Alan Braslau wrote:

On Fri, 14 Oct 2022 15:38:52 -0600
Max Chernoff via ntg-context  wrote:


$ context --luatex test.tex
mtx-context | redirect luametatex -> luatex: luatex --luaonly 
"/opt/context/tex/texmf-linux-64/bin/mtxrun.lua" --script mtx-context --luatex 
test.tex --redirected
mtxrun  | unknown script 'mtx-context.lua' or
'mtx-mtx-context.lua'

This happens when the luatex cache is cleared and the context format is not 
rebuilt properly.


Do you know how to rebuild the format? I've tried the following to no
avail:
normally context will remake automatically (you can try to touch the 
context.mk* file)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] issues with current latest

2022-10-15 Thread Hans Hagen via ntg-context

On 10/15/2022 12:46 AM, Max Chernoff via ntg-context wrote:

On Fri, 2022-10-14 at 16:38 -0600, Alan Braslau wrote:

On Fri, 14 Oct 2022 16:33:12 -0600
Max Chernoff  wrote:


Do you know how to rebuild the format? I've tried the following to no
avail:

--script mtx-context


I believe that you have to give the full script path here to mtxrun


Thanks! Running:

luatex --luaonly "/opt/context/tex/texmf-linux-64/bin/mtxrun.lua" --script 
/opt/context/tex/texmf-context/scripts/context/lua/mtx-context.lua --luatex --make 
--redirected

has fixed the format issue.

I now unfortunately have a new issue (probably for Hans or Mikael).
Running:

context --luatex empty.tex

where "empty.tex" is:


\starttext
\null
\stoptext

gives me this output:

mtx-context | redirect luametatex -> luatex: luatex --luaonly 
"/opt/context/tex/texmf-linux-64/bin/mtxrun.lua" --script mtx-context --luatex 
empty.tex --redirected

resolvers   | formats | executing runner 'run luatex format': /opt/context/tex/texmf-linux-64/bin/luatex --jobname="empty" --fmt=/home/max/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.fmt --lua=/home/max/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:engine="luatex" --c:fulljobname="./empty.tex" --c:input="./empty.tex" --c:kindofrun=1 --c:luatex --c:maxnofruns=9 --c:redirected --c:texmfbinpath="/opt/context/tex/texmf-linux-64/bin"

This is LuaTeX, Version 1.15.1 (TeX Live 2023/dev)
 system commands enabled.
open source > level 1, order 1, name 
'/opt/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
job > passes > version mismatch: 1.33 <> 1.32
system  >
system  > ConTeXt  ver: 2022.10.14 10:16 MKIV  fmt: 2022.10.14  
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/opt/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/opt/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'empty', input './empty', result 'empty'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name 
'/home/max/Projects/lua-widow-control/nogit-testing/empty.tex'
fonts   > preloading latin modern fonts (second stage)

lua error   > lua error on line 1 in file /home/max/Projects/lua-widow-control/nogit-testing/empty.tex:

...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: attempt to index a nil value (field 'subsets')

stack traceback:
...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: in 
field 'moveitalics'
.../context/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg:103: in 
main chunk
[C]: in function 'dofile'
...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:78: in function 
<...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:68>
(...tail calls...)

1 >>  \starttext

2 \null
3 \stoptext
4

mtx-context | fatal error: return code: 256


The same file compiles just fine with LMTX.

i'll add a dummy subtable in math-act.lua:

local tweaks   = { subsets = { } }
mathematics.tweaks = tweaks


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] new upload

2022-10-14 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version. Apart from a few fixes / extensions already 
mentioned here (or known to those who wanted it) the main changes are in 
the math goodie files (work in progress, we will clean them up later) as 
part of improving the rendering of math.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Spacing in \unit - SOLVED

2022-10-14 Thread Hans Hagen via ntg-context

On 10/13/2022 1:52 PM, Gavin via ntg-context wrote:

Hi Oli,


Thank four your effort. I found out, that the following definition of a new 
unit, i called it SI, results also in a correct spaceing in the math 
environment:

\defineunit[SI][alternative=text]

It seems, that the option alternative=text solves the problem with no spaces 
between value and unit in the math environment.


That is a terrific solution that doesn’t require any messing with 
phys-dim.mkxl. You do not need to define a new unit. I got your result using 
this line:

\setupunits[alternative=text]

This fixed the most significant problems with \unit in most situations. I’m 
still applying some of my solutions as well.
I'll look into it (with Mikael as some relates to math) once you're done 
playing and provide suggestions and tests.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] atan2 function

2022-10-14 Thread Hans Hagen via ntg-context

On 10/14/2022 2:35 AM, Max Chernoff via ntg-context wrote:


Hi,


The angle function doesn't appear to provide the same calculation as
my atantwo in all cases.


They both give the same results, but "angle" gives a result in degrees
while "atantwo" gives a result in radians. This demo:

\startMPpage
vardef atantwo( expr dy, dx ) =
save theta;

numeric theta;

theta := 0;

if (dx > 0):

theta := atan( dy / dx );
elseif (dx < 0) and (dy >= 0):
theta := atan( dy / dx ) + pi;
elseif (dx < 0) and (dy < 0):
theta := atan( dy / dx ) - pi;
elseif (dx == 0) and (dy > 0):
theta := pi / 2;
elseif (dx == 0) and (dy < 0):
theta := -pi / 2;
fi;

theta

enddef;

def showangles(expr dx, dy) =

message "---"
message "atantwo " & decimal atantwo(dy, dx)
message "angle " & decimal (angle(dx, dy) * pi / 180)
message "angle " & decimal angle(dx, dy)
message "(" & decimal dx & ", " & decimal dy & ")"
enddef;

showangles(1, 0);

showangles(1, 1);
showangles(0, 1);
showangles(-1, 1);
showangles(-1, 0);
showangles(-1, -1);
showangles(0, -1);
showangles(1, -1);
\stopMPpage
So you suggest to add atantwo? As side note, you can redure your 
definition to:


 vardef atantwo( expr dy, dx ) =
 if (dx > 0):
 atan( dy / dx )
 elseif (dx < 0) and (dy >= 0):
 atan( dy / dx ) + pi
 elseif (dx < 0) and (dy < 0):
 atan( dy / dx ) - pi
 elseif (dx == 0) and (dy > 0):
 pi / 2
 elseif (dx == 0) and (dy < 0):
 -pi / 2
 else :
 0
 fi
 enddef ;

and then

vardef atantwo(expr dy, dx) =
if dx == 0 :
if dy < 0 : - fi pi / 2
else :
atan(dy/dx) if dx > 0 : if dy < 0 : - else : + fi pi fi
fi
enddef ;

going further makes us end up in an one-line obscurity

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-13 Thread Hans Hagen via ntg-context

On 10/13/2022 8:36 PM, Henning Hraban Ramm via ntg-context wrote:

Am 13.10.22 um 19:41 schrieb Pablo Rodriguez via ntg-context:

On 10/13/22 00:50, Max Chernoff via ntg-context wrote:

On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:

[...]
The last version of font-cff.lua should also copy the hinting-related
values of the CFF properly (/BlueScale, /StemSnap[HV] etc).
We fixed that on the side. ;)


Yay!


Many thanks for your work fixing this, Leah and Hans.

The only remaining question is then when the new version will be be
released.


They who attended the latest online meeting know that there’s a secret 
project going on that needs to be completed first.
let's keep it a secret till at least the next meetup .. after all it 
relates to a more that 30 year old sort of secret


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-13 Thread Hans Hagen via ntg-context

On 10/13/2022 7:41 PM, Pablo Rodriguez via ntg-context wrote:

On 10/13/22 00:50, Max Chernoff via ntg-context wrote:

On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:

[...]
The last version of font-cff.lua should also copy the hinting-related
values of the CFF properly (/BlueScale, /StemSnap[HV] etc).
We fixed that on the side. ;)


Yay!


Many thanks for your work fixing this, Leah and Hans.

The only remaining question is then when the new version will be be
released.
some day soon ... the apple m1 has to come online first (afaik apple 
didn't release a robust vm yet so the machine has to be kicked into 
action every now and then) and we only release when we can do all 
platforms ... apart from ms and me wanting to finish something first


it's not that no-one can print, right?

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \text{...} inside \sqrt is tiny

2022-10-13 Thread Hans Hagen via ntg-context

On 10/13/2022 2:38 PM, Gavin via ntg-context wrote:

Hi List,

When I use text inside a radical, the text is script-script size.

$\text{Radius} = \sqrt{\text{Area}/\pi}$

It should be normal size. Any ideas for a fix?

I stumbled on this issue when working with \units, but it is not specific to 
units.

fixed in next upload (better radical scanner in engine)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-12 Thread Hans Hagen via ntg-context

On 10/12/2022 8:49 PM, Denis Maier via ntg-context wrote:

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Henning
Hraban Ramm via ntg-context
Gesendet: Mittwoch, 12. Oktober 2022 10:15
An: ntg-context@ntg.nl
Cc: Henning Hraban Ramm 
Betreff: Re: [NTG-context] \quotation, protrusion and linebreaking

Am 11.10.22 um 21:06 schrieb Leah Neukirchen:

Henning Hraban Ramm via ntg-context  writes:

\setupdelimitedtext[quotation][method=font]




Just a quick request for clarification: What does that actually do?

uses glyph in font instead (most opentype have them)


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to make something appear to the right of every paragraph?

2022-10-11 Thread Hans Hagen via ntg-context

On 10/10/2022 12:12 AM, Joel via ntg-context wrote:
I'd like to add some area for readers to write in the margins of some 
text. This would leave three lines, like this to the right of the text.


__
__
__

The passage would take up about the left 60% of the text and the margin 
note space about 30% of textwidth, so no need to use the margins.


Though its easy for me to implement this code using some \thinrules and 
manually dropping macros in the text, is there some way ConTeXt can be 
told to just add them to right of every paragraph (at the start of the 
paragraph)?


Sample:

This is some text  
that is written in        
the passage and      
you can see the th-
ree lines to the right.
The text in the para-
graph continues even
though there are
just three lines to
the right.

Here is another par-    
agraph.                        
       

Here is yet another    
paragraph. You can    
see it also has the 
three liens.

This is just for a segment of the book, not every paragraph in the book.


\starttext

\def\StartHack
 {\margintext
   [location=right,style=]
   {\thinrules[n=3]}}

\def\StopHack
 {\par \ifnum\prevgraf<3
\blank[\the\numexpr4-\prevgraf\relax*line]
  \fi}

\StartHack \input tufte \StopHack

\StartHack test test \StopHack

\StartHack test test \StopHack

\stoptext



--

-
      Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Adding support for German language to the Words conversion

2022-10-10 Thread Hans Hagen via ntg-context

On 10/10/2022 9:21 PM, Marcus Christopher Ludl via ntg-context wrote:

Hello all,

this is my first contribution to this mailing list. 

Recently, when I posted a question on StackExchange.com regarding adding 
support for another language (German) to the "Words" conversion in 
ConTeXt (see here: 
https://tex.stackexchange.com/questions/657534/how-to-add-support-for-another-language-german-to-the-words-conversion-in-cont), 
@mickep suggested that I post the patched file (core-con.lua) to the 
mailing list, once I have it finished, so that it can be added for all 
to use. So, now that I'm confident my code works well, I would like to 
do just that. 


How should I proceed? Should I just send the file including my new code 
as an attachement to the mailing list? Or would it be preferrable to 
paste only the new parts of the code inline into an e-mail? Is that even 
the correct mailing list or would it be better to send this to 
dev-cont...@ntg.nl?

just mail them to me and wolfgang and we'll have a look at it

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] ConTeXt Standalone does not works on macOS Monterey with Apple M2 chip

2022-10-10 Thread Hans Hagen via ntg-context

On 10/10/2022 3:04 PM, Tommaso Gordini via ntg-context wrote:
While waiting for Mojca's attempts, for the moment I solved it by simply 
copying the folder of the old Mac in which I had installed the 
Standalone to the Mac M2.

I have slightly modified the TeXShop scripts and everything works.

The log tells me:

This is LuaTeX, Version 1.13.0 (TeX Live 2021)

Compiling with LMTX, i read:

ConTeXt  ver:  2022.09.11 20:44 LMTX

And compiling with MkIV (of the TeX Live 2022):

This is LuaTeX, Version 1.15.0 (TeX live 2022)


in a setup where lmtx is leading mtxrun/context will use luametatex as 
runner and that one should recognize os/platform better


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] startTEXpage on A4

2022-10-09 Thread Hans Hagen via ntg-context

On 10/9/2022 3:52 PM, Leah Neukirchen via ntg-context wrote:

Wolfgang Schuster via ntg-context  writes:


Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:

Hi,

is there a way to have something like

\setuppapersize[A5][A4]

but have the "inner paper size" be a computed fit like in
\startTEXpage?

Or, alternatively, is there is a way to print crop marks around
an environment like \startTEXpage?


Can you be more concrete what your goal is, there are a few ways to solve
your problem but with a few more information we can give you a good
solution.


Say I want to print some stickers or paper strips of non-fixed size,
and get crop marks around them to know where to cut.

With \setuppapersize and \setuparranging I can do this nicely if I
know the size in advance, but in some cases I don't.

\unprotect % fix needed

\def\page_boxes_apply_offset % #box
  {\unless\ifdim\topoffset=\zeropoint
 \expandafter\page_boxes_apply_offset_indeed
   \orunless\ifdim\backoffset=\zeropoint
 \expandafter\page_boxes_apply_offset_indeed
   \else
 \expandafter\gobbleoneargument
   \fi}

\protect

\definepapersize
  [label]
  [width=6cm,
   height=25mm]

\setuppapersize
  [label] [A4]

\setuplayout
  [page]

\setuppaper
  [nx=3,
   ny=10,
   dx=1mm,
   dy=1mm]

\setuplayout
  [horoffset=50mm,
   veroffset=10mm]

\setuparranging
  [XY]

\setupbackgrounds
  [page]
  [frame=on]

\starttext
\dorecurse{56}
  {\startpagemakeup
 \midaligned{test #1}
   \stoppagemakeup}
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-09 Thread Hans Hagen via ntg-context

On 10/9/2022 8:03 AM, Max Chernoff via ntg-context wrote:


Hi all,


I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.

Here's a tiny test document, I disabled PDF compression but it also
doesn't work with the default settings.

\setupbackend[level=0,compresslevel=0]
\starttext
Just a line of text.
\stoptext

When I print this "directly" (i.e. sending the raw PDF to the printer)
on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.


Just to add some more data points, I tested the attached MkXL file on
two printers, and the file printed perfectly on both.

Printer 1:
Brother HL-3170CDW
Printed via running "cat test.mkxl.pdf | nc Colour-Printer.local 9100"

Printer 2:

HP M227f LaserJet
Printed from the PDF file on a USB stick

Neither printer is anything fancy; they're both fairly inexpensive home

laser printers. I've got a much older Brother laser printer that I may be
able to test with next week.

Sorry I can't be of more help.
Leah and I are zooming in on the issue. It might relate to wrong font 
matrix default behavior in the pdf printer driver, and GS got a fix for 
that long ago, so maybe old printers with not-updated drivers can be 
affected.


Once we're confident that we can catch it Leah (who does the low level 
introspective testing with viewers, printers and tools) likely will 
report on it and there will be a test file for users to test if what we 
do is okay before we apply the safeguard.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-06 Thread Hans Hagen via ntg-context

On 10/6/2022 2:42 PM, Leah Neukirchen wrote:


But I also found yet another printer model that doesn't print:
the HP Color LaserJet 4700 (Model Q7492A, Firmware 20060821 46.031.1).

Since you seem to own the only printer that works ;) would
you be so kind and share which model you have?


We have a HP ColorFlowMFP X585 full-width highspeed duplex inkjet 
printer (a couple of years old, always prints ok). So far we never heard 
of printing failures elsewhere.



I also wondered whether bisecting the snapshot-repo would work.
But I only have one LMTX binary; this font handling should be all in
lua code tho?


It makes no sense to compare luametatex and luatex .. it's different 
machinery.


Btw, some in the thread mention issues (like bad looking heros shapes) 
but in your case there is no print at all, so that is different. Isn't 
there some error log in these printer?


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-06 Thread Hans Hagen via ntg-context

On 10/6/2022 12:31 PM, Ulrike Fischer via ntg-context wrote:

Am Tue, 4 Oct 2022 18:09:28 +0200 schrieb Hans Hagen via
ntg-context:


Hans, is it possible that LMTX uses some technique that is “too modern”
for some built-in PDF interpreter?



we basically use the old pre 1.6 embedding, same as luatex


I saw that the new code renumbers the glyphs, so it uses 0001, 0002
etc instead of the mix of various slot numbers in luatex. Perhaps
the printers don't like that.
indeed, soem control code confusion; a few days ago i suggested a test 
for that and got no response yet


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-05 Thread Hans Hagen via ntg-context

On 10/5/2022 6:02 PM, Pablo Rodriguez via ntg-context wrote:


It happens both with LuaMetaTeX and LuaTeX. When playing with certain
levels of zooming, some blank spots are displayed inside the characters
(printing is fine).


Such artifacts can result from operating in the extremes and one has to 
keep in mind that maybe not all variables fonts have all characters 
tested for these extremes. Actually even regular fonts can have such 
effects like small bumps (we saw some in math fonts) and these also show 
up in font editors. But normally we don't see these at small sizes. Some 
has to do with 'sloppy or difficult or challenging' designs, some with 
(eo)fill side effects not much different from what mp graphics can do 
with envelopes (we've written about that). I'd not loose sleep over this.

 Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 5:52 PM, Leah Neukirchen via ntg-context wrote:


I looked into /StemV 0 (which was different in MKIV) but that works
with the TTF files, too.  Also should be ignored for Type 3 anyway.

Does your test have type 3 fonts? Should be no problem.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 5:44 PM, Henning Hraban Ramm via ntg-context wrote:

Am 04.10.22 um 14:59 schrieb Hans Hagen via ntg-context:

On 10/4/2022 2:35 PM, Leah Neukirchen via ntg-context wrote:


Are there any tools to analyze this CID font stream?

You can browse the glyphs with full acrobat


You can? Not with Acrobat Pro v9 or before.
it is hidden in preflight, some tiny entry in a menu "browse internal 
.." or so but as adobe loves to change user interfaces with each version 
i have no clue where you can find it


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 6:03 PM, Henning Hraban Ramm via ntg-context wrote:

Am 04.10.22 um 15:21 schrieb Angel M Alganza via ntg-context:
On Tue, Oct 04, 2022 at 01:59:45PM +0200, Henning Hraban Ramm via 
ntg-context wrote:



How do you send the files “directly” to the printer? Copy to lpt queue?


In my case, as I explained in my original email, I plug in a USB drive
into the printer USB port, and I pick up the file to print from the
printer software on a touch screen.  I guess this qualifies as sendig te
file directly to the printer queue?


Yes, of course. Sorry, I didn’t read your mails thoroughly since I 
assumed I couldn’t help anyway.


Hans, is it possible that LMTX uses some technique that is “too modern” 
for some built-in PDF interpreter?
we basically use the old pre 1.6 embedding, same as luatex ... mayeb 
some other object is too modern (maybe some indirect reference is not 
seen or so but then one expects an error) .. I have no clue what is in 
those printers (it works here)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 2:35 PM, Leah Neukirchen via ntg-context wrote:


Are there any tools to analyze this CID font stream?
You can browse the glyphs with full acrobat (but I haven't a full 
acrobat installed ... I lost it when I upgraded my laptop and have no 
plans to buy a new version as I don't need it).


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

Hi,

does (the obsolete)

\enabledirectives[backend.pdf.forcecidset]

help

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 2:35 PM, Leah Neukirchen via ntg-context wrote:

Hans Hagen  writes:


what is sent to the printer .. maybe not pdf but something the printer
driver produces


For the Ricoh and Samsung printers, we printed the raw PDF directly
over JetDirect (port 9100).  For the Brother, the "upload PDF"
function was used.  So no outside printer drivers involved.

If I run it through Ghostscript, that somehow fixes it:
gs -dPDF -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=print.pdf foo.pdf

normally gs complains when there is an issue

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 12:53 PM, Leah Neukirchen wrote:

Hans Hagen via ntg-context  writes:


On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote:

On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via
ntg-context wrote:


When I print this "directly" (i.e. sending the raw PDF to the printer)
on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.

I believe that is the exact same problem I have and that I described
a
few days ago in my email with subject "Missing letters and numbers in
printout".  I have some grids on my document, which gets printed out,
but nothing else does.


Another data point: Brother B205 doesn't print it either.
But would all of these use the same licensed PDF renderer...


The PDFs render fine on every PDF reader I could find.

Same here.


PDFs generated directly from Context MKIV from TeXLive 2022 using
LuaTeX 1.5 render fine on these printers.
I've also printed PDFs from pdfTeX in the past fine.

Same here.


Any ideas what I should try to help debug this?

I was told that this is the default now, that isn't going to change,
and
that I could always use LuaTeX instead.  I could also use LaTeX, I
guess, but I'd rather keep using ConTeXt at least while my old 32 bits
OpenBSD installation works.

what happens if you include the lmtx pdf in a mkiv document as image


On above Brother B205, this document:

\starttext
\externalfigure[foo.mkxl.pdf]
\stoptext

only prints the page number of the outer document, which is kept in a
seperate font:

NREXLC+LMRoman12-Regular CID Type 0C   Identity-H   yes yes 
yes  5  0
CLLXEY+LMRoman12-Regular CID Type 0C   Identity-H   yes yes 
yes  8  0

I tried converting the pdf with pdfjam (which uses pdfTeX internally)
before, which probably uses similar mechanisms, and it didn't work
either.
what is sent to the printer .. maybe not pdf but something the printer 
driver produces


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

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

On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote:
On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via 
ntg-context wrote:



When I print this "directly" (i.e. sending the raw PDF to the printer)
on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.


I believe that is the exact same problem I have and that I described a
few days ago in my email with subject "Missing letters and numbers in
printout".  I have some grids on my document, which gets printed out,
but nothing else does.


The PDFs render fine on every PDF reader I could find.


Same here.


PDFs generated directly from Context MKIV from TeXLive 2022 using
LuaTeX 1.5 render fine on these printers.
I've also printed PDFs from pdfTeX in the past fine.


Same here.


Any ideas what I should try to help debug this?


I was told that this is the default now, that isn't going to change, and
that I could always use LuaTeX instead.  I could also use LaTeX, I
guess, but I'd rather keep using ConTeXt at least while my old 32 bits
OpenBSD installation works.

what happens if you include the lmtx pdf in a mkiv document as image

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-03 Thread Hans Hagen via ntg-context

On 10/3/2022 7:17 PM, Leah Neukirchen via ntg-context wrote:

Hi,

I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.

Here's a tiny test document, I disabled PDF compression but it also
doesn't work with the default settings.

\setupbackend[level=0,compresslevel=0]
\starttext
Just a line of text.
\stoptext

When I print this "directly" (i.e. sending the raw PDF to the printer)
on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.

The PDFs render fine on every PDF reader I could find.

Conversion to PostScript with pstopdf (poppler-22.07.0) and then
sending the PS renders the document correctly on the printer.

PDFs generated directly from Context MKIV from TeXLive 2022 using
LuaTeX 1.5 render fine on these printers.
I've also printed PDFs from pdfTeX in the past fine.

I attached the non-working 'foo.pdf.mkix'
and the working 'foo.pdf.mkiv' file.

I tried to disable font subsetting to debug this further, but I
couldn't figure out how to do it.


subsetting should not be a problem and both files are subsetted  (lmxt a 
bit different but not fundamentally)



Any ideas what I should try to help debug this?

i'm clueless ...

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Hans Hagen via ntg-context

On 10/2/2022 3:13 PM, Fabrice Couvreur via ntg-context wrote:
Ok, it works very well. Without wanting to insist, how to have the same 
hatching with two different figures ?

see upcoming mail from Mikael

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Hans Hagen via ntg-context

On 10/2/2022 1:02 PM, Fabrice Couvreur via ntg-context wrote:

I just tried but I got an empty file...
Do we agree that I have to replace the two lines with the other two ?
Regarding what you proposed, how to get the same type of hatching in 
both figures ?

no, we disagree here; add them after the min/max lines

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Hans Hagen via ntg-context

On 10/2/2022 11:20 AM, Floris van Manen via ntg-context wrote:



On 02/10/2022 10:55, Fabrice Couvreur via ntg-context wrote:
Initially, there was a bug with maro numberstriped() and Hans 
suggested another sensible approach to me, but you don't get the same 
shape of the hatches depending on the dimensions of the squares.


some unexpected side effect show up when the unitsquare is xyscaled to a 
rectangle like (2.5cm,1cm)

it seems related to the angle chosen

e.g.



\startMPcode

path p, q, r, b ;
p  := unitsquare xyscaled (4cm,4cm) ;
q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
r := unitsquare xyscaled (2.5cm,1cm) shifted(1cm,3cm) ;
b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;

draw r anglestriped (1,35,2) withcolor red;
draw q anglestriped (1,35,2) withcolor green;
draw b anglestriped (1,35,2) withcolor cyan;
draw p;
draw q;
draw b;
draw r;

label.llft("D", p) ;
label.lrt("C", p) ;
label.ulft("A", p) ;
label.urt("B", p) ;
label.urt("P", lrcorner r) ;
label.lft("Q", llcorner r) ;
label.top("M", urcorner r) ;

\stopMPcode


for that you can patch mp-tool.mpxl (l 676):

maximum := max (xpart llcorner mask, xpart urcorner mask, ypart 
llcorner mask, ypart urcorner mask) ;
minimum := min (xpart llcorner mask, xpart urcorner mask, ypart 
llcorner mask, ypart urcorner mask) ;

% a hack:
maximum := maximum + max(xpart urcorner shape, ypart urcorner shape);
minimum := minimum - max(xpart urcorner shape, ypart urcorner shape);

a bit overkill but it seems to work

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-29 Thread Hans Hagen via ntg-context

On 9/29/2022 3:54 PM, Angel M Alganza via ntg-context wrote:


No, alas I do not.  Could you please point me to where I could download
the latest greatest for 32bits OpenBSD from.  I remember a discussion a
few months ago to eliminated 32bits OpenBSD if nobody used it, where I
asked to keep publising it if it was possible.  I don't know if it has
finally been removed or not, but I can't find it anywhere.
openbsd is tricky in the sense that ervery update means that we need to 
install a new vm


what you can try is to download the installation from git 
(contextgarden) and then compile yuourself (not that hard); ther eis a 
smake script that should move the bin to the right spot (nice test case 
for Mojca who made that setup)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-28 Thread Hans Hagen via ntg-context

On 9/28/2022 5:10 PM, Pablo Rodriguez via ntg-context wrote:


Well, that is probably too much to say (I mean, that "--luatex"
generates more accurate PDF documents).


depends on how one defines accurate


The main issue would be pretending to use with LuaTeX some features
available only in LuaMetaTeX.


plenty (also font features) not in luatex indeed


I agree with Hans that LuaMetaTeX is here to stay. He may correct me,
but as far as I understand it, LuaMetaTeX is LuaTeX-2.0.

2.10

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-28 Thread Hans Hagen via ntg-context

On 9/28/2022 3:30 PM, Angel M Alganza via ntg-context wrote:
On Tue, Sep 27, 2022 at 04:03:06PM +0200, Pablo Rodriguez via 
ntg-context wrote:



In that case, run "context --luatex --generate" first and then "context
--luatex a6lua.tex".

This would give you a pure LuaTeX-compiled PDF document.

I think that this PDF document will be fine with your printer.


It was.  I printed it this morning without any problem.  Thank you!

If compiling with --luatex option seem to have more chances to produce a
complete product, shouldn't it be convenient for this option to be the
default?  I would expect 'context file.tex' to work "out of the box" and
produce a correct and complete PDF output.  Would it be possible to have
that changed?  Or is there maybe any other potentially undesirable side
effect?

Also, I guess that can be configured somehow so, what would need to be
changed to have 'context file.txt' to compile using luatex instead of
LuaMetaTeX?

top line:

% engine=luatex

but lmtx is and will stay as default (btw, you don't run the latest 
greatest)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] About macro numberstriped ()

2022-09-28 Thread Hans Hagen via ntg-context

On 9/28/2022 3:11 PM, Fabrice Couvreur via ntg-context wrote:

Hi Hans,
Thank you for this solution which is an approach that I did not know.
Fabrice

PS : What is the exact meaning of the word "blobs" because my English is 
average ?
in order to get 'lines' you need to fill the two opposing corners with 
"blobs of ink"


Hans (who's dutch is better than his english)

-
      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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] About macro numberstriped ()

2022-09-27 Thread Hans Hagen via ntg-context

On 9/27/2022 7:49 PM, Fabrice Couvreur via ntg-context wrote:

Hello,
I notice a strange behavior of the macro numberstriped ( ).
Thanks.
Fabrice

\starttext
  \switchtobodyfont[9pt]
  \startMPcode

   path p, q, r, b ;
   p  := unitsquare xyscaled (4cm,4cm) ;
   z[0] = (2cm,0cm) ;
   z[1] = (2cm,4cm) ;
   z[2] = (0cm,2cm) ;
   q := llcorner p--z[0]--z[1]--z[2]--cycle ;
   r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
   b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
   draw p ;
   draw r withcolor red;
   draw r numberstriped (.25,20,5) withcolor magenta ;
   draw b numberstriped (.25,20,5) withcolor magenta ;
   label.llft("D", p) ;
   label.lrt("C", p) ;
   label.ulft("A", p) ;
   label.urt("B", p) ;
   label.urt("P", lrcorner r) ;
   label.lft("Q", llcorner r) ;
   label.top("M", urcorner r) ;

   \stopMPcode
\stoptext

you need to find a volunteer to make the pattern have the two corner  blobs

\starttext

\startMPcode
path p, q, r, b ;
path p ; p  := unitsquare xyscaled (4cm,4cm) ;
draw p ;
draw p
withpattern image (
draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ;
% how to get the corner dots
)
withpatternscale 1/16
withpen pencircle scaled 1mm
;
\stopMPcode

\stoptext


-----
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] lmtx status

2022-09-27 Thread Hans Hagen via ntg-context

Hi,

At the ctx meeting we released luametatex, that is, the source code is 
now in the context zip (so it grew a few MB). At the same time Mojca set 
up some contextgarden repositories on github. We're working on a setup 
for users to generate older snapshots, if needed (for instance because 
there are platform changes). She's also working on cmake based 
installation helpers.


One of the things we did was pruning the fonts that are part of the 
installation. With a few exceptions the type one fonts were dropped, 
which is most noticeable for math. There is no need for px and tx fonts, 
they served their puspose in the transition from old style t1 fonts to 
opentype math (when we started with mkiv; we could have dropped them 
already).


We're looking into antykwa math as well as in alternative script and 
calligraphic math alphabets so eventually virtual math from t1 
construction can be dropped completely (in principle if can be 
integrated in the tweak mechanisms) because it is not wirth the effort 
to make them better. That means that we will ship some additional 
companion fonts.


There are math times fonts but they are currently not free and there is 
some effort going on to turn them opentype so we can ditch their setups 
too (we can't test anyway; to some extend that is also true for minion 
math).


High on the agenda is euler (in combination with pagella). This also 
relates to upgraded mixed script and calligraphic support in math. It 
actually means that enabling alternative alphabets will happen a bit 
differently (more naturally integrated as we introduced dedicated ranges 
of slots). Again a side effect is that we have more granular math glyph 
properties (opentype math is too limited but basically frozen so we have 
to get over that and move on). We (Mikael and me) also try to compensate 
for the ommissions and weird things in unicode math but it will take 
some time before we have that all documented.


One of the next uploads will have the pruned / upgraded texmf tree (one 
can always install more in the local tree of course). At some point 
installing from the garden (or from a git clone) will also be supported 
(basically anyone can host a lmtx install).


For the next texlive we hope to switch to lmtx as default and that also 
means that luametatex is the runner then. One can (as currently in lmtx) 
always run luatex with "--luatex".


Als-in-all it's a lot of work but we're getting there.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-26 Thread Hans Hagen via ntg-context

On 9/26/2022 11:04 PM, Angel M Alganza via ntg-context wrote:

On Mon, Sep 26, 2022 at 10:44:55PM +0200, Hans Hagen via ntg-context wrote:


mtxrun --script pdf --info oeps.pdf


$ mtxrun --script pdf --info a6.pdf
mtx-pdf | filename  > a6.pdf
mtx-pdf | pdf version   > 1.7
mtx-pdf | major version > 1
mtx-pdf | minor version > 7
mtx-pdf | number of pages   > 1
mtx-pdf | title > a6
mtx-pdf | creator   > LuaMetaTeX 2.09 20220429 + ConTeXt 
LMTX 2022.05.11 11:36

mtx-pdf | producer  > LuaMetaTeX-2.09
mtx-pdf | author    > 
mtx-pdf | creation date > D:20220920071929+02'00'
mtx-pdf | modification date > D:20220920071929+02'00'
mtx-pdf | cropbox   > pages: 1-1, width: 841.889758, 
height: 595.27559



mtxrun --script pdf --fonts oeps.pdf


$ mtxrun --script pdf --fonts a6.pdf
mtx-pdf | id   basefont   encoding  
subtype   unicode characters
mtx-pdf | mtx-pdf | Fm1.F1   KBVQDT+LMRoman8-Regular
no encoding   Type0 no vector   , - A B C D F G H I J K L M N O P R 
S T V Z a b c d e f g h i j k l m n o p q r s t u v x y z Á á é í ñ ó ú
mtx-pdf | Fm1.F2   PISBZT+LMRoman6-Regular    no encoding   
Type0 no vector   M a d e i l n
mtx-pdf | Fm2.F1   KBVQDT+LMRoman8-Regular    no encoding   
Type0 no vector   , - A B C D F G H I J K L M N O P R S T V Z a b c 
d e f g h i j k l m n o p q r s t u v x y z Á á é í ñ ó ú
mtx-pdf | Fm3.F1   KBVQDT+LMRoman8-Regular    no encoding   
Type0 no vector   , - A B C D F G H I J K L M N O P R S T V Z a b c 
d e f g h i j k l m n o p q r s t u v x y z Á á é í ñ ó ú
mtx-pdf | Fm4.F3   VGDDRM+LMRoman12-Regular   no encoding   
Type0 no vector   0 2 3
mtx-pdf | Fm4.F4   BBBAHN+LMMono8-Regular no encoding   
Type0 no vector   0 1 2 3 4 5 6 7 8 9 A D F J M N O S a b c e g h i 
l m n o p r s t u v y

mtx-pdf |

Does that help?

looks ok to me

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-26 Thread Hans Hagen via ntg-context

On 9/26/2022 8:26 PM, Angel M Alganza via ntg-context wrote:


I didn't know any of the poppler-utils, thank you!


Otherwise, the only option about your documents is guessing.

mtxrun --script pdf --info oeps.pdf

mtxrun --script pdf --fonts oeps.pdf

the second one also shows what characters are in there

-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-26 Thread Hans Hagen via ntg-context

On 9/26/2022 8:26 PM, Angel M Alganza via ntg-context wrote:


I didn't know any of the poppler-utils, thank you!


mtxrun --script pdf --info oeps.pdf

mtxrun --script pdf --fonts oeps.pdf

the second one also shows what characters are in there

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new hash for buffer (as file)

2022-09-26 Thread Hans Hagen via ntg-context

On 9/26/2022 7:24 PM, Pablo Rodriguez via ntg-context wrote:

On 9/26/22 02:05, Max Chernoff via ntg-context wrote:


Hi Pablo,


But now I don’t understand is the following issue: if the saved file
contains "\r\n", why does basic Notepad the new lines?

"\r\n" are the chars to get new lines in Windows. Or what am I missing here?


I'm not too sure what you're asking here, but Notepad was somewhat-
recently updated to handle both CRLF and LF line endings:

https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/


Hi Max,

I realized later that I was doing something wrong. My fault here.


[...]
Also, you should probably check to make sure that the results of the
file don't depend on the current code page on Windows. Try writing out a
buffer from ConTeXt with the following contents:

АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя

First, run "chcp 65001" before running "context" and record the size of the
file written. Then, run "chcp 1251" and run "context" again. Hopefully the
file size doesn't change; but if it does, then that means that the binary
content of any file written will depend on the system's default code page,
which would complicate making reproducible hashes.


For more than two decades, all my TeX sources are written in UTF-8.

I thought that ConTeXt would output the same character encoding as in
the source file when saving a buffer.

I haven’t found this issue and I’d say that all my saved buffers are
UTF-8 encoded.

the magic is in

savedata(name,replacenewlines(content),"\n",option == v_append)

because tex reads in and then lost what it saw (cr lf crlf) we use the 
line endings of the operating system (good old typewriters and windows 
use cr+lf and old macs uses cr while linux uses lf)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Missing letters and numbers in printout

2022-09-26 Thread Hans Hagen via ntg-context

On 9/26/2022 4:06 PM, Angel M Alganza via ntg-context wrote:

Hello,

I have a document that includes some grids (drawn with \grid) as well as
alphanumeric information (letters and numbers) which contents (the info,
not the grids) I modify every year and then print it out.  I've been
using it without any problem for a few (maybe 4 or 5) years but, this
time, only the grid showed up on the printout, but none of the letters
or numbers would, using the same printer I used every time before.  I
always copy the PDF file into a USB stick that I bring to the
(departamental) printer, plug it in the printer and directly print from it.

I tried printing the same file (from the same USB drive) into a
different printer, this time connected to a computer, and sending the
file from it, which worked just fine.  My guess is that the first
printer in missing the font the document uses, whereas the second
printer received the font from the computer (Devuan Linux), which has
the appropriate font.  Could that be correct?

In all previous ocasions I used the version of ConTeXt included in
Texlive on Devuan, but a few months ago I decided to install ConTeXt
using the official distribution instead.  Could that explain the change
in behaviour I'm seeing?  Could it be that the previous versions I used
somehow embeded the fonts into the PDF file but the current one doesn't?
And, if that's really the case, how could I force the font to be
included into the PDF file?  I remember I read something like that a
very long time ago (probably about LaTeX, not ConTeXt), but I haven't
found how to do it now in a few searches on the documentation.
i assume that you use mkiv or lmtx in which case fonts are embedded in 
the pdf file ... does the viewer show the file ok?


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new hash for buffer (as file)

2022-09-26 Thread Hans Hagen via ntg-context

On 9/26/2022 2:05 AM, Max Chernoff via ntg-context wrote:


Hi Pablo,


But now I don’t understand is the following issue: if the saved file
contains "\r\n", why does basic Notepad the new lines?

"\r\n" are the chars to get new lines in Windows. Or what am I missing here?


I'm not too sure what you're asking here, but Notepad was somewhat-
recently updated to handle both CRLF and LF line endings:

https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/

But I do agree that the line ending handling seems a little odd. I find it

surprising that the buffers internally use CR line endings since no systems
in the past 20 years use that.


how about tex ...

\number\endlinechar
\number\numexpr`M-`A+1\relax % plain sets up `^^M

... you don't want to know how much hassle dealing with line endings in 
tex is



Also, you should probably check to make sure that the results of the
file don't depend on the current code page on Windows. Try writing out a
buffer from ConTeXt with the following contents:

АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя

First, run "chcp 65001" before running "context" and record the size of the

file written. Then, run "chcp 1251" and run "context" again. Hopefully the
file size doesn't change; but if it does, then that means that the binary
content of any file written will depend on the system's default code page,
which would complicate making reproducible hashes.

if that were the case nothing would work .. so it's bytes in - bytes out

Hans

-----
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Spacing in \unit

2022-09-25 Thread Hans Hagen via ntg-context

On 9/25/2022 5:29 PM, Gavin via ntg-context wrote:

Hi Hans,

I also just noticed that the space between the number and the unit is missing 
when I typeset with ConTeXt ver: 2022.09.11 20:44 LMTX fmt: 2022.9.25. This 
space was present in with the ConTeXt version I was using earlier, from a 
couple months ago. Thanks for putting it on the math todo list!
i can probably clean up the code a bit in lmtx ... units are not that 
(rapidly) evolving and much is rather old code so best collect all 
issues and make a test file that mikael and i can use (as wer then do 
math and text at the same time)


maybe we also need to add units (are there new ones anyway?)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Spacing in \unit

2022-09-25 Thread Hans Hagen via ntg-context

On 9/25/2022 3:30 PM, Gavin via ntg-context wrote:

Hello list,

I have a few questions about space produced by the unit command. Consider this 
MWE

\starttext
\unit{3.00e8 kg m/s}

$\unit{3.00e8 kg m/s}$
\stoptext

The dot between “kg” and “m” has different spacing depending on whether the 
\unit command is in text or math mode. I think that the tighter spacing in the 
first one, in text, is correct.

I personally would also like less space around the \times. To me, the number 
3.00e8 should be typeset more like a single number, rather than like a product 
of 3.00 and 10^8. I am probably in the minority here. If \unit and \digit had 
an option for tighter spacing around the \times, I’d use it, but the current 
output with more space is probably what most people expect and want. Perhaps 
something like [scispace=tight].


that's for the math todo


Finally, \unit does not play nicely with surrounding spaces. For example:

 $2\pi\,\unit{3.00e8 kg m/s}$

causes a fatal error:

tex error   > tex error on line 9 in file ./Untitled.tex: Incompatible glue 
units (case 1)
that's an interesting case for the engine (Mixing regular and mu skips 
and so) ... we mighth finaly have a valid case for a primitive zero test


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-24 Thread Hans Hagen via ntg-context

On 9/24/2022 4:51 PM, Jeong Dal via ntg-context wrote:

Dear Aditya, Mikael,

Thank you for your explanation.
I just wonder \alinghere can be applicable to multiple formula.
It is OK to use \NC \NR for multiple formulas.
What probably can be done, is to let the next formula start with the 
align of the previous one .. Mikael can add it to our todo


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] setupregister with realpage?

2022-09-24 Thread Hans Hagen via ntg-context

On 9/24/2022 3:30 AM, Benjamin Buchmuller wrote:

Thank you, Hans! This works, I get all the correct page references!

I didn't know about cont-new.mkxl to temporarily store "hacks". I assume the file is 
updated with each release? Is there a way to store local hacks, e.g., in texmf-local? I could not 
find "cont-loc" (maybe it's not a file).


Just use that file, as it will be updated. Local copies can only 
interfere later on (unless you check them each update).


You can have an cont-loc.mkxl file in you local tree for various 
personal preferences and hacks.


For dev there is also cont-exp.mkxl but that's not supposed to be known; 
it's what we use for experimental things that i test for a while.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] setupregister with realpage?

2022-09-23 Thread Hans Hagen via ntg-context

On 9/23/2022 11:08 PM, Benjamin Buchmuller via ntg-context wrote:

Dear list,

\setuplist has the convenient option [pagenumber=realpage]

\setupregister has not (yet).

How can I get the realpagenumber instead of the userpagenumber for the register 
indices?

I tried

\def\MyPageCommand#1{\realpagenumber}

\setupregister[MyIndex][pagecommand=\MyPageCommand]

but this prints only the current (although real) page number.

you can try with this in cont-new.mkxl

\pushoverloadmode \unprotect

\let\currentregisterrealpage\!!zerocount % todo: more general accessor

\permanent\protected\def\withregisterpagecommand#1#2#3#4%
  {\ifcase#3\relax
 {\tt [entry\space not\space flushed]}%
   \else
 \def\currentregisterpageindex{#2}%
 \def\currentregisterrealpage{#3}%
 \iflocation

\strc_references_goto_internal{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
 \else
   \applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
 \fi
   \fi}

\protect \popoverloadmode

which sets \currentregisterrealpage

-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] LMTX incompatibility in \meaning breaks TikZ, other minor issues

2022-09-22 Thread Hans Hagen via ntg-context

On 9/22/2022 2:23 PM, Leah Neukirchen via ntg-context wrote:

Hi,

I'm trying to get tikz-cd to run on LMTX and some examples already
work fine, but I had a problem with text on arrows.

To reproduce:

\usemodule[tikz]
\usetikzlibrary[cd]

\starttext
\starttikzcd
A \arrow{r}{A} \NC B \NR
\stoptikzcd
\stoptext

This builds fine on MkIV from TeXLive 2022 with LuaTeX, but on LMTX I get:

system  > ConTeXt  ver: 2022.09.11 20:44 LMTX  fmt: 2022.9.20  int: 
english/english
...
close source> level 2, order 63, name 'tikzlibrarycd.code.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 ./tik.tex: Package pgfkeys Error: I do not 
know the key '/tikz/"{A}"{}' and I am going to ignore it. Perhaps you misspelled 
it.^^J...^^Jl.7 I think the culprit is a tikzcd arrow in cell 1-1

After a bunch of debugging, it turns out that LMTX breaks the TikZ 'quotes'
library, which works using code ala:

\def\tikz@enable@node@quotes{%
   \pgfkeyssetvalue{/handlers/first char syntax/the character 
"}{\tikz@quote@parser}%
   \let\tikz@quotes@as\tikz@node@quotes@as%
}

The last part of the /-key is derived from \meaning, but in LMTX,
\meaning" is "the character U+0022 'quotation mark'"
and thus the key cannot be found.

I have patched TikZ for now to match for this alternate string too.


a bit weird way to test a key .. maybe you can compare to

\edef\ThatQuote{\meaning/}

using \ifx


But perhaps it would be better for compatibility to agree with the
original TeX \meaning strings for the 7-bit ASCII subset at least. 


too messy when want to parse


I found another minor nit that's not really triggering a bug but still a
difference to LuaTeX: \eTeXrevision should expand to .2, but it
expands to 2 in MkIX.  There is some code out there which uses
constructions like
\number\eTeXversion\eTeXrevision
or even
\ifdim 0\XeTeXrevision pt > 0.9996pt

As LMTX doesn't care about this macro, this should be easy to adjust.
i'll add the period; btw afaikt testing for an etex version is useless 
because all used engines have it and there is basically only one version 
and there will be no follow ups


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Combining Macron Below needed

2022-09-22 Thread Hans Hagen via ntg-context

On 9/22/2022 1:46 PM, Steffen Wolfrum wrote:

for what fonts does this fontfeature work?


\definefontfeature[default][default][compose=yes]

\starttext

\definedfont[name:agaramondproregular*default]{ḵ ṭarī}

\stoptext


I need it for Garamond Premier Pro (and Renner*).

fonts that have the accents and base characters that are needed

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] cannot update ConTeXt to 2022.09.16

2022-09-21 Thread Hans Hagen via ntg-context

On 9/21/2022 9:03 AM, Marco Patzer via ntg-context wrote:

On Mon, 19 Sep 2022 17:16:19 +0200
Pablo Rodriguez via ntg-context  wrote:


Could anyone confirm the issue?


I can confirm. On a fresh install I'm getting

   2022.09.11 20:44
which is fine ... there is no later update ... Mojca and I are setting 
up repositories and that happens in parallel (including an alternative 
installer from git)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] cannot update ConTeXt to 2022.09.16

2022-09-21 Thread Hans Hagen via ntg-context

On 9/20/2022 5:21 PM, Pablo Rodriguez via ntg-context wrote:

On 9/19/22 18:23, Otared Kavian via ntg-context wrote:

Hi Pablo,

I had the same issue and, as this was discussed a few years or months
ago, after removing the three files with extension « .tma » the
update goes through normally.> On my machine, running MacOS X, I had to remove the 
following files:>

texmf.tma

texmf-osx-64.tma
texmf-context.tma


Hi Otared,

what is really weird, installing both brand-new versions for Win64 and
Linux64 is that I cannot get current latest from 2022.09.16 14:39 (but
only from 2022.09.11 20:44).

What am I doing wrong here?

Many thanks for your help,
only bins were updted (when we released), not the installer ... i need 
to do that when i'm at home and can access the dmz directly (and have 
bandwidth)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new uplaod

2022-09-11 Thread Hans Hagen via ntg-context

On 9/10/2022 9:45 AM, Alexandre Christe via ntg-context wrote:

Hi Hans,

Will |\mvert|and|\midalso be included in the \autofencelogic? It would 
be quite useful.|
we don't have \mvert so i'll add that ... in a next upload you can do 
the attached (kind of experimental as Mikael and I need to review this 
which we will do next week)


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
-
% \setupbodyfont[cambria]
\setupbodyfont[pagella]
% \setupbodyfont[bonum]

\starttext

% \showmakeup[mathglue] \mathspacingmode1 \showglyphs

\enablemathautospacing % more global
\enablemathautofencing % more global
\enablemathautonumbers % more global
\autofences% more local

\startTEXpage [offset=1dk]

% $|x| + |3|$

% $ x \middle | \frac{a}{x}$

% $ x | \frac{a}{x}$

% $ ( \frac{a}{x} + b | x )$

$ ( \frac{a}{x} + b | x )$

$ ( \frac{a}{x} + b || x )$

$ ( \frac{a}{x} + b ||| x )$


$ ( \frac{a}{x} + b + |x| )$

$ ( \frac{a}{x} + b + ||x|| )$

$ ( \frac{a}{x} + b + |||x||| )$

% $ ( \frac{a}{x} + b + |x| + 2)$

% $ ( \frac{a}{x} + b \lvert x )$

% $ ( \frac{a}{x} + b \mvert x )$

% $ ( \frac{a}{x} + b \mVert x )$

% $ ( \frac{a}{x} + b \vert x )$

% $ ( \frac{a}{x} + b \Vert x )$

\stopTEXpage

\stoptext


fences-002.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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Combining Macron Below needed

2022-09-11 Thread Hans Hagen via ntg-context

On 9/10/2022 5:41 PM, Steffen Wolfrum via ntg-context wrote:

Hi,

a text is to be set in Garamond Premier Pro and uses this character: ḵ

Is there a way to set a combining macron below (U+0331), preferable in a 
Garamond-like font?
I'm sure that these missing accented chars in fonts have been discussed 
before and you can use this feature (made for Mojca long ago):


\definefontfeature[default][default][compose=yes]

\starttext
ḵ
\stoptext

So, unless you wikify it, I bet the same question will come up again.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new uplaod

2022-09-10 Thread Hans Hagen via ntg-context

On 9/10/2022 9:45 AM, Alexandre Christe via ntg-context wrote:

Hi Hans,

Will |\mvert|and|\midalso be included in the \autofencelogic? It would 
be quite useful.|


i prototyped it but the chairman of the CMS has to check it before we 
decide to enable it


one complication is that

$ \autofences x | \frac{a}{x}$

$ \autofences ( \frac{a}{x} + b | x )$

should also work (lone middles)

Le jeu. 25 août 2022 à 18:18, Hans Hagen via ntg-context 
mailto:ntg-context@ntg.nl>> a écrit :


Hi,

I uploaded a new lmtx. Again some updated math of which details will be
revealed later. Apart from some details we added suport for fourier
notations. There are no high level definitions yet as we have to invent
names but this is how it works (private unicode slots might change):

\setupbodyfont[pagella]

\starttext

\setupmathdelimited
    [topoffset=.2\exheight]

\definemathdelimited
    [fourier]
    [rule=no,
     left=\zerocount,
     right="FE944]

\definemathdelimited
    [courier]
    [rule=no,
     left=\zerocount,
     right="FE946]

\definemathdelimited
    [xourier]
    [rule=no,
     left=\zerocount,
     right="FE948]

$ \fourier{(z+1)} $

$ \fourier{(z+1)} + \sqrt[2]{1}$

$ \fourier{(z+1)} + \courier{(z+1)} + \xourier{(z+1)} $

$ \fourier{\left(z+\frac12\right)} + \courier{\left(z+\frac12\right)} +
\xourier{\left(z+\frac12\right)} $

$ \autofences \fourier{(z+\frac12)} + \courier{(z+\frac12)} +
\xourier{(z+\frac12)} $

$ \widehat{x^2 + 2x + 2} $

\stoptext

This example also shows a new \autofences feature and widehats
(widetilde and widecheck also work that way) that overcome limitations
in fonts, so

\def\CrappyHack#1{\im{#1{a} + #1{a+b} + #1{a+b+c} + #1{a+b+c+d} +
#1{a+b+c+d+e} + #1{a+b+c+d+e+f}}\par}
\CrappyHack\widehat
\CrappyHack\widetilde
\CrappyHack\wideacute
\CrappyHack\widecheck

will work. For thise in finance we now have

$ \annuity{x + 1} + \lannuity{x + 1} + \rannuity{x + 1} +
\lrannuity{x +
1} $

these are basically radicals (like sqrt) with two sided symbols.

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 <mailto:ntg-context@ntg.nl> /
https://www.ntg.nl/mailman/listinfo/ntg-context
<https://www.ntg.nl/mailman/listinfo/ntg-context>
webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl> /
http://context.aanhet.net <http://context.aanhet.net>
archive  : https://bitbucket.org/phg/context-mirror/commits/
<https://bitbucket.org/phg/context-mirror/commits/>
wiki     : https://contextgarden.net <https://contextgarden.net>

___


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

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



--

-----
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-09-10 Thread Hans Hagen via ntg-context

On 9/10/2022 9:49 AM, Henning Hraban Ramm via ntg-context wrote:

Am 10.09.22 um 03:01 schrieb Cron Daemon via ntg-context:

receiving incremental file list


Now, this looks like an update!

But when I run install.sh, I get:

"""
$ . install.sh
mtx-install | provide valid server and instance


If you want to run ConTeXt everywhere, you need to adapt the path, like:

   export PATH=/Users/hraban/lmtx/tex/texmf-osx-64/bin:$PATH

If you run from an editor you can specify the full path to mtxrun:

   /Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun --autogenerate 
--script context --autopdf ...


The following settings were used:

   server   : lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl
   instance : install-lmtx
   extras   :
   ownpath  : /Users/hraban/lmtx
   platform : osx-64

"""
actually we only had lmtx.pragma-ade.nl but when i had to update the 
certificates for the sites i added the com address to the dns ... for 
some reason certbot had added extra entries with 301 in front of the 
regular configuration so i removed these .. maybe it works now


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-09-07 Thread Hans Hagen via ntg-context

On 9/7/2022 5:13 PM, Taco Hoekwater via ntg-context wrote:

As Hraban said: it is my script that checks for new ConTeXt uploads by Hans, 
which currently cannot connect to Hans’ server.

Usually that is because Hans is reconfiguring something in his internal network 
at Pragma, and it will eventually sort itself out.
due to changes in the server infrastructure i had to reconfigure a 
managed switch (vlan stuff) and for some reason the (pfsense) router got 
confused about that .. it should work now (crossed fingers)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

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

On 9/5/2022 9:07 PM, Pablo Rodriguez via ntg-context wrote:

On 9/5/22 20:28, Henning Hraban Ramm via ntg-context wrote:

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros
(\something) or anything containing dots (logs.errors)?
Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.


Hi Hraban,

has it to be the source browser?

I mean, I use grep in Linux (MSYS2 in Windows [and brew.sh is available
for macOS]) and it works perfectly fine with ConTeXt.

   $ grep -irl fi[eë][eë] context
   context/tex/texmf-context/tex/context/base/mkiv/char-def.lua
   context/tex/texmf-modules/tex/context/third/lilypond/t-lilypond.tex

Althought regular expressions are fine, I don’t know why "fi[eë]+"
doesn’t work in this case.

Just in case it might help,

an oldie (the one i use):

  mtxrun --script grep

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] zint module on LMTX

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

On 9/4/2022 12:59 PM, Michal Vlasák via ntg-context wrote:


The aspiration was that this repository would pin the "known to work
versions" of optional libraries and prepare build instructions for them.
But it is now largely untested. I can only say that zint works, as I
haven't tried others in a while. On the other hand from what I know
zint is the only fragile one, other optionals are much more less likely
to break.

For some reason i get

CMake Error: Unknown argument --toolchain

so i need to figure that out

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] zint module on LMTX

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

On 9/4/2022 12:59 PM, Michal Vlasák via ntg-context wrote:


The aspiration was that this repository would pin the "known to work
versions" of optional libraries and prepare build instructions for them.
But it is now largely untested. I can only say that zint works, as I
haven't tried others in a while. On the other hand from what I know
zint is the only fragile one, other optionals are much more less likely
to break.

we need to discuss with moijca on how to use that on the farm

thanks for keeping it going,

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] zint module on LMTX

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

On 9/4/2022 11:59 AM, Ivan Pešić via ntg-context wrote:

Дана 04.09.2022. у 12:36, ntg-context-requ...@ntg.nl пише:

looks like the library is loaded ... so what is your test

we don't do png, we do outlines (actually native zint graphic structures 
that we then convert with mp)


Hans



Hi Hans,
here is the example that I used, basically I took it from the from the 
module:


\starttext
\usemodule[zint]
     \startTEXpage
     \barcode[alternative=PDF417,text={Hans Hagen}]%
     \blank
     \barcode[alternative=pdf417,text={Ton Otten}]%
     \blank
     \barcode[alternative=ISBN,text=9789490688011]%
     \blank
     \barcode[alternative=isbn,text=9789490688011,width=3cm]%
     \blank
     \dontleavehmode
     %\barcode[alternative=qr code,text={This is ConTeXt MKIV : #1}]
     \barcode[alternative=qr code,text={This is ConTeXt LMTX}]
     \barcode[alternative=qr code,text={\input{tufte}},width=3cm]
     \stopTEXpage
\stoptext

The resulting PDF has just empty page


bah, there used to be precompiled x64 files for windows so one cpuld 
just drop in the dll (kind of strange to stick to 32 bit as most windows 
installations today are 64 bit)


although i don't like top do it i cloned the zint repos and tried to 
compile (after migrating the proj file to vs2022) but it fails on some 
png.h file missing and i see no way to disable png)


a pitty as zint used to be quite stable over years (at some point we 
will set up compilation on the farm and then we can stick to old stable 
versions forever)


anyway, so instead of trying that i went for a quick and dirty cross 
compile on wls


# mingw-64.cmake

set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX  x86_64-w64-mingw32)
set(CMAKE_C_COMPILER  ${TOOLCHAIN_PREFIX}-gcc)

and on build then run

mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../mingw-64.cmake ..
make

which gives me a huge dll that we can strip to some 600+K and that one 
seems to load ok


it assume of course that you have the linus subsystem installwd with gcc 
and the crosscompiler (which i have as it is how i compile luametatex)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] zint module on LMTX

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

On 9/4/2022 1:36 AM, Ivan Pešić via ntg-context wrote:

Hi Pablo,
I'm resurrecting this thread, as I've just managed to get some progress 
on Windows with zint in LMTX.
The thing is that you need 64-bit DLL, because LuaMetaTex is built for 
64-bit architecture on Windows.
As it is not available, I built 64-bit zint.dll (and zlib + libpng) from 
the latest git sources (2.11.1.9 (dev)),
renamed it to libzint.dll and placed in appropriate place, as per the 
instructions.


But there are still some problems... here is the excerpt from the log:

modules > using user prefixed file 'libs-imp-zint'
modules > 'zint' is loaded
open source > level 2, order 3, name 
'c:/Data/context/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
resolvers   > lua > loading file 
'c:/Data/context/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.lmt' succeeded
close source> level 2, order 3, name 
'c:/Data/context/tex/texmf-context/tex/context/base/mkxl/libs-imp-zint.mkxl'
optional> using library 
'c:/Data/context/tex/texmf-win64/bin/lib/luametatex/zint/libzint.dll'
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
backend > xmp > using file 
'c:/Data/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector

I tested the library with the generated CLI tool, and I get the barcode 
images created.
Although, png format is not working, I get file with length 0 and no 
error whatsoever.
It could be that there is something wrong with the build, I'll try to 
figure out.

looks like the library is loaded ... so what is your test

we don't do png, we do outlines (actually native zint graphic structures 
that we then convert with mp)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Issue with setupMPvariables

2022-09-03 Thread Hans Hagen via ntg-context

On 9/3/2022 6:48 PM, Alexandre Christe via ntg-context wrote:

Dear all,

I'm trying to reuse some MP code for several custom enumeration.

However I can't make the overall setup work, needless to say different 
border colors for each enumeration though setupMPvariables. What am I 
missing?\startuseMPgraphic{mp:textFrame}

begingroup;
path p ;
for i = 1 upto nofmultipars :
		p := (ulcorner multipars[i]) -- (llcorner multipars[i]) -- (llcorner 
multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm) 
-- cycle ;

fill p withcolor boxfillcolor ;
draw p withcolor boxlinecolor ;
endfor;
endgroup;
\stopuseMPgraphic


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


  1   2   3   4   5   6   7   8   9   10   >