[NTG-context] Re: start/stopregister

2024-04-26 Thread Hans Hagen

On 4/26/2024 9:54 AM, Thomas A. Schmitz wrote:

On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
 A\index{A} B \page
 A\startregister [index] {A} B\startregister [index] [B] {B}
 \dorecurse {10} {\input tufte}
 A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext


And I'm not even sure if this is allowed to say anymore, but: works in 
mkii...

That's because mkii is AI enhanced. Can you try this:

\setuppapersize [A6]

\starttext

A\index{A} B \page


\stopregister [index] [A]
B>
\stopregister [index] [B]

\page

\placeregister[index]

\stoptext

(Watch the [A] vs {A} usage where [A] is the label used for matching the 
potentially weiord nested start/stop ... maybe we need different aliases 
for these, like \fromregister and \toregister.)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: start/stopregister

2024-04-25 Thread Hans Hagen

On 4/25/2024 4:51 PM, Taco Hoekwater wrote:




On 25 Apr 2024, at 16:45, Thomas A. Schmitz  wrote:

On 4/25/24 16:13, Henning Hraban Ramm wrote:

I’m using it like
\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]
i.e. very similar to your example, and can confirm it doesn’t result in a page 
range in the index. Also gives no error.


Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from 
a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in 
the references table, mkxl doesn't. This appears to be the relevant bit, and it is 
connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt

references.lastrealpage = texgetcount(c_realpageno)


Let's seen if we can make Thomas more of an expert as he's zooming in on 
the issue:


extendregister {
metadata   = { name =  name },
references = { abel =  label },
}

Let me know if you't see it.


Possibly related: I noticed last week that mkxl does not update the legacy 
counter \pageno any more for every page.

i'll check 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: The graph is not visible.

2024-04-25 Thread Hans Hagen

On 4/25/2024 4:08 PM, Fabrice Couvreur wrote:

Hi Taco,
I knew I wouldn't be able to explain what was happening.
The code works perfectly and the figure is clearly visible in the 
component chapter-14 :


\startcomponent[chapter-14]
\startMPpage
...
\stopMPpage
\stopcomponent

But if I compile my project, it disappears !!

\startproduct[terminale-manual]
  \startbodymatter
       \component[chapter-1]
       \component[chapter-2]
       \component[chapter-3]
       \component[chapter-4]
       \component[chapter-5]
       \component[chapter-6]
       \component[chapter-7]
       \component[chapter-8]
       \component[chapter-9]
       \component[chapter-10]
       \component[chapter-11]
       \component[chapter-12]
       \component[chapter-13]
       \component[chapter-14]
     \stopbodymatter
\stopproduct

-- compile with specific preceding chapters commented
-- when the interfering one is found, make a copy and strip till the 
problem is gone


it might be that you redefine something metapost

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: utiliydata

2024-04-25 Thread Hans Hagen

On 4/25/2024 9:25 AM, Thomas A. Schmitz wrote:




Nope, very sorry, can’t figure it out… I see job.register, I see I can access 
structures.refrences.collected, but what about the next level

utilitydata.structures.references.collected={
[""]={
  [“REF"]={

What does the empty key do? And how do I retrieve the value of

REF.references.realpage?

Thomas


Sigh, as always: just when I had hit “send,” I figured it out:

structures.references.collected[""][REF].references.realpage

But I’m not sure if there is an easier/better way. And I still would like to 
know what the empty string as key does.
it's the prefix (namespace) which here is empty (easier to use "" as key 
than have some exception)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: utiliydata

2024-04-24 Thread Hans Hagen

On 4/24/2024 5:41 PM, Thomas A. Schmitz wrote:

Hi all,

I’m slightly embarrassed because this should be easy, but I can’t figure out 
how to do this: in the tuc/tua file, I have the complete references of my 
document. How can I access it from within my Lua code? For instance, something 
like

utilitydata.structures.references.collected.”MyReference”.references.realpage

How can this be accessed?
grep for "job." (i bet you can figure it out and compensate the 
embaressment that way)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-22 Thread Hans Hagen via ntg-context

On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
I'm three days out from sending my work to an editor, and found some 
serious problem: many footnotes just aren't rendering.


I have a history text that uses ConTeXt-SBL for the citations, as such, 
it has lots of footnotes. Sometimes the footnotes are just in the main 
text, but sometimes also in figure captions, inside floats, inside 
tables that are inside floats, inside tabulations inside floats, etc.


What I find alarming is it is frequently not rendering all of the 
footnote messages at the bottom of the page. The actual footnote number 
within the body is rendered, but no number is listed in at the bottom of 
the page. So I might see a list of footnotes, for instance, on page 1, I 
only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.



---
1 message
2 message
3 message
5 message
6 message

After a lot of trial-and-error and checking logs and checking my BibTeX 
files for errors, running everything through BibTex Tidy, etc., and 
failures to make a minimum working example, I found a single pattern:


If the footnote marker appears on the SAME page as the footnote text, it 
has no problem rendering the footnote. But, if ConTeXt decides to move a 
float a page or two later on--as it frequently seems to do---such that 
the footnote marker and footnote text at bottom of page should be on 
DIFFERENT pages, the footnote message at the bottom of the page won't 
render.


I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
have issues with footnotes; they appear to be similar to my issue--is 
that still a problem? Is there a fix or workaround? Old fixes I could 
finding in the mailing list don't seem to work with current versions of 
ConTeXt anymore.

you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)

- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
\startplacefigure[location=here,title={test \footnote{oeps 1}}]
\blackrule[width=1tw]
here
\footnote{hello 1} and
\footnote{hello 2} and
\footnote{hello 3} done
\stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).


I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem





-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to isolate serious errors from warnings?

2024-04-19 Thread Hans Hagen

On 4/18/2024 8:26 AM, Henning Hraban Ramm wrote:

Am 18.04.24 um 02:09 schrieb Joel via ntg-context:
I'm about to have a lengthy (2,000+ page) document published. Normally 
if it compiles and looks okay, I regard that as meaning no errors 
appeared, but I've noticed that sometimes ConTeXt will still compile, 
even if something isn't displayed on screen as it should:


(1) I tried placing a table inside a startitemize environment, as 
instead of it not compiling, it left a message in the document warning 
that wasn't supported.


(2) In another case, I had an image that ConTeXt couldn't find, as I 
mispelled the filenmame, and it fully compiled and made a PDF, without 
me noticing.


(3) Or maybe in some case, a font couldn't be found for a specific 
character, so a single character in the file isn't displaying.


Those are just some examples; I intended for something to be printed 
on the PDF, but it isn't showing there.


Since a document of this size will have a lot of messages, is there a 
way to adjust the settings, from "show everything" to "show some" to 
"show only serious errors"? Or maybe to use > to send the errors to 
another file for careful study? (using Linux if that matters)


You can enable trackers like

\enabletrackers[figures.*]

But that just gives more log messages for debugging.

You get the list of all trackers with:

context --global m-trackers.mkiv


For your use case, directives are more helpful, like

\enabledirectives[logs.errors=*] (i.e. break at every error)

AFAIK that just handles missing characters, references and modules ATM, 
but this information might be outdated.


You get all directives with

context --global m-directives.mkiv


often the log files has some summaries at the end



-
      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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Wiki - test/proposal to further clarify documentation

2024-04-17 Thread Hans Hagen

On 4/17/2024 8:32 AM, Thomas A. Schmitz wrote:




On 16. Apr 2024, at 21:56, Peter Hopcroft via ntg-context  
wrote:




On 17/04/2024, at 7:11 AM, Henning Hraban Ramm  wrote:

In my poster (still WIP) I wrote:
…


Excellent


No, I must admit I don’t like the first two paragraphs. The question is “what 
is ConTeXt,” and the answer is “we’re not LaTeX.” And why “infamous”?
I agree. It sounds the same as "we're not msword" or "we're not google 
docs". (In the end the only thing that latex and context have in common 
is that they use the tex language / ecosystem.)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Back in the 90s

2024-04-13 Thread Hans Hagen

On 4/13/2024 2:12 PM, Riviera Taylor wrote:

Hello,

I was reading about the history of ConTeXt in the Not So Short 
Introduction To ConTeXt and I have a historical question. I noticed that 
the PDF specification was published in 1993 yet ConTeXt was invented in 
1991. The book suggests that PDF output was handled by the PdfTeX engine 
in MKII in 2005. What sort of output did the software produce before 
PdfTeX was introduced? Was this the same as the output produced by the 
software before the publication of the PDF specification?
2005 is when we started with luatex which is a follow up on pdftex, and 
pdftex is more a mid 90's thing; we immediately adopted pdftex (which 
made some believe that context depended on pdftex which is not true)


anyway, we started with dvi which needs a postprocessor to go to some 
printer format like specific hp or more general postscript but also can 
drive viewers


we went from epson dot matrix printer -> early 300 dpi laser -> 600 dpi 
laser printer -> high speed oce 512 dpi printer (metric) -> high speed 
oce 600 dpi printer (+ crappy canon color laser printer) -> fast 
page-wide hp color inkjet office printer


in mkii all is controlled by backend drivers, that use so called 
specials to support color, hyperlinks, images so a workflow can have


- dvipsone : high quality postscript
- dviwindo : viewer with typeone support and hyperlinks
- acrobat  : postscript to pdf

and as all these external backends have their demands we could handle 
all these things in an abstract way (that way one could also drive 
printer properties like duplex or paper bins etc from a tex job)


that meant that when pdf came around we could almost immediately support 
most of the interactive features in a dvi -> ps -> acrobat workflow


when pdftex came around the intermediate step of postscript could be 
avoided which btw was also possible with dvipdfm(x) so we also supported 
that


so to summarize, it went from

tex -> dvi -> printer format
tex -> dvi -> postscript -> more generic printer format
tex -> dvi -> pdf -> print from acrobat
tex -> pdf -> print from pdf viewer

in the meantime we are pdf (as from that one can produce other formats)

Hans

(btw, the fact that we could easily support pdf was also a reason why at 
that time some adobe folk in nl used documents produced by context to 
show somewhat extrems usage of interactive features, thanks to the fact 
that tex can adapt to such new situations, also via the dvi route in 
this case with pdfmarks; at that time pdf usage - and features - was a 
bit more dualistic: ps replacement format versus storage and preview 
format, but that's a different story; but it still shows in how the 
standard evolved)


-----
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Most recent context doesn't like synctex?

2024-04-13 Thread Hans Hagen

On 4/13/2024 12:39 AM, Jim wrote:

Hi,

I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
system.

Recently, the stand-alone ConTeXt distribution seems to not create a
synctex file any more.  Specifically,

 /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
--synctex=1 --nonstop file.tex

does not create a .synctex file (and deletes it, if it is there), whereas
the TeXlive version

 /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
--synctex=1 --nonstop nwg_newsletter_2024_04.tex

does create the .synctex file.


The ConTeXt distribution version *does* create the file if --nonstop is
*not* used.  Knowing that, I can work around this for now, although
emacs+auctex probably won't be happy without --nonstop.

I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
that.

Is this a bug introduced by some recent change?

it's more a feature

- Mikael S and i spend some time with editor/viewer combinations on 
linux in order to find ways around the different synctex libs that they use


- as a result we could make most work ok

- we assume that synctex is set up in the document with

\setupsynctex[state=start]
\setupsynctex[state=repeat] % less efficient but gets around issue

- when context is run 'headless' (on a server) it's often done in 
batchmode because one knows that the style works and in that case 
synctex makes no sense so we disable it; this avoids the need to patch 
the style


- the manual has been updates

- running context in nonstop mode makes little sense

(maybe, as power user, Mikael remembers more details)

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \luaescapestring in proper Lua

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

On 4/11/2024 5:07 PM, Pablo Rodriguez via ntg-context wrote:

On 4/10/24 21:48, Hans Hagen via ntg-context wrote:

On 4/10/2024 7:49 PM, Pablo Rodriguez via ntg-context wrote:

[...]
I wonder whether there is a proper way in the Lua code to avoid
[[\luaescapestring{}]] in \ctxlua.
[...]

  context(tokens.scanners.string())


Many thanks for your reply, Hans.


\protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}}


Sorry, but why \protected is required or recommended here?


depends if you want it to be expandable

-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

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

On 4/11/2024 5:25 PM, Pablo Rodriguez via ntg-context wrote:

On 4/10/24 22:28, Denis Maier wrote:

[...]
   context --luatex --generate


Thanks, Pablo.
I've tried it, but it doesn't seem to work...


I get the same result on Win64 when I move the luatex binary from the
tex/texmf-win64/bin/ directory.

This may sound stupid, but could you check whether the bin directory
contain the required binary?

