unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.73k stars 266 forks source link

Expose LaTeXInline to enable inline LaTeX support in Doc #5059

Open hojberg opened 3 months ago

hojberg commented 3 months ago

We want to enable inline LaTeX (via KaTeX) in the Doc format. We already support block based LaTeX as a codeblock, and we do have a LaTeXInline constructor.

I think whats missing is the proper types in base and likely some tweaks in the unison codebase to fully support this. I think the way FrontMatter is done via Embed would be the way to go for LaTeXInline.

pchiusano commented 3 months ago

@hojberg I think this might be all you, actually. 😀

Just use EmbedInline doc element in the same way as you use Embed.

Add some helpers to base as a contribution, then modify the front end to look for that shape.

I don’t see why ucm would need changing. The console renderer can’t render any of the Embed elements - it just prints them as their source.

hojberg commented 3 months ago

Here's the base contribution: https://share.unison-lang.org/@unison/base/contributions/40

aryairani commented 2 months ago

Sorry, that was a Linear weirdness. Though I'm not sure what the ask is on this ticket. Was I assigned by accident?