marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Make mo.latex() work with text directly

Open GeorgOhneH opened this issue 3 months ago • 3 comments

Description

I would like to to use mo.latex() to load some macros. However, I don't want to import them from a separate file (for portability reasons). It would be nice if the mo.latex() function accepts directly the content of the file.

Are you willing to submit a PR? (You must receive approval from the team before submitting a PR.)

  • [ ] Yes

Alternatives

No response

Additional context

No response

GeorgOhneH avatar Aug 26 '26 09:08 GeorgOhneH

Thanks @GeorgOhneH, accepting LaTeX text directly makes sense. We will add this request to our backlog. We don't have a timeline for this, but we are happy accept a code contribution and are open to helping along the way.

kirangadhave avatar Aug 26 '26 18:08 kirangadhave

Thank you so much.

GeorgOhneH avatar Aug 31 '26 20:08 GeorgOhneH

Hi @kirangadhave! I've implemented this with full backward compatibility and comprehensive test coverage (supporting both positional and keyword text=..., validating mutual exclusivity with filename, and updating docs). Opening a PR now to link here!

pylrn avatar Sep 02 '26 09:09 pylrn