Sorry, "luatex --version" and even "whereis luatex" should give the same
result (but on Windows, it seems to be https://ss64.com/nt/where.html).

I hope it may help,

it searches for mtxrun.lua and contextl.lua in the same path so you need:

luametatex.exe
mtxrun.exe (can be link to luametatex.exe)
context.exe (can be link to luametatex.exe)
context.lua
mtxrun.lua

all in the same (bib) path

... always has been so ...

Hans

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

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \luaescapestring in proper Lua

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

On 4/10/2024 7:49 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \starttext
   \startluacode
   function document.print_the_thing(str)
 context(str)
   end
   \stopluacode

   \unexpanded\def\PrintTheThing#1{%
 \ctxlua{document.print_the_thing([[\luaescapestring{#1}]])}}

   \PrintTheThing{a \em b {c}}
   \stoptext

I wonder whether there is a proper way in the Lua code to avoid
[[\luaescapestring{}]] in \ctxlua.

BTW, [[\luaescapestring{}]] in \ctxlua works better for me, since in my
real world document, I’m using str:match() to check whether the string
ends with interrogation or exclamation marks ("%?!$").

\starttext
  \startluacode
  function document.print_the_thing()
context(tokens.scanners.string())
  end
  \stopluacode

  \protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}}

  \PrintTheThing{a \em b {\bf c} d}
\stoptext

bonus:

  test!\removepunctuation ?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Figure reference failing

2024-04-10 Thread Hans Hagen

On 4/10/2024 1:30 PM, Taco Hoekwater wrote:




On 10 Apr 2024, at 13:04, Willi Egger  wrote:

Hello,

It seems, that the referencing mechanism is failing. I detected this with the 
January version and the current version: 2024.04.01 08:59.

Could some one confirm this?


It fails for me as well, when "mode=columns" is used.

compare with and without mode columns:

\starttext

\enablemode[columns]

As we see \doifelsemode {columns} {in \in {table} [demo-1]} {below} 
we can have

more than one cell in a row.

\startplacetable[mode=columns,reference=demo-1]
\externalfigure[cow][width=\textwidth]
\stopplacetable

\samplefile{tufte}

\stoptext

so basically we have an "at the spot" placement or a float

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-10 Thread Hans Hagen

On 4/10/2024 5:22 AM, seyal zavira wrote:
seams this code means to put a hidden text with same size behind 
metapost shape.
but it does not work properly for me (current version: 2024.04.01 08:59) 
and produce empty page but with searchable hidden text.


as mentioned kind = "outline" will be in the next upload so with the 
current one you need to use the also posted here for ... endfor variant



also when i edit the code and replace metapost part like this:

\startMPcode
      draw lmt_outline [
          kind = "outline",
          text = "\getbuffer[MyText]",
       ]
          withcolor red
       ;
\stopMPcode

it produces a selectable hidden text on top of body and red text that 
drawn by metapost below of that.


How can this problem be solved?

i attached the codes and pdf results.

On Mon, Apr 8, 2024 at 4:37 AM Hans Hagen <mailto:j.ha...@xs4all.nl>> wrote:


On 4/8/2024 8:22 AM, seyal zavira wrote:
 > thank you Harban and Keith McKay.
 >
 >     \startMPpage
 >            picture tt ; tt := lmt_outline [
 >                kind = "path",
 >                text =
"\definedfont[name:texgyrepagellabold*default]foo
 >     f o o",
 >            ] ;
 >
 >            fill
 >               for i within tt : pathpart i && endfor cycle
 >               withshademethod "linear"
 >               withshadedirection down
 >               withshadecolors (red, blue) ;
 >     \stopMPpage
 >
 >     I'll add this:
 >
 >     \startMPpage
 >           draw lmt_outline [
 >               kind = "outline",
 >               text =
"\definedfont[name:texgyrepagellabold*default]foo f
 >     o o",
 >           ]
 >               withshademethod "linear"
 >               withshadedirection down
 >               withshadecolors (red, blue)
 >           ;
 >     \stopMPpage
 >
 >     so a single path option (no picture)
 >
 >     Hans
 >
 >
 > Thank you so much for the sample examples
 > it would be great to also make text select able in output pdf
 > the third example currently does not work. did you mean you will add
 > this feature for next updates?
we're talking outlines so that is paths which implies no search but you
can do this (Keith and/or Hraban will explain and/or wikify it)

\starttext

\startbuffer[MyText]
      \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
      \framed[align=normal,frame=off]{\input{tufte}}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
      \startMPcode
           draw lmt_outline [
               kind = "outline",
               text = "\getbuffer[MyText]",
           ]
               withshademethod "linear"
               withshadedirection down
               withshadecolors (red, blue)
           ;
      \stopMPcode
\egroup

\startoverlay


{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
      {\box\scratchbox}
\stopoverlay

\stoptext




-
                                            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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
<https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl> /
https://context.aanhet.net <https://context.aanhet.net> (mirror)
archive  : https://github.com/contextgarden/context
<https://github.com/contextgarden/context>
wiki     : https://wiki.contextgarden.net
<https://wiki.contextgarden.net>

___


___
If your question is of interest to others 

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-08 Thread Hans Hagen

On 4/8/2024 8:22 AM, seyal zavira wrote:

thank you Harban and Keith McKay.

\startMPpage
       picture tt ; tt := lmt_outline [
           kind = "path",
           text = "\definedfont[name:texgyrepagellabold*default]foo
f o o",
       ] ;

       fill
          for i within tt : pathpart i && endfor cycle
          withshademethod "linear"
          withshadedirection down
          withshadecolors (red, blue) ;
\stopMPpage

I'll add this:

\startMPpage
      draw lmt_outline [
          kind = "outline",
          text = "\definedfont[name:texgyrepagellabold*default]foo f
o o",
      ]
          withshademethod "linear"
          withshadedirection down
          withshadecolors (red, blue)
      ;
\stopMPpage

so a single path option (no picture)

Hans


Thank you so much for the sample examples
it would be great to also make text select able in output pdf
the third example currently does not work. did you mean you will add 
this feature for next updates?
we're talking outlines so that is paths which implies no search but you 
can do this (Keith and/or Hraban will explain and/or wikify it)


\starttext

\startbuffer[MyText]
\definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
\framed[align=normal,frame=off]{\input{tufte}}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
\startMPcode
 draw lmt_outline [
 kind = "outline",
 text = "\getbuffer[MyText]",
 ]
 withshademethod "linear"
 withshadedirection down
 withshadecolors (red, blue)
 ;
\stopMPcode
\egroup

\startoverlay

{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
{\box\scratchbox}
\stopoverlay

\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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Very bizarre bug

2024-04-07 Thread Hans Hagen

On 4/7/2024 10:14 PM, Thomas A. Schmitz wrote:

On 4/7/24 19:44, Hans Hagen wrote:
ok, so this "on" ... where does it come from .. you can try to run 
with \tracingall and then quit the run after the first and search the 
log for !on to get a clue


Hans


Found it - and I'm embarrassed to say it was in my own environment file, 
not in the lmtx distribution. I have a Lua function that prints 
information about the computer model and the operating system into a 
layer. Unfortunately, there was an "elseif" in there somewhere which 
should catch exceptions (such as a raspberry pi), but instead of 
concatenating the relevant return values to display in the layer, I had 
a ' context (" on ")' in there (probably for debugging) which I forgot 
about.


Sorry for the noise - I was getting too sophisticated for my own good...

No problem, is it a rpi 5? If so, how does that one perform?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Hans Hagen

On 4/7/2024 7:42 PM, Henning Hraban Ramm wrote:

Am 07.04.24 um 19:05 schrieb Hans Hagen:

\startMPpage
 picture tt ; tt := lmt_outline [
 kind = "fillup",
 text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
 ] xsized 12cm ;

 path bb ; bb := boundingbox tt ;
 path pp ; pp := bb enlarged 2cm ;

 fill pp
 withshademethod "linear"
 withshadedirection down
 withshadecolors (red, blue) ;

 draw tt withcolor green ;
\stopMPpage

no need to loop over tt


But the intention was to get a gradient _within_ the text.

Might there be a problem with the latest changes to gradients?

\startMPpage
 picture tt ; tt := lmt_outline [
 kind = "path",
 text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
 ] ;

 fill
for i within tt : pathpart i && endfor cycle
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue) ;
\stopMPpage

I'll add this:

\startMPpage
draw lmt_outline [
kind = "outline",
text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
]
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue)
;
\stopMPpage

so a single path option (no picture)

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Very bizarre bug

2024-04-07 Thread Hans Hagen

On 4/7/2024 7:37 PM, Thomas A. Schmitz wrote:

On 4/7/24 19:21, Hans Hagen wrote:
can you make a format with line 25 of context.mkxl uncommented to see 
if you get a message (not production, just a test)


Hans


That should give a message "some spurious input in line..." in the 
output or the log, right? No, did not see such a message.
ok, so this "on" ... where does it come from .. you can try to run with 
\tracingall and then quit the run after the first and search the log for 
!on to get a clue


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Very bizarre bug

2024-04-07 Thread Hans Hagen

On 4/7/2024 7:08 PM, Thomas A. Schmitz wrote:

Hi everybody,

this is bizarre, but hear me out: a file that I have has a mixture of 
xml, TeX and Lua. It compiles cleanly, no problem, on macos and linux. I 
also have a little raspberry pi on which I have installed lmtx. The file 
compiles, BUT: it has one additional page. The first page of the 
document is empty and has the word "on" in the upper left hand corner of 
the text area. I have checked several times, it always comes out like 
this. Everything else is exactly the same - context version, file and 
environment files (everything under git, so really identical). The "on" 
does not appear if I just make a "hello world" document on the raspi. So 
my question is: how can I begin to explore where this word creeps in? I 
suspect it's something in the linux-aarch64 tree or some test for this 
architecture that is the culprit, but what would be a good way to trace it?


can you make a format with line 25 of context.mkxl uncommented to see if 
you get a message (not production, just a 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF/UA-2, WTPDF

2024-04-07 Thread Hans Hagen via ntg-context

On 4/7/2024 9:31 AM, Henning Hraban Ramm wrote:

Am 07.04.24 um 08:06 schrieb Hans Hagen:

On 4/6/2024 5:34 PM, Henning Hraban Ramm wrote:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/


looks likes one has to pay for it


That’s not how you promote open standards.

should have been an ecma standard instead

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Hans Hagen





 Forwarded Message 
Subject: Re: [NTG-context] Re: how to apply gradient color to a piece of 
text?

Date: Sun, 7 Apr 2024 19:05:13 +0200
From: Hans Hagen 
To: Keith McKay 

On 4/7/2024 6:56 PM, Keith McKay wrote:
Not for me either. I used it somewhere so I'll need to look back in my 
files.


\startMPpage
picture tt ; tt := lmt_outline [
kind = "fillup",
text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
] xsized 12cm ;

path bb ; bb := boundingbox tt ;
path pp ; pp := bb enlarged 2cm ;

fill pp
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue) ;

draw tt withcolor green ;
\stopMPpage

no need to loop over tt



-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF/UA-2, WTPDF

2024-04-07 Thread Hans Hagen

Hi,


-- Support for MathML*

ha, mml and support for it (comes and goes in browsers) has been if flux 
for ages (features get added but also removed) so what are we talking 
about here, maybe in a few decades when people stopped messing with it 
(and somethign new showed up it might work out


-- Support for modern Unicode*

i must have missed something (probably ancient unicode)

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF/UA-2, WTPDF

2024-04-07 Thread Hans Hagen

On 4/7/2024 9:31 AM, Henning Hraban Ramm wrote:

Am 07.04.24 um 08:06 schrieb Hans Hagen:

On 4/6/2024 5:34 PM, Henning Hraban Ramm wrote:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/


looks likes one has to pay for it


Oh, as usual with PDF association…

That’s not how you promote open standards.

(Didn’t check, jost forwarded the message.)


2. Well-Tagged PDF (WTPDF)
https://pdfa.org/wtpdf/

well, tagging ...


Of course.

But you asked for wanted accessibility features:


sure.

We have \pdfbackendactualtext{visible}{alternative}, can we get 
alternative text (ActualText) for images?
Not automatically, of course (if someone wants AI descriptions they can 
implement a module), just as a keyword in \externalfigure?


we can add a description option that then can eb used in the wrapper 
(not that it helps much to make an image accessible)


btw, someone showed me what this acrobat liquid mode does to a document 
... the fact that one has to apply 'ai' to a document is a bad omen and 
makes one wonder ... but anyway, big tech, big money, etc so ... (after 
visiting a typesetting museum today one again realizes that a few 
decades from now one will look back in a certain way, not all is progress)


one thing we need to keep in mind is that as soon as 'obsolete' and 'not 
to be used' enters descriptions (which kind of contradicts the 
flexibility of sofware) one can also wonder how older documents can ever 
match a standard; i often get the impression that instead of some 
thinking ahead we end up adapting to what can't be done or what went 
wrong (and calling something a standard can then be a way to obscure)


anyway, one way or the other we will cope (and it depends on user demand 
which in turn depends on organizational demand)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF/UA-2, WTPDF

2024-04-07 Thread Hans Hagen

On 4/6/2024 5:34 PM, Henning Hraban Ramm wrote:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/


looks likes one has to pay for it


2. Well-Tagged PDF (WTPDF)
https://pdfa.org/wtpdf/

well, tagging ...

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: incosistent output of --- dash

2024-04-06 Thread Hans Hagen

On 4/6/2024 1:38 PM, Wolfgang Schuster wrote:

Henning Hraban Ramm schrieb am 06.04.2024 um 12:23:

Am 06.04.24 um 11:43 schrieb madiazm.eo...@gmail.com:

Hi everyone,
I'm a bit puzzled because I usually don't get an em-dash when I type 
tree hyphens. If I use the command \emdash, no problem but when I use 
the hyphens some days it works... and somedays I see three small 
hyphens.
I tried it on overleaf and of ContextOnWeb with the same 
inconsistency. If I create a new file it usually works right; but 
when I overwrite an existing file subtituting a hyphen for three 
where the dash should be I sometimes get it right and sometimes wrong.
It is not the pdf viewer since I get good or bad results in all, the 
overleaf pdf preview tool, the context on web preview tool and the 
mozilla integrated pdf viewer.


Am I missing something on the use of this ligature? (the question is 
just out of curiosity, since I plan to create a command that adds a 
hairspace after or before the dash, since I don't like it to stick to 
some letters like "o".


Generally, “we” try to reduce active characters as much as possible, 
that’s why -- and --- usually /don’t/ produce en or em dashes. You can 
activate these ligatures as a font feature though (AFAIR 
"latexhyphens", can’t find it…).


The name of the option has changes a few times and the current setting 
is textcontrol=collapsehyphens.



Some editors and some fonts do automatical replacements.


In this case it could be the wrong symbol in the document, there are 
many dashes in unicode which look similar in the input and output files.


\starttext

\startbuffer
\starttabulate[|T]
\NC U+0002D \NC - \NC -- \NC --- \NC\NR
\NC U+02011 \NC ‑ \NC ‑‑ \NC ‑‑‑ \NC\NR
\NC U+02012 \NC ‒ \NC ‒‒ \NC ‒‒‒ \NC\NR
\stoptabulate
\stopbuffer

\getbuffer

\setupbodyfont[pagella]

\getbuffer

\stoptext
detail: it is not a real fontfeature (as tlig in mkiv) but implemented 
differently with a bit more control, so we have


\nohyphencollapsing
\dohyphencollapsing

etc too as control options. These collapsed hyphens are also configured 
as valid hyphenation chars.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: what about "textdisplay"?

2024-04-02 Thread Hans Hagen via ntg-context

On 4/2/2024 7:44 AM, Henning Hraban Ramm wrote:

Am 01.04.24 um 18:54 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 18:29:

Am 01.04.24 um 18:21 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 17:19:
A while ago, I was pointed (by Wolfgang or Hans, I guess) to 
\start/stoptextdisplay to enhance whitespace handling around images.


My guess is Mikael because I saw the command the first time in the 
source of a presentation from him.


Oh, that’s probably where I saw it, too.


Here is a short example which two other solution to get a similar 
effect as \starttextdisplay.


\usemodule[visual]

\setupfloat[figure][location=left]

\starttext

\fakewords{10}{20}
\startlinecorrection
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stoplinecorrection
\fakewords{10}{20}

\blank[2*line]

\fakewords{10}{20}
\startplacefigure[location={force,none}]
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stopplacefigure
\fakewords{10}{20}

\blank[2*line]

\fakewords{10}{20}
\starttextdisplay
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stoptextdisplay
\fakewords{10}{20}

\stoptext


Thank you!
And when would you suggest what?

A float I’d use only if I need caption/numbering or the floating feature.

When I tried line correction, it never helped; probably I used it wrong 
(e.g. around section titles).


linecorrection is older, textdisplay newer and both are mainly meant to 
position boxed content (like images) in a way so that spacing looks 
acceptable ... they are vboxes with spacing around them so not meant for 
e.g. section heads or whatever text; it's for images, framed stuff, 
maybe bTABLE etc


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: OT: San Seriffe

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

On 4/1/2024 3:56 PM, Henning Hraban Ramm wrote:

in honour of Knuth and the current occasion:
https://realdougwilson.com/writing/san-serriffe

the subject title suggest that you found an open type version

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-04-01 Thread Hans Hagen

On 4/1/2024 11:34 AM, Otared Kavian wrote:

Hi Hans and Mikael,

Thanks for the new module math-goodriddance !
Indeed there are many mathematicians who are going to use the 
\goodriddancemath command, and no doubt they are going to thank you, 
even if they are very shy to come out.


Moreover this command can be used by people who want to transform the 
output PDF into an audio file, because for instance the following


\usemodule[math-goodriddance]
\goodriddancemath

\starttext

\startformula
\int_{0}^{\pi} \sin(x)\dd x = 2.
\stopformula

\stoptext

gives

integral from 0 to 휋 , of sin of 푥 d 푥 equals 2


you cna be more ambituous:

\im { C \of (\openinterval{a,b}) \neq C^^2 \of (\interval{a,b}) \neq 
C^^2 \of \interval{0,1} \neq C\of(\Omega) \neq 풞 \of (\Omega)}


or

\dm {u\of(b)-u\of(a)=\lim_{n\to+\infty} \parenthesis{f(x__1)\Delta 
x__1+f(x__2)\Delta x__2+\ldots+f(x__n)\Delta x__n}}


so we can really get rid of a lot of math

as one can see in the attached output which is very useful for the blind 
using an audio software.
yes, although unfortunately unicode never bothered to add some handy 
stuff for that (while if did for other comparable things) but we'can get 
around that


I now assume that you are willing to come up with the french 
translations (that then can be validated by Alan).  Do we actually have 
serious german context math users, as I wouldn't trust Hraban and Thomas 
on doing 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upload

2024-04-01 Thread Hans Hagen

Hi,

There is a new lmtx upload.

-- The svg inclusion via metapost has been upgraded and cleanup a bit, 
using some more recent metapost features. There are some new (not yet 
all documented metapost) features.


-- In the process, support for LCH colors has been added, which is 
documented in the (eg luametafun manual).


-- The math manual is not yet there because we were distracted by 
improving support for envelopes (penbased outlines) in metafun. This is 
still work in progress, some is present and discussed in the manual, and 
we'll come back to that sometime next month. Given the next item, we 
also might need to change some in the manual (different focus).


-- Because we have users who have to conform to the European 
Accessibility Act we have been wondering how to deal with that and at 
Mikaels place there are two demands: distinctive colors and tagging and 
especially math (somehow validators love to check that). Colors never 
were an issue as they can be controlled, and tagging math neither, 
especially because nothing was/is done with it anyway, but ... we are 
happy that we found a reasonable (more modern and future proof) way out.


As explained / shown in the attached document we're basically forced to 
choose a different approach with math (a pity as we worked hard to get 
the rendering right but the attached file works fine in the viewers that 
we tested).


-- We like to hear from users what other demands wrt accessibility there 
are. We're not interested in the (commercial) big money aspects (of pdf 
and tagging) nor in the politics behind it (changes over time). What are 
the demands, so that we can see how to make it work or just work around 
it (as it's kind of boring to cook uyp complex features	, esp compared 
to playing with metapost).


-- Furthermore .. the usual bits and pieces as discussed on the list and 
otherwise.


-- If you have troubles (crash) you need to wipe the cache due to a 
change in lua bytecode storage (no easy way to catch it).


Hans & Mikael

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

math-riddance.pdf
Description: Adobe PDF document
% language=us

% todo: no comma

\usemodule[scite]
\usemodule[article-basic]
\usemodule[abbreviations-logos]
\usemodule[math-goodriddance]

\setuplayout[tight]

\starttext

\subject{Good riddance}

We're done with math. After years of active development, Mikael and Hans have
decided to quit working on math, and concentrate on \METAPOST\ and handing over
to the next generation instead. We lost our user to the way more popular
alternative (frozen in stone standards). Also, we had it with suboptimal math
fonts, Unicode math not getting improved, MathML constantly being changed,
browsers dealing with math differently every few years, math archives getting
polluted with tons of useless tagged math.

There are other motivations, like the European union imposing strict rules with
respect to accessibility in educational content management systems, and Dutch
schools trying to get rid of math in favor of simple calculus, if at all. This 
is
why the next iteration of the engine will no longer have a math engine:
MathLessTeX. Of course, in the beginning \MLTX\ will be compatible with \LMTX,
because we owe that to the users and we need to prototype the new engine anyway.

In order to get an idea of how we will get rid of the disturbing formulas, you
can load the module:

\starttyping
\usemodule[math-goodriddance]
\stoptyping

Until becoming the default setting, the command \typ {\goodriddancemath} will
bring you into \MLTX\ mode while \typ {\badriddancemath} will bring you back to
the obsolete \LMTX\ mode. Like:

\startbuffer
\usemodule[math-goodriddance] \goodriddancemath

Who wants to solve the equation \m {x + 1 = 4} or deal with the function \m {x 
\mapsto
\root [3] {x}}, when we have AI around the corner to help us out with simple 
and silly
things like the Pythagorean theorem: \m {a^2 + b^2 = c^2}, or even with more 
advanced
math like geometric series: \m {\sum_{k = 0}^{+\infty} x^k = 1/(1 - x)}?

We will not support complicated nonsense stuff like:

\startplaceformula
\startformula
F__{1}{2}(a,b;b;z) = (1 - z)^{-a}
\stopformula
\stopplaceformula

When developing this Hans' Swedish improved a lot. {\language[sv] Den lilla del 
av
befolkningen som handlar på IKEA och tittar på fåniga krimserier förstår kanske 
detta:
\im {\sqrt {x + 1} = \sin(4 + y)}!}
\stopbuffer

\typebuffer[option=TEX]

Which gives us the beautifully typeset:

\startcolor[darkblue] \getbuffer \stopcolor

We hope that the highly respected Swedish Academy will consider our prose in
their upcoming evaluations. Our first submission to the leading \TEX\ journal 
was
how

[NTG-context] Re: How to get an image to fill the maximum available space?

2024-03-30 Thread Hans Hagen

On 3/30/2024 12:07 PM, Bruce Horrocks wrote:




On 30 Mar 2024, at 09:38, Henning Hraban Ramm  wrote:

Am 30.03.24 um 03:15 schrieb Joel via ntg-context:

I have code like this:
 \placefigure[here, force]{my caption}{%
 \externalfigure[#1][frame=on, maxheight=1.2\textwidth, 
maxwidth=\textwidth]%
 }%
I need some images to appear in a book. I need them to keep their proper 
ratios, but scale up to the maximize the available space.
The image can't be more than \textwidth wide, and can't ever be more than 
1.2\textwidth high.
The problem I am getting with this code, and it does seem to be limiting the 
images to be not bigger than those two dimensions above, is some of the images, 
for reasons I can't understand, are appearing really tiny and aren't scaling up 
to fill as much space as is possible. I can't explain why this is 
happening--the images themselves are very very high resolution.
Is there any way to modify the code to make sure the image stretches up to be 
the biggest it can, without exceeding the sizes I've listed?


Hi Joel,

AFAIK, if you don’t set at least either height or width, ConTeXt uses the 
image’s resolution setting to calculate its size, and that is often useless.

(Maybe there’s also something wrong with ConTeXt’s max width/height, I don’t 
know; I’m still planning to carefully check all options of image processing…)

You could try if "factor=fit" or "factor=max" yields the results you want.


As Hraban says, you only need to set one of height or width and Context works 
out the other.

For your case I think you just need width=\textwidth, so

   \externalfigure[#1][frame=on,width=\textwidth,maxheight=1.2\textwidth]%

where maxheight imposes the height size limit you mention.

If you still have problems with tiny images then I suspect that is a different 
issue - something to do with the image file and the metadata about the image 
size maybe? If you can share an affected image then perhaps start another 
question with an MWE and upload the image somewhere.

% \externalfigure
% [t:/sources/cow.pdf]
% [frame=on,factor=max]

\externalfigure
[t:/sources/mill.png]
[frame=on,factor=max,maxwidth=\textwidth,maxheight=.8\textheight]


-
      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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Unknown units es and dk

2024-03-24 Thread Hans Hagen

On 3/23/2024 8:31 PM, Hraban Ramm wrote:


Am 23.03.24 um 19:05 schrieb Hans Hagen:

On 3/23/2024 2:27 PM, Wolfgang Schuster wrote:

Regarding the dk unit: https://tug.org/TUGboat/tb42-3/tb132hagen-dk.pdf

The es, ts and eu are discussed here:

https://tug.org/TUGboat/tb44-2/tb137egger-edith.pdf


In German, I call these "Spaßeinheiten" (units of measurement = 
"Maßeinheiten"; Spaß = fun; "units of leisurement" might be a good 
translation).
Apart from being fun they are also useful, for instance the "ts" (and 
dk) make good framed offsets when making examples. Of the "serious" unit 
is only use pt, mm and cm (and bp in the backend).


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Unknown units es and dk

2024-03-23 Thread Hans Hagen

On 3/23/2024 2:27 PM, Wolfgang Schuster wrote:

Jan Ulrich Hasecke via ntg-context schrieb am 23.03.2024 um 13:57:

I saw this in (the btw great) bachotex-stepbystep presentation

\definepapersize
[example]
[width=8.5es,
height=11es]


\setuptextbackground
[location=paragraph,
backgroundcolor=MyColors:4,
backgroundoffset=1dk,
frame=off]


The units "es" and "dk" are unknown to me.
What does they mean?


Regarding the dk unit: https://tug.org/TUGboat/tb42-3/tb132hagen-dk.pdf

The es, ts and eu are discussed here:

https://tug.org/TUGboat/tb44-2/tb137egger-edith.pdf

it also discusses how the team callibrated these units by sampling texies.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-18 Thread Hans Hagen

On 3/18/2024 1:31 AM, Jim wrote:

On Sat, Mar 16, 2024 at 15:20 (+0100), Hans Hagen wrote:


On 3/16/2024 2:10 PM, Jim wrote:

On Fri, Mar 15, 2024 at 01:53 (+0100), Aditya Mahajan wrote:



On Thu, 14 Mar 2024, Jim wrote:



Max (et al),



were you hoping the ConTeXt distribution would ship its own
pgfutil-context.def, or were you hoping that someone could convince Henri
to put the RGB change in?



We can patch some of the definitions of pgfutil-context.def in m-tikz if
really needed, but it would be preferable to first check if tikz
maintainers are willing to merge them upstream.



Unfortunately, it seems that the maintainer feels that if we can't deal
with cmyk profiles, we shouldn't have cmyk at all.  I don't agree, but
that's where it ended.  (I was arguing for plain TeX support at the time in
the linked^2 message, but I was able to add the definition for cmyk to my
own macro file, so I was able to process examples with cmyk colours.)

What does the maintainer mean by that ... context


The maintainer's comment was about plain TeX, not context.  Sorry if that
wasn't clear.


ah, good to know


In any case, I should have sent my request to Max alone, rather than the
ntg-context list, because if Max was going to push something there, I was
hoping that a second appeal for cmyk colour support in plain would be
nice.  (I'm not quite ready to give up all of my plain TeX files.)


if it's plain, indeed, too confusing otherwise (it's no problem asking 
plain questions here but in this tikz case kind of confusing)



can add profiles if configured to do so (best not to embed them) ... and
why should there be a profile anyway ... crappy arguments ..


I agree about the colour profile, but the last time I poked that bear, my
pleas fell on deaf ears.


not even plain needs color profiles and i hope tikz doesn't add them


[And in summary, to be clear: I'm good with the colour support in ConTeXt!]

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-16 Thread Hans Hagen

On 3/16/2024 2:21 PM, Jim wrote:


I hope that time doesn't come, because either someone (you? :-) would be


not me as i don't need tikz and so i wouldn't notice what functionality 
got adapted



left with an on-going job of patching the snapshot, or ConTeXt's version of
tikz would become increasingly different (and, presumably, increasingly
less capable than the "mainline" version).
i guess it depends on what gets added .. maybe a bit of diffing to see 
if changes affect something or not before upgrading


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-16 Thread Hans Hagen

On 3/16/2024 2:10 PM, Jim wrote:

On Fri, Mar 15, 2024 at 01:53 (+0100), Aditya Mahajan wrote:


On Thu, 14 Mar 2024, Jim wrote:



Max (et al),



were you hoping the ConTeXt distribution would ship its own
pgfutil-context.def, or were you hoping that someone could convince Henri
to put the RGB change in?



We can patch some of the definitions of pgfutil-context.def in m-tikz if
really needed, but it would be preferable to first check if tikz
maintainers are willing to merge them upstream.


Unfortunately, it seems that the maintainer feels that if we can't deal
with cmyk profiles, we shouldn't have cmyk at all.  I don't agree, but
that's where it ended.  (I was arguing for plain TeX support at the time in
the linked^2 message, but I was able to add the definition for cmyk to my
own macro file, so I was able to process examples with cmyk colours.)
What does the maintainer mean by that ... context can add profiles if 
configured to do so (best not to embed them) ... and why should there be 
a profile anyway ... crappy arguments .. especially because when i run


\usemodule[tikz]

\startTEXpage

\definecolor [colorone] [r=0,g=0,b=0.5]
\definecolor [colortwo] [c=0,m=1]

\starttikzpicture
\fill [colorone] (0,0) circle(2) ; % rgb
\fill [colortwo] (0,0) circle(1) ; % cmyk
\stoptikzpicture
\setupcolors[cmyk=no]
\starttikzpicture
\fill [colorone] (0,0) circle(2) ; % rgb
\fill [colortwo] (0,0) circle(1) ; % rgb
\stoptikzpicture

\stopTEXpage

here i get a pdf file with rgb and cmyk. Maybe I have an old tikz and 
something changed (wouldn't be the first time). So let's forget about 
maintainers and ugly hacks, and identify what is the real 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
-


oeps.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: how to include an an svg file?

2024-03-15 Thread Hans Hagen via ntg-context

On 3/13/2024 9:16 AM, Henning Hraban Ramm wrote:

Am 12.03.24 um 23:59 schrieb seyal zavira:
You are correct. when i convert this svg to pdf via inkscape it works 
like a charm.


But what is standard way of including an svg file with context if we 
want to inkscape render the images?


\externalfigure[smile]

without any other settings, but inkscape must be callable on the command 
line (which doesn’t work for me on MacOS any more, must investigate…).

\startMPcode
draw lmt_svg [ filename = "smile.svg"]
\stopMPcode

Now gives the attached but it took me a while to figure out what works. 
An inkscape export adds for instance something (globally applied) that 
is not in the svg file (which actually derived from tiger.svg as 
mentioned in the file).


To be honest this is a horrible file and a good example of making things 
more complex than needed (probably common in wysiwyg applications), 
although we already had the machinery in the mp/pdf converter.


The biggest issue here is that one has to put some constrants in place 
order to make it work in e.g. sumatra (mypdf) and acrobat (which here 
actually does weird erratic things when I play with another test).


As with much complex svg, browsers also differ in interpretation o fsome 
features so it's hard to figure out what to do when there are 
conflicting demands. (Pointing to something that works tomorrow doesn't 
mean it worked when we tried to implement something yesterday.)


For Hraben - who mentioned it - i also added support for group opacity 
and transformed shades.


In the process I tried a few inkscape options (pdf export) but some 
produce faulty files (with missing stuff) so i guess we have a complex 
situation in general. That said, as long as one sticks to reliable and 
clean code (plain svg) it should mostly work out.


Text is another matter because svg dropped glyph support so now 
everything has to go through font features which in turn means that if 
one uses svg as output format one has to specify every character with 
possible abuse of a substitution feature that accesses it. So that is no 
longer a real interesting option, unless of course one exports all text 
as curves, just to be sure.


(I will extend general text suport but it will always be suboptimal but 
then, svg is not a long term archival format anyway.)


No upload yet as i also want to do some cleanup,

ps. For metapost lovers, here is some of the trickery used:

\startMPpage[offset=1ts]

draw image (
fill (unitsquare xscaled 10cm yscaled 4cm)
withcolor svgcolor(0.5,0,0)
;

registerluminositygroup ("test") (
fill (unitsquare scaled 2cm) shifted (1cm,1cm)
withshademethod "circular"
withshadecolors (.6,.1)
) ;

applyluminositygroup ("test") (
fill (unitsquare scaled 2cm) shifted (1cm,1cm)
withshademethod "circular"
) ;

draw luminositygroup (
fill (unitsquare scaled 2cm) shifted (4cm,1cm)
withshademethod "circular"
withshadecolors (.6,.1)
) (
fill (unitsquare scaled 2cm) shifted (4cm,1cm)
withshademethod "circular"
) ;

draw luminosityshade (
(unitsquare scaled 2cm) shifted (7cm,1cm)
) (
withshademethod "circular"
withshadecolors (.6,.1)
) (
withshademethod "circular"
) ;
) ;

\stopMPpage

Not that intuitive and a bit ugly deep down but it works (there was no 
need to extend mp btw as we already have graphic grouping in the 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
-


smile-test.pdf
Description: Adobe PDF document


luminosity.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-15 Thread Hans Hagen

On 3/15/2024 12:53 AM, Jim wrote:

Max (et al),

were you hoping the ConTeXt distribution would ship its own
pgfutil-context.def, or were you hoping that someone could convince Henri
to put the RGB change in?

And, if anyone has the will to push this (or add it in to a ConTeXt
distribution version), I'd still like the cmyk support, even if there is no
ability to specify colour profiles:

\def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil
{
 \pgfmathsetmacro{\@red@}{(1 - #2) * (1 - #5)}%
 \pgfmathsetmacro{\@green@}{(1 - #3) * (1 - #5)}%
 \pgfmathsetmacro{\@blue@}{(1 - #4) * (1 - #5)}%
 \expandafter\edef\csname\string\color@#1\endcsname
 {\noexpand\xcolor@ {}{}{rgb}{\@red@,\@green@,\@blue@}}
}

I don't see that it would hurt anything, even if it doesn't give complete
cmyk support.

We provide

\pgf@context@registercolor
\pgf@context@registergray
\pgf@context@registerrgb
\pgf@context@registercmyk

in colo-ini that hook into the context color mechanism so be careful 
with patches. I'm not going to spend time on other solutions that can 
interfere with internals.


(I wonder when the moment comes that we have to take a snapshot of tikz 
and stay with that.)


Hans

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

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-15 Thread Hans Hagen

On 3/15/2024 12:18 AM, Max Chernoff wrote:

Hi all,

I've had a few patches applied to my installation for a little while
now, so I figured that I should send them in. There's a diff at the end
of the email, and the modified files are attached [but rejected by the
mailing list, so sent separately to Hans]

  * In the definition of "featurecreep()" in "lpdf-mis.lmt",
"structures.pages.tobesaved[i].status" should be "[...].state" to
match the definition of "pages.save" in "strc-pag.lua".


ok, changed, i assume you tested it


  * For the "resultof" runner in "util-sbx.lmt", the current io.popen
mode only works with Windows. See the definition of "l_checkmodep" in
"liolib.c".


i trust you on that (never run piped on linux, only on windows)


  * Some of the pgfplots 3D shaders appear to be broken,
see https://tex.stackexchange.com/a/708121 .

  * The TikZ "RGB" colour model does not currently work properly. This is

internally used by "\usepgfplotslibrary[colorbrewer]" among others.
See https://github.com/pgf-tikz/pgf/pull/1130 .


see mail by others

Thanks,

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere

2024-03-13 Thread Hans Hagen via ntg-context

On 3/13/2024 12:26 PM, Mikael Sundqvist wrote:

Hi,

On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff  wrote:


Hi Hans,

On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote:

the next upload will support the attached ... so no ugly hacky code needed


"\texthere[inbetween]" looks perfect, thanks!

The "\definebar[...][inlined]" doesn't look quite right though -- the
issue that I'm having is that I can't figure out how to highlight across
both sides of an \alignhere without any questionable hacks. Unless the
new "inlined" does work across an \alignhere and I'm just not seeing it
in the example.

Thanks again,
-- Max


I can confirm that it works over \alignhere. Hans is doing some black
magic, but I guess he did not want to show off by including the whole
line.

Indeed, no need to show of the obvious

\definebar
  [mybar]
  [backgroundbar]
  [height=\strutht,depth=\strutdp,offset=.250ex,color=red]

\definebar
  [yourbar]
  [backgroundbar]
  [height=\strutht,depth=\strutdp,offset=.125ex,color=blue]

\definebar
  [ourbar]
  [backgroundbar]
  [height=\strutht,depth=\strutdp,offset=.125ex,color=green]

\starttext

\startTEXpage[width=4cm]
\startformula
a \alignhere= b + c \breakhere
\mybar {d + \yourbar{e \alignhere=} f \breakhere
g \alignhere \ourbar{=} h} + i
\stopformula
\stopTEXpage

\stoptext

Especially when it would not pass the rigourous accessibility check (esp 
wrt color) of your university,


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
-


inter-001.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread Hans Hagen

On 3/12/2024 2:53 PM, seyal zavira wrote:

thanks for your reply

yes but i don't have problem with regular svgs but when svgs has 
gradient color it does not produce any color in output.


you can see my svg in attachment.
svg gets worse and worse (esp the inheritance model) ... anyway, i can 
sort of get the gradient but no stepwise gradient opacity (in pdf and 
i'm not going to emulate something) (it's not the most interesting stuff 
to work on unpaid)


but ... i don't know if fixing this breaks something else

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere

2024-03-12 Thread Hans Hagen

On 3/12/2024 8:57 AM, Max Chernoff wrote:

Hi all,

Often I want to include a sentence/paragraph in the middle of a long
multipart formula. With the old \startalign/\stopalign formulas, I could
use \intertext{...} to do this, but this doesn't work with the new
\alignhere/\breakhere formulas. I've managed to find a "solution" for
this, although I'd prefer something a bit less hacky. Any ideas?

Also, is there a way to highlight an equation across an \alignhere? Once
again, I've found a "solution", but like before, it's pretty hacky.

Example files are attached.

the next upload will support the attached ... so no ugly hacky code 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
-


inter-001.pdf
Description: Adobe PDF document
\definebar[mybar][inlined][offset=.25ex,color=red]

\starttext

\startformula
a  \alignhere= b + c \breakhere
\mybar {d + e} \alignhere= f \breakhere
g  \alignhere= h + i
\stopformula

\page

\samplefile{knuth}
\startformula
\text{something} + \text{really} + \text{really} + \text{long} 
\alignhere= \sqrt{x} \numberhere
\texthere[inbetween]{\input{knuth}}
d \alignhere= e + f \numberhere \breakhere
g \alignhere= h + i \breakhere
j \alignhere= k + l
\stopformula
\samplefile{knuth}

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere

2024-03-12 Thread Hans Hagen

On 3/12/2024 8:57 AM, Max Chernoff wrote:

Hi all,

Often I want to include a sentence/paragraph in the middle of a long
multipart formula. With the old \startalign/\stopalign formulas, I could
use \intertext{...} to do this, but this doesn't work with the new
\alignhere/\breakhere formulas. I've managed to find a "solution" for
this, although I'd prefer something a bit less hacky. Any ideas?

Also, is there a way to highlight an equation across an \alignhere? Once
again, I've found a "solution", but like before, it's pretty hacky.

Example files are attached.

maybe

\starttexdefinition protected newintertext #1
\leftparbox [global] {
\vadjust pre \bgroup
\forgetall
\vskip.5\strutdp % needs to be more clever in the end
\dontleavehmode\vtop\bgroup
#1
\egroup
\egroup
}
\breakhere
\stoptexdefinition

but i need to discuss it with Mikael as we might integrate something 
better and then it needs to be documented (in the upcoming manual) as well


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] update

2024-03-11 Thread Hans Hagen

Hi,

Todays update has a fix for the compact mode slant interference (as 
explained by Wolfgang a few days ago). Hopefully that works out well.


We (MS and HH) also managed to make curve detection more accurate (the 
decision routine that is responsible for straight lines in the MP 
output) so that extreme paths with control points way beyond reasonable 
still produce the right output (before we could get a wrong bbox due to 
clipping the curve in the backend). One can actually also force "always 
curve" with "withcurvature 1" (more variants might follow) but that is 
more or us to have a test option. Curvature detection is mostly a pdf 
efficiency feature and normally users should rely on the default to work 
okay.


Other new mp features are relative and absolute points which makes it 
possible to define paths in a turtle graphics way (a bit like hlineto 
and vline in postscript), a native "--" operator (equivalent but 
somewehat more efficient on huge generated paths). The luametafun manual 
has a chapter on paths that describes some of this.


Yet another new feature is "firstcontrol" and "secondcontrol" that is an 
addendum to controls that makes both control points the same when only 
one is given.


Finally there is a fix in mp where some directions, think { dir 120 }, 
gave the wrong result due to sign swapping (so it was seen as { dir 200} 
or { dir -60 }) as side effect of negative zeros fed into tan2. This 
became obvious when MS reprocessed a graphic, as last year we switched 
from scsled (no bug) to double (long time bug exposed). (The bug is also 
present in LuaTeX double/binary mode but it will be fixed there too.)


The rest is not (yet) worth mentioning,

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)

2024-03-10 Thread Hans Hagen

On 3/10/2024 11:48 AM, Wolfgang Schuster wrote:

Hans Hagen via ntg-context schrieb am 10.03.2024 um 10:46:

On 3/10/2024 9:32 AM, Pablo Rodriguez via ntg-context wrote:

On 3/9/24 16:04, Wolfgang Schuster wrote:

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:

[...]
    \enableexperiments[fonts.compact]

Which seeems weird to me. Or at least, I thought I read that Hans
enabled it by default in LMTX.


AFAIR Hans uses the setting in his own documents.


I have been using it for a while.

I hope the issue with \glyphslant might be fixed to enable it again.


Then my question is whether this was caused by simply enabling compact
fonts or by doing it twice.


The results happen when you use compact mode and is a result of
\glyphslant which keeps the value of the italic style even when you
switch back to the upright style.


Many thanks for your explaination,

using the low level commands

\glyphscale
\glyphxscale
\glyphyscale
\glyphslant
\glyphweight

directly can have side efects when at an outer level these are also 
set, so you need to accumulate, like


\starttext

test {\glyphscale 2000 test \glyphscale \numericscaled1.2\glyphscale 
test} test


test {\glyphslant  500 test \glyphslant \numericscaled2.0\glyphslant 
test} test


test {\glyphweight 100 test \glyphweight\numericscaled2.0\glyphweight 
test} test


\stoptext


The problem is that compact mode uses them to apply the slanted feature 
without any manual use of the commands from a user.


\enableexperiments[fonts.compact]

\definefontfamily[mainface][rm][TeX Gyre Termes]
   [it={style:regular, features:{default,slanted}},
    sl={style:regular, features:{default,slanted}}]

\setupbodyfont[mainface]

\starttext

\startstyle[style=italic]normal {\em emphasized} normal\stopstyle

\stoptext

The only way to mask the effect is to create a new fontfeature with the 
minimum slant value and apply it to the upright style.


\definefontfeature [unslanted] [slant=0.001]

\definefontfamily[mainface][rm][TeX Gyre Termes]
   [features={default,unslanted},
    it={style:regular, features:{default,slanted}},
    sl={style:regular, features:{default,slanted}}]

ok, i'll fix that (build is down so no 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)

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

On 3/10/2024 9:32 AM, Pablo Rodriguez via ntg-context wrote:

On 3/9/24 16:04, Wolfgang Schuster wrote:

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:

[...]
\enableexperiments[fonts.compact]

Which seeems weird to me. Or at least, I thought I read that Hans
enabled it by default in LMTX.


AFAIR Hans uses the setting in his own documents.


I have been using it for a while.

I hope the issue with \glyphslant might be fixed to enable it again.


Then my question is whether this was caused by simply enabling compact
fonts or by doing it twice.


The results happen when you use compact mode and is a result of
\glyphslant which keeps the value of the italic style even when you
switch back to the upright style.


Many thanks for your explaination,

using the low level commands

\glyphscale
\glyphxscale
\glyphyscale
\glyphslant
\glyphweight

directly can have side efects when at an outer level these are also set, 
so you need to accumulate, like


\starttext

test {\glyphscale 2000 test \glyphscale \numericscaled1.2\glyphscale 
test} test


test {\glyphslant  500 test \glyphslant \numericscaled2.0\glyphslant 
test} test


test {\glyphweight 100 test \glyphweight\numericscaled2.0\glyphweight 
test} test


\stoptext

which you will now 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
-

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How can I do this?

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

On 3/8/2024 6:36 PM, Henning Hraban Ramm wrote:

Am 08.03.24 um 17:56 schrieb Otared Kavian:

Hi Ursula,

The reason for which you did not get the expected result is that you 
have « } » missing in your file, that is the closing brace after your 
italic command

« {\it » at the end of your document.
Moreover you did not have a \stoptext in your file, and a math command 
« \m » was not written correctly. Talking of math, I personnaly prefer 
to enclose in-line math between dollar signs $, that is writing « 
$\exists x \in H$ » instead of  « \m{\exists x \in H} ».


Well, better stay with the modern ConTeXt approach of \m{}.
for regular inline math we just use \im{...} (which has an \dm{...} 
companion with displaystyle


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: additional font faces

2024-03-08 Thread Hans Hagen

On 3/8/2024 5:55 PM, Henning Hraban Ramm wrote:
Hi, if I need an additional pair of upright and italic font faces, e.g. 
a Medium or Light version, would it make sense to define them like this:


I'd just define a new typeface / bodyfont, using fo rinstance

\starttypescript [sans] [AlegreyaMedium]

and then use

\switchtobodyfont[AlegreyaMedium]\sl

or

\AlegreyaMedium\sl

which is also more efficient than adding more variants

Hans


% adapted from font-pre.mkxl

\definefontalternative[md]
\definefontalternative[mi]
\definefontalternative[ms]

\definealternativestyle [medium] [\md] []
\definealternativestyle [mediumitalic,italicmedium]  [\mi] []
\definealternativestyle [mediumslanted,slantedmedium][\ms] []

\definealternativestyle [sansmedium]  [\ss\md] []
\definealternativestyle [serifmedium] [\rm\md] []
\definealternativestyle [monomedium]  [\tt\md] []

%\definealternativestyle [mediumface]    [\mediumface]    []

\unexpanded\def\normalmd{\let\fontalternative\md\font_helpers_synchronize_font}
\unexpanded\def\normalmi{\let\fontalternative\mi\font_helpers_synchronize_font}
\unexpanded\def\normalms{\let\fontalternative\ms\font_helpers_synchronize_font}

\let\md\normalmd
\let\mi\normalmi
\let\ms\normalms

\definehighlight[medium   ] [command=no,style=medium]
\definehighlight[mediumitalic ] [command=no,style=mediumitalic]
\definehighlight[mediumslanted] [command=no,style=mediumslanted]


Is that necessary? And is it enough?


\starttypescript [sans] [alegreya]
   \definefontsynonym[AlegreyaSans-Regular][name:AlegreyaSans-Regular]
   \definefontsynonym[AlegreyaSans-Italic][name:AlegreyaSans-Italic]
   \definefontsynonym[AlegreyaSans-Caps][name:AlegreyaSansSC-Regular]
   \definefontsynonym[AlegreyaSans-ItalicCaps][name:AlegreyaSansSC-Italic]
   \definefontsynonym[AlegreyaSans-Medium][name:AlegreyaSans-Medium]

\definefontsynonym[AlegreyaSans-MediumItalic][name:AlegreyaSans-MediumItalic]
   \definefontsynonym[AlegreyaSans-MediumCaps][name:AlegreyaSansSC-Medium]

\definefontsynonym[AlegreyaSans-MediumItalicCaps][name:AlegreyaSansSC-MediumItalic]
   \definefontsynonym[AlegreyaSans-Bold][name:AlegreyaSans-Bold]
   
\definefontsynonym[AlegreyaSans-BoldItalic][name:AlegreyaSans-BoldItalic]

   \definefontsynonym[AlegreyaSans-BoldCaps][name:AlegreyaSansSC-Bold]

\definefontsynonym[AlegreyaSans-BoldItalicCaps][name:AlegreyaSansSC-BoldItalic]
\stoptypescript

\starttypescript [sans] [alegreya] [name]
   \definefontsynonym [Sans]   [AlegreyaSans-Regular] []
   \definefontsynonym [SansItalic] [AlegreyaSans-Italic]  []
   \definefontsynonym [SansSlanted]    [AlegreyaSans-Italic]  []
   \definefontsynonym [SansMedium]   [AlegreyaSans-Medium] []
   \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][]
   \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][]
   \definefontsynonym [SansBold]   [AlegreyaSans-Bold]    []
   \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic]  []
   \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic]  []
   \definefontsynonym [SansCaps]   [AlegreyaSans-Caps] \stoptypescript
___
If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl

webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Log entries about confusing level change

2024-03-08 Thread Hans Hagen

On 3/8/2024 3:38 AM, Rik Kabel wrote:

Hello all,

The following example produces two log entries that seem a bit odd. The 
log entries are:


backend > bookmarks > confusing level change at level 3
around '1 body1'
backend > bookmarks > confusing level change at level 3
around 'back1'

and they refer to the first chapter of the bodymatter and the first 
chapter of the backmatter, respectively.


The example:

\setupinteraction [state=start]
\placebookmarks   [chapter]
\starttext
   \startfrontmatter
     \startchapter [title=front1]
   \samplefile {knuth-gpt}
     \stopchapter
   \stopfrontmatter
   \startbodymatter
     \startchapter [title=body1]
   \samplefile {knuth-gpt}
     \stopchapter
   \stopbodymatter
   \startbackmatter
     \startchapter [title=back1]
   \samplefile {knuth-gpt}
     \stopchapter
   \stopbackmatter
\stoptext

Does the level change message suggest that something is missing in the 
document?
normally harmless so i can add an extra check but bookmarks can be a 
pain when less structure is used (somewhat weird low level pdf stuff)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Font version parse question

2024-03-07 Thread Hans Hagen

On 3/7/2024 7:36 PM, Rik Kabel wrote:

Hello all,

The font tweak file libertinus_math.lfg tests for a font version of 
*7.040*, but the result of the version parse is *7.040;RELEASE*, 
resulting in an error message. I do not know if this is the fault of the 
parser or of the font metadata. Changing the test in the .lfg file fixes 
the error, but that is not a long-term solution.


The exact message I get in the log is:

mathematics > tweak > 'LibertinusMath-Regular', size 10, math
size 0, version 'Version, 7.040;RELEASE' found, version 'Version
7.040' expected

This is not a high-priority issue for me -- I have nothing in this 
document that would benefit -- but others may appreciate a fix.
Unless we have a crash it's just a warning, more for Mikael and me so 
that we know when to check. One cannot rely on a version being a number, 
so who knows what to test. Consistency, also within a font family is 
often 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: imposition: getting to the last page of a booklet

2024-03-06 Thread Hans Hagen

On 3/6/2024 7:50 PM, Wolfgang Schuster wrote:

The semicolon is a undocumented extension (I noticed it in the 
definition of \page[quadruple]) of \numexpr in Luametatex for the 
modulus operator.


One of these days I have to write the pending section in th elow level 
manual and also explain this:


\starttext
\ifnum  10  = 11 wrong \else okay  \fi
\ifnum  10 != 11 okay  \else wrong \fi
\ifnum  10 !> 11 okay  \else wrong \fi
\ifnum  10 !< 11 wrong \else okay  \fi
\ifnum  10 ≤  11 okay  \else wrong \fi
\ifnum  10 ≥  11 wrong \else okay  \fi
\ifnum  10 ≰  11 okay  \else wrong \fi
\ifnum  10 ≱  11 wrong \else okay  \fi
\ifnum "F0 ∈ "F0 okay  \else wrong \fi
\ifnum "F0 ∉ "F0 wrong \else okay  \fi
\stoptext

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Hans Hagen

On 3/6/2024 11:18 AM, Marco Patzer wrote:

On Tue, 5 Mar 2024 23:14:04 +0100
Wolfgang Schuster  wrote:


Here is the official solution:

\startxmlsetups xml:meta
\setupmetadata
  [author={\xmltext{#1}{/author}},
   title={\xmltext{#1}{/title}}]
\stopxmlsetups


So now we have:

\setupinteraction
   [title=FooBar]

\setupdocument
   [metadata:title=FooBar]


that just sets defaults for \setupinteraction so that they inherit from 
document



\setupmetadata
   [title=FooBar]


that's for those who go global


Are any of those deprecated or the preferred way? I'm starting to
get confused.


even if we would use \setupmetadata we'd still have \setupinteraction 
because we remain compatible


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issue mixing font features (LMTX & MkIV)

2024-03-04 Thread Hans Hagen via ntg-context

On 3/3/2024 11:54 AM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \definefontfeature[wider][extend=2]

   \definefontfamily[mainface][rm][TeX Gyre Pagella]
 [features={default, quality, wider},
  it={style: regular, features:{default, slanted, quality}},
  bf={style: regular, features:{default, boldened-30}},
  bi={style: regular, features:{default, boldened-30, slanted}}]

   \setupbodyfont
 [mainface, 30pt]

   \starttext
   \startTEXpage[offset=1ex]
   a
   {\it a}\\
   {\bf a}
   {\bi a}
   \stopTEXpage
   \stoptext

With current latest (2024.02.27 09:21), LuaTeX gets boldened and slanted
for regular (but the other fonts cannot inherit the wider feature and
wider will not mix with boldened-30 [even when specified]).

For some reason, LMTX from current latest cannot get slanted and
boldened-30 (but it mixes the inherited wider feature in all fonts).

This began to behave differently in latest from 2024.01.08 11:23 (which
is my next version after the one from 2023.09.26 18:19).

Could anyone confirm the issue?
accumulating these effects is dependent on how the features that you use 
are defined


in luametatex we have a bit more advanced mechanism (also relates to 
compact mode) because th eengine is a bit more clever


just make sure that you don't add up features where one calcels the 
other, so use for instance:


\definefontfeature[wide] [extend=2]
\definefontfeature[wideslant][extend=2,slant=.2]
\definefontfeature[widebold] [extend=2,weight=.1]
\definefontfeature[wideboldslant][extend=2,weight=.1,slant=.2]

\definefontfamily[mainface][rm][TeX Gyre Pagella]
  [tf={style:regular,features:{default,quality,wide}},
   it={style:regular,features:{default,quality,wideslant}},
   bf={style:regular,features:{default,quality,widebold}},
   bi={style:regular,features:{default,quality,wideboldslant}}]

\setupbodyfont
  [mainface,30pt]

\starttext
\startTEXpage[offset=1ex]
a
{\it a}
{\bf a}
{\bi a}
\stopTEXpage
\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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issues scaling glyphs of Twemoji Mozilla

2024-03-04 Thread Hans Hagen via ntg-context

On 3/2/2024 1:46 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \definefontfamily[mainface][rm][TeX Gyre Termes]
   \definefontfamily[mainface][cg][Twemoji Mozilla][features={color}]
   \setupbodyfont[mainface]
   \starttext
   \scale[width=30em]{a}
   \scale[width=30em]{\cg }
   \stoptext

Using current latest from both MkIV and LMTX, I cannot scale the emoji flag.

Latest font release can be directly download from
https://github.com/mozilla/twemoji-colr/releases/latest/download/Twemoji.Mozilla.ttf.

Am I missing something to scale the glyph properly?
You're missing the fact that the font has an issue. I can add a 
workaround, assuming that (as often) issues become features.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: FreeBSD 13.2

2024-02-27 Thread Hans Hagen

On 2/26/2024 2:21 PM, Roger Mason wrote:

Hello Hans,

Hans Hagen  writes:


On 2/26/2024 12:22 PM, Roger Mason wrote:


Looks like the unset TEXMF and TEXMFCNF envars are a problem.   What
should they be set to and where should they be set?

fwiw, i'll do an update oen fo these days with the old bin

what you coudl do is download the latest zip and unzip it in
texmf-context and then take the ins from the garden build


Please do not go to this trouble on my account.  I have decided to give
up on context.

well, i put the older in in the latest 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Japanese

2024-02-26 Thread Hans Hagen

On 2/26/2024 9:08 PM, Otared Kavian wrote:

Hi all,

Does anyone have a simple setup of fonts to write a small Japanese document 
(possibly with furagana) ? I am using MacOS and I have several Japanese fonts 
on the system.
I have some old examples which do not typeset correctly now, maybe because they 
use the old module simplefonts and  commands such as \setcjkmainfont and 
friends.

Many thanks in advance: Otare
there are some files "japanese-*" in the test suite; it boils down to a 
setting up a font and enabling script (because of specific spacing)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: FreeBSD 13.2

2024-02-26 Thread Hans Hagen

On 2/26/2024 12:22 PM, Roger Mason wrote:


Looks like the unset TEXMF and TEXMFCNF envars are a problem.   What
should they be set to and where should they be set?

fwiw, i'll do an update oen fo these days with the old bin

what you coudl do is download the latest zip and unzip it in 
texmf-context and then take the ins from the garden build


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: FreeBSD 13.2

2024-02-25 Thread Hans Hagen

On 2/24/2024 4:28 PM, Mojca Miklavec wrote:

Dear Roger,

On Sat, 24 Feb 2024 at 15:34, Roger Mason wrote:


After unpacking, running the install scripts results in:

ld-elf.so.1: /home/rmason/Software/Context/bin/mtxrun: Undefined symbol
"__libc_start1@FBSD_1.7"

I assume this is because mtxrun is compiled for FreeBSD 14.0.


There were some troubles with our infrastructure which led Hans to
build the binaries himself without paying extra attention to
compatibility with older systems.


Can freebsd 14 work with older bins?

The previosu method of these hard coded version numbers was a pain as i 
have to adapt different scripts and the websit to newer versions so and 
i don't want that.


(We could put more bins in the installer for a platform and then let the 
install.sh choose what bins to fetch but even then the question is how 
far do we go back in time.)



You can find the binaries here:
 https://build.contextgarden.net/dl/luametatex/

but I hope that Hans will rebuild the installer in order to make the
older systems functional again.

Other than that, building luametatex is relatively straightforward with CMake.
The sources can be found either inside ConTeXt or separately inside
 https://github.com/contextgarden/luametatex
We could add a flag to the installer thaqt doesn't update the binaries 
but intead (advices) to build the bins but it assumes Cmake and gcc to 
be installed (we could cheat and use an existing cmake made make 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] new context option

2024-02-22 Thread Hans Hagen

Hi,

As I needed to check some commands i added this:

   context --find="%\starttabulate"

which will (should) give a list of lines/files in the documentation 
where this command is used.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: MetaPost lines in tables?

2024-02-22 Thread Hans Hagen via ntg-context

On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote:

Am 21.02.24 um 19:43 schrieb Wolfgang Schuster:
… but it would be visible on a colored background. I’m sure you can 
show me a better way…


\startuseMPgraphic{dottedborder}
   draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed 
withdots withcolor "red";

   setbounds currentpicture to OverlayBox;
\stopuseMPgraphic


Thank you!

(I’m sure I already used that somewhere… Must document…)
ok, new feature dedicated to Hraban ... who then of courese has to 
document it.


\starttext

\starttabulate
\FL[1,2] % linefactor (old) dashfactor (new)
\NC test \NC test and test and test and done \NC \NR
\ML[1,1]
\NC test \NC test and test and test and done \NC \NR
\NC test \NC test and test and test and done \NC \NR
\NC test \NC test and test and test and done \NC \NR
\LL[1,10]
\stoptabulate

\framed
  [align=middle,topframe=dash,frame=off]
  {\samplefile{tufte}}

\framed
  [align=middle,
   frame=dash,
   dashstep=.01hs,
   rulethickness=1pt]
  {\samplefile{tufte}}

\framed
  [align=middle,
   frame=dash,
   dashstep=10pt,
   rulethickness=2pt,
   background=color,
   backgroundcolor=gray]
  {\samplefile{tufte}}

\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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: using an end of line as parameter

2024-02-20 Thread Hans Hagen

On 2/20/2024 12:26 PM, madiazm.eo...@gmail.com wrote:

Thanks Hans,
I supposed that lua would be more suitable, but unfortunately I still did not 
learn it (I hope in summer I have time to read the manual)

The problem arises from the fact that for each line i will perform a different 
action and for \def\foo I need four arguments so that I can correctly format 
the lines. How can i get the result of string.splitlines (s) separated into 
four arguments to pass to the macro? then \foo would be 
\def\foo#1SEPARATOR#2SEPARATOR#3SEPARATOR#4

I now use:


\starttext
%now I use the dirty trick of writing an ñ at the end of line so that the macro 
detects each argument; but for each question I have to manually add it, which 
is tedious; therefore I look for a solution to detect lines automatically

%the definition
\def\tareaAbc #1ñ#2ñ#3ñ#4ñ{\item #1
 \startitemgroup[lista1a]
 \item #2
 \item #3
 \item #4
 \stopitemgroup}

%in the document
/startitemgropu[lista1a]   %I manually open the first level of the list 
so the first argument -the question- gets numbered

\tareaAbc In den Büchereien gibt es auch …ñ   %the question; an item of 
first level
… Kuchen.ñ   %option a gets a new list of second level opened and argument 
2 is the first item
… Theater.ñ   %option b another item
… Workshops.ñ  %option c last item and closes the second level list

%some more macros with more questions and options

/stopitemgroup %I manually close the first level list
You have to provide more details about these lines. For instance, do you 
want to split on spaces?


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: using an end of line as parameter

2024-02-19 Thread Hans Hagen

On 2/19/2024 1:49 PM, Miguel Diaz wrote:

Dear list,
I want to format some language tests that different people are 
preparing. Each one uses different software and there are always 
problems in format that i want to solve.


for a a/b/c questions I receive text that I will format to a list 
(comments are mine)


In den Büchereien gibt es auch … %the question
… Kuchen. %option a
… Theater. %option b
… Workshops. %option c

I need to detect \par or whatever sign marks the newline character as an 
argument delimiter so that I dont have to paste hundreds of times braces 
for each argument.

For the example, I use this macro definition (which does no work!)

\long\def\prueba 
#1\par#2\par#3\par#4ñ{\framed[frame=off,width=0.8\textwidth,corner=round,offset=1em,align=flushleft]%

{{\bf Beispiel}: #1\\
\qquad  a) #2\\
\qquad  b) {\bf #3}\\
\qquad  c) #4
}

I get: tex error on line 493 in file ./prueba.tex: The file ended when 
scanning an argument.


the macro seems to  read to the end of file not detecting \par; I know 
its the \par that causes the problem; I used ^^M also which I read is a 
sinonym for return but it also does not work.


Help would be appreciated (my computer keyboard would appreciate it too...)

better start thinking something:

\starttext

\def\foo#1{<<<#1>>>>\par}

\startluacode
local s = [[
line 1
line 2
line 3
line 4
]]

-- local s - io.loaddata("yourfile.txt")

local lines = string.splitlines(s)

for i=1,#lines do
if lines[i] ~= "" then
context.foo(lines[i])
end
end

\stopluacode

\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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: lmt_shade fails

2024-02-19 Thread Hans Hagen

On 2/19/2024 7:10 PM, Keith McKay wrote:
Thanks for the reply Fabrice. Looks like something changed in the recent 
update. I'm sure Hans will pick it up.
next upload (when mid cycles were introduced we lost an end one in some 
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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Memory consumption in new upload

2024-02-17 Thread Hans Hagen

On 2/17/2024 10:50 PM, Shiv Shankar Dayal wrote:
I assume you would have created typescripts for those fonts. Can you 
please add them to

ConTeXt distribution, at least for the popular fonts?


Many of those are covered by typescripts. Those that are not, are on my 
machine because we needed them (often long ago) for a project (these are 
commercial fonts, in most cases typeone and of such a collection 
actually a few were used then). There are also some commercial fonts 
that I got for free. Then there are fonts that I have to check because 
users had an issue (public ones, of different quality and useability). 
Of those 'trying to cover all of unicode with  different fonts of the 
same design' I tested subsets. And of course the fonts that come with 
the operating system (basically all fonts that context can access during 
a run).


We're not going to make typescripts for every combination as in practice 
for most documents one needs a single setup and therefore only a handful 
of lines of code (and likely use some typescript file for a math font). 
There's also the selectfont mechanism that uses heuristics to do the 
same. There are plenty of examples in the distribution and for a 
specific style that demands certain fonts one can also put the 
definitions in the style.


On Sun, Feb 18, 2024 at 3:12 AM Shiv Shankar Dayal 
mailto:shivshankar.da...@gmail.com>> wrote:


The only change I made was that I started using a 9pt modern font
than a 10 pt modern font.

My document decreased from 580+ pages to 500 pages after that.

About your document, I assume you had a lot of Graphics because text
only 180MB is too high.
I have only few diagrams and my file size is only 3MB.

On Sun, Feb 18, 2024 at 2:13 AM Hans Hagen mailto:j.ha...@xs4all.nl>> wrote:

On 2/17/2024 6:17 PM, Shiv Shankar Dayal wrote:
 > Thanks for new upload. I see that memory consumption is much
less than
 > previous version. So
 > once again, thanks a lot.
 >
 > I am curious about what has changed in recent upload, that
memory
 > consumption is about 60% of earlier versions.
it's hard to tell what exact consumpiton is becaue for instance
when lua
creates tables, they grow by factors two when then have to
(maybe 5.5 is
a bit less consuming)

on the one hand luametatex is more efficient than luatex due to
all kind
of ímprovements' but some nodes are larger so that takes more
memory,
which is only noticed when one has lots of text on a page (or keeps
boxes stuff around)

anyway, not that much changed since the previous upload, so
maybe you
just stay below a threshold

I recently generated a 180MB document with 2500 fonts + metapost
outlines of them and that could bump mem usage (with empty
cache) to 30
GB (less after fonts were cached) but normally we stay around
125 MB for
a document. Anyway, tex mem consumption can often be neglected
compared
to other applications.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
<https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl>
/ https://context.aanhet.net <https://context.aanhet.net> (mirror)
archive  : https://github.com/contextgarden/context
<https://github.com/contextgarden/context>
wiki     : https://wiki.contextgarden.net
<https://wiki.contextgarden.net>

___



-- 
Respect,

Shiv Shankar Dayal



--
Respect,
Shiv Shankar Dayal

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : http

[NTG-context] Re: Memory consumption in new upload

2024-02-17 Thread Hans Hagen

On 2/17/2024 6:17 PM, Shiv Shankar Dayal wrote:
Thanks for new upload. I see that memory consumption is much less than 
previous version. So

once again, thanks a lot.

I am curious about what has changed in recent upload, that memory 
consumption is about 60% of earlier versions.
it's hard to tell what exact consumpiton is becaue for instance when lua 
creates tables, they grow by factors two when then have to (maybe 5.5 is 
a bit less consuming)


on the one hand luametatex is more efficient than luatex due to all kind 
of ímprovements' but some nodes are larger so that takes more memory, 
which is only noticed when one has lots of text on a page (or keeps 
boxes stuff around)


anyway, not that much changed since the previous upload, so maybe you 
just stay below a threshold


I recently generated a 180MB document with 2500 fonts + metapost 
outlines of them and that could bump mem usage (with empty cache) to 30 
GB (less after fonts were cached) but normally we stay around 125 MB for 
a document. Anyway, tex mem consumption can often be neglected compared 
to other applications.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: An announcement of my new book.

2024-02-15 Thread Hans Hagen

On 2/15/2024 8:25 PM, Tommaso Gordini wrote:
Thanks everyone for the suggestions on the manuals. I knew the resource 
reported by Alain and, of course, that of Joaquín, whose translation 
into Italian I have completed, but not yet refined.


However, I didn't know the file reported by Mikael, which I found to be 
an excellent tutorial to get started with.


The documentation on ConTeXt is copious, and we know it: just look at 
the manuals on Contextgarden. But it is decidedly fragmented, and this 
disorientates the user.


I believe, therefore, that what the community misses is a 
tutorial/reference manual/complete guide that comes /directly/ from the 
ConTeXt team (Hans, Wolfgang, etc). And, above all, that it is up to 
date: on Contextgarden many ‘valid’ manuals date back to many years ago, 
and the obsolescence of the software guides could make people say 
something like «well, stuff from years ago, I don't trust it».


A manual in a single file that has, in short, the seal of officiality: 
the various resources in circulation are just as many excellent efforts 
by individuals, who however have put their own approach to ConTeXt into 
their work. Perhaps there is a more correct approach than others, more 
essential, which is worth knowing.


I am speaking to you as a LaTeX user, and therefore I may have written a 
lot of nonsense in my message.
I conclude by saying that, in the end, the ConTeXt team may not be 
interested in all this, and therefore our discussions are pure academic. :)
As with latex it's not dev who have to write documentation, manuals, 
books ... so any addition is okay. There are only 24 hours in my day 
(maybe a few more in wolfgangs),


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-02-15 Thread Hans Hagen

On 2/15/2024 10:02 AM, luigi scarso wrote:

On Wed, 14 Feb 2024 at 13:47, Hans Hagen  wrote:


Hi,

as we're around texlive code freeze time we're also in upload mode

- i uploaded a new lmtx
- i also added linux and windows 32 bin (as it seems to have users)

- we're now using lua 5.5 which has one restriction (was already
announced a while ago):


hm, I don't see lua 5.5 around ... perhaps Lua 5.4.5 ?
it's beta stuff but luametatex is an good test for it as it used a lot 
of lua so it's s way to pay back for using lua


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] manuals

2024-02-14 Thread Hans Hagen via ntg-context

There's also:

https://github.com/contextgarden/not-so-short-introduction-to-context

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: mtxrun.lua:10080: bad argument #9 to 'format'

2024-02-14 Thread Hans Hagen

On 2/14/2024 10:05 PM, Garulfo wrote:

Hi,

it seems that line 10066 in mtxrun.lua (now 10070) has not been updated 
for today's update.


What is the command line to rebuild mtxrun locally without downloading 
update from internet ?

(I only know "sh install.sh"...)

can you copy the 'bad line' in the mail

(there's also a mtxrun.lua in scripts/context/lua)

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: An announcement of my new book.

2024-02-14 Thread Hans Hagen

On 2/14/2024 8:37 PM, Joaquín Ataz López wrote:
I join the thanks to the other members of the list. I think that good 
documentation is essential in any project, and, in particular, a 
low-level explanation of ConTeXt that is understandable without being an 
accomplished TeX programmer seems to me a great idea.


As for TeX documentation, I don't know what the members of the list who 
know more than I do will think, but I think The TeXBook is a great book, 
very didactic. I also like (although at a different level) TeX By Topic,

indeed these are must-haves

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: Context lmtx for 32bit under LUBUNTU 18.04

2024-02-14 Thread Hans Hagen

On 2/14/2024 6:10 PM, Henning Hraban Ramm wrote:

Sorry, I can’t help ATM.

But Hans’ latest upload includes 32bt Linux binaries again.
Indeed. I have to improvise a bit as the build is only partially working 
so some binaries i generate myself and currently we skip luatex (no big 
deal as most use luametatex 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upload

2024-02-14 Thread Hans Hagen

Hi,

as we're around texlive code freeze time we're also in upload mode

- i uploaded a new lmtx
- i also added linux and windows 32 bin (as it seems to have users)

- we're now using lua 5.5 which has one restriction (was already 
announced a while ago):


for i=1,10 in t do

i = 2 * i

end

should now be:

for i=1,10 in t do

local i = 2 * i

end

as one cannot change the (local constant) i which actually is not that 
different from what metapost does. The good news is that voilating this 
is reported when a lua file is loaded so one can't get it unexspectedly.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \type ignores space between command and bracket

2024-02-02 Thread Hans Hagen via ntg-context

On 2/2/2024 11:16 AM, wolfgangbackes--- via ntg-context wrote:

I have stumbeld across the same bug. Seems to be very elementary, but is still 
present after many years. Sigh.

don't confuse bugs and features ...

\starttext

here a \type{\test  is}  done
here a \type{\test [is]} done
here a \type{\test {is}} done

here a \type[compact=yes]{\test  is}  done
here a \type[compact=yes]{\test [is]} done
here a \type[compact=yes]{\test {is}} done

here a \type[compact=all]{\test  is}  done
here a \type[compact=all]{\test [is]} done
here a \type[compact=all]{\test {is}} done

\stoptext

it helps to read a bit about how tex handles spaces esp after control 
sequences and when passing stuff in arguments ... then sit down and 
ponder possible solutions 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: hyphenation question

2024-02-02 Thread Hans Hagen via ntg-context

On 2/2/2024 1:03 PM, Hans van der Meer via ntg-context wrote:
In the 18th century documents I am transcribing often words are 
abbreviated as for example /voorschreeve/ becoming /voors:/ In the 
transcription it is usual to write this as /voors[chreeve]/ indicating 
to the reader how the abbreviation was interpreted.


The problem then arises with hyphenation, because /voors[chreeve]/  in 
the example will not be hyphenated as if the []'s were absent. Which is 
what I would like to happen.


Question: is it possible to realize this and how?

Like this?

\starttext

\startexceptions
voor-s[chree-ve]
\stopexceptions

\hsize1mm
voors[chreeve]

\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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: textbackground spacing offset

2024-01-31 Thread Hans Hagen

On 1/31/2024 7:15 PM, Marco Patzer wrote:

On Thu, 16 Nov 2023 13:52:05 +0100
Marco Patzer  wrote:


I'm having problems getting the textbackground spacing offset to work.
Example:

\setupframedtext
   [offset=overlay,
width=max,
depthcorrection=off]

\setuptextbackground
   [location=paragraph,
%% offset=overlay,   %% does nothing
%% backgroundoffset=overlay, %% does nothing
%% depthcorrection=off,  %% does nothing
%% topoffset=3mm,%% works, but only for positive values
background=,
frame=on]

\starttext
   \startframedtext
 \framed{Foo}
   \stopframedtext
   \starttextbackground
 \framed{Foo}
   \stoptextbackground
\stoptext

How do it get the same spacing as in the framedtext case?


Is there a solution to this? Or an explanation why the spacing
differs?
these are fundamentally different mechanisms .. you can play with 
\inframed in the second case


-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: mtxrun.lua:10080: bad argument #9 to 'format'

2024-01-29 Thread Hans Hagen

On 1/29/2024 12:08 PM, Taco Hoekwater wrote:


Hi,

I changed line 10066 in mtxrun.lua to

  templates[i]="%-"..w.."s"..between

from

  templates[i]=“% "..w..”i"..between

and that fixed it.


thanks, I also changed util-fmt.lua line 79

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upload

2024-01-24 Thread Hans Hagen

Hi,

I uploaded a new lmts:

- important fix for empty page (pdf, recently introduced)
- win32 installer fix
- bsd installer fix

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Caching Metafun images and VIM Syntax highlighted code

2024-01-24 Thread Hans Hagen

On 1/24/2024 5:50 PM, Aditya Mahajan wrote:

On Wed, 24 Jan 2024, Shiv Shankar Dayal wrote:


Perhaps Aditya Mahajan can tell me how can I cache code snippets. Invoking
VIM will have heavy penalty on highlighting the code otherwise.


Have you tried the vim module:

https://github.com/adityam/filter/blob/dev/vim-README.md

Caching is enabled out of the box, so you don't need to configure anything.


Other than that, how can I cache Metafun images so that they are not
recomputed on every processing of file.


There used to a command for caching metafun images in MkII, but I don't know if 
that is really needed in LMTX. In most cases, metapost processing does not have 
a significant processing delay.
if images are the same one can use the reuseMPgraphic or uniqueMPgraphic 
features .. plenty of examples can be found, but as Aditya poined out mp 
is quite fast (but reuse saves on file size)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Using plain TeX commands in ConTeXt

2024-01-24 Thread Hans Hagen

On 1/24/2024 2:55 PM, Shiv Shankar Dayal wrote:

Dear List,

Can we use plain TeX commands which are available in LuaMetaTeX in an 
arbitrary manner or are there any restrictions?

what do you mean with arbitrary plain tex commands

-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: After Compiling the Context test, there was no PDF.

2024-01-24 Thread Hans Hagen

On 1/24/2024 9:55 AM, Ursula Hermann wrote:

Dear List,

I am sorry, but once again me: I downloaded the last upload from Hans 
yesterday, I downloaded context-win64, and tried the test today .

you're using windows 32 so you need to use the 32 mswin installer

http://lmtx.pragma-ade.nl/install-lmtx/context-mswin.zip


-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: OpenBSD install failed

2024-01-24 Thread Hans Hagen

On 1/24/2024 2:00 AM, Damien Thiriet via ntg-context wrote:




Dear Hans,


can you test with

 OpenBSD|openbsd)
 case "$CPU" in
 i*86)
 PLATFORM="openbsd" ;;
 amd64)
 PLATFORM="openbsd$-amd64" ;;
 *)

instead?


I tested it, with and without the typo at
openbds$-amd64

Having fixed it to

   OpenBSD|openbsd)
   case "$CPU" in
   i*86)
   PLATFORM="openbsd" ;;
   amd64)
   PLATFORM="openbsd-amd64" ;;
   *)

