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

2022-04-25 Thread Max Chernoff via ntg-context
On 2022-04-25 6:51 p.m., Eduardo Bohoyo wrote: First things first.  I want to acknowledge and thank you for the tough mission that surely involves maintaining this module for the benefit of the TeX community and, most especially, for LMTX in particular, due to the very reasons you have just

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

2022-04-25 Thread Max Chernoff via ntg-context
(Please keep me CC'd as I'm not subscribed to the list) Hi, I'm the lua-widow-control author. > lua error > lua error on line 74 in file > /opt/luametatex/texmf-modules/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl > > The odd thing is that line 75 of the t-lua-widow-control

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

2022-04-27 Thread Max Chernoff via ntg-context
Quick question before I begin: are you using any especially "interesting" ConTeXt features? By "interesting" I mean things like grid typesetting, pagecolumns, bidirectional text, etc. I haven't tested lwc with every possible ConTeXt feature, so there may be some adverse interaction. If you are

Re: [NTG-context] How to install the ConTeXt-SBL module?

2022-05-29 Thread Max Chernoff via ntg-context
> What is the correct way to install an unofficial ConTeXt module Right now with LMTX, the only way to install modules is to manually copy files. I believe that the typical location to store module files is "TEXMFMODULES", but "TEXMFLOCAL" or "TEXMFHOME" should also work. To get the folder

Re: [NTG-context] Changing font and font size inside textex

2022-05-30 Thread Max Chernoff via ntg-context
I'm using the following macro to set the font size via h-height: \starttexdefinition setxheight [#1][#2] \switchtobodyfont[#1, 12pt] \scratchdimen=\dimexpr#2\relax \switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen / tex.sp"1ex" * tex.sp"1em" .. "sp"}] \stoptexdefinition But I

Re: [NTG-context] Changing font and font size inside textex

2022-05-31 Thread Max Chernoff via ntg-context
Thanks Max that works perfectly! But It would still be useful if I could change families inside a MPpage. Sure, but you'll need to store the x-heights first: \starttexdefinition storexheight [#1] % Placing the first use of \switchtobodyfont inside a group messes % with the

Re: [NTG-context] issue with scite module

2022-06-01 Thread Max Chernoff via ntg-context
Now, I still don’t understand LPEG and don’t know if there’s a general “character” class that doesn’t need a list... Well looking through the XML spec https://www.w3.org/TR/REC-xml/#NT-NameChar you'd think that we'd want a pattern like this: local name = (R("az","AZ","09",

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Max Chernoff via ntg-context
I have a large .tex file with metapost embedded in it and want to compile it, but it fails. Do you know of a way to compile it? Just use plain MetaPost: diff --git a/belgrade_gm.tex b/belgrade_gm.mp index 3281754..d536b64 100644 --- a/belgrade_gm.tex +++ b/belgrade_gm.mp @@

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Max Chernoff via ntg-context
On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote: Thank you very much Max! It works indeed! One more question. How would I import the eps file back into MPpage, so I could do trickery with text. Convert the PostScript file into PDF with either "ps2pdf" or GhostScript, then you can import the

Re: [NTG-context] issue in Lua syntax formatting

2022-05-31 Thread Max Chernoff via ntg-context
the formatting of Lua multi-line strings messes up the source structure, in the following MWE, the "one" is displayed after "[[": \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext I can reproduce this. As a workaround, you can insert a non-breaking space (U+00A0)

Re: [NTG-context] issue with scite module

2022-06-02 Thread Max Chernoff via ntg-context
For the sake of consistency (with buff-imp-xml.lua), I think the patch should read > [...] +local alsoname = lpatterns.utf8two + lpatterns.utf8three + lpatterns.utf8four I think that that pattern is a little too broad, since it will match any non-ASCII Unicode character. Things like

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

2022-05-14 Thread Max Chernoff via ntg-context
Hi all, I've pushed lwc v2.1.0 to CTAN and the Garden Modules site. This new version fully supports the ConTeXt grid snapping (MkIV/MkXL), and it also adds some improved logging. You can download this directly at https://modules.contextgarden.net/dl/lua-widow-control-v2.1.0.zip I

Re: [NTG-context] Callbacks (and nodes) in LuaMetaTeX

2022-05-25 Thread Max Chernoff via ntg-context
Hi list, I haven't had any luck solving any of the issues from my previous email: [NTG-context] Callbacks in LuaMetaTeX https://mailman.ntg.nl/pipermail/ntg-context/2022/105566.html Admittedly, my problems are fairly obscure (and likely self-inflicted), but any suggestions would be

