[NTG-context] Re: stackrel in context?
On Thu, 21 Sep 2023, Mikael Sundqvist wrote: > Nice with offset=auto. It is not clear to me what the intent/meaning > is of the original example, but one can also try the 23DC (can extend > as \overparent): https://tex.stackexchange.com/questions/128625/how-to-put-smallsmile-or-smallfrown-on-top-of-a-letter I guess, some book/paper somewhere introduced it as an accent, and now others follow the same style. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: stackrel in context?
On Thu, 21 Sep 2023, Hans Hagen wrote: > a teaser for Aditya: > > \definemathstackers[toprel][top][mathclass=\mathrelationcode] > \definemathstackers[topbin][top][mathclass=\mathbinarycode] > > \definemathextensible[toprel][frownedupon]["2322] > \definemathextensible[topbin][frowned]["2322] > > \starttext > $x \frownedupon{4} y + \frowned{!} z = 10$ > \stoptext Interesting, but I think that the OP wanted to use \frown as an accent, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: stackrel in context?
On Thu, 21 Sep 2023, Xavier B. wrote: > Hi, > > I want to write: > > $0,00\stackrel{\smallfrown}{4}$ > > like latex > [https://tex.stackexchange.com/questions/39225/differences-between-stackrel-and-stackbin] > > but context LMTX does not recognize stackrel > > What can I do? \stackrel is defined in context (with almost the same definition as latex). You get an error because \smallfrown is not defined. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Different behavior of \clf_lastypos vs \clf_lastxpos
Hi, I am trying to debug an unexpected behavior with tikz reported on tex.se: https://tex.stackexchange.com/q/696136/323 The attached file shows what is going wrong (without using tikz). For some reason, there is an extra \relax written to file after `\the\numexp\clf_lastypos\relax` (there is no such relax after `\the\numexpr\clf_lastxpos\relax`). The test.pgf file is: \macro {A}{23930350}{43358454.0\relax } \macro {B}{39564274.0\relax }{14083538} Any ideas on why is the extra \relax written after lastypos and how to fix that? Aditya t1.tex Description: TeX document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Tikz calendar problem.
On Mon, 4 Sep 2023, Fabrice L wrote: > Dear list, > > I have a problem with tikzCalendar on a recent installation. This minimal > example : > > 8< > > \usemodule[tikz] > \usetikzlibrary[calendar] > > \starttext > This should works: > \blank > \tikz \calendar[dates=2000-01-01 to 2000-01-31,week list]; > \blank > but this does not ! > \stoptext > > 8< > > should work, but does not. The problem seems to be here: > > open source > level 2, order 61, name 'tikzlibrarycalendar.code.tex' > modules > 'pgfcalendar' is not found > close source> level 2, order 61, name ‘tikzlibrarycalendar.code.tex' > > The file « tikzlibrarycalendar.code.tex » is read, but the file « pgfcalendar > » seems missing. I have reinstall a new standalone version of ConTeXt, with > all the modules (with the new script from ConTeXt Garden), but nothing works. Here is what is going on: `tikzlibrarycalendar.code.tex` contains the line: \pgfutil@usemodule{pgfcalendar} In `generic/pgf/utilities/pgfutil-context.def`, \pgfutil@usemodule is defined as: \def\pgfutil@usemodule#1{\usemodule[#1]} which is supposed to load the file `plain/pgf/utilities/pgfcalendar.tex` which just a wrapper to load `pgfcalendar.code.tex`: \edef\pgfcalendaratcode{\the\catcode`\@} \catcode`\@=11 \input pgfrcs.tex \input pgfcalendar.code.tex \catcode`\@=\pgfcalendaratcode \endinput Now, the reason that this is not working is that the new module installer for tikz removes all the files from `tex/plain`. It appears that tikz is at fault here. If the file `pgfcalendar.tex` is supposed to used by both plain and context, then it should be in `tex/generic` directory rather than `tex/plain` directory. However, moving the file to `tex/generic` will not fix the issue directly loading the above `pgfcalendar.code.tex` in context is surely going to fail because of the manual catcode changes that are being done by pgfcalendar. So, I propose that we add a file `m-tikz-pgfcalendar.tex` as a wrapper around `pgfcalendar.code.tex` and in `m-tikz.mk(xl|iv)` add \definefilesynonym [pgfcalendar] [tikz-pgfcalendar] I am attaching `m-tikz-calendar` which causes the original example to compile (provided one adds the definefilesynonym before calling \usetikzlibrary[calendar]). Can you please test if other features of pgfcalendar are working with this file. Aditya m-tikz-calendar.tex Description: m-tikz-pgfcalendar.tex ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An error which is not in .log file
On Wed, 16 Aug 2023, Wolfgang Schuster wrote: > 3. \starttikzpicure doesn't allow arguments which results in font error > messages (char ... missing). This is an error in the ConTeXt version of the > \starttikzpicture command and should be fixed. Looking at m-tikz.mkxl, \starttikzpicture should allow optional arguments. The following works correctly for me with ver 2023.07.18: \usemodule[tikz] \usetikzlibrary[patterns] \starttext \starttikzpicture[scale=0.75] % recipient \draw (0,0) -- (0,10) -- (2,10) -- (2,0) -- cycle; % aigua \filldraw[pattern=north east lines, pattern color=orange] (0,0) -- (0,4) -- (2,4) -- (2,0) -- cycle; \draw (1,2) node[fill=white] {aigua}; % oli \filldraw[pattern=dots, pattern color=blue] (0,4) -- (0,6.5) -- (2,6.5) -- (2,4) -- cycle; \draw (1,5.25) node[fill=white] {oli}; % ròtuls \draw (2,2) node[anchor=west] {$2/5$}; \draw (2,5.25) node[anchor=west] {$1/4$}; \stoptikzpicture \stoptext Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Very strange error:
On Mon, 14 Aug 2023, Xavier B. wrote: > > Can you show the text (and commands) which appears on line 540 (plus a > > few lines before/after line 540) of your document. > > > I attach the dev.log and dev-error.log. Is it enough? You should show a *complete* context source document that generates the error. See https://tex.meta.stackexchange.com/questions/228/ive-just-been-asked-to-write-a-minimal-working-example-mwe-what-is-that (Most of the advice here is latex specific, but the idea is the same for context). Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Link from a PDF to a reference of an embedded PDF
On Mon, 24 Jul 2023, Gerion Entrup wrote: > Hi Pablo, > > > not sure I’m getting your point right. > > Thank you for the detailed answer. > But I fear, I have not expressed myself precise enough. > The solution that you described does not directly fit to my setting. > I'll try to rephrase. Maybe it gets more clear then. I think, named > destinations could be a important part in the solution. > > I'm do not know the structure of PDFs exactly, therefore some of my > terms might be wrong. I'll name the two things from now on the following > way: > - a destination: This is a defined position within a PDF document; so > some position that a PDF viewer is able to jump to. In ConTeXt, you > can set such a position most of the time with the "reference" keyword. > In LaTeX, you use \label. > - a reference: This is a link that you can click on and cause the > PDF viewer to jump/scroll to the linked destination. In ConTeXt, you > can use \in to create a reference. In LaTeX, you use \ref. > > The situation is that I have a PDF-document (inner.pdf) that defines > several destinations and I want to embed that document with > \externalfigure into another PDF-document (outer.pdf). My question is: > Is it possible to create references within the source code of outer.pdf > that correctly set a link to a destination that is defined in inner.pdf? > Asked in another way: Is is possible that \externalfigure can extract > the (maybe named) destinations of inner.pdf and translate them in such a > way, that I can use \in within the outer document to link to them. According to https://wiki.contextgarden.net/Command/setupexternalfigure \externalfigure[][interaction=reference] should keep all the references (you can also try interaction=all). Not sure how the references get mapped internally, so that they may be linked. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: About Pgfplot.-
On Sat, 22 Jul 2023, Freddy Omar López Quintero wrote: > I’m trying to reproduce the example in https://wiki.contextgarden.net/Pgfplot > and I’m getting this error: That example is a little hard to test because you need to download a bunch of data files to test it, but pgfplots is working in the latest version. > I’m on macOS 13.4.1 and this is the version of context I’m running: > > > context --version > mtx-context | ConTeXt Process Management 1.04 > mtx-context | > mtx-context | main context file: > /usr/local/texlive/2023/texmf-dist/tex/context/base/mkiv/context.mkiv > mtx-context | current version: 2023.03.10 12:15 > mtx-context | main context file: > /usr/local/texlive/2023/texmf-dist/tex/context/base/mkxl/context.mkxl > mtx-context | current version: 2023.03.10 12:15 Tikz (and related modules) needed to be adapted for LMTX, and this was done around April or May. So you will need to upgrade. If texlive does not include the latest version, then you would need to manually install context lmtx: https://wiki.contextgarden.net/Installation Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: context-on-web broken
On Mon, 26 Jun 2023, Hans Hagen via ntg-context wrote: > On 6/26/2023 7:53 PM, Aditya Mahajan via ntg-context wrote: > > On Mon, 26 Jun 2023, Miguel Diaz via ntg-context wrote: > > > >> indeed it is a simple simulation of overleaf (for latex). > > > > FWIW, context works on overleaf as well! > > > > Simply create a `latexmkrc` file with the following content: > > > > ``` > > $pdflatex="context --synctex=1 --result=output %S; cp output.log > > /compile/output.log;cp output.pdf /compile/output.pdf"; > > $recorder=0; > > $pdf_mode=1; > I found back this link: > > https://davidcarlisle.github.io/latexcgi/testc > > > % !TEX mtxrun --script context > > \starttext > > \dorecurse{500}{\samplefile{tufte}\par} > > \stoptext > > Runs 113 pages in 1.13 sec so quite ok for a remote un I guess. > > I'm not sure how up to date it is. 2023.05.05 18:36, so very recent. https://texlive.net/run?%25!TEX%20mtxrun%20--script%20context%0A%0A%5Cstarttext%0A%5Ccontextversion%0A%5Cstoptext%0A Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Arch linux package for context lmtx
Hi, I maintained a AUR (Arch User Repository) package for context lmtx which was called luametatex. Arch recently introduced an official extra package for luametatex (the binary) called ... well ... luametatex, which means that my package has a name conflict with the official package and hence was deleted. Arch also now provides an official texlive-context package for context. I assume that it syncs with texlive. At present, texlive-context includes ConTeXt 2023.03.10. So, I think that the AUR package is still useful. It is essentially just a wrapper around the official install scripts and provides the latest release of context lmtx (and user modules). So, I am renaming my old `luametatex` package and am re-releasing it as `context-lmtx-bin`. To use it: git clone https://aur.archlinux.org/context-lmtx-bin.git cd context-lmtx-bin makepkg sudo pacman -U context-lmtx-bin-.pkg.tar.zst This will install context lmtx in /opt/context-lmtx. This is in parallel with any system installed context. I also keep the old .tar.zst files around. That makes it easy to revert back to a previous version in case there is something that doesn't work as expected in the latest release. Note that by default the following third user modules are installed: 'filter' 'visualcounter' 'vim' 'tikz' 'typescripts' This is obviously a biased list corresponding to what packages I use. To install other packages, simply open the PKGBUILD file and change the _module variable defined as: _modules=('filter' 'visualcounter' 'vim' 'tikz' 'typescripts') You can change it to _modules=('--all') to install all modules. When using the package for the first time, run source /opt/context-lmtx/setuptex mtxrun --generate For any future runs, simply use source /opt/context-lmtx/setuptex once in your shell. This adds /opt/context-lmtx/texmf-linux-{32,64}/bin to the PATH variable, so the binaries provided by context-lmtx are found before the system binaries. The setuptex file provides a `resettex` function which removes the above path from the PATH variable. The setuptex file also sets a variable CONTEXDIST to 'lmtx'. This can be used to set the value of PS1 variable (or similar) of your shell prompt to add a visual reminder of which context installation you are using. Let me know if there are any issues with this install. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: MP setup for a progress bar
On Tue, 4 Jul 2023, Henning Hraban Ramm wrote: > Thanks to Taco, Robbert and Jules for their work! > > > I used the downtime to setup a presentation style with a progress bar in the > footer. But I get the same (first page) graphics on all pages, and the footer > background appears under the text area as well as under the margins. Also see: https://github.com/adityam/visualcounter There is a simple progress bar and the documentation shows how to create your own as well. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] context-on-web broken
On Mon, 26 Jun 2023, Miguel Diaz via ntg-context wrote: > indeed it is a simple simulation of overleaf (for latex). FWIW, context works on overleaf as well! Simply create a `latexmkrc` file with the following content: ``` $pdflatex="context --synctex=1 --result=output %S; cp output.log /compile/output.log;cp output.pdf /compile/output.pdf"; $recorder=0; $pdf_mode=1; ``` Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TiKz with LMTX
On Fri, 9 Jun 2023, Hans Hagen via ntg-context wrote: > On 6/9/2023 5:57 AM, Aditya Mahajan via ntg-context wrote: > > On Thu, 8 Jun 2023, Jigé via ntg-context wrote: > > > >> Thanks a lot Aditya. > >> > >> The very simple TikZ example with the cross works. > >> The more complex example with the trigonometric circle from the pgf > >> manual, > >> quoted in https://wiki.contextgarden.net/TikZ , does not compile > >> unless you also comment out > >> or find(n,"pdftex") > >> in line 181 of the mtx-install-modules.lua file > >> before doing mtxrun --script install-modules --install tikz > >> but I could guess that from a: > >> Driver file ``pgfsys-pdftex.def'' not found.. > >> message > > > > Ah so tikz uses both drivers. > > > > @Hans, so the validate function should be: > > > > local function validate(n) > > return not ( > > find(n,"latex") > > -- or find(n,"lualatex") > > or find(n,"plain") > > or find(n,"optex") > > -- or find(n,"luatex") > > -- or find(n,"pdftex") > > ) > > end > so an alternative is to ignore deleting those two files > > what is in lualatex that we need? can hardly be something generic pgf/tikz doesn't have anything with lualatex in the name. The only files that match luatex/pdftex are these def files. > (it being pretty big makes me wonder if we should have texmf-tikz for it as i > don't want to polute the modules tree too much - it gets hard to check other > modules for instance when i want to see if some change has impact) If it makes things easier to manage, we can definitely do that. We already have 7 trees, one more isn't going to make any difference :-) Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TiKz with LMTX
On Thu, 8 Jun 2023, Jigé via ntg-context wrote: > Thanks a lot Aditya. > > The very simple TikZ example with the cross works. > The more complex example with the trigonometric circle from the pgf manual, > quoted in https://wiki.contextgarden.net/TikZ , does not compile > unless you also comment out > or find(n,"pdftex") > in line 181 of the mtx-install-modules.lua file > before doing mtxrun --script install-modules --install tikz > but I could guess that from a: > Driver file ``pgfsys-pdftex.def'' not found.. > message Ah so tikz uses both drivers. @Hans, so the validate function should be: local function validate(n) return not ( find(n,"latex") -- or find(n,"lualatex") or find(n,"plain") or find(n,"optex") -- or find(n,"luatex") -- or find(n,"pdftex") ) end Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TiKz with LMTX
On Mon, 5 Jun 2023, Aditya Mahajan via ntg-context wrote: > On Sun, 4 Jun 2023, Jigé via ntg-context wrote: > > > > $ mkdir ~/.local/share/context > > $ cd ~/.local/share/context > > $ wget https://lmtx.pragma-ade.com/install-lmtx/context-linux-64.zip > > $ unzip context-linux-64.zip > > $ sh install.sh > > $ rm context-linux-64.zip > > $ cd ~/.local/share/context/tex > > $ mtxrun --script install-modules --list > > $ mtxrun --script install-modules --install tikz > > (And for good measure, I later did `mtxrun --script install-modules > > --install all`) > > > > $ cd my-working-directory > > $ vi some-sample-context-file.tex > > $ export PATH=/home/myname/.local/share/context/tex/texmf-linux-64/bin:$PATH > > $ context some-sample-context-file.tex > > > > Did I miss anything? It works just fine. > > On a new machine and pgfsys-luatex.def is missing for me as well. I'll try to > check what is going on. This was a bit crazy to track down. Here is the fix: In line 180 of mtx-install-modules.lua, comment the line or find(n,"luatex") Otherwise, the file tex/generic/pgf/systemlayer/pgfsys-luatex.def is not extracted from the tikz.zip! I don't know why OP and I (both on archlinux) were the only ones who had pgfsys-luatex.def missing. Everyone should have been affected by this. Aditya PS: Also on line 103, it may be a good idea to change the curl call to curl --ssl --location mirros.ctan.org will also do a HTTP 302 redirect and without the --location flag, curl will not follow the redirect. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TiKz with LMTX
On Sun, 4 Jun 2023, Jigé via ntg-context wrote: > $ mkdir ~/.local/share/context > $ cd ~/.local/share/context > $ wget https://lmtx.pragma-ade.com/install-lmtx/context-linux-64.zip > $ unzip context-linux-64.zip > $ sh install.sh > $ rm context-linux-64.zip > $ cd ~/.local/share/context/tex > $ mtxrun --script install-modules --list > $ mtxrun --script install-modules --install tikz > (And for good measure, I later did `mtxrun --script install-modules --install > all`) > > $ cd my-working-directory > $ vi some-sample-context-file.tex > $ export PATH=/home/myname/.local/share/context/tex/texmf-linux-64/bin:$PATH > $ context some-sample-context-file.tex > > Did I miss anything? It works just fine. On a new machine and pgfsys-luatex.def is missing for me as well. I'll try to check what is going on. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Moving up a Figure
On Mon, 5 Jun 2023, Alan Braslau via ntg-context wrote: > On 05/06/23 05/06/23, 00:08, Mikael Sundqvist via ntg-context wrote: > > On Mon, Jun 5, 2023 at 4:03 AM Jeroen via ntg-context > > wrote: > >> Not fully, it indeed moves up the figure but a little too much. Is there a > >> more granular method? > > Not that I know of, but maybe {right,halfline} will do? > > Maybe try "location={right,-1*hang}," For finer control, you can use `\movesidefloat`: \movesidefloat[x=-..., y=...] \startplacefigure [..] \stopplacefigure Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Super slow installation
On Tue, 30 May 2023, Thangalin via ntg-context wrote: > FWIW, I'm seeing the same slow down issue from three different machines: > >1. My personal computer in Vancouver BC. >2. A work computer on Vancouver Island (Victoria BC) >3. Microsoft ADO servers (presumably in Seattle WA). > > Is it possible there's a slow pipe from North America to Europe? Could be. For me (Montreal, Canada) it took more than a minute: ❯ wget http://lmtx.pragma-ade.com/install-lmtx//texmf.zip --2023-05-30 13:38:26-- http://lmtx.pragma-ade.com/install-lmtx//texmf.zip Resolving lmtx.pragma-ade.com (lmtx.pragma-ade.com)... 213.125.29.165 Connecting to lmtx.pragma-ade.com (lmtx.pragma-ade.com)|213.125.29.165|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 53293716 (51M) [application/zip] Saving to: ‘texmf.zip’ texmf.zip 100%[==>] 50.82M 637KB/sin 72s 2023-05-30 13:39:38 (721 KB/s) - ‘texmf.zip’ saved [53293716/53293716] Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] module installer: unknown script 'install-modules.lua' or 'mtx-install-modules.lua'
On Wed, 24 May 2023, Denis Maier via ntg-context wrote: > I've just tested with a couple of other scripts... > > Doesn't matter which one I try to call: > Mtxrun --script XYZ > > will always results in the equivalent error message, e.g.: > mtxrun | unknown script 'interface.lua' or 'mtx-interface.lua' > > I have > ..\context\tex\texmf-win64\bin > ..\context\bin > In my path. > > Do I need to add something else to the Path? I would remove context/bin from the PATH. Try running mtxrun --generate to regenerate the files database. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Inline framed verbatim text
On Fri, 19 May 2023, Jeroen via ntg-context wrote: > Many thanks. Is there a proper way to add some space (a couple of pt or em) > to the left and the right of the text itself so the frame does not get so > close to the text? \framed[loffset=0.2ex, roffset=0.2ex]{...} Also see: https://wiki.contextgarden.net/Command/setupframed Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] upload
On Fri, 5 May 2023, Hans Hagen via ntg-context wrote: > Hi, > > I uploaded a version that provides > > mtxrun --script install-tikz > > that when run in the tex root (.../tex) will fetch some tikz stuff from ctan > and puts is in texmf-modules. After installing it wipes the files that make no > sense (or can interfere or might be harmful) but I didn't check that > extensively. Finally it remakes the file dastabase. I don't know if more needs > to be installed. It assumes curl to be present (as library or binary). It's a > rather stupid script but (I guess) good enough for what it is supposed to do. Works fine at my end. I also adapted the arch AUR package to use the install-tikz option (earlier I was installing these packages by wget as part of the installation process). > I can add more (like other modules) in which case it will be renamed. Would it make sense to add a similar script to install context modules from modules.contextgarden.net? Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz + lmtx
On Thu, 4 May 2023, Hans Hagen via ntg-context wrote: > On 4/28/2023 6:08 AM, Aditya Mahajan via ntg-context wrote: > > Hi all, > > > > For a few months now, all features of tikz have not been working with LMTX. > > After help from Hans and a bit of trial and error, I think that figured out > > what was going wrong with the catcodes in m-tikz: Since the texcatcodes are > > different from what tikz expects, the catcodes have to be set inside > > \starttikzpicture (in addition to before the loading of tikz files, which > > was already being done). > > > > I am attaching the working m-tikz.mkxl file. > > > > I have tested this on my course notes, which make extensive use of simple > > tikz block diagrams and pgfplots graphs. Perhaps others who were having > > issues with tikz could test if this fixes everything and, if so, we can add > > this to the distribution. > So, what is needed from tikz? > > "graphics/pgf/base/pgf.tds.zip", > "graphics/pgf/contrib/pgfplots.tds.zip", > "graphics/pgf/contrib/circuitikz.tds.zip", > > Is there more that should be installed as reasonable basic set? I believe that these are the most popular ones. > I made a script that does fetch/installs it (and also wipes latex / plain > /useless stuff afterwards including some shell etc scripts as we don't want > those either - security risk etc -). Does that mean that these will be now included as part of the lmtx install? > Not being a tikz user I have no preferences but we can add some test files to > the test suite if needed. It may be good to add some basic files (e.g., the ones that I sent to you off-list) so that we may know if these packages break again. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Units for volts and Ohms
Hi, As I was testing circuitikz, I realized that the following don't work: \unit{1V} \unit{100 kΩ} In phys-dim.lmt, we need to change line 467: v = "volt", to V = "volt", and perhaps add (not sure if lua allows utf variable names) Ω = "ohm", Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz + lmtx
On Fri, 28 Apr 2023, Aditya Mahajan via ntg-context wrote: > On Fri, 28 Apr 2023, Ulrike Fischer via ntg-context wrote: > > > Am Fri, 28 Apr 2023 01:01:23 -0400 (EDT) schrieb Aditya Mahajan via > > ntg-context: > > > > > Circuitikz still doesn't work. Even loading the module fails. > > > > It works for me on texlive 2023 with your new module file. > > Thanks for testing. I'll double check what was going wrong with my circuitikz > tests. A 5 year old circuitikz module in $TEXMFHOME, which was interfering! Everything appears to be working now at my end as well. @Hans, could we add the m-tikz.mkxl file that I sent to the distribution. Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz + lmtx
On Fri, 28 Apr 2023, Floris van Manen via ntg-context wrote: > > > On 28/04/2023 16:25, Aditya Mahajan via ntg-context wrote: > > These are already part of the distribution. Just one caveat: you need to use > > > > \usemodule[tikz] > > \usemodule[pgfplots] > > > when running the example from contextgarden: > https://wiki.contextgarden.net/Pgfplot > > \setupcolors[state=start] > \usemodule[tikz] > \usemodule[pgfplots] > \starttext > \starttikzpicture > \startaxis[ > xmin=0,xmax=300, > title=http://cryogenics.nist.gov/, > xlabel=$T$ (K), > ylabel=$(L-L_{293})/L_{293}$, > legend style={at={(0.95,0.05)},anchor=south east}, > width=16cm ] > \addplot[mark=none,color=red] plot file {sapphire.dat}; > \addlegendentry{sapphire} > \addplot[mark=none,color=green] plot file {Be.dat}; > \addlegendentry{Be} > \addplot[mark=none,color=blue] plot file {BeCu.dat}; > \addlegendentry{BeCu} > \addplot[mark=none,color=cyan] plot file {SS304.dat}; > \addlegendentry{SS304} > \addplot[mark=none,color=magenta] plot file {Al6061-T6.dat}; > \addlegendentry{Al6061-T6} > \addplot[mark=none,color=orange] plot file {nylon.dat}; > \addlegendentry{nylon} > \stopaxis > \stoptikzpicture > \stoptext Is it possible to create a standalone test that does not depend on a bunch of datafiles that need to be downloaded? Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz + lmtx
On Fri, 28 Apr 2023, Ulrike Fischer via ntg-context wrote: > Am Fri, 28 Apr 2023 01:01:23 -0400 (EDT) schrieb Aditya Mahajan via > ntg-context: > > > Circuitikz still doesn't work. Even loading the module fails. > > It works for me on texlive 2023 with your new module file. Thanks for testing. I'll double check what was going wrong with my circuitikz tests. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz + lmtx
On Fri, 28 Apr 2023, Gavin wrote: > Hi fellow Tik-Z users, > > Tik-Z, including circuitikz, is working for me after adding two files from > Hans to a slightly older version of ConTeXt (ver: 2023.02.07 19:06 LMTX fmt: > 2023.3.14). I do not know if these files are of any use with the current > versions, but I am quoting a list email from January (including the files) > just in case it helps anyone with the present problems. > > Gavin These are already part of the distribution. Just one caveat: you need to use \usemodule[tikz] \usemodule[pgfplots] Directly loading \usemodule[pgfplots] will not work as the t-pgfplots module explicitly loads t-tikz, which does not work with LMTX. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz + lmtx
On Fri, 28 Apr 2023, Aditya Mahajan via ntg-context wrote: > Hi all, > > For a few months now, all features of tikz have not been working with LMTX. > After help from Hans and a bit of trial and error, I think that figured out > what was going wrong with the catcodes in m-tikz: Since the texcatcodes are > different from what tikz expects, the catcodes have to be set inside > \starttikzpicture (in addition to before the loading of tikz files, which was > already being done). > > I am attaching the working m-tikz.mkxl file. > > I have tested this on my course notes, which make extensive use of simple > tikz block diagrams and pgfplots graphs. Perhaps others who were having > issues with tikz could test if this fixes everything and, if so, we can add > this to the distribution. Circuitikz still doesn't work. Even loading the module fails. Not sure why this is happening: \usemodule[circuitikz] gives: tex error > tex error on line 77 in file /opt/luametatex/texmf-context/tex/context/modules/mkxl/m-circuitikz.mkxl: Package pgfkeys Error: I do not know the key '/tikz/resistor', to which you passed 'american', and I am going to ignore it. Perhaps you misspelled it \pgfkeys@error which is a bit strange as the key should have been '/tikz/circuitikz/resistor' rather than 'tikz/resistor'. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] tikz + lmtx
Hi all, For a few months now, all features of tikz have not been working with LMTX. After help from Hans and a bit of trial and error, I think that figured out what was going wrong with the catcodes in m-tikz: Since the texcatcodes are different from what tikz expects, the catcodes have to be set inside \starttikzpicture (in addition to before the loading of tikz files, which was already being done). I am attaching the working m-tikz.mkxl file. I have tested this on my course notes, which make extensive use of simple tikz block diagrams and pgfplots graphs. Perhaps others who were having issues with tikz could test if this fixes everything and, if so, we can add this to the distribution. Aditya%D \module %D [ file=m-tikz, %Dversion=2021.07.12, %D title=\CONTEXT\ Extra Modules, %D subtitle=TIKZ support, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. %D A fixed variant of the t-tikz module distributed with tikz. For practical reasons %D per 2021 we split the module for \MKIV\ and \LMTX. (Maybe some day I'll optimize %D TIKZ a bit.) %D %D All these t-* modules in the tikz distribution make no sense as we can just load %D them here which is way cleaner. There is also some mkii filename mapping going on %D that is not needed on todays systems (windows has no 8.3 limitation and on unix %D tds finally adopted a case insensitive approach.) %D Just in case someone does a hard input ... \ifdefined\pgfdefined\endinput \fi \ifdefined\pgfcoredefined\endinput \fi %D ... but normally we end up here: \startmodule[tikz] \ifdefined\pdflastxpos \else \unprotect \frozen\overloaded\protected\def\pdflastxpos{\numexpr\clf_lastxpos\relax} \frozen\overloaded\protected\def\pdflastypos{\numexpr\clf_lastypos\relax} \protect \fi \newcatcodetable \tikzcatcodes \startcatcodetable \tikzcatcodes \catcode\tabasciicode \spacecatcode \catcode\endoflineasciicode \endoflinecatcode \catcode\formfeedasciicode\endoflinecatcode \catcode\spaceasciicode \spacecatcode \catcode\endoffileasciicode \ignorecatcode \catcode\circumflexasciicode \superscriptcatcode \catcode\underscoreasciicode \subscriptcatcode \catcode\ampersandasciicode \alignmentcatcode \catcode\backslashasciicode \escapecatcode \catcode\leftbraceasciicode \begingroupcatcode \catcode\rightbraceasciicode \endgroupcatcode \catcode\dollarasciicode \mathshiftcatcode \catcode\hashasciicode\parametercatcode \catcode\commentasciicode \commentcatcode \catcode\atsignasciicode \lettercatcode \catcode\exclamationmarkasciicode \othercatcode \catcode\questionmarkasciicode\lettercatcode \catcode\tildeasciicode \activecatcode \catcode\barasciicode \othercatcode \stopcatcodetable \permanent\protected\def\starttikzinput {\pushoverloadmode \pushcatcodetable \setcatcodetable\tikzcatcodes \pushmacro\meaning \let\meaning\meaningless \autoparagraphmode\zerocount} \permanent\protected\def\stoptikzinput {\autoparagraphmode\plusone \popcatcodetable \popmacro\meaning \popoverloadmode} \permanent\protected\def\tikzinputfile#1% {\starttikzinput \input{#1}\relax \stoptikzinput} \permanent\protected\def\tikzerrormessage#1#2#3% {\writestatus{#1}{#2}} % For now we need this but we need to educate the user to wrap settings in the % wrappers. So some day the next line will go. I need to check what commands are % possible outside a picture. \overloadmode\zerocount \newtoks\everytikzpicture % \appendtoks % \resetcharacterspacing % \to \everytikzpicture \permanent\protected\def\starttikzsettings {\pushoverloadmode \pushmacro\meaning \let\meaning\meaningless \autoparagraphmode\zerocount} \permanent\protected\def\stoptikzsettings {\autoparagraphmode\plusone \popmacro\meaning \popoverloadmode} \permanent\protected\def\starttikzpicture {\dontleavehmode \hcontainer\bgroup \setcatcodetable\tikzcatcodes \the\everytikzpicture \autoparagraphmode\zerocount \pushmacro\meaning \let\meaning\meaningless % \pushoverloadmode \ifdefined\PackageError\else \let\PackageError\tikzerrormessage \fi \tikzpicture} \permanent\protected\def\stoptikzpicture {\endtikzpicture % \popoverloadmode \popmacro\meaning \egroup} \let\pgfdefined\relax \let\pgfcoredefined\relax \tikzinputfile{pgfutil-common.tex} \tikzinputfile{pgfutil-context.def} \tikzinputfile{pgfrcs.code.tex} \tikzinputfile{pgfsys.code.tex} \tikzinputfile{pgfkeys.code.tex} \tikzinputfile{pgfsyssoftpath.code.tex} \tikzinputfile{pgfsysprotocol.code.tex}
Re: [NTG-context] update
On Wed, 26 Apr 2023, lynx--- via ntg-context wrote: > Re: performing update(s) > > New to conTeXt, have not performed a specific update prior to this. > > My conTeXt installation is part of TeXlive-2023 (under Linux OS). Will > the updates to ConTeXt be handled by tlmgr ? No. Usually, texlive updates context once a year. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Filter Module with Openscad
On Wed, 26 Apr 2023, Jeroen via ntg-context wrote: > I am using OpenSCAD to create drawings with the filter module with the > following MWE: > > \usemodule[filter] > \defineexternalfilter[openscad] > [filtercommand={/context/openscad/openscad -o \externalfilteroutputfile}, >output={\externalfilterbasefile.png}, >cache=force, >readcommand=\ReadImage] > \define[1]\ReadImage{\externalfigure[#1]} > > \starttext > \startopenscad > square(4,2); > \stopopenscad > \stoptext > > This works fine. I now want to use the following options added to the > command line: --view axes,edges,scales --viewall > > When I create an Openscad file test.scad, I can run it fine with the > following command line at a CLI window: > > openscad.com test.scad -o test.png --view axes,edges,scales --viewall > > When I add this to the filtercommand as following > > [filtercommand={/context/openscad/openscad -o > \externalfilteroutputfile --view axes,edges,scales --viewall} > > I cannot get it to run. Is there anything I am missing? My guess is that you need: [filtercommand={/context/openscad/openscad -o \externalfilteroutputfile\space --view axes,edges,scales --viewall} this is because any macro \something gobbles the space after that. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Idea for a shared repository.
On Tue, 25 Apr 2023, Pawel Urbanski via ntg-context wrote: > What about creating a repository called: 'templates' or 'resources' - we can > figure out the exact name later. Why not use the wiki for such documents? For fonts, there is already a wiki page collecting typescripts: https://wiki.contextgarden.net/Typescripts_examples There are also a collection of templates which are already on the wiki: https://wiki.contextgarden.net/Category:Sample_documents > It is not about duplicating the Context garden site but to collect code in a > place where we could gradually fix possible errors or introduce improvements. This can be done on the wiki as well. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupitemize[indentnext=auto] broken?
On Mon, 17 Apr 2023, Hans Hagen via ntg-context wrote: > On 4/17/2023 7:06 AM, Aditya Mahajan via ntg-context wrote: > > On Sun, 16 Apr 2023, Aditya Mahajan via ntg-context wrote: > > > >> On Sat, 15 Apr 2023, Jim via ntg-context wrote: > >> > >>> % > >>> > >>> \setupindenting[medium,yes] > >>> \setupitemize[indentnext=auto] > >>> > >>>\startitemize > >>> \item One > >>>\stopitemize > >>> > >>>This paragraph should be indented - due to the blank line after > >>>\type{\stopitemize}. > >>> > >>>\startitemize > >>> \item Two > >>>\stopitemize > >>>This paragraph should not be indented. > >>> > >>> % > >> Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is > >> going wrong. > > > > `indentnext=auto` doesn't appear to work for any environment. > can you test with this patch This works on with the 3-4 test examples that I had but ... > \permanent\protected\protected\def\spac_indentation_check_next_indentation ^ Is that a typo (double \protected)? I tested with a single \protected and that also works. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupitemize[indentnext=auto] broken?
On Sun, 16 Apr 2023, Aditya Mahajan via ntg-context wrote: > On Sat, 15 Apr 2023, Jim via ntg-context wrote: > > > % > > > > \setupindenting[medium,yes] > > \setupitemize[indentnext=auto] > > > > \startitemize > > \item One > > \stopitemize > > > > This paragraph should be indented - due to the blank line after > > \type{\stopitemize}. > > > > \startitemize > > \item Two > > \stopitemize > > This paragraph should not be indented. > > > > % > Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is > going wrong. `indentnext=auto` doesn't appear to work for any environment. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupitemize[indentnext=auto] broken?
On Sat, 15 Apr 2023, Jim via ntg-context wrote: > In the wiki page https://wiki.contextgarden.net/Indentation there is the > following example: > > % > > \setupindenting[medium,yes] > \setupitemize[indentnext=auto] > > \startitemize > \item One > \stopitemize > > This paragraph should be indented - due to the blank line after > \type{\stopitemize}. > > \startitemize > \item Two > \stopitemize > This paragraph should not be indented. > > % > > Tragically, the paragraph which claims it should be indented is not, in > both my test and the wiki page itself. > > Is this a documentation bug, a ConTeXt bug, or something else yet? Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is going wrong. Aditya (who wrote bulk of that wiki page) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Feynman Diagrams
On Wed, 12 Apr 2023, Gavin via ntg-context wrote: > Hi Aditya, > > > Have you tried using feynmp (the metapost macros) directly instead of the > > LaTeX wrapper? Can you create an example that works with metapost but fails > > in ConTeXt? > > No, I’m not sure how to do that. I looked at the manual, and it has some > examples where new styles are written in MetaPost, but every diagram is drawn > with the LaTeX wrapper. I looked in the source files, and maybe feynmf.dtx > has everything to produce documentation for the MetaPost macros, but if so, > I’m not sure how to generate that documentation. > > Can you point me to an example that works with metapost macros directly? I have never used feynMP, so I am just copy-pasting an example from https://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/feynmp/fmfsamples.pdf \documentclass{article} \usepackage{feynmp} \begin{document} \unitlength = 1mm \begin{fmffile}{simple} \begin{fmfgraph}(40,25) \fmfleft{i1,i2} \fmfright{o1,o2} \fmf{fermion}{i1,v1,o1} \fmf{fermion}{i2,v2,o2} \fmf{photon}{v1,v2} \end{fmfgraph} \end{fmffile} \end{document} This creates a file simple.mp in the same directory (kind of like the old mkii way of including MP in context): % simple.mp -- do not edit, generated automatically by test1.tex input feynmp require_RCS_revision "1.30"; beginchar(1, 40*2.84526pt#, 25*2.84526pt#, 0); "feynmf: 1"; LaTeX_unitlength:=2.84526pt; subgraph (0, 0, w, h); vinit; pickup pencircle scaled thin; vleft (__i1, __i2); vright (__o1, __o2); vconnect ("fermion", __i1, __v1, __o1); vconnect ("fermion", __i2, __v2, __o2); vconnect ("photon", __v1, __v2); vfreeze; vdraw; endsubgraph; endchar; % the end. end. endinput; So, I created a context file: \startMPinclusions input feynmp; require_RCS_revision "1.30"; \stopMPinclusions \starttext \startMPpage beginchar(1, 40*2.84526pt#, 25*2.84526pt#, 0); "feynmf: 1"; LaTeX_unitlength:=2.84526pt; subgraph (0, 0, w, h); vinit; pickup pencircle scaled thin; vleft (__i1, __i2); vright (__o1, __o2); vconnect ("fermion", __i1, __v1, __o1); vconnect ("fermion", __i2, __v2, __o2); vconnect ("photon", __v1, __v2); vfreeze; vdraw; endsubgraph; endchar; \stopMPpage \stoptext but compiling that fails with metapost> trace > metapost> trace > loading metafun for lmtx, including the plain 1.004 base definitions metapost> trace > metafun > log > metafun > log > error: Isolated expression metafun > log > metapost> trace > 1 metapost> trace > # metafun > log > metafun > log > I couldn't find an '=' or ':=' after the expression that is shown above this error message, so I guess I'll just ignore it and carry on. metafun > log > metapost> trace > bp# := bp; metapost> trace > My guess is that it could be something to do with bp# being used as a variable, but I am not 100% sure on that. In principle, it should be easier to adapt the feynmp.mp (attached) code to make it work with LMTX. The feynmp.sty package, simply provide a high level macro wrapper around this mp code, and it is relatively simply to do something similar in context; but the MP file isn't that different from the latex code anyways. Aditya%% %% This is file `feynmp.mp', %% generated with the docstrip utility. %% %% The original source files were: %% %% feynmf.dtx (with options: `base,mp') %% %% Copyright (C) 1989, 1990, 1992-1995 by thorsten@physik.th-darmstadt.de %% %% This file is NOT the source for feynmf, because almost all comments %% have been stripped from it. It is NOT the preferred form of feynmf %% for making modifications to it. %% %% Therefore you can NOT redistribute and/or modify THIS file. You can %% however redistribute the complete source (feynmf.dtx and feynmf.ins) %% and/or modify it under the terms of the GNU General Public License as %% published by the Free Software Foundation; either version 2, or (at %% your option) any later version. %% %% As a special exception, you can redistribute parts of this file for %% the electronic distribution of scientific papers, provided that you %% include a short note pointing to the complete source. %% %% Feynmf is distributed in the hope that it will be useful, but %% WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %% %% \CheckSum{924} %% \CharacterTable %% {Upper-case
Re: [NTG-context] Feynman Diagrams
On Wed, 12 Apr 2023, Gavin via ntg-context wrote: > Hi Hans, Alan, Mikael, and other Feynman fans, > > I do think Alan's node module could do a good job with this. > > > It would be nice to have a not too complicated syntax, but maybe just have > > some of the > > "shapes" of paths available. So, which ones are actually needed? > > I think the needed shapes are: > - dashed or dotted paths already built into MetaPost > - paths that are wiggly, zig-zag or coiled > - optional arrows on the paths > - optional dots or blobs at the connecting points > > This is plenty for someone doing Standard Model physics. Model builders doing > supersymmetric, walking-technicolor, bla-bla need more, of course, but I’d > let them program their own shapes. > > The package feynMP already has all of these paths, as well as double-line > variants, coded in MetaPost. If I could use feynMP with ConTeXt, that’s what > I’d do. It produces very nice diagrams. Have you tried using feynmp (the metapost macros) directly instead of the LaTeX wrapper? Can you create an example that works with metapost but fails in ConTeXt? Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex
On Mon, 10 Apr 2023, Carlos via ntg-context wrote: > I'm just following some of the standalone installation instructions > as per the wiki alongside a TeX Live installation, but there are a > few things that don't add up or I can't seem to add them up :). > > first, while I was trying to mtxrun --generate it returned > > /usr/bin/env texlua no such file or directory > > So I thought heck, perhaps by creating a symbolic link we'll call it > a day, but that wasn't enough, nope. > > This is is circa 21st century ladies and gentlemen! > > so I thought, alright, since there seems ot be a a problem with texlua, > let's also add it to path somehow. Did you source the `setuptex` script, which sets the correct path. > So with that out of the way, we'll move on to the next step and change > to a directory and try to call out mtxrun --generate again > > It returns: > > mtxrun --generate resolvers | resolving | variable 'SELFAUTOLOC' > set to '/home/ce/context/bin' resolvers | resolving | variable This appears to be the wrong mtxrun binary. You should include the PATH variable listed as part of the installation. It should point to `/home/ce/context/texmf-linux-64/bin` or something similar. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz error upgrading to texlive version (artix)
On Fri, 31 Mar 2023, Hans Hagen via ntg-context wrote: > On 3/30/2023 11:56 PM, Xavier B. via ntg-context wrote: > > Thanks, Max, for finding the problem. It is related to two more bugs: > > https://github.com/pgf-tikz/pgf/issues/990 > > and > > https://github.com/pgf-tikz/pgf/issues/958 > > > > Perhaps Hans or other people could help tikz staff to do the pending and > > definitive solution. > > It's annoying to have to put workarrounds in production documents. > > > > There is just a glad mkiv user ;-) > \usemodule[tikz] > > \starttext > Hello World. > \stoptext > > works ok here Last time I tested, a simple \starttikzpicture \draw (0,0)--(1,0); \stoptikzpicture was failing. I'll try again with the latest version of LMTX + TikZ. Hans, are you using the latest version of tikz from ctan? Some of these issues are due to recent changes made in tikz. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] tikz error upgrading to texlive version (artix)
On Thu, 30 Mar 2023, Xavier B. via ntg-context wrote: > Thanks, Max, for finding the problem. It is related to two more bugs: > https://github.com/pgf-tikz/pgf/issues/990 > and > https://github.com/pgf-tikz/pgf/issues/958 > > Perhaps Hans or other people could help tikz staff to do the pending and > definitive solution. > It's annoying to have to put workarrounds in production documents. > > There is just a glad mkiv user ;-) I reported that tikz is not working a few months ago, but after a few back and forth with Hans, could not get it to work. At that time, it appeared that I was the only have having issues, so I thought that I was making a mistake in how I was installing the package. I have reverted to using mkiv for my course notes, because I heavily use pgfplots and that is not working in LMTX. (I was also using some nice new features of metafun, and have had to resort to compiling them externally using LMTX via the filter module and compiling the main doc with MkIV). Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Description together with itemize, luametatex
On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote: > Hi, > > I'm trying to use a description environment in conjunction with an > itemize with the latest luametatex. Is this supposed to work? > > Here is an MWE: > ``` > \definedescription[desc][headstyle=bold] > > \starttext > Foo > > \desc{Some title} Some text > \startitemize > \item Some item > \stopitemize > > \stoptext Use \startdesc ... \stopdesc \definedescription[desc][headstyle=bold] \starttext Foo \startdesc[title={Some title}] Some text \startitemize \item Some item \stopitemize \stopdesc \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Visual highlighted text with title, mix of enumeration and framedtext
On Mon, 6 Mar 2023, Henning Hraban Ramm via ntg-context wrote: > Am 06.03.23 um 12:19 schrieb Gerion Entrup via ntg-context: > > I want to typeset a "Good to know" section that is visually highlighted > > and can spawn across multiple pages. > > > > In LaTeX this would be possible with the mdframed package. See the > > attached screenshot for an example how it might look like (it is copied > > out of page 4: Definition: Inhomogeneous linear of the mdframed > > documentation: > > http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf) > > > > I have searched in the wiki and found \defineenumeration: > > This is near of that what I need. However I explicitly does not need an > > enumeration (so no number or counter). Also I am not sure if I can set a > > background and so on. > > > > The other possibility is \defineframedtext. For example this goes much > > in the direction that I want: > > \definecolor[gbackground][s=0.98] > > \defineframedtext[gtk][frame=on, > > offset=5pt, > > background=color, > > width=0.95\textwidth, > > backgroundcolor=gbackground] > > > > However, there does not seem a possibility to define a title and it > > seems to not work on multiple pages. > > > > Is there a mix of an enumeration and framedtext that can produce > > something like in the attached picture? > > If you don’t need an enumeration, then don’t use one. > > Did you try text backgrounds? > https://wiki.contextgarden.net/TextBackground As an example, see this article that I had written years ago: https://www.tug.org/pracjourn/2006-4/mahajan/ The solution environment there is similar to what you want. Most of the code there should still work with minor changes. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Aaligned numbers in a matrix?
On Mon, 27 Feb 2023, Bruce Horrocks via ntg-context wrote: > I'm using the following MWE to produce a matrix: > > \definemathmatrix[bmatrix] > [matrix:brackets] > [simplecommand=bmatrix] > \starttext > $ a \rightarrow > \bmatrix{1, 2, 3, 4; >2, 1, 4, 3; >3,-4, 1,-2; >4,-3, 2,-1} $ > \stoptext > > The columns with negative numbers in are centred and I would rather have them > right-aligned so that the digits stack up above each other and the negative > signs stick out to the left, so to speak. Is there an easy way to achieve > this? You can right align all columns, though I am not sure that this looks better, because column 2 and 3 now appear to be "too close". \definemathmatrix[bmatrix] [matrix:brackets] [align=all:right,simplecommand=bmatrix] \starttext $ a \rightarrow \bmatrix{1, 2, 3, 4; 2, 1, 4, 3; 3,-4, 1,-2; 4,-3, 2,-1} $ \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Math issue
On Thu, 16 Feb 2023, Willi Egger via ntg-context wrote: > Hi math gurus, > > I should typeset a couple of simple math formulae. However I do not get the > desired result. I attach my output as pdf. > > 1. Why is the \times 12 in the denominator although the fraction is grouped? > — I tried also the grouping with bracis, which gives the same result. > 2. Why is the result after the equalsign in the denominator? > > [...] > Thank you for hinting me how to this correctly. Have you tried using \frac{...}{...} instead of {... \over ...} Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)
On Fri, 27 Jan 2023, Hans Hagen via ntg-context wrote: > On 1/27/2023 6:26 PM, Otared Kavian via ntg-context wrote: > > Hi Hans, > > > > Thank you for the hint: indeed > > \setupmathematics[collapsing=2] > > does exactly what I was looking for… > > > > Now, like many others, I am just waiting for the 3145 pages document about > > maths in ConTeXt :-) > It will be 3147 because we need to demo No, it has to be 31415 pages now (so that the number of pages eventually converges to pi)! Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Aditya Mahajan via ntg-context wrote: > On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > > > make sure to get rid of the t-tikz modules > > Tested again. Downloaded the latest context and pgf.tds.zip from ctan. Unizip > pgf by using 'unzip -x "**/t-*.*" so that no t- modules from tikz are > unzipped but still get the following error on a simple hello world example: > > \usemodule[tikz] > > \starttext > Hello > \stoptext > > gives the attached log. FWIW, the above example also fails on 2023.01.24 (with latest tikz from CTAN), with the same error message as in the last log. Could someone else please confirm if that is the case to rule out a misconfiguration/bug in my local install. Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Aditya Mahajan via ntg-context wrote: > On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > > > make sure to get rid of the t-tikz modules > > Tested again. Downloaded the latest context and pgf.tds.zip from ctan. Unizip > pgf by using 'unzip -x "**/t-*.*" so that no t- modules from tikz are > unzipped but still get the following error on a simple hello world example: > > \usemodule[tikz] > > \starttext > Hello > \stoptext > > gives the attached log. In case anyone else needs a temp workaround until this is resolved: \usemodule[filter] \startbuffer[tikz-start] \usemodule[tikz] % Add font setup % Add tikz setup \starttext \startTEXpage \starttikzpicture \stopbuffer \startbuffer[tikz-stop] \stoptikzpicture \stopTEXpage \stoptext \stopbuffer \defineexternalfilter [tikzpicture] [ filter=context --luatex --once, cache=yes, output=\externalfilterbasefile.pdf, readcommand=\IncludeTikzPicture, bufferbefore=tikz-start, bufferafter=tikz-stop, ] \define[1]\IncludeTikzPicture{\externalfigure[#1]} \starttext Hello \starttikzpicture \draw (0,0) -- (1,1); \stoptikzpicture \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > make sure to get rid of the t-tikz modules Tested again. Downloaded the latest context and pgf.tds.zip from ctan. Unizip pgf by using 'unzip -x "**/t-*.*" so that no t- modules from tikz are unzipped but still get the following error on a simple hello world example: \usemodule[tikz] \starttext Hello \stoptext gives the attached log. Does the latest pgf/tikz run at your end? Adityajob > passes > version mismatch: 1.32 <> 1.33 system > system > ConTeXt ver: 2023.01.15 14:04 LMTX fmt: 2023.1.16 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './test', input './test.tex', result './test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './test.tex' modules > 'tikz' is loaded open source > level 2, order 3, name '/opt/luametatex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 3, order 4, name 'pgfutil-common.tex' close source> level 3, order 4, name 'pgfutil-common.tex' open source > level 3, order 5, name 'pgfutil-context.def' close source> level 3, order 5, name 'pgfutil-context.def' open source > level 3, order 6, name 'pgfrcs.code.tex' open source > level 4, order 7, name 'pgf.revision.tex' close source> level 4, order 7, name 'pgf.revision.tex' close source> level 3, order 7, name 'pgfrcs.code.tex' open source > level 3, order 8, name 'pgfsys.code.tex' open source > level 4, order 9, name 'pgfkeys.code.tex' open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 4, order 10, name 'pgfkeys.code.tex' cld > stack > cld > stack > use : slot = context.functions.register(f) cld > stack > and : context.functions.unregister(slot) cld > stack > open source > level 4, order 11, name 'pgf.cfg' close source> level 4, order 11, name 'pgf.cfg' Driver file for pgf: pgfsys-luatex.def open source > level 4, order 12, name 'pgfsys-luatex.def' open source > level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 4, order 13, name 'pgfsys-luatex.def' open source > level 4, order 14, name 'test.pgf' close source> level 4, order 14, name 'test.pgf' close source> level 3, order 14, name 'pgfsys.code.tex' open source > level 3, order 15, name 'pgfkeys.code.tex' close source> level 3, order 15, name 'pgfkeys.code.tex' open source > level 3, order 16, name 'pgfsyssoftpath.code.tex' close source> level 3, order 16, name 'pgfsyssoftpath.code.tex' open source > level 3, order 17, name 'pgfsysprotocol.code.tex' close source> level 3, order 17, name 'pgfsysprotocol.code.tex' open source > level 3, order 18, name 'pgfcore.code.tex' open source > level 4, order 19, name 'pgfmath.code.tex' open source > level 5, order 20, name 'pgfmathutil.code.tex' close source> level 5, order 20, name 'pgfmathutil.code.tex' open source > level 5, order 21, name 'pgfmathparser.code.tex' close source> level 5, order 21, name 'pgfmathparser.code.tex' open source > level 5, order 22, name 'pgfmathfunctions.code.tex' close source> level 5, order 22, name 'pgfmathfunctions.code.tex' open source > level 5, order 23, name 'pgfmathfunctions.basic.code.tex' close source> level 5, order 23, name 'pgfmathfunctions.basic.code.tex' open source > level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' close source> level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' open source > level 5, order 25, name 'pgfmathfunctions.random.code.tex' close source> level 5, order 25, name 'pgfmathfunctions.random.code.tex' open source > level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' close source> level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' open source > level 5, order 27, name 'pgfmathfunctions.base.code.tex' close source> level 5, order 27, name 'pgfmathfunctions.base.code.tex' open source > level 5, order 28, name 'pgfmathfunctions.round.code.tex' close source> level 5, order 28, name 'pgfmathfunctions.round.code.tex' open source > level 5, order 29, name 'pgfmathfunctions.misc.code.tex' close source> level 5, order 29, name 'pgfmathfunctions.misc.code.tex' open source > level 5, order 30, name
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Henri Menke via ntg-context wrote: > On Mon, 2023-01-16 at 11:56 -0500, Aditya Mahajan wrote: > > > > On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > > > > > just load tikz first so that the right loader helpers are there > > > > > > \usemodule[tikz] > > > \usemodule[pgfplots] > > > > > > \starttext > > > Hello > > > \stoptext > > > > > > seems to work here > > > > I did a fresh install of context and downloaded the latest version of > > pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz: > > > > \usemodule[tikz] > > > > \starttext > > Hello > > \stoptext > > > > gives the attached log file. Not sure what changed on the tikz end. > > That's most likely due to > > https://github.com/pgf-tikz/pgf/issues/1062 > https://github.com/pgf-tikz/pgf/pull/1073 > > but this MWE > > \catcode`\@=11 > > \begingroup > \lccode`\~=`\" > \lowercase{\endgroup > \def\pgfmath@catcodes{% > \catcode`\==12 % > \catcode`\,=12 % > \catcode`\|=12 % > \catcode`\&=12 % > \let~\pgfmath@char@quote > }}% > > {\pgfmath@catcodes "} > > \bye > > works in Knuth TeX, so it's likely not our fault. I haven't looked pgf core in a while, but does it make sense to just redefine all the catcode jugglery in pgf as a catcodetable in m-tikz.mkxl? Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > just load tikz first so that the right loader helpers are there > > \usemodule[tikz] > \usemodule[pgfplots] > > \starttext > Hello > \stoptext > > seems to work here I did a fresh install of context and downloaded the latest version of pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz: \usemodule[tikz] \starttext Hello \stoptext gives the attached log file. Not sure what changed on the tikz end. Thanks, Aditya system > system > ConTeXt ver: 2023.01.15 14:04 LMTX fmt: 2023.1.16 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './test', input './test.tex', result './test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './test.tex' modules > 'tikz' is loaded open source > level 2, order 3, name '/opt/luametatex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 3, order 4, name 'pgfutil-common.tex' close source> level 3, order 4, name 'pgfutil-common.tex' open source > level 3, order 5, name 'pgfutil-context.def' close source> level 3, order 5, name 'pgfutil-context.def' open source > level 3, order 6, name 'pgfrcs.code.tex' open source > level 4, order 7, name 'pgf.revision.tex' close source> level 4, order 7, name 'pgf.revision.tex' close source> level 3, order 7, name 'pgfrcs.code.tex' open source > level 3, order 8, name 'pgfsys.code.tex' open source > level 4, order 9, name 'pgfkeys.code.tex' open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 4, order 10, name 'pgfkeys.code.tex' cld > stack > cld > stack > use : slot = context.functions.register(f) cld > stack > and : context.functions.unregister(slot) cld > stack > open source > level 4, order 11, name 'pgf.cfg' close source> level 4, order 11, name 'pgf.cfg' Driver file for pgf: pgfsys-luatex.def open source > level 4, order 12, name 'pgfsys-luatex.def' open source > level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 4, order 13, name 'pgfsys-luatex.def' open source > level 4, order 14, name 'test.pgf' close source> level 4, order 14, name 'test.pgf' close source> level 3, order 14, name 'pgfsys.code.tex' open source > level 3, order 15, name 'pgfkeys.code.tex' close source> level 3, order 15, name 'pgfkeys.code.tex' open source > level 3, order 16, name 'pgfsyssoftpath.code.tex' close source> level 3, order 16, name 'pgfsyssoftpath.code.tex' open source > level 3, order 17, name 'pgfsysprotocol.code.tex' close source> level 3, order 17, name 'pgfsysprotocol.code.tex' open source > level 3, order 18, name 'pgfcore.code.tex' open source > level 4, order 19, name 'pgfmath.code.tex' open source > level 5, order 20, name 'pgfmathutil.code.tex' close source> level 5, order 20, name 'pgfmathutil.code.tex' open source > level 5, order 21, name 'pgfmathparser.code.tex' close source> level 5, order 21, name 'pgfmathparser.code.tex' open source > level 5, order 22, name 'pgfmathfunctions.code.tex' close source> level 5, order 22, name 'pgfmathfunctions.code.tex' open source > level 5, order 23, name 'pgfmathfunctions.basic.code.tex' close source> level 5, order 23, name 'pgfmathfunctions.basic.code.tex' open source > level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' close source> level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' open source > level 5, order 25, name 'pgfmathfunctions.random.code.tex' close source> level 5, order 25, name 'pgfmathfunctions.random.code.tex' open source > level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' close source> level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' open source > level 5, order 27, name 'pgfmathfunctions.base.code.tex' close source> level 5, order 27, name 'pgfmathfunctions.base.code.tex' open source > level 5, order 28, name 'pgfmathfunctions.round.code.tex' close source> level 5, order 28, name 'pgfmathfunctions.round.code.tex' open source > level 5, order 29, name 'pgfmathfunctions.misc.code.tex' close source> level 5, order 29, name 'pgfmathfunctions.misc.code.tex' open source > level 5, order 30, name
Re: [NTG-context] pgfplots module wrecks in latest
On Fri, 30 Dec 2022, Hans Hagen via ntg-context wrote: > On 12/30/2022 12:40 AM, Gavin via ntg-context wrote: > > Hi List, > > > > The TikZ related module “pgfplots” is causing a fatal error in the latest > > ConTeXt. Here is a MWE: > > > > > > \usemodule[tikz] > > \usemodule[pgfplots]% PGFPlots module for graphs > > > > \starttext > > > > \starttikzpicture > > \draw (0, 0) circle (3cm); > > \stoptikzpicture > > > > \stoptext > > > > > > Without loading the pgfplots module, this draws a circle. With the > > \usemodule[pgfplots] line, this has the error below before doing anything. > > > > I don’t know when this started happening, because I don’t use pgfplots > > often, but it was probably in the last couple months. > > > > Thanks for all the great updates! > these extra modules have bad loaders ... i'll send you better ones to test pgfplots still appears to be broken in LMTX: \usemodule[pgfplots] \starttext Hello \stoptext gives tex error > tex error on line 521 in file pgfplots.code.tex: Use of \pgfplots@command@to@string@@ doesn't match its definition m acro:colormap \pgfplots@colormap@catcodemagic \pgfplots@command@to@string #1#2->\expandafter \pgfplots@command@to@string@@ \meaning #1 \pgfplots@EOI {#2} \pgfplots@command@to@string\pgfplots@colormap@catcodemagic\pgfplots@colormap@catcodemagic @Hans, could you please send me the new loaders as well and I can test them. Thanks, Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Why does \doifsomething think there is content?
On Sun, 15 Jan 2023, Joel via ntg-context wrote: > I am creating a book that presents readers with a list of recommended > materials. > If materials are listed, then its displayed under the \subject{Materials} > heading in a simple itemized list. > I'm using \doifsomething{} to check if any items are listed. Try \doiftext which typesets the material and checks its width. > The problem I'm having is, when fed a blank macro, `\define\needsoven{}` it > thinks there is content, so it displays the "Materials" heading, but an empty > list. I have a custom macro that determins "if oven is needed" independent of > these other items. So I need `\define\needsoven{}` to be regarded as nothing. \define\needsoven makes \needsoven non-expandable. You either need \defineexpandable\needsoven or use \doiftext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Command line arguments on context project
On Sun, 18 Dec 2022, Alan Braslau via ntg-context wrote: > On Fri, 16 Dec 2022 16:14:33 + > Jethro Djan via ntg-context wrote: > > > 2. How do I get CoTeXt to recognise the ref.bib file when I run the > > components not the product? > > > > For context, I don’t want the references printed at the end of each > > chapter but I would like the in-text citation to work (if that is > > possible). If not, is it possible compile the whole product but only > > output a certain page range? > > You need to include the \usebtxdataset [ref.bib] in an environment file > that gets read each run. > > A limitation, or rather a design goal, of the bibliography subsystem is > that citations will not work unless you render the bibliography list. You can, of course, cheat: \setbox\scratchbox\vbox{\placelistofpublications} > Why is this? The reasoning is that it makes no sense to give list > numbers or list labels (e.g. APA : authoryear) if there is no list, for > these numbers or labels depend on the context (bibliography by chapter, > by part, by volume, or by book, for example). Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \externalfigure problem with displaying external images via https://live.contextgarden.net
On Mon, 5 Dec 2022, Jaroslav Hajtmar via ntg-context wrote: > Does anyone know what the problem might be? Why online ConTeXt is not read my > PDF file and on other side read another PDF file? What does onlineConText not > like? > I need to get my application for printing archive certificates working > again... I am guessing it is a security setting to avoid DOS attack (imagine forcing the server to download a ridiculously large file, etc.). Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] annotated equations
On Thu, 17 Nov 2022, Henning Hraban Ramm via ntg-context wrote: > Here’s an interesting example for annotated equations, done with LaTeX/TikZ: > https://mastodon.social/@sibin/109349703357749846 > > I guess something similar is possible with node anchors in ConTeXt/MetaPost? Yes, this is possible using node anchors and \hpos etc. The interface is slightly cumbersome, mainly because you have to make sure that anchors are unique. I sometimes use such constructs in my presentations, but not often enough to build a nice interface as the latex package provides. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Create the values of a sequence with Lua
On Mon, 31 Oct 2022, Fabrice Couvreur via ntg-context wrote: > Hi, > The idea is to fill the array with the sequence defined by > p(0) = 0.3 and p(n + 1) = 0.3 + 0.7*p(n) > The problem is that I don't really master Lua but I will learn when I have > some time! > Thanks for your help. > Fabrice You just need to adjust the order in which you are doing things... \starttext \startluacode context.startxtable({"align={middle,lohi},width=2cm,bodyfont=9pt"}) local p = {} p[0] = 0.3 for i= 0, 19 do context.startxrow() context.startxcell() context(i) context.stopxcell() -- context.startxcell() context(i+1) context.stopxcell() context.startxcell() context("%0.8f", p[i]) context.stopxcell() context.stopxrow() p[i+1] = 0.3 + 0.7*p[i] end context.stopxtable() \stopluacode \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] What to do when ConTeXt not revealing the error details?
On Mon, 31 Oct 2022, Joel via ntg-context wrote: > I found what it was, a % in the text preventing a \stopitemize to close a > list. Thanks! --Joel mtxrun concheck filename is very useful in such situations. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] new upload
On Mon, 17 Oct 2022, Hans Hagen via ntg-context wrote: > On 10/17/2022 3:38 AM, Aditya Mahajan via ntg-context wrote: > > On Sun, 16 Oct 2022, Mikael Sundqvist via ntg-context wrote: > > > >> Hi, > >> > >> On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context > >> wrote: > >>> > >>> On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote: > >>> > >>>> Hi, > >>>> > >>>> I uploaded a new version. Apart from a few fixes / extensions already > >>>> mentioned here (or known to those who wanted it) the main changes are in > >>>> the math goodie files (work in progress, we will clean them up later) as > >>>> part of improving the rendering of math. > >>> > >>> Something is wrong with the placement of limits around an integral with > NeoEuler: > >>> > >>> \usetypescriptfile[euler] > >>> > >>> \definetypeface[mainfont][rm][specserif][CharisSil][default] > >>> \definetypeface[mainfont][mm][math] [eulernova][default] > >>> \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, > features=none] > >>> \setupbodyfont[mainfont,10pt] > >>> > >>> \starttext > >>> \startTEXpage[offset=1mm] > >>>$\displaystyle \int_{0}^{1} f(x) dx$ > >>> \stopTEXpage > >>> \stoptext > >>> > >>> gives the attached result. > >> > >> This is because the integral "sits wrong" in its boundingbox. Almost > >> all fonts have the glyph centered around the math axis, but there are > >> a few that doesn't. In euler-math.lfg, add the tweak > >> > >> { > >> tweak = "fixoldschool", > >> }, > > > > This fixes the issue with eulernova, but not with pagellaovereuler. > pagellaovereuler uses euler-with-pagella-math as a goodie file, but that is > missing from the distribution. (I simply copied euler-math.lfg for my use > case). > > > > With tweak=fixoldschool, \startcases doesn't work correctly (see attached): > > > > \usetypescriptfile[euler] > > > > \definetypeface[mainfont][rm][specserif][CharisSil][default] > > \definetypeface[mainfont][mm][math] [eulernova][default] > > \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, > features=none] > > \setupbodyfont[mainfont,10pt] > > > > \starttext > > \startTEXpage[offset=1mm] > >\startformula > > \startcases > >\NC A \NC B \NR > >\NC C \NC D \NR > > \stopcases > >\stopformula > > \stopTEXpage > > \stoptext > > Looks like some older experimental value is wrong: > > parameters = { > -- DelimiterPercent= 901, > DelimiterShortfall = 500, > }, > > (that whole lfg is a todo) Thanks. This fixes the delimiters. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] new upload
On Sun, 16 Oct 2022, Mikael Sundqvist via ntg-context wrote: > Hi, > > On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context > wrote: > > > > On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote: > > > > > Hi, > > > > > > I uploaded a new version. Apart from a few fixes / extensions already > > > mentioned here (or known to those who wanted it) the main changes are in > > > the math goodie files (work in progress, we will clean them up later) as > > > part of improving the rendering of math. > > > > Something is wrong with the placement of limits around an integral with > > NeoEuler: > > > > \usetypescriptfile[euler] > > > > \definetypeface[mainfont][rm][specserif][CharisSil][default] > > \definetypeface[mainfont][mm][math] [eulernova][default] > > \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, > > features=none] > > \setupbodyfont[mainfont,10pt] > > > > \starttext > > \startTEXpage[offset=1mm] > > $\displaystyle \int_{0}^{1} f(x) dx$ > > \stopTEXpage > > \stoptext > > > > gives the attached result. > > This is because the integral "sits wrong" in its boundingbox. Almost > all fonts have the glyph centered around the math axis, but there are > a few that doesn't. In euler-math.lfg, add the tweak > > { > tweak = "fixoldschool", > }, This fixes the issue with eulernova, but not with pagellaovereuler. pagellaovereuler uses euler-with-pagella-math as a goodie file, but that is missing from the distribution. (I simply copied euler-math.lfg for my use case). With tweak=fixoldschool, \startcases doesn't work correctly (see attached): \usetypescriptfile[euler] \definetypeface[mainfont][rm][specserif][CharisSil][default] \definetypeface[mainfont][mm][math] [eulernova][default] \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, features=none] \setupbodyfont[mainfont,10pt] \starttext \startTEXpage[offset=1mm] \startformula \startcases \NC A \NC B \NR \NC C \NC D \NR \stopcases \stopformula \stopTEXpage \stoptext Aditya test.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] new upload
On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote: > Hi, > > I uploaded a new version. Apart from a few fixes / extensions already > mentioned here (or known to those who wanted it) the main changes are in > the math goodie files (work in progress, we will clean them up later) as > part of improving the rendering of math. Something is wrong with the placement of limits around an integral with NeoEuler: \usetypescriptfile[euler] \definetypeface[mainfont][rm][specserif][CharisSil][default] \definetypeface[mainfont][mm][math] [eulernova][default] \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, features=none] \setupbodyfont[mainfont,10pt] \starttext \startTEXpage[offset=1mm] $\displaystyle \int_{0}^{1} f(x) dx$ \stopTEXpage \stoptext gives the attached result. Thanks, Aditya test.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers
On Tue, 11 Oct 2022, Leah Neukirchen via ntg-context wrote: > Hans Hagen via ntg-context writes: > > Once we're confident that we can catch it Leah (who does the low level > > introspective testing with viewers, printers and tools) likely will > > report on it and there will be a test file for users to test if what > > we do is okay before we apply the safeguard. > > There's a write up now on the issue: > https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-debugging-of-pdf-rendering-in-printers.html Wow, that was quite a ride. Kudos on getting to the bottom of this! Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Math alignment question
On Thu, 22 Sep 2022, Jeong Dal via ntg-context wrote: > Dear Mikael and Hans, > > Recently, you introdued the new command “\alignhere, \breakhere, \skiphere” > which works fine. > > Since I usually use the following code that is adopted from My > Way(Mathalign.pdf), I’d like to know that there is a way to use “\alignhere, > \breakhere, \skiphere” for the case below? > > \startformula\startalign > \NC A \NC = 3 \NR > \NC B \NC = 5 \NR > \stopalign\stopformula The way I see it is that the current implementation is that it is way to break a _single_ long equation to multiple lines. For multiple equations, you still need to use the \startalign method. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Merging two lua tables
On Mon, 29 Aug 2022, Hans Hagen via ntg-context wrote: > On 8/29/2022 2:20 PM, Aditya Mahajan via ntg-context wrote: > > Hi, > > > > How do I merge two lua tables? I believe that table.merge or table.merged > should do the trick, but I cannot figure out how to use them. > > > > ``` > > local t1 = { 1, 2 } > > local t2 = { 8, 9 } > > > > local m1 = {} > > table.merge(m1,t1, t2) > > table.print(m1) > > > > local m2 = table.merged(t1, t2) > > table.print(m2) > > ``` > > > > Processing the file with context filename shows that both m1 and m2 are {8, > 9}. What am I missing. > table.imerge(m1,t1, t2) Ah, thanks! Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Merging two lua tables
On Mon, 29 Aug 2022, Aditya Mahajan via ntg-context wrote: > Hi, > > How do I merge two lua tables? I believe that table.merge or table.merged > should do the trick, but I cannot figure out how to use them. > > ``` > local t1 = { 1, 2 } > local t2 = { 8, 9 } > > local m1 = {} > table.merge(m1,t1, t2) > table.print(m1) > > local m2 = table.merged(t1, t2) > table.print(m2) > ``` > > Processing the file with context filename shows that both m1 and m2 are {8, > 9}. What am I missing. Looking at the code, I see what is happening. table.merge(d) assume that the tables are key-value tables so the keys of the first table are silently overwritten by the send. I guess, I'll have to write my own function to merge "array" tables. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Merging two lua tables
Hi, How do I merge two lua tables? I believe that table.merge or table.merged should do the trick, but I cannot figure out how to use them. ``` local t1 = { 1, 2 } local t2 = { 8, 9 } local m1 = {} table.merge(m1,t1, t2) table.print(m1) local m2 = table.merged(t1, t2) table.print(m2) ``` Processing the file with context filename shows that both m1 and m2 are {8, 9}. What am I missing. Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
On Mon, 22 Aug 2022, amano.kenji via ntg-context wrote: > Wuh. That's a bit complex. If you are packaging any flavor of TeX, you need to understand TDS (TeX Directory Structure): https://tug.org/tds/ ConTeXt distributions are TDS compatible, but simplify certain aspects. Essentially, context LMTX is distributed as a collection of TDS trees (texmf, texmf-context, texmf-linux, etc.) which separate the files according to their role. The purpose of texmfcnf.lua is to tell the binary about the location of the different trees. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Clipping multiple PDFs
On Tue, 23 Aug 2022, Pablo Rodriguez via ntg-context wrote: > On 8/23/22 17:27, Aditya Mahajan via ntg-context wrote: > > [...] > > For a more low-level interface to finding the number of pages, see: > > > > https://adityam.github.io/context-blog/post/include-multi-page-pdf/ > > Hi Aditya, > > I wonder whether your final definition should be rewritten as: > > \unexpanded\def\includePDF[#1]% > {\getfiguredimensions[#1] > \dorecurse{\noffigurepages} > {\startTEXpage > \externalfigure[#1][page=\recurselevel] > \stopTEXpage}} > > At least, otherwise it will only work with "talk.pdf". > > Or am I missing something? Thanks. That was a typo and is now fixed. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Clipping multiple PDFs
On Mon, 22 Aug 2022, Jethro Djan via ntg-context wrote: > > Thanks for the solution Pablo. It works well. > > I wanted to add more pdfs (which also has many pages) and found it was easier > for me to reason in the lua side of things. This is what I have at the moment: > > \starttext > \startluacode > local function doc(fil) > return fil..[[.pdf]] > end > > local function disppdf(fname) > n = 1 > repeat > context.externalfigure({fname},{ > page = n, > width = "200mm", > scale = "950" > }) > n = n + 1 > until n == context(context.noffigurepages) > end > > local pdffiles = {"ass1", "ass2", "ass3", "ass4", "ass5", "ass6", "ass7", > "ass8"} > for index=1,#pdffiles do > local f = doc(pdffiles[index]) > context.getfiguredimensions({f}) > disppdf(pdffiles[index]) > end > \stopluacode > \stoptext > > I didn’t know how to get an array (or indexed table or whatever you call it) > in ConTeXt/Tex. My problem is now with context(context.noffigurepages). It > doesn’t produce an integer so n is being compared to nil. Am I calling it > wrong? All I want to do is call \noffigurepages from the lua side. Is there > something I am missing? For a more low-level interface to finding the number of pages, see: https://adityam.github.io/context-blog/post/include-multi-page-pdf/ Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Special numbering
On Wed, 17 Aug 2022, Fabrice Couvreur via ntg-context wrote: > Hello, > how to get this > Définition 1.1. > Proposition 1.2. > Définition 1.3. > Proposition 1.4. > > Thanks > Fabrice > > \setupenumerations > [before={\blank}, >after={\blank}, >alternative=serried, >distance=0.5em, >title=yes, >titleleft=, >titleright=, >titlestyle=normal, >prefix=yes, >prefixsegments=chapter, >way=bychapter, >headcommand=\groupedcommand{}{.}, >numbercommand=\groupedcommand{}{}, >titlecommand=\groupedcommand{(}{)}, >width=broad] > > \defineenumeration >[definition] >[text=Définition, > number=yes, > style=italic] > > \defineenumeration >[proposition] >[text=Proposition, > number=yes, Add: counter=definition, > style=italic] Now, definition and proposition share the same counter. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)
On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote: > 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 sure that line breaks work properly) Does something like this work: https://wiki.contextgarden.net/Verbatim_XML Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns
On Fri, 12 Aug 2022, Marcin Ciura via ntg-context wrote: > Dear list, > > I am typesetting [nothyphenated,flushleft] text in two columns. Some words > stick through the right margin of the left column, sometimes even > overlapping the right column. How can I make Context obey the right margin? (Untested): Try adding 'tolerant' or 'verytolerant' to the align options. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to display these characters
On Tue, 9 Aug 2022, Henning Hraban Ramm via ntg-context wrote: > Am 09.08.22 um 18:57 schrieb Wolfgang Schuster via ntg-context: > > Henning Hraban Ramm via ntg-context schrieb am 09.08.2022 um 16:51: > >> I actually never really looked into the nodes module, but I guess that > >> would work. > > > > There is a simple LaTeX / plain TeX package [1] for this but I don't > > know if the plain TeX version works with ConTeXt. > > [1] https://www.ctan.org/pkg/dirtree > > That is advertised as “like Windows Explorer”, so I expected folder and > file icons, but it makes quite ugly lines with square nodes. Looking at the documentation, it appears that the size of the square node is configurable. So, if you set the size to be the same as line width, the square will be invisible. > Line drawing glyphs look better IMO, and the MP nodes module is probably > even better, but I need to try... It should be relatively easy to write a function that draws such trees without using any module as well. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] update
Hi, I cannot view the onandon.pdf manual. pdfinfo says that it a malformed PDF. Aditya On Fri, 5 Aug 2022, Hans Hagen via ntg-context wrote: > Hi, > > I uploaded a new lmtx that fixes a few math issues reported. > > Hans > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
On Sun, 24 Jul 2022, Mikael Sundqvist via ntg-context wrote: > Dear list, > > I just noticed that Hans made a new release (thanks Taco for these > cron'd emails!). > > I attach to this email somemoreformulas.tex, with some additional > examples to the previous ones, with tests/examples on issues people > had with the previous release. If there still are problems, please > tell! > > I finally shamelessly provide a link to the slides of the talk on math > in ConTeXt at tug that I just gave: > https://www.maths.lth.se/matematiklth/personal/mickep/mps-tug.pdf. I > guess there will be a video available in due time, (check > https://tug.org/tug2022/). Very nice presentation! Lots of new features to play with. Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] upload
On Wed, 6 Jul 2022, Hans Hagen via ntg-context wrote: > We're pleased to announce the first official release of the new math > code. We're talking of: > > -- a reworked math engine (which happened stepwise so some already > trickled into previous uploads) > > -- settling on one model for display math but with alignment variants as > well as improving inline math (e.g. wrt linebreaks) > > -- redoing bit of the (sub) numbering > > -- improving the alignment features (the traditional one and the > text/page mode one) > > -- fixing the math font using all kind of tweaks in the goodie file > > -- providing means to annotate formulas > > -- we ditched support for \over simply because it is too fragile wrt > spacing (one can \usemodule[oldmath] to get it back > > -- we might move some more alien stuff to m-oldmath in due time I played around with it a bit, and everything looks really nice! Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost label font size
On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > How can I change the font size of labels within one picture? (Untested): See https://www.contextgarden.net/Command/setupMPinstance \setupMPinstance[metafun][textstyle=sans] Or define a new instance, which sets the textstyle to sans. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost cutdraw
On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > Hi, I’m trying to understand MetaPost better. > > I’d like to draw a fat line that’s cut at its end points. You mean like linecap = butt? \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); interim linecap := butt; draw p withpen pencircle scaled 5mm; p := p shifted (0,2cm); interim linecap := rounded; draw p withpen pencircle scaled 5mm; p := p shifted (0,2cm); interim linecap := squared; draw p withpen pencircle scaled 5mm; \stopMPpage > I learned, “cutdraw” should do the trick, but I get a parallelogram > instead of a rectangle. Seems to be something weird with pensquare: \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); % interim linecap := butt; cutdraw p withpen pensquare scaled 5mm; p := p shifted (0,2cm); interim linecap := rounded; draw p withpen pensquare scaled 5mm; p := p shifted (0,2cm); interim linecap := squared; draw p withpen pensquare scaled 5mm; \stopMPpage Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overbar bug
On Mon, 4 Jul 2022, Johann Birnick via ntg-context wrote: > please have a look at the following example: > > \starttext > $\overbar{\alpha} \overbar{\beta}$ > \stoptext > > The first one works just fine, whereas the second one looks very odd. > (At least in MkIV...) > > Any ideas? I don't understand why you are using $\overbar$ in math mode. Do you want $\bar{\alpha}$ and $\bar{\beta}$? Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multiline text in mathmode
On Thu, 30 Jun 2022, Johann Birnick via ntg-context wrote: > I guess you will update to LMTX..? Unfortunately I use MkIV, because of other > math bugs in LMTX. Do you know any (can be ugly) way of doing this without the > new stuff? You could just use a framed. \define[1]\multilinetext{\vcenter{\framed[align=middle,frame=off]{#1}}} \startTEXpage[offset=2mm] \startformula \left\{ \multilinetext{Quaternion algebra over $\rationals$ \\ up to isomorphisms} \right\} \stopformula \stopTEXpage Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] SVG text alignment issue
On Mon, 27 Jun 2022, Thangalin via ntg-context wrote: > In the following example, the line and text should be aligned to the > middle when LMTX converts the SVG figure using MP. (Note that you may have > to install Roboto, but the font isn't the issue.) > > % SOF > \startbuffer[svg] > width="25mm" >height="70mm" >viewBox="0 0 25 70" >xmlns="http://www.w3.org/2000/svg; >xmlns:svg="http://www.w3.org/2000/svg;> > d="m 12.51,63.971412 v -12.4787" > id="path2" > style="fill:none;fill-opacity:1;stroke:#00;stroke-opacity:1" /> > x="-48.831322" > y="15.60547" > id="text4933-8-6" > transform="rotate(-90)" > > > style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;font-family:Roboto;-inkscape-font-specification:'Roboto, > Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">id="tspan159594-1" >x="-48.831322" >y="15.60547" > > > style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;font-family:Roboto;-inkscape-font-specification:'Roboto, > Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">16p13.3 > > \stopbuffer > > \starttext >\placefigure[]{}{\includesvgbuffer[svg][conversion=mp]} > \stoptext > % EOF This has nothing to do with SVG. Looking at the definition of \includesvgbuffer, here is a simpler example illustrating the issue: \starttext \startplacefigure[location=here, title={Test}] \dontleavehmode\begingroup \startMPcode draw fullcircle scaled 2cm; \stopMPcode\endgroup \stopplacefigure \stoptext One way to "fix" the alignment is to wrap everything in an hbox: \placefigure[]{}{\hbox{\includesvgbuffer[svg][conversion=mp]}} Maybe there is a simple way to modify the definition of includesvgbuffer so that an \hbox is not needed. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] lmtx installation paths not working
On Tue, 14 Jun 2022, Jano Kula via ntg-context wrote: > Hello list, > > I cannot make fresh install of lmtx to work. The structure after unzipping: > C:\data\context\bin\beta > C:\data\context\bin\beta\bin > C:\data\context\bin\beta\tex > C:\data\context\bin\beta\tex\texmf > C:\data\context\bin\beta\tex\texmf-cache > C:\data\context\bin\beta\tex\texmf-context > etc. > > First compilation of texfile is not working, so mtxrun --generate is the > friend. > > C:\data>mtxrun --generate It appears that you are running the wrong mtxrun. There should be mtxrun in C:\data\context\beta\texmf-win64\bin (the texmf-win64 directory might be named slightly differently, I haven't used windows in a while). If you add that to your path, then mtxrun --generate should work. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Table of Contents empty for unknown reason
On Sun, 12 Jun 2022, Joel via ntg-context wrote: > I need to display a table of contents, but only displaying chapters. > > Here is my minimum working example: You need to add "criterium=all" to both placelist and completecontent. See below: > \starttext > \startfrontmatter > \startchapter[title={Contents}] > \placelist[chapter][criterium=all] > \stopchapter > \completecontent[criterium=all] > \stopfrontmatter > \startbodymatter > \startchapter[title={Title 1}] > \input knuth > \stopchapter > \stopbodymatter > > \stoptext Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Two minor questions
On Mon, 6 Jun 2022, Stefan Nedeljkovic via ntg-context wrote: > Dear list, > > I have 2 small questions: > > 1. In \setuplayout if I try to set topspace=5\measured{base} + > \dimexpr2bp I get an error. How should I add these 2bp? (Untested) \dimexpr\measure{base}+2bp\relax or \dimexpr\measured{base}+2bp\relax should work. > 2. I have an mp graphic defined in the file "graphic.mp" which has the > exact same dimensions as my page. I'd like to set that graphic as a > background. How do I do this? (Again, untested) \startuseMPgraphic{background-image} input graphic.mp; \stopuseMPgraphic \defineoverlay[background-image][\useMPgraphic{background-image}] \setupbackgrounds[page][background={background-image}] Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setting up zint on a mac with macOS Montery Version 12.3.1
On Tue, 31 May 2022, Michal Vlasák via ntg-context wrote: > On Mon May 30, 2022 at 8:19 PM CEST, Jan-Erik Hägglöf via ntg-context wrote: > > With latest LMTX installed on my Monterey intel MacBook Air and Zint > > version 2.11 > > > > optional> using library > > '/Users/janneman/CTX/tex/texmf-osx-64/bin/lib/luametatex/zint/libzint.so' > > zint> something went wrong: invalid result vector > > zint> something went wrong: invalid result vector > > zint> something went wrong: invalid result vector > > … > > Luametatex is still built against zint 2.10, which is on the binary > level incompatible with 2.11, so you should try 2.10 in the meantime. > > Ultimately there are three possibilities for the long run: > > 1) Everyone sticks with 2.10 (which may be problematic since binaries > for this "old" version may gradually cease to be available). > > 2) Hans updates luametatex to zint 2.11, which would mean that a lot of > people would need to update their zint installations now (and possibly > in the future for every update). This is what was done last time with > the update to 2.10. > > 3) luametatex gains compatibility with 2.10 *and* 2.11. > > Not sure what is the best way to proceed, since 3) is the messiest > implementation wise, but nicest for the users. Another option is to call the binary via the filter module. Here is an example which uses the `barcode` binary. It should be easy to adapt this to call `zint`. https://github.com/adityam/filter/blob/dev/tests/13-filtersetup.tex The filter module caches the result, so the overhead of calling a binary instead of a library will be negligible. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Offseting the baseline grid, and irregular columnsets
On Fri, 27 May 2022, Stefan Nedeljkovic via ntg-context wrote: > Thanks Rik, that fixed the issue with at which line the text begins, but I > still get the grid offset. What do you mean by grid offset? Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Offseting the baseline grid, and irregular columnsets
On Wed, 25 May 2022, Stefan Nedeljkovic via ntg-context wrote: > Dear list, > > My adventures into the world of grids continue. In the linked file > (slide_grid_overlay.pdf) there are two things I cannot yet achieve: > > 1. I want the baseline grid to evenly (vertically) divide the text > area, but my code produces a smaller height of the first line and an > additional space at the bottom. You did not set footerdistance to zero. So, that takes up some space. > 2. The number of columns is 21.5, that is the first column is 0.5 units > wide and the rest are 1 unit wide. I believe that columns has to be an integer. Why do you want fractional columns? Columns are useful because you can say: \setlayer[name][line=2,column=3]{} for absolute positioning of layers. So, you can always use: \setlayer[name][line=2,column=3,x=0.5\measured{base}]{} to move everything to the right by 0.5 units. Another option is not to use columns at all, and simply do: \setlayer[name][line=2,x=3.5\measured{base}] which will place the layer at 3.5 units from the left edge of the text area. > Here is what I got right now: Currently your textwidth is not a multiple of base units. I have tweaked the code below so that it is. \definemeasure[xheight][0.1in] \definemeasure[base][3\measured{xheight}] % Since all distances are in terms of base units, specify the paper size in those % terms as well. \definepapersize[slide][width=26\measured{base},height=20\measured{base}] \setuppapersize[slide] \setupinterlinespace[line=\measure{base}] \setuplayout [ topspace=2\measured{base}, header=\zeropoint, headerdistance=\zeropoint, height=middle, % Space for 20-4=16 lines footerdistance=\zeropoint, footer=\zeropoint, bottomspace=2\measured{base}, % cutspace=2\measured{base}, leftmargin=\zeropoint, leftmargindistance=\zeropoint, width=middle, % space for 26-4=22 col rightmargindistance=\zeropoint, rightmargin=\zeropoint, backspace=2\measured{base}, % columns=22, columndistance=1pt, % grid=yes, ] \showframe \showgrid \starttext \input tufte \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Achieving the style of Jean-Luc Doumont
On Mon, 16 May 2022, Stefan Nedeljkovic via ntg-context wrote: > Dear list, > > Years ago I stumbled upon the work of Jean-Luc Doumont. He typesets all his > documents using TeX, although his modified Version called Quantum. His documents are really beautifully typeset. In the book, "Theorems, Maps, and Trees" all paragraphs are typeset as complete rectangles! See a sample here: https://www.principiae.be/book/pdfs/TM > The whole idea of his fascinating approach is that the page is quantized in 2 > dimensions and that all positioning, even graphical elements stick to that > grid. ConTeXt already implements grid snapping in the vertical dimension. For "grid snapping" in the horizontal direction, you need to ensure that all \hskip's are multiple of the grid size. > I'm specifically interested in using this approach for report generation. To > me data I/O is not an issue since I would use a Python script to generate the > markup. You can use layers to position things anywhere on a page. The keys `lines=..., columns=...` work almost like a grid. See the details manual for examples of grid snapping and layers. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
On Fri, 6 May 2022, Denis Maier via ntg-context wrote: > Hi, > thanks for your assessment. Indeed, that looks very promising. > > I've now had a chance to look at this a bit more too. Not that I understand > that stuff in detail, but anyway... > > I also have the impression that extending citeproc-formats.lua should be the > easiest part. As an aside, I think the HTML is in there because that is > needed for the test suite, but for ConTeXt we should be able to copy the > LaTeX mapping and tweak a few things here and there. > > The LaTeX package is hard to understand, at least if you're not used to the > "new" latex3 programming syntax and style. I also can only guess what that > stuff does. But as you say this is rather isolated from the citeproc > processing, so I guess the main task would be to come up with an equivalent > ConTeXt module that writes the citations to the tuc file, calls the citeproc > engine, and uses the results for the output. Right? (I.e., AFAICS, everything > that lives under https://github.com/zepinglee/citeproc-lua/tree/main/citeproc > should pretty much just work, while > https://github.com/zepinglee/citeproc-lua/tree/main/latex must be adapted.) Does citeproc-lua/biblatex support using CSL files (https://citationstyles.org/). IMO, that is currently the biggest limitation of the context bib module that only a few citation styles are supported. Developing a new citation style is relatively easy but a lot of work. Being able to use CSL will simplify things (from the point of view of the user) a lot. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] recursion in a table
On Sun, 1 May 2022, Henning Hraban Ramm via ntg-context wrote: > Hi, > I was playing with the example from > https://wiki.contextgarden.net/Scaling_Rotating_Mirroring_Clipping#Location_parameter > > and tried to put it in a tabulate: > > > \useMPlibrary[dum] > \setupexternalfigures[width=3em,height=2em,frame=on,] > > %\def\TXT{\ruledhbox{\bf(XyX)}} > \def\TXT{\externalfigure[pic]} > > \starttabulate[|l|l|l|l|l|l|] > \NC\NC normal\NC depth\NC fit\NC broad\NC high\NC\NR > \HL > \dostepwiserecurse{0}{359}{45}{% > %\expanded{\setuprotate[rotation=\recurselevel]} > \NC{\expanded{\recurselevel}˚}% Untested, but I think that you might need: \expanded{\NC \recurselevel \noexpand\NC ... } > This works, but \recurselevel is always 0. I know I must expand it (like > in the original example), but I can’t make it work within the tabulation. > In the first column, \expanded{\recurselevel} stays 0, and > rotation=\expanded{\recurselevel} gives an error, while the \setuprotate > line has no effect (if I remove "rotation=\recurselevel", of course). > > How would that work? Remind me of a more-than-a-decade-old discussion on the mailing list, summarized here: https://adityam.github.io/context-blog/post/tex-programming/ > Also, \HL doesn’t work at the end, and the second line of the error > message makes no sense: I find that in such cases, using Lua (CLD) is the simplest solution Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fuzzy paragraph when exporting to XML
On Sat, 30 Apr 2022, Hans Hagen via ntg-context wrote: > On 4/29/2022 4:59 PM, Aditya Mahajan via ntg-context wrote: > > Hi, > > > > I am trying to debug a bug-report for t-vim: > https://github.com/adityam/filter/issues/64 Exporting with trackers=export* > gives a warning: > > > > backend > export > fuzzy paragraph: > > > > I have managed to narrow it down to the attached MWE (which does not depend > on the t-vim module at all). Compiling it using > > > > $context --trackers=export\* lines > > > > gives the fuzzy paragraph warning. Any hints on how to resolve this? > As you like challenges ... you can way more narrow it down ... > > \setupbackend[export=yes] > > \starttext > { > \forgetall >% \forgeteverypar > x\strut\par > } > \stoptext > > the problem is that you basically loose *all* par related tagging now so > you need to bring that back, which is (of course i had to look it up) is > done with for instance \forgeteverypar which forgets (as in \forgetall) > but not really all Thanks! I manually tag start and end of lines anyways (using \SYNBOL ... \SYNEOL), so I can add \dotagsetparcounter in \SYNBOL and that removes the warning! Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fuzzy paragraph when exporting to XML
Hi, I am trying to debug a bug-report for t-vim: https://github.com/adityam/filter/issues/64 Exporting with trackers=export* gives a warning: backend > export > fuzzy paragraph: I have managed to narrow it down to the attached MWE (which does not depend on the t-vim module at all). Compiling it using $context --trackers=export\* lines gives the fuzzy paragraph warning. Any hints on how to resolve this? Thanks, Aditya lines.tex Description: TeX document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Word wrap of 'part' titles
On Mon, 18 Apr 2022, Wolfgang Schuster via ntg-context wrote: > Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46: > > In the MWE below the 'part' title is centred but on one line only and, > because it is a long title, the beginning and end are lost off the sides of > the page. > > > > If it were a 'chapter' title then I could insert '\\' to cause a line break > at that point. However this does not seem to work for 'part'. > > > > Is there a way of making 'part' titles wrap the same way that 'chapter' > titles do? > > > > % ---begin--- > > \define[2]\placePartTitle{\midaligned{#2}} > > > > \definehead [Part] [part] > > \setuphead[Part] > >[ placehead=yes, > > style={\tfd}, > > command=\placePartTitle, > >] > > \setuphead > [Part] > [placehead=yes, > style=\tfd, > align=middle, > number=no] Or use: align={middle,broad}, which has slightly better alignment for titles, IMHO. There is also `alternative=middle`. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: command line arguments to specify output directory
On Wed, 30 Mar 2022, A A via ntg-context wrote: > On Wed, 30 Mar 2022 at 18:39, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > > A A via ntg-context schrieb am 30.03.2022 um 18:24: > > > Dear All, > > > > > > I would like to ask whether there exists a command line option to the > > > context executable which would allow me to specify the directory in > > > which I would like my output to be dumped. > > > > > > I have noticed that if I call the executable outside the directory in > > > which the .tex file resides, my supporting files (and resulting pdf) > > > are dumped outside the directory in which the .tex file is located. > > > > context --runpath=... filename > >- I tried the following *context --runpath=test test/test.tex * but it >still dumps all the output (.log, .pdf and .tuc) into my current directory. >I would like for it to get dumped inside the *test *directory... mtxrun --path=test --script context test.tex (note that filename has to be relative to the test/ directory not CWD) Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] upload
On Tue, 29 Mar 2022, Mikael Sundqvist via ntg-context wrote: > On Tue, Mar 29, 2022 at 6:37 AM Otared Kavian wrote: > > > > Hi Mikael, > > Hi Otared, > > > > > Thanks for your explanation and the example you sent about > > \definemathsimplealign (I didn’t get immediately that « sesac » in the > > command \startmathfenced[sesac] means « cases » in reverse or mirrored… I > > guess this is a wise and humourous choice by Hans :-) ). > > I guess so too :) > > > > > Regarding \startcases, it seems that it is still not possible to number > > each equation, but I may be overlooking something. I’ll try a few examples > > and will let you know, as well as Hans. > > Hm, but a cases environment does not provide several formulas. This is > just one formula: > > \startformula > |x|= > \startcases > \NC x \NC x>0\NR > \NC 0 \NC x=0\NR > \NC -x \NC x<0\NR > \stopcases > \stopformula > > and as such should have (at most) one equation number, right? However, some sub-disciplines like to number each case (for example, if you want to refer to one of them in the future). > Only Hans knows if it is (easily) doable to add the possibility to add > numbers to each three lines. In the old implementation, this was tricky (the equation without the equation number should be centered, and the equation number should be flush right). But I think that this should be possible with the new low-level box alignment macros. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] tilde character
On Mon, 14 Mar 2022, Henning Hraban Ramm via ntg-context wrote: > Hi, I’ve a stupid question: How do I get the default tilde character > from a font? > > ~ is a fixed space > \texttilde gives a tilde accent > \utfchar{0x007E} yields a space (probably the same as ~) \textasciitilde Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] help with facing page image
On Thu, 10 Mar 2022, jbf via ntg-context wrote: > Am endeavouring to explore Wolfgang's very 'elegant' solution to this > facing page challenge. The exploration has included a look at > base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where > I see immediately that the approach is experimental and where it says > also that 'probably more alternatives will be added'. I wonder if that > last phrase also includes the ability to manipulate the image(s) either > generally or in individual cases? > > So, for example., say I need (and in fact I do!) to change some aspect > of individual images, e.g. I might want to scale=500, or fiddle with > width/height of a particular image. At the moment I cannot see a way of > doing this for each image. I wondered if the commented out setups in the > response to this question might be a clue, but so far haven't been able > to get that to have any effect. Couldn't you just pass scale as a key-value parameter, similar to how `name` is passed in Wolfgang's solution? Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Disable reuse of figures
On Sat, 19 Feb 2022, Hans Hagen via ntg-context wrote: > On 2/19/2022 7:30 AM, Aditya Mahajan via ntg-context wrote: > > Hi, > > > > This is related to a bug report for the filter module: > > https://github.com/adityam/filter/issues/60 > > > > Normally, when the same figure is included twice, context only includes the > figure once and refers to the included figure the second time. The option > `object=no` to externalfigure is supposed to prevent that, but it doesn't > work. For example, consider the following example the bug-report uses graphviz > as the external program, but I have changed that to context to keep things > self contained) > > > > \usemodule[filter] > > > > \defineexternalfilter > >[graphviz] > >[ > > filter=context --purge, > > output=\externalfilterbasefile.pdf, > > readcommand=\ReadPDF, > >] > > > > \def\ReadPDF#1% > > {\externalfigure[#1][object=no]} > > > > \starttext > > > >Circle: > >\startgraphviz > > \startMPpage > >draw fullcircle scaled 1cm; > > \stopMPpage > >\stopgraphviz > > > >Square: > >\startgraphviz > > \startMPpage > >draw fullsquare scaled 1cm; > > \stopMPpage > >\stopgraphviz > > > > \stoptext > > > > Behind the scenes, the first \startgraphviz ... \stopgraphviz environment > writes the content to an external file (\jobname-temp-graphviz.tmp), runs > `context --purge \jobname-temp-graphviz.tmp`, which creates > `\jobname-temp-graphviz.pdf`. The `\ReadPDF` macro then includees the file > (with object=no). > > > > At the next \startgraphviz .. \stopgraphviz, the same process is repeated. > The `\jobname-temp-graphviz.pdf` file is overwritten and the new file should > have been included. But it is not. The output contains the first image twice. > > > > I thought that object=no should have prevented the reuse. In fact, if I > compile the file with luatex, I get an error message: > > > > ! error: (pdf inclusion): file has changed > '12-two-outputs-temp-graphviz.pdf' > > mtx-context | fatal error: return code: 256 > > > > Any idea why object=no is not working? > the pdf file is kept open, for various reasons: > > - performance > - the might be different pages to fetch > - analysis happens when the image is placed, inclusion happens later > > so you try to reopen an already open file (which has not been completely > processed) I see. So, for the filter module this means that one always has to use `cache=yes` (so that each PDF file has a different name). I'll add that to the documentation. Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Disable reuse of figures
Hi, This is related to a bug report for the filter module: https://github.com/adityam/filter/issues/60 Normally, when the same figure is included twice, context only includes the figure once and refers to the included figure the second time. The option `object=no` to externalfigure is supposed to prevent that, but it doesn't work. For example, consider the following example the bug-report uses graphviz as the external program, but I have changed that to context to keep things self contained) \usemodule[filter] \defineexternalfilter [graphviz] [ filter=context --purge, output=\externalfilterbasefile.pdf, readcommand=\ReadPDF, ] \def\ReadPDF#1% {\externalfigure[#1][object=no]} \starttext Circle: \startgraphviz \startMPpage draw fullcircle scaled 1cm; \stopMPpage \stopgraphviz Square: \startgraphviz \startMPpage draw fullsquare scaled 1cm; \stopMPpage \stopgraphviz \stoptext Behind the scenes, the first \startgraphviz ... \stopgraphviz environment writes the content to an external file (\jobname-temp-graphviz.tmp), runs `context --purge \jobname-temp-graphviz.tmp`, which creates `\jobname-temp-graphviz.pdf`. The `\ReadPDF` macro then includees the file (with object=no). At the next \startgraphviz .. \stopgraphviz, the same process is repeated. The `\jobname-temp-graphviz.pdf` file is overwritten and the new file should have been included. But it is not. The output contains the first image twice. I thought that object=no should have prevented the reuse. In fact, if I compile the file with luatex, I get an error message: ! error: (pdf inclusion): file has changed '12-two-outputs-temp-graphviz.pdf' mtx-context | fatal error: return code: 256 Any idea why object=no is not working? Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Harfbuzz plugin and colors
On Sun, 13 Feb 2022, Jairo A. del Rio via ntg-context wrote: > Hi, list! I've tested the Harfbuzz plugin in ConTeXt and it works nicely > for most cases. However, color doesn't seem to work. Is this intended? I > know this plugin won't be supported, but I'll be fine with pointers to > solve this issue. Thanks in advance. > > \usemodule[fonts-plugins] > \definefontfeature[harf] > [mode=plug, >features=harfbuzz, >shaper=native] > %Just to test Harfbuzz is actually working > \definefontfeature[devaA][harf] > [language=dflt, >script=deva] > \definefontfeature[devaB][default] > [script=deva] > \definefontfeature[colored][harf] > [language=dflt,script=arab, >colr=yes] %doesn't do anything Wouldn't you also have to enable the colored feature somewhere? > \starttext > {\righttoleft\definedfont[file:AmiriQuranColored.ttf*colored]\input{khatt-ar}} > > {\definedfont[file:Lohit-Devanagari.ttf*devaA]\getbuffer[hindi]} > \blank[line] > {\definedfont[file:Lohit-Devanagari.ttf*devaB]\getbuffer[hindi]} > \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___