I could install the binaries and compile the basic test doc with \input 
tufte

ok, i'll fix that $

Hans

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

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-23 Thread Hans Hagen via ntg-context

On 1/20/2024 10:32 AM, Ursula Hermann wrote:

32 bits Windows download does not work, because 404 report.


i uploaded a win32 installer (for now we only keep 32 bit win but once 
all users are on 64 bit ...)


the current upload is as usual work in progress

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Named characters

2024-01-23 Thread Hans Hagen

On 1/15/2024 7:57 PM, Thomas A. Schmitz wrote:

Hi all,

not a complaint, just a question (for Hans and Wolfgang, I guess): in 
recent versions of lmtx, Greek named characters (constructs such as 
\greekdasiatonos) don't work any more. Which means I have to adapt some 
of my older macros. Is this an oversight or did they get axed?
I assumed that most moved on to utf so ... when i looked at these 
definitions there were plenty greek, cyrillic, etc that were just there 
because in mkii we had to follow the 'name' route and it's a waste of 
memory and hash entries. For now I kept the latin but it is tempting to 
ditch them too.


We could of course make a module with named ones,

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: OpenBSD install failed

2024-01-22 Thread Hans Hagen

On 1/23/2024 12:34 AM, Damien Thiriet via ntg-context wrote:

