Temml icon indicating copy to clipboard operation
Temml copied to clipboard

<la-tex> Custom Element

Open runarberg opened this issue 1 year ago • 3 comments

Would you be interested in exporting a <la-tex> custom element? Currently TexZilla exports it, I also export a <math-up> element in my mathup (see here).

I‘m thinking about how I can make markdown-it-math extremely easy to use while supporting all the libraries, and I think custom elements might be a pretty neat way to go about it.

runarberg avatar Mar 06 '25 04:03 runarberg

If I understand correctly, TexZilla's enablement of a <la-tex> element involves a TexZillla extension. I think it would be good to add a <la-tex> element to the set of Temml extensions. That way, it could be maintained by someone who has a better grasp than me of the various use cases.

Recently, @mbourne persuaded me to fold the auto-render extension into Temml proper. Maybe someday something similar can be done for a <la-tex> element. For now, I would prefer it in an extension.

ronkok avatar Mar 06 '25 17:03 ronkok

I see. It seems like <la-tex> is actually just an example of TexZilla usage, rather than being exported from the library (or even published as an extension):

If I find time in the coming months I may write a wrapper around Temml which only exports the custom element (I will probably just copy-paste from my <math-up>). It seems like a good first step, from which you can evaluate if you want to move it into Temml proper.

runarberg avatar Mar 06 '25 19:03 runarberg

I just published https://github.com/runarberg/temml-custom-element which is a pretty basic wrapper around Temml, I haven‘t tested all the features but in theory they should all work except matching of stylesheets with the font and maybe labeling which I might come back to later.

runarberg avatar Mar 20 '25 01:03 runarberg