Am 28.08.24 um 16:47 schrieb Mojca Miklavec:
On Wed, 28 Aug 2024 at 12:03, Shiv Shankar Dayal wrote:
I have two specific interests. I want to make asymptote work with ConTeXt
but I can live with including generated images and use PDFs.
There’s the built-in asymptote module:
https://source.contextgarden.net/tex/context/modules/mkiv/m-asymptote.mkiv
I don’t know if it still works and if it could/should be improved.
There’s also Aditya’s filter module that alleviates calling external
programs (I’m using it with LilyPond):
https://github.com/adityam/filter
But calling external programs is slow.
MetaPost is fast, (also) because it is integrated as a library.
It’s possible to address C libraries using Lua’s FFI (don’t ask me how,
there is/was a manual).
Also, Hans announced to include some "2.5D" functions (perspective
projections) into MetaFun soon. That might obsolete some uses of
Asymptote. But a proper 3D model for MetaPost seems to be missing (not
my expertise).
The second interest is in Aditya Mahajan's syntax highlighting module.
It is very nice but it invokes VI making the entire thing slow. I understand
the advantage of using VI is that we do not have to implement anything
when a new language comes. VI will have syntax highlighting and it will
be automatically done for us.
ConTeXt does support native syntax highlighting. You can try to create
some new grammars to extend language coverage (Hans only made sure
that TeX, lua, metapost etc. work correctly). Or you can try to start
brainstorming whether some existing OpenSource grammars could be
integrated to do syntax highlighting using Lua.
Vi was a shortcut to get the syntax highlighting done in some way at all.
There’s also the scite module that uses SciTE’s lexers for syntax
highlighting. The builtin highlighters are limited to TeX/ConTeXt,
MetaPost, Lua and XML.
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________