Hello,

I tried to install OpenBSD 7.4 binaries but failed.
What I did:
download the zip from pragma
unpack it in /usr/local/context
chmod 744 install.sh
./install.sh

After running it, there is no file in

/usr/local/context/tex/texmf-openbsd7.4-amd64/

I searched the mailing list archive and after reading that post from Mojca
https://www.mail-archive.com/ntg-context@ntg.nl/msg92131.html
I took a look at mtxrun.lua

Don't know if this is the issue, but here is

grep bsd /usr/local/context/bin/mtxrun.lua
output:
  elseif name=="freebsd" then
    bits,platform=64,"freebsd-amd64"
    bits,platform=32,"freebsd"
  elseif name=="kfreebsd" then
    bits,platform=64,"kfreebsd-amd64"
    bits,platform=32,"kfreebsd-i386"


can you test with

OpenBSD|openbsd)
case "$CPU" in
i*86)
PLATFORM="openbsd" ;;
amd64)
PLATFORM="openbsd$-amd64" ;;
*)

instead?
-----
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context version 20240118 ("Registerhaltigkeit")

2024-01-22 Thread Hans Hagen via ntg-context

On 1/22/2024 10:47 AM, Thomas Meyer wrote:

Hi Hans,

maybe you understand the question mark now, you are part of it. 
Unfortunately, I haven't received a reply to my last e-mail from January 
18.


