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.

This is a much better specified question.

It would ideally require some work both on the Asymptote side, as well
as some work on the ConTeXt side.

Asymptote is in fact written in C++, so it might be a lot closer to
your particular expertise.

I would say that what's most needed is someone with a great passion to
get this complete, and some clear communication pathway between the
two projects.

Asymptote is very LaTeX-centric and should ideally be ConTeXt-ilized
to simplify some operations. I would start by playing with a super
simple minimum example written in plain asymptote. Figure out how to
compile Asymptote on your computer and try to process the asy file
into a ConTeXt file. This conversion then needs to be tweaked in order
to produce two different results:
- A standalone file that could be processed directly by ConTeXt.
- A minimalistic file that could be included from another ConTeXt
source to generate the final document.

Check the file that you get right now, figure out what goes wrong,
what could be improved ...
If you have a simple file that no longer needs asymptote processing,
you can check on the ConTeXt list what could still be improved, and
then you can go and start fiddling with Asymptote source code (with
help of Asy developers) until the files get progressively better.

Iterate between the Asymptote and ConTeXt developers until the results
are fully satisfactory.

It has been a while since I touched any asymptote, but I suspect that
what you want to achieve is something like

\starttext
\startasymptote
some graphics
\stopasymptote

\placefigure[label]{really nice 3D model}{%
\startasymptote
another 3D graphics
\stopasymptote}
\stoptext

where ConTeXt would process this file, prepare some input to
asymptote, and then asymptote would have to be called just once to
generate all the required graphics at once, and ConTeXt would
eventually include them, properly scaled etc.

Start with graphics, continue with simple text labels ... progress
towards proper interactive 3D models ...

> 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.

In either case start a separate thread covering exactly that one topic.

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to