Re: [NTG-context] TikZ in buffers: My struggle with \definestartstop
Thanks Hans! That works great. I understand it all and it is working in my book, so even better. I did not know you could \typsetbuffer[a,b,c]. I will be using that again. In case anyone finds this in the future, trying to solve a similar issue, my final version is below, including my \marginTikZ command. Gavin \setuppapersize[letter] \setuplayout[ backspace=90pt, % Horizontal layout leftmargin=36pt, % 1/2 in leftmargindistance=9pt, % 3/8 in width=306pt, % 4 1/4 in rightmargindistance=27pt, % 3/8 in rightmargin=144pt, % 2 in ] \startbuffer[starttikz] \usemodule[tikz]% Lots of setup can go here! \startTEXpage \starttikzpicture \stopbuffer \startbuffer[stoptikz] \stoptikzpicture \stopTEXpage \stopbuffer \define[2]\marginTikZ{ \startplacefigure[location=margin, reference=fig:#1, title={#2}] \typesetbuffer[starttikz,#1,stoptikz] \stopplacefigure } \starttext \startbuffer[BlueCircle] \draw[thick,blue] (0,0) circle (2cm)node{Ti{\it k}Z!}; \stopbuffer \marginTikZ{BlueCircle}{Ti{\it k}Z drew this blue circle\dots slowly.} \startbuffer[RedCircle] \draw[thick,red] (0,0) circle (2cm)node{Ti{\it k}Z!}; \stopbuffer \marginTikZ{RedCircle}{Ti{\it k}Z drew this red circle\dots slowly.} Take a look at the blue circle in \in{figure}[fig:BlueCircle] and the red circle in \in{figure}[fig:RedCircle] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Initial caps with short paragraph
This has come up before on the mailing list, but I was wondering if LMTX has a more elegant solution than using a transparent/invisible capture of the drop-cap. Consider: \setupinitial[n=2, style=\tfd, location=text]\setuphead[chapter][after={\placeinitial}] \starttext \chapter Hello world! \input ward\stoptext The output shows that the second paragraph is not indented beyond the bounding box of the drop-cap, resulting in an overlap. This isn't a problem when the first paragraph spans two or more lines. Any ideas for how to resolve this without changing the content? Thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX: different output if dots are used in the file name
On 7/8/2021 3:38 PM, Marco Patzer wrote: On Thu, 8 Jul 2021 10:34:32 +0200 Hans Hagen wrote: Now, to the issue of names like 10.11.12.13 ... here .13 is the suffix, like it or not, so in principle we then get 10.11.12.log 10.11.12.tuc 10.11.12.pdf It's not that I use files without (.tex, .mkiv, ...) suffixes, but your 10.11.12.13 example is processed by MkIV without problems: 10.11.12.pdf 10.11.12.tua 10.11.12.log actually that's also not ok as it should be a .tuc file LMTX, however doesn't like it: 10.11.pdf 10.11.tua 10.log if not then indeed there is some issue. According to my tests LMTX doesn't work like you describe it should. i'll check it (in retrospect tex could better have enforced a suffix and not fallback on .tex but i suppose the usage scenarios were hard to foresee let alone the restart-the-program-time-penalty when you forgot to add .tex) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] xmldisplayverbatim
On 7/8/2021 9:18 AM, Hans van der Meer wrote: I get the impression that \xmldisplayverbatim changes ' (apostroph) into ' and " (quotation mark) into " etc. How can I get rid of this translation? I would prefer to have typeset ' and " instead of the entity representations. er staat vast wel ergens hoe je entiteiten kunt configureren (test suite of manual) .. altijd een kip of ei zaak .. roundtrip of niet - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] font feature
On 7/8/2021 9:46 AM, Thomas A. Schmitz wrote: Hi all, is it possible to subtract a featureset that has been applied to a fontfamily? MWE: \definefontfeature [f:frac] [frac=yes,onum=no,pnum=no] \definefontfeature [f:onum] [onum=yes,pnum=yes] \definefontfamily [test] [serif] [AntykwaTorunska] [features=f:onum] \definefontfamily [test] [sans] [Myriad Pro] \definefontfamily [test] [mono] [DejaVu Sans Mono] \definefontfamily [test] [math] [Xits Math] \setupbodyfont[test,12pt] \starttext Mozarts erster Satz ist ein {\subtractfeature[f:test]\addfeature[f:frac]4/4}-Takt, Beethoven wählt einen Dreiertakt, Mozarts Romanze ist ein 3/8-Takt, Beethoven wählt einen 2/4, Mozarts Rondo ist eine Gavotte im 2/2-Takt, Beethoven schreibt ein Jagdrondo im 6/8-Takt. \stoptext If I comment out the part [features=f:onum], I get the fractions that I'm looking for, but it seems that I can't get the same effect with \subtractfeature and \addfeature. I'm confused... you forgot the 'default' so you basically force basemode which is does permanent features .. add/subtract works only in node mode \definefontfeature [f:onum] [onum=yes,pnum=yes] \definefontfamily [test] [serif] [AntykwaTorunska] [features={default,f:onum}] \definefontfamily [test] [sans] [Myriad Pro] \definefontfamily [test] [mono] [DejaVu Sans Mono] \definefontfamily [test] [math] [Xits Math] \setupbodyfont[test,12pt] \starttext test 1 2 3 test 1/2 \subtractfeature[f:onum] test 1 2 3 test 1/2 \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TikZ in buffers: My struggle with \definestartstop
On 7/8/2021 7:55 PM, Gavin wrote: Hello, I have a book containing many margin figures drawn with TikZ, which is very slow. By putting the TikZ code in a buffer and using \typesetbuffer only altered TikZ code is executed on each run, saving tremendous time. This means the code containsmany constructions like this, which I would like to simplify: \startbuffer[BlueCircle] \usemodule[tikz]% Actually this is many lines to load environments, define fonts, etc. \startTEXpage \starttikzpicture \draw[thick,blue] (0,0) circle (1.5cm)node{Ti{\it k}Z!}; \stoptikzpicture \stopTEXpage \stopbuffer \placefigure[margin][fig:BlueCircle] % location, label {Ti{\it k}Z drew this blue circle\dots slowly.} % caption text {\hbox{\typesetbuffer[BlueCircle]}} My plan is to replace the first block with a new \startTikZbuffer…\stop…, which is defined using \definestartstop to include all of the stuff around the TikZ code. Then I will replace the second block with a new command, \marginTikZ, which has three arguments: a label, a caption, and the TikZ code. This command will use my new \startTikZbuffer to create the buffer before using \placefigure to put it in the margin. Only the \marginTikZ command will appear throughout the book. I’d like to do this in two steps because I will also have \textTikZ and \wideTikZ for diagrams in the text block and diagrams spanning the full page with. All of these can use the same \startTikZbuffer. However, I cannot get the \startTikZbuffer to work as expected. I put a small working example below. Removing the “This method works” block and adding the "This method fails” block causes the an error that I cannot decipher: "Use of \page_fitting_start doesn't match its definition." Any advice is appreciated. Maybe I am doing this entirely the wrong way. A couple notes: I considered using \definebuffer, but this doesn’t allow me to create named buffers, which seems like a deal breaker. I considered using \definefloat, but it don’t allow me include before and after commands, as far as I can tell. \starttext \input knuth \startbuffer[starttikz] \usemodule[tikz] \startTEXpage \starttikzpicture \stopbuffer \startbuffer[stoptikz] \stoptikzpicture \stopTEXpage \stopbuffer \protected\def\MyTikzBuffer#1{\typesetbuffer[starttikz,BlueCircle,stoptikz]} \startbuffer[BlueCircle] \draw [thick,blue] (0,0) circle (1.5cm)node{Ti{\it k}Z!}; \stopbuffer \startplacefigure[location=margin,reference=fig:BlueCircle,title={Example A.}] \typesetbuffer[starttikz,BlueCircle,stoptikz] \stopplacefigure \startplacefigure[location=margin,reference=fig:BlueCircle,title={Example B.}] \MyTikzBuffer{BlueCircle} \stopplacefigure \input knuth \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] img.scan in lmtx?
On 7/8/2021 8:31 PM, Henning Hraban Ramm wrote: Am 27.01.2020 um 09:16 schrieb Hans Hagen : On 1/26/2020 11:50 PM, Henning Hraban Ramm wrote: I use the lua function img.scan{filename}, but in lmtx I get "attempt to index a nil value (global 'img')", so I guess this got renamed or moved? Just the high level command: figures.getinfo(name,page) local t = figures.getinfo("name.pdf",10) -- optional page number - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] nuts.setfield is nil in generic code
On 7/8/2021 4:21 PM, Michal Vlasák wrote: Hello, in the generic font loader code `nuts.setfield` is `nil`. This is because in `luatex-basics-nod.lua` there is a wrong assignment for `nuts.setfield` on line 121 (there is no `setfield` at that scope, it should be `direct.setfield`). This is the required patch: ```diff --- a/luatex-basics-nod.lua +++ b/luatex-basics-nod.lua @@ -118,7 +118,7 @@ nuts.setcomponents = direct.setcomponents nuts.setdirection = direct.setdirection nuts.setdisc = direct.setdisc nuts.setreplace= direct.setreplace -nuts.setfield = setfield +nuts.setfield = direct.setfield ok, will do nuts.setkern = direct.setkern nuts.setlink = direct.setlink nuts.setlist = direct.setlist ``` This surfaced because `nuts.setreplace` in the generic code is defined in terms of `nuts.setfield`. Previously `nuts.setreplace` wasn't used anywhere (I think), but since 20th May 2021 it is used when injecting kerns into discretionaries (font-otj.lua): See also https://www.mail-archive.com/ntg-context@ntg.nl/msg98463.html. Minimal not working example is: ``` \font\f=file:{./BaskervilleF-BoldItalic.otf}:mode=node;script=latn;kern=yes; at10pt \f B\-C \bye ``` Fails with: "warning (node filter): error: ./luatex-fonts-merged.lua:5166: attempt to call a nil value (upvalue 'setfield')". Interestingly I can't reproduce the issue with Latin Modern, although it seems to have a similar kern: ``` \font\f=file:lmroman10-regular.otf:mode=node;script=latn;kern=yes; at10pt \f V\-a \bye one is injected before and one after so one ends up in the replacement part which involves setfield Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX: different output if dots are used in the file name
On 7/8/2021 8:13 PM, Alan Braslau wrote: (and for Hans, the VMS ";" version specification is a different feature). Sure, one being that one ran out of disk space (but there were enough unused accounts with simple passwords to take care of backups) but it would add an interesting challenge (probably some extra parameter in opening a file). (btw, no tex on these vax machines, pretty unknown at that time so we rolled out our own ascii-art formatting / pagination) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] img.scan in lmtx?
> Am 27.01.2020 um 09:16 schrieb Hans Hagen : > > On 1/26/2020 11:50 PM, Henning Hraban Ramm wrote: > >> I use the lua function img.scan{filename}, but in lmtx I get "attempt to >> index a nil value (global 'img')", so I guess this got renamed or moved? > Just the high level command: > > figures.getinfo(name,page) Coming back to this, I can’t find "figures.getinfo" in the sources. Is there any documentation? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX: different output if dots are used in the file name
On Wed, 7 Jul 2021 21:57:27 +0200 Ulrike Fischer wrote: > Am Wed, 7 Jul 2021 12:25:29 -0600 schrieb Alan Braslau: > > > Windows, I believe, does not take kindly to filenames containing > > multiple dots. > > > > Therefore, Hans never uses such filenames and does not expect them, > > either, so I am not surprised that this yields unpredictable > > results. > > > > An unfortunate side-effect of dealing with Windows. > > Sorry but this is nonsense. I have seen many files with lots of dots > in windows and it works fine. Not nonsense: some MS/Windows filesystems couldn't deal with multiple dots in the filename. That my *now* be history, but wasn't. What is clear is that (perhaps due to this legacy), many programs and packages do not expect to find filenames having many dots. Indeed, *some* filesystem specifications even use "." to delimit file system hierarchy (similarly like / and \). Lua also uses this in table specifications, as does MetaPost for token separation, not mentioning structures in C (and C++). The bottom line is that using "." in a filename is best to be avoided, as are spaces in order to avoid surprises. As to "nonsense" and "Windows bashing", give me a break! (and for Hans, the VMS ";" version specification is a different feature). Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] TikZ in buffers: My struggle with \definestartstop
Hello, I have a book containing many margin figures drawn with TikZ, which is very slow. By putting the TikZ code in a buffer and using \typesetbuffer only altered TikZ code is executed on each run, saving tremendous time. This means the code containsmany constructions like this, which I would like to simplify: \startbuffer[BlueCircle] \usemodule[tikz]% Actually this is many lines to load environments, define fonts, etc. \startTEXpage \starttikzpicture \draw[thick,blue] (0,0) circle (1.5cm)node{Ti{\it k}Z!}; \stoptikzpicture \stopTEXpage \stopbuffer \placefigure[margin][fig:BlueCircle] % location, label {Ti{\it k}Z drew this blue circle\dots slowly.}% caption text {\hbox{\typesetbuffer[BlueCircle]}} My plan is to replace the first block with a new \startTikZbuffer…\stop…, which is defined using \definestartstop to include all of the stuff around the TikZ code. Then I will replace the second block with a new command, \marginTikZ, which has three arguments: a label, a caption, and the TikZ code. This command will use my new \startTikZbuffer to create the buffer before using \placefigure to put it in the margin. Only the \marginTikZ command will appear throughout the book. I’d like to do this in two steps because I will also have \textTikZ and \wideTikZ for diagrams in the text block and diagrams spanning the full page with. All of these can use the same \startTikZbuffer. However, I cannot get the \startTikZbuffer to work as expected. I put a small working example below. Removing the “This method works” block and adding the "This method fails” block causes the an error that I cannot decipher: "Use of \page_fitting_start doesn't match its definition." Any advice is appreciated. Maybe I am doing this entirely the wrong way. A couple notes: I considered using \definebuffer, but this doesn’t allow me to create named buffers, which seems like a deal breaker. I considered using \definefloat, but it don’t allow me include before and after commands, as far as I can tell. ConTeXt version: 2021.07.06 18:49 Same results with MkIV and LMTX. Thanks! Gavin \setuppapersize[letter] \setuplayout[ backspace=90pt, % Horizontal layout leftmargin=36pt, % 1/2 in leftmargindistance=9pt, % 3/8 in width=306pt, % 4 1/4 in rightmargindistance=27pt, % 3/8 in rightmargin=144pt, % 2 in ] \definestartstop[TikZbuffer][ before={\startbuffer[\tikzname]\usemodule[tikz]\startTEXpage\starttikzpicture}, after={\stoptikzpicture\stopTEXpage\stopbuffer}, ] \starttext \input knuth % This method works: \startbuffer[BlueCircle] \usemodule[tikz] \startTEXpage \starttikzpicture \draw[thick,blue] (0,0) circle (1.5cm)node{Ti{\it k}Z!}; \stoptikzpicture \stopTEXpage \stopbuffer % This method fails: %\def\tikzname{BlueCircle} %\startTikZbuffer % \draw[thick,blue] (0,0) circle (1.5cm)node{Ti{\it k}Z!}; %\stopTikZbuffer \placefigure[margin][fig:BlueCircle] % location, label {Ti{\it k}Z drew this blue circle\dots slowly.}% caption text {\hbox{\typesetbuffer[BlueCircle]}} \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX crashes with source
On 7/7/2021 6:51 PM, Pablo Rodriguez wrote: Dear list, I have the following source: \definefontfamily [malayalam] [rm] [RIT Rachana] %~ [features=malayalam-two] \setupbodyfont [malayalam] \starttext \startTEXpage \tf അദ്ധ്യായം\\ \em അദ്ധ്യായം\\ \em\bf അദ്ധ്യായം\\ \em അദ്ധ്യായം \stopTEXpage \stoptext Using latest from 2021.07.06 18:49 and the following fonts: http://rachana.org.in/downloads/RIT-Rachana-Regular.ttf http://rachana.org.in/downloads/RIT-Rachana-Italic.ttf http://rachana.org.in/downloads/RIT-Rachana-Bold.ttf http://rachana.org.in/downloads/RIT-Rachana-BoldItalic.ttf I get a crash when using LMTX, but not with MkIV (in both Windows and Linux). I’m afraid it might be a bug. Could anyone confirm the issue? hm, not related to the font .. tricky to trace, the real cause workaround : use { } when you change \em Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] [OT] TeXShop v4.66 adds support for new ConTeXt's syncing method
On 2021-07-08, Nicola wrote: > I have brought TeXShop's page in the wiki up to date (I haven't touched > what are currently §1.4 and §1.5) Typo, sorry: I meant §1.5 and §1.6. Nicola ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] [OT] TeXShop v4.66 adds support for new ConTeXt's syncing method
For those who are interested, the latest TeXShop release provides support for ConTeXt's own syncing method (by invoking mtxrun --script synctex). This supersedes the old syncing method based on Laurens' SyncTeX, which should not be used any more. I have brought TeXShop's page in the wiki up to date (I haven't touched what are currently §1.4 and §1.5), with instructions to get synchronisation to work: https://wiki.contextgarden.net/TeXShop Make sure to read it carefully! I have tested the feature for some time now, and I'd say that it works pretty well (with some caveats, which I have annotated in the wiki). I take the opportunity to thank Hans for being so responsive with the changes in mtxrun necessary to provide this feature, and for patiently bear with my sometimes unclear requests or feedback. Kudos also to Richard Koch (TeXShop's author) for his relentless support of the macOS TeX community and, in this case, of the ConTeXt community! Happy ConTeXt'ing! Nicola ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] nuts.setfield is nil in generic code
Hello, in the generic font loader code `nuts.setfield` is `nil`. This is because in `luatex-basics-nod.lua` there is a wrong assignment for `nuts.setfield` on line 121 (there is no `setfield` at that scope, it should be `direct.setfield`). This is the required patch: ```diff --- a/luatex-basics-nod.lua +++ b/luatex-basics-nod.lua @@ -118,7 +118,7 @@ nuts.setcomponents = direct.setcomponents nuts.setdirection = direct.setdirection nuts.setdisc = direct.setdisc nuts.setreplace= direct.setreplace -nuts.setfield = setfield +nuts.setfield = direct.setfield nuts.setkern = direct.setkern nuts.setlink = direct.setlink nuts.setlist = direct.setlist ``` This surfaced because `nuts.setreplace` in the generic code is defined in terms of `nuts.setfield`. Previously `nuts.setreplace` wasn't used anywhere (I think), but since 20th May 2021 it is used when injecting kerns into discretionaries (font-otj.lua): See also https://www.mail-archive.com/ntg-context@ntg.nl/msg98463.html. Minimal not working example is: ``` \font\f=file:{./BaskervilleF-BoldItalic.otf}:mode=node;script=latn;kern=yes; at10pt \f B\-C \bye ``` Fails with: "warning (node filter): error: ./luatex-fonts-merged.lua:5166: attempt to call a nil value (upvalue 'setfield')". Interestingly I can't reproduce the issue with Latin Modern, although it seems to have a similar kern: ``` \font\f=file:lmroman10-regular.otf:mode=node;script=latn;kern=yes; at10pt \f V\-a \bye ``` Originally reported at https://github.com/latex3/luaotfload/issues/194. Regards, Michal Vlasák ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] hang error
On 7/8/2021 2:16 PM, Hans van der Meer wrote: Why this: normal plain TeX macro \hang giving an Undefined control sequence error in ConTeXt? This MWE shows it: \starttext \hang \stoptext I would not expect basic plain macro's to crash. If it is intended behaviour I do not think that is the road to go, because this invalidates older documents. But maybe it is just an error in the dis tribution. wel, je vraagt er om .. \hang gobbled tot er een \par (equivalent) dat eea afsluit ... er is een reden waarom we \start .. \stop hebben -) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX: different output if dots are used in the file name
On Thu, 8 Jul 2021 10:34:32 +0200 Hans Hagen wrote: > Now, to the issue of names like 10.11.12.13 ... here .13 is the > suffix, like it or not, so in principle we then get > > 10.11.12.log > 10.11.12.tuc > 10.11.12.pdf It's not that I use files without (.tex, .mkiv, ...) suffixes, but your 10.11.12.13 example is processed by MkIV without problems: 10.11.12.pdf 10.11.12.tua 10.11.12.log LMTX, however doesn't like it: 10.11.pdf 10.11.tua 10.log > if not then indeed there is some issue. According to my tests LMTX doesn't work like you describe it should. > Now, although it's quite some > work, one can think of seeing .13 as part of the filename, in which > case the lookupe becomes > > 10.11.12.13.tex Just to make it clear: I don't use files without .tex/.mkvi/etc. suffix. So I don't expect 10.11.12.13 to work, but 10.11.12.tex should in fact work as far as I understand. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] hang error
Why this: normal plain TeX macro \hang giving an Undefined control sequence error in ConTeXt? This MWE shows it: \starttext \hang \stoptext I would not expect basic plain macro's to crash. If it is intended behaviour I do not think that is the road to go, because this invalidates older documents. But maybe it is just an error in the distribution. dr. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX: different output if dots are used in the file name
On 7/7/2021 8:25 PM, Alan Braslau wrote: Windows, I believe, does not take kindly to filenames containing multiple dots. windowes is very kind to multiple dots but it (normally) sees the last suffix as an indication of what file is it (other operating system needs some 'open' command while windows works with associations) Therefore, Hans never uses such filenames and does not expect them, either, so I am not surprised that this yields unpredictable results. actually, mkiv will append a suffix for converted files, so foo.eps.pdf is made ... works ok An unfortunate side-effect of dealing with Windows. more an unfortunate side effect of the way users and porograms construct filenames and expect systems that use some heuristic to deal with that to work fine (unless one accepts that foo.tex gets a foo.tex.log and foo.tex.pdf file as result) (inconsistent font and file filenames can even make life even more misserable) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX: different output if dots are used in the file name
On 7/7/2021 10:13 PM, Marco Patzer wrote: But maybe Hans can chime in and clarify. I have to check it but syffixes and tex are kind of special. It has nothing to do with operating systems (sorry for those who love to bash windows for it). Personally I always use a suffix and don't look into files without them. (On VMS we even had version numbers with the name, which was also nice.) That said: - tex needs to make a log file and an output file (.log, .pdf and maybe more like .tuc) - so, it determines a jobname, which is the input file with the suffix removed - actually it adds a suffix .tex when there is none and then looks for that file - in that respect, .10 is a suffix as is .foo or .pointless - in tds/kpse/web2c there were flags for 'multiple suffixes' (which of course also introduces compatibility issues) - as a side note: filenames are case sensitive unless the operating system makes them insensitive; this has long been yet another reason for bashing windows, but it looks like kpse/web2c now decided it's a good idea so there's also a flag (i think itis true by default) that enables insentivity (context always tried to be insensitive and mkiv/lmtx definitely is) Now, to the issue of names like 10.11.12.13 ... here .13 is the suffix, like it or not, so in principle we then get 10.11.12.log 10.11.12.tuc 10.11.12.pdf if not then indeed there is some issue. Now, although it's quite some work, one can think of seeing .13 as part of the filename, in which case the lookupe becomes 10.11.12.13.tex but we can optionally first check for 10.11.12.13 ... however, because there are many possibel suffixes (.tex being one of them) we then get 10.11.12.13.log 10.11.12.13.tuc 10.11.12.13.pdf but in the case of 10.11.12.13.tex we get 10.11.12.13.tex.log 10.11.12.13.tex.tuc 10.11.12.13.tex.pdf because there is no way to determine any longer that .tex is special (one can argue that .mk* also qualifies but what about .xml and all variants on that). Al this means that personally I always stick to (1) lowercase filenames (2) with no spaces (3) only a-z, A-Z, 0-9, and - (4) always with a suffix ... it never gives issues. (If you ever had to deal with third party files, especially graphics made by third parties, you'd know that most problems come from bad filenames where for instance a single space or multiple spaces and/or funny mixes in case get unnoticed.) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] font feature
Hi all, is it possible to subtract a featureset that has been applied to a fontfamily? MWE: \definefontfeature [f:frac] [frac=yes,onum=no,pnum=no] \definefontfeature [f:onum] [onum=yes,pnum=yes] \definefontfamily [test] [serif] [AntykwaTorunska] [features=f:onum] \definefontfamily [test] [sans] [Myriad Pro] \definefontfamily [test] [mono] [DejaVu Sans Mono] \definefontfamily [test] [math] [Xits Math] \setupbodyfont[test,12pt] \starttext Mozarts erster Satz ist ein {\subtractfeature[f:test]\addfeature[f:frac]4/4}-Takt, Beethoven wählt einen Dreiertakt, Mozarts Romanze ist ein 3/8-Takt, Beethoven wählt einen 2/4, Mozarts Rondo ist eine Gavotte im 2/2-Takt, Beethoven schreibt ein Jagdrondo im 6/8-Takt. \stoptext If I comment out the part [features=f:onum], I get the fractions that I'm looking for, but it seems that I can't get the same effect with \subtractfeature and \addfeature. I'm confused... Thanks and all best Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] xmldisplayverbatim
I get the impression that \xmldisplayverbatim changes ' (apostroph) into ' and " (quotation mark) into " etc. How can I get rid of this translation? I would prefer to have typeset ' and " instead of the entity representations. dr. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___