No I don't. Are you sayign that you want an instant reply every time? I 
assume you realize that we're talking about volunteers here and that 
answering is askign users and developers to allocate free time to answer 
them and as we all have jobs it's not like we can always answer 
immediately.


Maybe only those whose questions are more serious, more interesting or 
whatever will get an answer.


Depends. I guess that when folk on this list assume a question to be 
answered they move on to a next one. Also, the only way to get an answer 
fast is to provide a good small example that exposes the issue.


I do not understand what you mean with "as follow up on the keyword 
thread we decided to treat bad values to equivalent to 'no'"! Which 
values are bad in this context?


Did you read Wolfgangs answers? We support "yes" but not "yes " etc etc. 
We just added a bit more rigorous test.



With the new ConTeXt version, "grid" no longer works for me! Too bad.


Let's see what Wolfgang says as he tested your mwe.


Should my attempt to use ConTeXt end here?

hm

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: cont-new.mkiv and \everymathematics

2024-01-21 Thread Hans Hagen via ntg-context

On 1/20/2024 7:49 PM, Rogers, Michael K wrote:

Hi all,

In writing class notes, I frequently make one-letter macros for formatted 
symbols, such \v and \w for vectors. Generally speaking, one-letter names for 
function/macros/variables is frowned upon in programming, but I find this 
localized use very convenient.

