vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
533 stars 89 forks source link

Make asymptote package work with latexml #430

Open charlesstaats opened 4 months ago

charlesstaats commented 4 months ago

The LaTeXML project attempts to convert LaTeX code to html documents. If this could be made to work with Asymptote, and in particular with WebGL output, it might offer a nice avenue for distributing 3d (and 2d svg) figures inside a larger document.

johncbowman commented 4 months ago

The PreTeXt project already does something like this:

https://pretextbook.org/doc/guide/html/latex-asymptote-links.html

so that would be a good place to start. Here's an example of how it looks in practice:

https://opentext.uleth.ca/apex-calculus/sec_disk.html

charlesstaats commented 4 months ago

Interesting! Having the ability to author documents in LaTeX certainly has additional value (in particular since arXiv is experimentally rendering papers as html via LaTeXML), but PreTeXt looks like it covers some important use cases, especially if you just want a document with embedded asy images and don't mind writing the document in XML directly.