Re: [NTG-context] Specifying font size as x-height

2022-05-28 Thread Max Chernoff via ntg-context
On 2022-05-28 2:27 a.m., Stefan Nedeljkovic wrote: One slight problem is when I use 2\measured{xheight} as the font size I get an error. \measure works fine though. The old version expected direct input, not a \dimen. Try this: \starttexdefinition setxheight [#1][#2]

Re: [NTG-context] Specifying font size as x-height

2022-05-28 Thread Max Chernoff via ntg-context
How would one specify the font size in LMTX, but via x-height? You could try this: \starttexdefinition setxheight [#1][#2] \switchtobodyfont[#1, 12pt] \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" * tex.sp"1em" .. "sp"}] \stoptexdefinition Demo:

Re: [NTG-context] Count (and limit) glyphs per line?

2022-06-25 Thread Max Chernoff via ntg-context
It's also a very insightful example of how to use and inject Lua code in the TeX output routine. This is injecting Lua code before the paragraph builder, not in the output routine. Something like https://tex.stackexchange.com/a/644613/270600 or my module "lua-widow-control" would be an

Re: [NTG-context] upload

2022-07-08 Thread Max Chernoff via ntg-context
This is because you need to pass a list that conforms to what the builder expects and the callback that you use doesn't do that for you (after all, it also gets hbox content). Isn't "processors/after" the same as "pre_linebreak_filter"? I thought that only "hpack_filter" gets \hbox content?

Re: [NTG-context] [Bug] Two-column text: Larger top spacing in inline images

2022-06-27 Thread Max Chernoff via ntg-context
Not a bug, although it may be unexpected. It's a grid snapping thing. Try: \def\example{% Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum.

Re: [NTG-context] "pragma-ade.com" is now a domain parking page

2022-07-01 Thread Max Chernoff via ntg-context
Hans had been complaining about networksolutions not allowing him to move the domain away from them, so I guess this was to be expected. indeed, and transfer is pending for ages now ... looks liek they don't like to transfer They only have 5 days to respond to a transfer request. If it's been

[NTG-context] Tagging corrupts URLs in bibliographies

2022-06-30 Thread Max Chernoff via ntg-context
Enabling PDF tagging corrupts the URLs displayed in bibliographies. MWE: \setuptagging[state=start] \usebtxdataset[mkiv-publications.bib] \usebtxdefinitions[apa] % \usebtxdefinitions[chicago] \starttext \nocite[article, advancedonline] \placelistofpublications

[NTG-context] "pragma-ade.com" is now a domain parking page

2022-07-01 Thread Max Chernoff via ntg-context
When I go to: https://www.pragma-ade.com/ I get a page that says: pragma-ade.com expired on 06/28/2016 and is pending renewal or deletion. followed by some advertisements. Both a link archiver https://archive.today/jUOox and an SSL/TLS certificate checker

Re: [NTG-context] "pragma-ade.com" is now a domain parking page

2022-07-01 Thread Max Chernoff via ntg-context
Well, we must change a lot of dead links on the wiki now. Taco, can you automate it? Otherwise I’ll start... I do not know of a clean way to automate that. It may be possible, but then it is outside of my knowledge set. So yeah, by hand. This might work

Re: [NTG-context] Count (and limit) glyphs per line?

2022-06-26 Thread Max Chernoff via ntg-context
On 2022-06-26 9:59 a.m., Benjamin Buchmuller wrote: Hi Max, Thank you so much for your help and pointing me to the documents; always a lot of things to learn in TeX! No problem :) I'm afraid that including the hyphen width doesn't solve the issue yet. It seems to move the problem to other

Re: [NTG-context] not working "mtxrun --scripts cache --erase"

2022-06-26 Thread Max Chernoff via ntg-context
I’m afraid that I have just found out that "mtxrun --scripts cache --erase" doesn’t delete a single file from the cache. Could anyone confirm the issue? I can confirm that the same thing happens here. If I change line 81 of texmf-context/scripts/context/lua/mtx-cache.lua from

[NTG-context] \setextrafontkerns can cause an infinite loop

2022-06-30 Thread Max Chernoff via ntg-context
Sometimes using \setextrafontkerns can cause an infinite loop. Example 1: \setextrafontkerns[max] \starttext l\it l \stoptext Example 2: \setupbodyfont[libertinus] \setextrafontkerns[max] \starttext x\ss x \stoptext Both of these examples cause

Re: [NTG-context] Odd behaviour with Plex typescript

2022-06-30 Thread Max Chernoff via ntg-context
just preload it, as in: \usebodyfont[modern] \setupbodyfont[plex] \setuphead [section] [style={\switchtobodyfont[modern]}] \starttext \section{A} A \stoptext That seems to have fixed it. Thanks! -- Max

Re: [NTG-context] upload

2022-07-06 Thread Max Chernoff via ntg-context
Hi, With the latest upload, "tex.linebreak" doesn't return an "info" table. When running this code: \startluacode function test(head) local new_head, info = tex.linebreak(node.copylist(head)) print(head, type(head), info, type(info)) if info ==

Re: [NTG-context] Malfunctioning of syllabic partitioning of words in Spanish

2022-07-06 Thread Max Chernoff via ntg-context
I am writing a document in Spanish and I notice that the syllable partitioning of words does not conform to the rules of the language. And so, for example, the word "limitarse" is partitioned as "lim-itarse" (the correct one is "li-mi-tar-se"), "colores" as "col-ores" (instead of "co-lo-res"),

Re: [NTG-context] missing mails

2022-06-24 Thread Max Chernoff via ntg-context
Hi Hans, So, if there has been serious issues not resolved (the last year) let me know. I've been having two issues with parfillskip nodes in LMTX that I haven't been able to figure out myself. Neither of them are particularly serious, but the first one is quite annoying. (The below is

Re: [NTG-context] Count (and limit) glyphs per line?

2022-06-23 Thread Max Chernoff via ntg-context
I've been confronted with the following 'intriguing' formatting requirement for a document: "Intriguing" is definitely right here. I suspect these guidelines were made for typewriters and haven't been updated since. to limit the number of glyphs per line to 112. 112 characters per line

Re: [NTG-context] issue with scite module

2022-06-04 Thread Max Chernoff via ntg-context
Could anyone confirm the issue or explain me what I am missing? Confirmed on Win64 with the same version. But I did find a workaround: if I convert your example from NFC (composed) to NFD (decomposed), it compiles fine. $ xxd xml.tex : 5c75 7365 6d6f 6475 6c65 5b73 6369 7465

[NTG-context] Certificate expired on pragma-ade.com

2022-06-04 Thread Max Chernoff via ntg-context
The TLS certificate for www.pragma-ade.com appears to have expired on "Thu, 02 Jun 2022 07:37:56 GMT". Firefox and Chrome both give "Certificate expired" errors when I try and connect. I can still access the site, although I need to click through a few warnings first. -- Max

Re: [NTG-context] Compiling context files in command line

2022-06-04 Thread Max Chernoff via ntg-context
Is it possible at the end off compile proces to move the created PDF to another directory (subdirectory of current directory) You can try something like this: \startluacode luatex.wrapup(function() local pdf = tex.jobname .. ".pdf" file.copy(pdf,

Re: [NTG-context] Foonotes in Captions ... again

2022-06-15 Thread Max Chernoff via ntg-context
What's the current state of affairs regarding footnotes in floats? Both version in the example below don't quite work... (Ideally, the note should be on the page with the float and the caption, but the numbering should also be adjusted.) We can completely abuse a bunch of different ConTeXt

Re: [NTG-context] Rotating jpeg image gives weird output

2022-06-14 Thread Max Chernoff via ntg-context
So, I've rotated the image, but now two things happen: 1. there's a weird offset (the image is moved to the right) This seems to be somehow related to the particular file. With a different file that does not happen. This can sometimes happen if the image has an embedded EXIF "Orientation" tag

Re: [NTG-context] Rotating jpeg image gives weird output

2022-06-14 Thread Max Chernoff via ntg-context
Any other ideas? (I tend to think the image is corrupted in one way or the other, but I have no clue how to fix that.) You could try making a new image with the same content. Assuming you're on Windows 10/11, install Image Magick winget install -e --id ImageMagick.ImageMagick then run

[NTG-context] Metafun hexagons aren't hexagons

2022-07-20 Thread Max Chernoff via ntg-context
Hi, The recently added Metafun hexagons seem to be producing octagons instead: \startMPpage fill fullhexagon scaled 100; draw unithexagon scaled 50 withcolor white; \stopMPpage -- Max ___ If

[NTG-context] Can't manipulate glue added by tex.preparelinebreak

2022-07-26 Thread Max Chernoff via ntg-context
Hi Hans, The new tex.preparelinebreak is great (thanks again), but I can't seem to figure out how to manipulate the parfillskip nodes that it adds. MWE: \newbox\testbox \startluacode function test(head) if head.id ~= node.id "par" then return head

Re: [NTG-context] Can't manipulate glue added by tex.preparelinebreak

2022-07-28 Thread Max Chernoff via ntg-context
> looks like i don't update something, i'll fix it (probably bin later > today) > new upload (see earlier mail for rest) Works great! Thanks! > btw, you can do this: > > local h, t, pil, pir, pfl, pfr = tex.preparelinebreak(new_head) > inspect(pfr) > pfr.stretchorder

Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-22 Thread Max Chernoff via ntg-context
> the firefox pdf viewer has problems with at least two sans serif > fonts. > > Using this mwe I get a bad display in ff with Gyre font and Alegreya > Font. > What do you mean by "bad display"? Are the fonts blurry, or are the shapes all slightly distorted? Your test file displays fine on my

[NTG-context] Odd behaviour with Plex typescript

2022-06-30 Thread Max Chernoff via ntg-context
If you load the Plex typescript, a spurious space is added on the first switch to another font, messing up any alignment. This doesn't happen with any other fonts; only with Plex. MWE: \setuphead[section][style={\switchtobodyfont[modern]}] \setupbodyfont[plex] \starttext

[NTG-context] Callbacks in LuaMetaTeX

2022-05-01 Thread Max Chernoff via ntg-context
Hi list, I've been playing around with some of the Lua callbacks in LuaMetaTeX, and I have a few questions/comments. Context: I'm writing a Plain/LaTeX/ConTeXt module called "lua-widow-control" that uses Lua callbacks to automatically remove widows and orphans from documents. The relevant Lua

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

2022-04-28 Thread Max Chernoff via ntg-context
On 2022-04-27 3:59 p.m., Eduardo Bohoyo wrote: When I uncomment grid=yes in my \setuplayout, lwc makes its real appearance on the scene. So it looks like lwc was broken with grid snapping. This surprised me -- I originally wrote lwc *specifically* to use with grid snapping -- but it looks like

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

2022-04-28 Thread Max Chernoff via ntg-context
On 2022-04-28 3:30 a.m., Henning Hraban Ramm wrote: I’m afraid the above release introduced a bug; while the offical release ran through, I now get: module  > lua-widow-control > Widow/orphan detected. Attempting to remove. lua error   > lua error on line 112 in file

[NTG-context] No error when loading a non-existent module

2022-08-24 Thread Max Chernoff via ntg-context
Hi all, If you load a non-existent module, ConTeXt issues a minor warning, but otherwise proceeds as normal: MWE: \usemodule[doesnt-exist] \starttext Hello world! \stoptext I think that this behaviour should be changed so that a fatal error is issued when a loaded module

Re: [NTG-context] Color property of \setupurl

2022-08-20 Thread Max Chernoff via ntg-context
Hi, > Could someone clarify me in what kind of context the color of a > hyperlink is controlled by the "color" property of \setupurl? This code: \show\setupurl \showthe\everysetupurl produces: > \setupurl=frozen protected macro: [#1]->\ifarguments \or

Re: [NTG-context] searching in the source browser

2022-09-05 Thread Max Chernoff via ntg-context
Hi Hraban, > Am 05.09.22 um 21:07 schrieb Pablo Rodriguez via ntg-context: > > has it to be the source browser? > > > > I mean, I use grep in Linux (MSYS2 in Windows [and brew.sh is available > > for macOS]) and it works perfectly fine with ConTeXt. > > > >$ grep -irl fi[eë][eë] context >

Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-22 Thread Max Chernoff via ntg-context
Hi Amano, > Wuh. That's a bit complex. Not really. From a user perspective, all that you need to run is make install From a developer perspective, this is essentially just the base ConTeXt files, a modified texmfcnf.lua, and a fairly basic makefile. > For distribution packages that

Re: [NTG-context] No error when loading a non-existent module

2022-08-25 Thread Max Chernoff via ntg-context
Hi Hans, On Thu, 2022-08-25 at 08:57 +0200, Hans Hagen wrote: > On 8/25/2022 2:19 AM, Max Chernoff via ntg-context wrote: > But ... you can already do > > \enabledirectives[logs.errors=*] > > or > > \enabledirectives[logs.errors=missing modules] Didn't know abou

Re: [NTG-context] No error when loading a non-existent module

2022-08-26 Thread Max Chernoff via ntg-context
On Fri, 2022-08-26 at 07:40 +0200, Hans Hagen wrote: > On 8/26/2022 3:00 AM, Max Chernoff wrote: > > Is there a way to make this produce a nice little "error" PDF as soon as > > the error occurs just like using "\undefined" does? > > Only If I add it as option (directive driven, must find some

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

2022-09-26 Thread Max Chernoff via ntg-context
Hi Hans, Pablo, > > But I do agree that the line ending handling seems a little odd. I find it > > surprising that the buffers internally use CR line endings since no systems > > in the past 20 years use that. > > how about tex ... > > \number\endlinechar > \number\numexpr`M-`A+1\relax % plain

Re: [NTG-context] Suboptimal German hyphenation

2022-09-28 Thread Max Chernoff via ntg-context
Hi Leah, > I was typesetting some German text on a narrow page when I discovered > the justification wasn't as good as expected. I think I tracked this > down to differences in hyphenation points, namely, ConTeXt has fewer: > > \starttext > \language[de] > \showhyphens{Zusammenhang} >

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

2022-10-18 Thread Max Chernoff via ntg-context
Hi Hans, When running in \normalizelinemode=0, the \parinitleftskip and \parinitrightskip nodes are either nonexistant or invisible from Lua, causing tex.linebreak to not work correctly. This sample file: \enabledirectives[system.callbacks.permitoverloads] \normalizelinemode=0

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

2022-10-26 Thread Max Chernoff via ntg-context
Hi Hans, > i'll bypass that warnign when the mode is zero I saw that you made that change in the latest upload, thanks. Unfortunately, I'm still getting the same output: luatex warning > linebreak: list seems already prepared luatex warning > linebreak: [ leftinit | rightinit |

[NTG-context] "true" units in LuaMetaTeX

2022-10-27 Thread Max Chernoff via ntg-context
Hi Hans, The unit scanner in LuaMetaTeX fails for any of the "true" dimensions.  With this test file: \starttext \vrule width 1truein height 1pt depth 0pt\relax \vrule width 1in height 1pt depth 0pt\relax \stoptext I get this output: tex error > tex error on

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

2022-10-27 Thread Max Chernoff via ntg-context
Hi Hans, > Anyway, I'll check it. Is anyone still using this "true" actually? I've been playing around with LuaMetaLaTeX/LuaMetaPlain recently https://github.com/zauguin/luametalatex and plain.tex uses truein for typesetting the footnote rule. It's trivial to fix that specific case, but

Re: [NTG-context] cannot update ConTeXt to 2022.09.16

2022-09-20 Thread Max Chernoff via ntg-context
Hi Pablo, Otared, > On 9/19/22 18:23, Otared Kavian via ntg-context wrote: > > Hi Pablo, > > > > I had the same issue and, as this was discussed a few years or months > > ago, after removing the three files with extension « .tma » the > > update goes through normally.> On my machine, running

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

2022-09-14 Thread Max Chernoff via ntg-context
Hi Steffen, > The idea is to set the hyphenation for certain words regardless of the > language that is used in the surrounding paragraphs. > > In this example it should stay: «steff-en» > > How do i set this to all non-english paragraphs (without using > \hyphenation on each language-switch)?

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

2022-09-14 Thread Max Chernoff via ntg-context
Hi Steffen, > … \replaceword should be the correct way for proper hyphenation?? Well I'm not sure if it's "correct", but it seems to work. Based on my testing, having three subsequent sets of groups ({A}{B}{C}) is converted to a discretionary. The discretionary hyphen "\-" is equivalent to the

[NTG-context] Latest ConTeXt won't "--make"

2022-09-14 Thread Max Chernoff via ntg-context
Hi all, I've just updated to the latest ConTeXt, but I'm unable to make the format: $ context --make resolvers | resolving | configuration files already identified resolvers | resolving | loading configuration file 'selfautoparent:/texmf/web2c/texmfcnf.lua' [...]

Re: [NTG-context] Latest ConTeXt won't "--make"

2022-09-14 Thread Max Chernoff via ntg-context
Hi Mikael, > I don't see this problem with the latest. Moreover, I think the > version of luametatex was pushed to 2.10, so there might be a > mis-match in your case. I hope it helps. I just tried updating again, and it says that I'm up to date, but: $ luametatex --version This is

[NTG-context] LuaMetaTeX insert nodes patch

2022-09-16 Thread Max Chernoff via ntg-context
Hi Hans, I see that you've released the LuaMetaTeX source code, yay! I'm really impressed with how easy it is to build, and with how quickly it builds. Can you please apply this patch to the LuaMetaTeX source code: diff

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

2022-09-25 Thread Max Chernoff via ntg-context
Hi Pablo, > But now I don’t understand is the following issue: if the saved file > contains "\r\n", why does basic Notepad the new lines? > > "\r\n" are the chars to get new lines in Windows. Or what am I missing here? I'm not too sure what you're asking here, but Notepad was somewhat-

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

2022-09-22 Thread Max Chernoff via ntg-context
Hi Pablo, > I mean, to get hash of the file attached to the document, I need to save > the buffer for "context(utilities.sha2.hash256(io.loaddata(buffer)))". > > But I don’t need to save the buffer to attach it to the PDF document. > > My question is how to define \shabufferfile to avoid

Re: [NTG-context] PDF viewer

2022-09-22 Thread Max Chernoff via ntg-context
Hi Hraban, > I compiled a kind of wishlist what we need or look for in a new or > enhanced open source PDF viewer, as discussed e.g. at the 2021 meeting. > > https://wiki.contextgarden.net/PDF_viewer > > Feel free to enhance the wiki page or discuss here. I think that pdf.js (the Firefox PDF

Re: [NTG-context] PDF viewer

2022-09-23 Thread Max Chernoff via ntg-context
Hi Hraban, > Unfortunately, Firefox doesn’t register itself as a PDF viewer (at least > on MacOS), that means I can’t use it easily to open a PDF from the > command line (e.g. in scripts). That's odd. You can set it as the default PDF viewer on Windows and Linux at least. > >> for forms: >

Re: [NTG-context] hash for buffer contents

2022-09-21 Thread Max Chernoff via ntg-context
Hi Pablo, > Is there any way to get "utilities.sha2.hash512" with the contents of > the "abc" buffer? You can use "buffers.getcontent" or "buffers.raw": \startbuffer[test] One Two Three \stopbuffer[test] \starttext \startluacode require("util-sha")

Re: [NTG-context] floats disturb grid setting

2022-10-03 Thread Max Chernoff via ntg-context
Hi Hraban, > > As soon as I use floats, text isn’t typeset on the grid any more: > > > > > > \setuppaper[A5] > > \setuplayout[grid=yes] > > \showframe\showgrid > > Oops, my bad: It must be "grid=on". > But didn’t work "yes" in earlier versions? I just tested: MkIV MkXL

Re: [NTG-context] remote images

2022-10-03 Thread Max Chernoff via ntg-context
Hi Hraban, > fetching images per URI was supported (and is also documented in the > wiki), but with LMTX 2022.09.11 and one of > > \externalfigure[http://tug.org/images/logobw.jpg] > or > \externalfigure[https://picsum.photos/300/200] > > I only get the usual grey box. No error message.

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

2022-10-12 Thread Max Chernoff via ntg-context
Hi Gavin, On Wed, 2022-10-12 at 15:54 -0600, Gavin wrote: > Hi Max, Alan, Bruce, Hans, et.al > > I solved my four issues with \unit spacing. In the process, I > prevented unwanted line breaks and removed an overzealous backspace > before division symbols. Below is a MWE that shows all of these >

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

2022-10-12 Thread Max Chernoff via ntg-context
On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote: > > Seeing that you're modifying the font encoding, could you perhaps > > reconsider supporting hinting in LMTX?  > > > >https://mailman.ntg.nl/pipermail/ntg-context/2022/106311.html > > > > Even with a high resolution screen, I can

Re: [NTG-context] atan2 function

2022-10-13 Thread Max Chernoff via ntg-context
Hi, > How is atan2 called? I rolled my own as follows: > Is atan with two parameters supposed to behave like atan2? At mp-math.mpxl:167 there is: vardef atan primary x = angle(1,x) enddef ; The MetaPost manual says: The angle operator takes a pair and computes the

Re: [NTG-context] atan2 function

2022-10-13 Thread Max Chernoff via ntg-context
Hi, > The angle function doesn't appear to provide the same calculation as > my atantwo in all cases. They both give the same results, but "angle" gives a result in degrees while "atantwo" gives a result in radians. This demo: \startMPpage vardef atantwo( expr dy, dx ) =

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

2022-10-13 Thread Max Chernoff via ntg-context
Hi Joel, > When I use the code given, it compiles and displays fine. But when I > try replacing \everypar with \EveryPar, it halts during compiling It looks like \EveryPar is a macro and not a token list. > These both work great, but do that for the whole document? Is there a > way to restrict

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

2022-10-10 Thread Max Chernoff via ntg-context
Hi Joel, On Mon, 2022-10-10 at 12:46 +, Joel wrote: > Hello Max, > It is preferred if the solution is just three lines per paragraph, > rather than some content parallel to the text A Lua callback solution: \startluacode -- Constants RULE_OFFSET= tex.sp "1em"

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

2022-10-11 Thread Max Chernoff via ntg-context
Hi Leah, > > Leah and I are zooming in on the issue. It might relate to wrong font > > matrix default behavior in the pdf printer driver, and GS got a fix > > for that long ago, so maybe old printers with not-updated drivers can > > be affected. > > > > Once we're confident that we can catch it

Re: [NTG-context] Apostrophe entity using \xmltexentity is ignored

2022-10-08 Thread Max Chernoff via ntg-context
Hi, > Has the handling for the apostrophe character entity changed recently? > > In the following example, the \xmltexentity for apostrophe is ignored, > resulting in a straight apostrophe instead of a curled one: > Any ideas on how to fix it? (see also

Re: [NTG-context] \setuparranging values for perfect bound A5 on A3?

2022-10-08 Thread Max Chernoff via ntg-context
Hi Bruce, > I have a book to be perfect bound[1] and I'm trying to work out what > imposition to use. > > The printer would like 4 A5 pages laid out on A3 e.g. > > +---+---+ > | | | > | a | b | > | | | > +---+---+ > | | | > | c | d | > | | | > +---+---+ > > so that he can cut

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

2022-10-09 Thread Max Chernoff via ntg-context
Hi all, > I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11. > > Here's a tiny test document, I disabled PDF compression but it also > doesn't work with the default settings. > > \setupbackend[level=0,compresslevel=0] > \starttext > Just a line of text. > \stoptext > > When I print

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

2022-10-10 Thread Max Chernoff via ntg-context
Hi Tommaso, > I'm trying to install ConTeXt Standalone on my Mac (macOS 12.6 Monterey and > Apple M2 chip) but at the end of the installation the ConTeXt-MkIV folder > (where I install Standalone) on the disk weighs only 7MB (the tex tree is > created, but its folders are empty). > I've never

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

2022-10-10 Thread Max Chernoff via ntg-context
Hi Joel, > I'd like to add some area for readers to write in the margins of some > text. This would leave three lines, like this to the right of the > text. Is it okay if there are rules continuously down the right column? If so, this is fairly simple to do with layers/backgrounds + MetaFun.

Re: [NTG-context] Spacing in \unit

2022-10-10 Thread Max Chernoff via ntg-context
Hi Alan, > I would very strongly argue that the space between the number and the > following units be UNBREAKABLE. Perhaps a thin space (preference), but > most certainly non-breakable. > > Similarly around the times in scientific notation. > > I further cannot imagine that a line break be

Re: [NTG-context] Fwd: [CG Wiki] ConTeXt with VS Code (https://wiki.contextgarden.net/VSCode)

2022-10-03 Thread Max Chernoff via ntg-context
Hi Taco, Michal, > > > > > /home/qasar/Stažené/cont/tex/texmf-context/context/data/vscode/extensions/context/node_modules/vsce/out/package.js:136 > > > return (translations ?? []) > > > ^ That's the "Nullish coalescing operator", which MDN says is only available in

Re: [NTG-context] issues with current latest

2022-10-14 Thread Max Chernoff via ntg-context
On Fri, 2022-10-14 at 16:38 -0600, Alan Braslau wrote: > On Fri, 14 Oct 2022 16:33:12 -0600 > Max Chernoff wrote: > > > Do you know how to rebuild the format? I've tried the following to no > > avail: > > > > --script mtx-context > > I believe that you have to give the full script path here to

Re: [NTG-context] issues with current latest

2022-10-14 Thread Max Chernoff via ntg-context
Hi Alan, On Fri, 2022-10-14 at 16:20 -0600, Alan Braslau wrote: > On Fri, 14 Oct 2022 15:38:52 -0600 > Max Chernoff via ntg-context wrote: > > >$ context --luatex test.tex >mtx-context | redirect luametatex -> luatex: luatex --luaonly > "/opt/c

Re: [NTG-context] issues with current latest

2022-10-14 Thread Max Chernoff via ntg-context
Hi Pablo, > I’m afraid that I cannot make latest from 2022.10.14 10:16 with LuaTeX. > > I’m on Linux64. I've got the same configuration and I'm getting the same results: $ context --luatex test.tex mtx-context | redirect luametatex -> luatex: luatex --luaonly

[NTG-context] Accessing inserts from Lua in LuaMetaTeX

2022-08-15 Thread Max Chernoff via ntg-context
Hi all, I'm trying to manipulate some inserts from Lua in LuaMetaTeX, and I'm having some problems that I'm not having with LuaTeX. First, how do I get an insert's class/type from the "insert" nodes on the page? With LuaTeX, the insert's class/type is the same as the subtype of the "ins" nodes,

Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Max Chernoff via ntg-context
Okay, I'm seeing a few separate issues here. 1. Gentoo expects to compile everything from source. This isn't an option here since LuaMetaTeX doesn't have any source available (yet). So for the time being, you'll need to use the provided binaries. These support pretty much every

Re: [NTG-context] Accessing inserts from Lua in LuaMetaTeX

2022-08-15 Thread Max Chernoff via ntg-context
Hi Hans, > > First, how do I get an insert's class/type from the "insert" nodes on > > the page? With LuaTeX, the insert's class/type is the same as the > > subtype of the "ins" nodes, but the subtype of the "insert" nodes is > > always zero in LuaMetaTeX, so I'm not sure how to get the

Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-12 Thread Max Chernoff via ntg-context
> Hi, > > Hans helped me out with some asciidoc processing a while ago. > > I played a bit further, but I'm currently facing two minor issues: > > (a) I don't know how to turn program listing (verbatim code) from xml > to (perhaps, vim-based) syntax highlighting (but most importantly, to > make

Re: [NTG-context] ConTeXt meeting 2022 – please register!

2022-08-04 Thread Max Chernoff via ntg-context
Hi Hraban, > but I’d like to know why you (esp. if you attended > previous meetings) decided not to come: A not-useful answer: * The flight would take 14 hours each way (biggest reason)   * The flight would cost more than 2 months of rent * It would be a bad idea for me to miss a full week

Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-17 Thread Max Chernoff via ntg-context
> Hi Amano(?), Hans > > Can you make it easier to make an OS package for ConTeXt LMTX by > > releasing versioned (source) archives, including BUILD/INSTALL > > instructions in the versioned archives, and so on? I wish I could just > > extract a versioned binary archive into certain locations or

Re: [NTG-context] Achieving different \cite styles

2022-12-09 Thread Max Chernoff via ntg-context
Hi Jethro, > I am interested in being able to cite in different ways. By analogy, I > refer to the \texcite{}, \parencite{} and other options available with > biblatex in LaTeX. How do I achieve something like \textcite{} in > ConTeXt? Page 34 of the publications manual lists the various

[NTG-context] Unwanted space with \startframedtext

2022-12-21 Thread Max Chernoff via ntg-context
Hi Hans, There's an uncommented linebreak in the definition of \pack_framed_text_start that's introducing an unwanted space just before \startframedtext. Minimal example: \showmakeup[space] \starttext \hbox{.\startframedtext.\stopframedtext} \stoptext Patch: ---

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

2022-11-21 Thread Max Chernoff via ntg-context
Hi Hans, Font expansion (hz) seems to be enabled by default with the latest upload. If I compile this document locally with ConTeXt "2022.11.18 13:22": \showframe % \definefontfeature[default][default][expansion=quality] % \usetypescript[modern-base] %

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

2022-11-21 Thread Max Chernoff via ntg-context
Hi Hans, > what you observe is likely a side effect of an increase in accuracy > which gives a bit less drift in the pdf; expansion is turned off (it > would increase runtime if turned on) It's not just in the PDF though, I can also see the change from Lua. Using this document:

Re: [NTG-context] Horizontal spacing

2022-11-21 Thread Max Chernoff via ntg-context
Hi Steffen, > But how can I adjust in general the horizontal distance between glyphs > (I don't mean \kern, I am looking for a general setup)? You probably want \definecharacterkerning. See https://www.pragma-ade.nl/general/manuals/fonts-mkiv.pdf#page=171 for details on how to use it. --

Re: [NTG-context] thousand separator space

2022-11-21 Thread Max Chernoff via ntg-context
Hi Jan, > Why is there an additional space after the thousand separator in math mode? Because something like ${\mathbb N} = \{1,2,3,4,\dots\}$ would look quite bad without any space between the numbers. (The technical reason is that commas have the math class \mathpunct, meaning that

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

2022-11-11 Thread Max Chernoff via ntg-context
Hi, > I want to simulate \hss in lua end in ConTeXt/luametatex environment. > For example, > > ```ConTeXt > a{\raise 1.5ex\hbox to 0pt{\hss b}}c > ``` > And in lua, I do as follows(part of my app seen in attachment): Your code doesn't compile as is. I think that this is the same thing

[NTG-context] node.setglue broken in LuaMetaTeX

2022-11-07 Thread Max Chernoff via ntg-context
Hi Hans, Using node.setglue in LuaMetaTeX sets all of the glue components to zero. This example: \startluacode local stretch_order = "stretch_order" local shrink_order = "shrink_order" if status.luatex_engine == "luametatex" then stretch_order = "stretchorder"

  1   2   >