In cont-new.mkiv, one finds definitions of \t and \w (via \let) appended to 
\everymathematics, which overwrites my definition of \w every time TeX enters 
math mode. I can fix this by appending my definition to \everymathematics. The 
inefficiency seems minor, and I can live with it. I have a question and a 
couple of points:

1. Is there a better way than adding the definition to \everymathematics?

2. I don’t think these definitions should be in ConTeXt. Let users add them if 
they wish. Or add a ‘useshortcuts’ option to \setupmathematics.

3. \t and \w are undocumented, \mathword is undocumented, and it took me a 
while to track down the bug it created for me. In particular, they overwrote my 
definition only in math mode, and “\show\w” did not work in math mode. 
Frustrating.  I could add a wikipage, I suppose, but I’m not proud of the 
extent of my knowledge: “\mathword{word} typesets “word” in math mode in a 
normal text font, somewhat like \text{word}, and \w is an abbreviation of it 
that is added to \everymathematics on startup.”
adding to \everymathematics can work fine as long as you're the last one 
adding


when you overload built in commands,

\enabledirectives[overloadmode=error] % or warning

can give you some protection

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-20 Thread Hans Hagen

On 1/20/2024 10:32 AM, Ursula Hermann wrote:

32 bits Windows download does not work, because 404 report.


