Closed ignacioxd closed 3 years ago
On second thought, svgdom
may be a dependency of just HtmlGenerator
and not latex.js
itself. Maybe these should be decoupled, perhaps including a default PlainTextGenerator
instead.
Yes, when latex.js
is used in the browser, no dependencies are required. However, if it is used outside of the browser environment, a DOM implementation becomes necessary, there is no way around it. The CLI also uses svgdom
.
I just discovered this project and it looks really promising!
Looking at the documentation for version 0.12.4, it seems like
svgdom
is required forlatex.js
to work as a library. This is not mentioned in the documentation explicitly, and in fact the claim on the front page is that "No external dependencies need to be loaded", but the two examples provided both requiresvgdom
.Is there a way to avoid the
document is not defined
error thrown when not usingsvgdom
? Otherwise, ifsvgdom
is indeed required, should it be included as a dependency?I haven't tried using
latex.js
as a CLI tool, but if it can work in the CLI withoutsvgdom
it should be possible to get it to work as a library as well.