32 bit windows has been dropped for now, i could generate native win32 
bins but they are less performing that mingw crosscompiled but all this 
is more manual work than using the garden build


I might add it when the garden build is up and running which might 
happen one of these days.


So, how many 32 bit bin users are out there? And for how long? Any linux 
32 users?


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

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

On 1/19/2024 6:34 PM, Pablo Rodriguez via ntg-context wrote:

On 1/18/24 20:43, Denis Maier via ntg-context wrote:

*Von:*Alain Delmotte 
*Gesendet:* Donnerstag, 18. Januar 2024 20:04
*An:* ntg-context@ntg.nl
*Betreff:* [NTG-context] Re: upload
[...]
When I go to https://www.pragma-ade.nl, I get an 404 Not Found
message, so I can't download the new upload !!
Works here.


Hi Denis,

I get a 404 error for both https://www.pragma-ade.nl/install.htm and
https://www.pragma-ade.com/install.htm.

I can update my existing installed version, but I wouldn’t be able to
install a brand new distribution.

Do you reach any of the urls included in my first paragraph?

Many thanks for your help,

can you try again

-
  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-19 Thread Hans Hagen

On 1/19/2024 7:13 PM, Bruce Horrocks wrote:




On 19 Jan 2024, at 09:31, Hans Hagen  wrote:

On 1/18/2024 11:15 PM, Bruce Horrocks wrote:

On 18 Jan 2024, at 18:56, Shiv Shankar Dayal  
wrote:


I understand that why it is slow, but the problem is that the difference is too 
high.
My book has lots of math, so perhaps that is the reason.

Option 1: Buy or borrow a faster computer. You'll get your desired speed-up far 
faster than waiting for Hans to make changes, even assuming there is something 
that can be changed. I'd recommend a Mac M3 :-)


As tex is a single core process (ok, the os might delegate some file handling 
to other cores) it benefits from  jump in core speed. I use a 2017 laptop with 
a reasonable fast intel xeon.  I have a few docks spread round with different 
resolution monitors (1920x1200, 2560×1440, 4096×2160) and performance also 
depends on the connected monitor.

I'd be curious to know how much these new processors impact performance over 
time because the ages of dohbling performance every year are past.


I mentioned the Mac M3 because it's not the cores that make the difference but 
the speed of the SSD. So reading the source and writing out the result, plus 
writing/reading any intermediate files is astonishingly fast on the Mac. Also 
the RAM is on the same die as the chip so RAM access speeds are high. Even if 
the app is single-threaded, the speed increases are significant - in fact 
especially when the app is single is threaded. :-)


File caching helps a lot indeed. Just compare

  context --make

after a reboot with the second or third time after that.

Hans

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

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-19 Thread Hans Hagen

On 1/19/2024 11:00 AM, Henning Hraban Ramm wrote:

Am 19.01.24 um 10:31 schrieb Hans Hagen:

(that said: luametatex runs fine on my mobile phone)


What’s the smallest/oldest device someone tried LMTX on?
(We were joking about “Hans’ thermostate and Alan’s fridge“…)
Would it run on some 8 bit homecomputer? (I’d guess the RAM is too 
limited, and loading from datasette would need hours…)


Just curious.
The smallest i have here is a https://en.wikipedia.org/wiki/RCA_1802 
which actually was a very nicely designed thing (also powers the 
hubble); processors never became cleaner. Now, as the kit I used only 
had 512 bytes ram (later 2K or so) it really learns one how to program 
efficiently (thihk of writing a simple game, save and load from cassette 
player, etc in that space; dynamic adaptive functions and such) and you 
know where I'm coming from'(later pascal and modula).


That said: luametatex has a smaller memory footprint than luatex 
although nodes are way bigger but even that won't make it run well on an 
8 bit processor, assuming it can address 32 bit mem.


Context mkii started on 4.7 Mhz intel (386) so now we're 1000 times 
faster but performance gain is not linear. After all, tex has to compete 
with other applications running at the same time (browsers, remote 
clients, media apps, web polling apps, zoom, etc.) so it's kin dof 
amazing that it actually performs okay.


What boosted performance is for instance ssd's. What might boost is ddr5 
memory but that has to catch up with ddr4 first. What also boosted 
luametatex is cpu cache. I remember when taco and I moved to the math 
part we noticed a drop in performance, until machines got updated with 
larger cache. We'd just crossed some magic threshold.


Actually, I kind of assume that we're stuck with cpu performance but 
nevertheless luametatex became faster. It helps to develop on an older 
machine and not on a yearly updated one as that obscures matters. (Not 
that I'd not like a faster machine, but that comes at a steep price.)


Hans

ps. In the tranmsition from pdftex to luatex to luametatex one should 
not underestimate Taco's effort of going from basically unreadable and 
useless C output by web2c (pascal -> c) to what became the luatex C code 
base (with embedded original documentation). From that we added more 
functionality gradually over a decade till luametatex spun off, which 
then lead to quite a bit of refactoring again (but trying to maintain 
the spirit of how tex is programmed).



-
      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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-19 Thread Hans Hagen

On 1/18/2024 11:15 PM, Bruce Horrocks wrote:

On 18 Jan 2024, at 18:56, Shiv Shankar Dayal  
wrote:


I understand that why it is slow, but the problem is that the difference is too 
high.
My book has lots of math, so perhaps that is the reason.



Option 1: Buy or borrow a faster computer. You'll get your desired speed-up far 
faster than waiting for Hans to make changes, even assuming there is something 
that can be changed. I'd recommend a Mac M3 :-)


As tex is a single core process (ok, the os might delegate some file 
handling to other cores) it benefits from  jump in core speed. I use a 
2017 laptop with a reasonable fast intel xeon.  I have a few docks 
spread round with different resolution monitors (1920x1200, 2560×1440, 
4096×2160) and performance also depends on the connected monitor.


I'd be curious to know how much these new processors impact performance 
over time because the ages of dohbling performance every year are past.


There are several factors that impact performance:

tex engine : quite a bit faster in luametatex
mp  engine : quite a bit faster in luametatex
lua engine : not much we can do about

but inefficient macros and usage can offset any gain in engine.

One thing to keep in mind is that tex is an interpreter and all gets 
tokenized which is more costly in a 32 bit engine than in an 8 bit one 
(like pdftex). And although luametatex is more efficient than luatex 
that gets offset by more features that come at a price, but we still 
win. It helps a bit to know what tex does and what macros add to that. 
Simple timing operations is useless as in practice we have less cache 
hits than with a simple loop test: tex is jumping all over memory. 
Bottlenecks are often noe where one expects them.


Anyway, if one can choose: go for a few high perfotmance cores over 
dozens of so called efficient cores.


(that said: luametatex runs fine on my mobile phone)


Option 2: Split your book into a project with each chapter, or even part of a 
chapter as a separate component and compile only the chapter you are working 
on. Set up a nighttime (or lunchtime) run to regenerate the entire book while 
you're away from the computer and speed doesn't matter.

Indeed. That's the natural way to deal with large 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: LuaMetaTeX code

2024-01-19 Thread Hans Hagen

On 1/19/2024 9:31 AM, Shiv Shankar Dayal wrote:

I see code like

# define luametatex_version          210
# define luametatex_revision         10
# define luametatex_release          10
# define luametatex_version_string   "2.10.10"

starting with C99 these become unnecessary. Rather they should be like 
const int luametatex_version=210; const char* 
luametatex_version_string="2.10.10";


These ensure type-safety in the code and are good coding practice.
Good coding practice discussions are wasted on me (you don't want me to 
look at your tex code -)


The versioning is abit special in te xdue to the fact thet some numbers 
en dup in registers and others as token list (string). I have considered 
changing that but it would also break some 'testing for tex version' so 
for now we have to accept this mix of tex/etex/pdftex inheritance.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: LuaMetaTeX code

2024-01-19 Thread Hans Hagen

On 1/19/2024 9:26 AM, Shiv Shankar Dayal wrote:

Dear Hans,

I saw the C code of LuaMetaTeX and I saw a lot of gotos which is not 
good coding practice. These potions of code which have goto should be 
refactored.


I am a C programmer, but I know very little of TeX. If you can point me 
towards where should I start for TeX(perhaps TeX Book or TeX for the 
Impatient), I can help with refactoring of code to make is more 
efficient/easier.
Luametatex evolves out of traditional tex so we have/keep some and 
although i grew up in the 'anti goto' times (pascal) there are plenty 
cases where i see no problem. Occasionaly I clean up such bits (when it 
makes sense). And I'm not going to enter coding practice discussions.


Forget about refactoring ... there has already be done a lot of that and 
we want to stay sort of close to the original (also due to 
doicumentation). I know the code quite wel now and refactoring is for me 
counter productive. These are projects running for decades and engines 
need to be stable so changes come slow.


You can compare the luanmetatex source to luatex and pdftex to see how 
we proiceed.


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-19 Thread Hans Hagen

On 1/19/2024 1:33 AM, Aditya Mahajan wrote:


\starttext

\dorecurse{5000}{\ReadFile{knuth}}

\stoptext

I'll send you the PDFs offlist.

lmtx defaults to 'modern' so you need to

\setupbodyfont[modern]

for mkiv

Hans


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

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-18 Thread Hans Hagen via ntg-context

On 1/19/2024 12:34 AM, Aditya Mahajan wrote:

On Thu, 18 Jan 2024, Hans Hagen wrote:


Of course we'll never be as fast as (pure) plain tex (no layers added) or
latex (which often is advocated as faster than context).


I was curious, so did a quick experiment: typeset \input knuth 500 times. Here 
are the results:

pdflatex: 547 pages/sec
lualatex: 308 pages/sec


opentype or type 1 ?


MKIV: 130 pages/sec
LMTX: 147 pages/sec


that is weird as lmtx is always faster here (we loose some 15% on the 
backend compared to luatex, maybe even more, but we gain back quite a 
bit elsewhere for various reasons)



Interestingly, pdflatex, lualatex, and MkIV all generated pdf with 1112 pages, 
while LMTX generated a pdf with 1250 pages. Both MkIV and LMTX take the same 
time to run (8.5 sec) but LMTX generates more pages so it is faster.


puzzling


Of course, this is a meaningless experiment from a practical point of view as a 
1000 page document will be more complex than just text.

% engine=pdftex  1.2
% engine=luatmetatex 1.6
% engine=luatex  1.8
% engine=xetex   2.4

\starttext

\dorecurse{500} {
\input knuth \par
}

\stoptext

125 pages, so how does your test file look

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-18 Thread Hans Hagen

On 1/18/2024 7:56 PM, Shiv Shankar Dayal wrote:




In comparison to LaTeX with LuaHBTeX, ConTeXt with LuaMetaTeX is
lightning fast.

pdfTeX is 8bit, and Knuth’s plain TeX is very low level – for a fairer
comparison, try the TeXbook on LuaMetaTeX (I don’t know if “plain”
works
though).

I understand that why it is slow, but the problem is that the difference 
is too high.

My book has lots of math, so perhaps that is the reason.

You can run the texbook with \tracingall and see what actually happens.

The texbook uses plain tex (very lightweight) with a dedicated style 
(also lightweight). On the contrary context uses layers of abstraction, 
a more complex font, math, structure, page etc etc etc sytstem.


In fact, plain tex had to be as it is because otherwise it would take 
ages to process teh texbook. On a pc one could see the page numbers 
crawl so in the end wr're quite okay nowadays.


If you run context with \tracingall you'll see that more goes on.

For me 40 pps sounds not that bad. If you use only text you can get to 
500 pps but that's not realistic. Maybe your style is suboptimal.


Also, open type fonts, opentype math, unicode, color, etc etc comes at a 
price. And, compared to pdftex, in most cases luametatex is faster on 
documents of average complexity. If you also use xml and/or metapost you 
migh tbe dragged down to a few pages per second while lmtx doesn't 
suffer much.


Anyway, if you think it can be made faster you can always post code to 
this list that identifies bottlenecks.


Of course we'll never be as fast as (pure) plain tex (no layers added) 
or latex (which often is advocated as faster than context).


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-18 Thread Hans Hagen

On 1/18/2024 3:27 PM, Otared Kavian wrote:

Dear Dalyoung, dear Mikael,

I installed anew the whole LMTX tree and now everything is working fine.
I don’t know whether this is related or not, somehow in my previous tree 
I had a directory (or folder in the MacOS language) named « texmf-osx-64 
» instead « texmf-osx-arm64 » and this apparently had consequences.


In any case everything works fine now.

Thanks to Hans, Mikael and all the people on this list!

concerning the prime, use

  $x\prime$ and not $x^\prime$ as you might want $x^2\prime$ some day

in the first case it's really a prime, in the second case a prime symbol 
in a superscript; in lmtx we have for each nucleus a presubscript, 
presuperscript, subscript, superscript and primescript (plus index ones)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context version 20240118

2024-01-18 Thread Hans Hagen via ntg-context

On 1/18/2024 12:59 PM, Thomas Meyer wrote:

What is going on?

Yesterday I got a perfect on-grid-written document!
But today, with the newest context-version (20240118) all changed for 
the worse.


as follow up on the keyword thread we decided to treat bad values to 
equivalent to 'no'



I may not get a reply to this e-mail either!

?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: [ \copypages ]

2024-01-18 Thread Hans Hagen via ntg-context

On 1/17/2024 10:20 PM, vm via ntg-context wrote:


Is there a (hidden) option that allows for changing the font color of 
external included pdfs

yes but experimental and not yet documented

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upload

2024-01-17 Thread Hans Hagen

Hi,

I uploaded a new version (there is some work in progress but it probably 
doesn't affect anyone).


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


  1   2   3   4   5   6   7   8   9   10   >