Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider extension for LaTeXStrings #145

Closed
jkrumbiegel opened this issue Jun 6, 2024 · 8 comments · Fixed by #147
Closed

Consider extension for LaTeXStrings #145

jkrumbiegel opened this issue Jun 6, 2024 · 8 comments · Fixed by #147
Assignees

Comments

@jkrumbiegel
Copy link
Collaborator

Currently, LaTeXStrings like they are output from Latexify have to be printed with output: asis. We could consider adding an expand overload for them in an extension so that returning them is like writing the math in markdown mode there. This makes them work everywhere where quarto implements math handling.

This could look like:

image

@MichaelHatherly
Copy link
Collaborator

Part of #94.

@MichaelHatherly
Copy link
Collaborator

What happens if you write display(latexify(m))? Do we get a bad output for that as well?

@jkrumbiegel
Copy link
Collaborator Author

from the thread:

image

@MichaelHatherly
Copy link
Collaborator

So I guess the question is whether expand should happen to results captured via InlineDisplay as well as from the cell return value?

@jkrumbiegel
Copy link
Collaborator Author

jkrumbiegel commented Jun 6, 2024

If quarto used the text/latex mimetype, I guess both display and return value would work. For me using expand feels like it should only apply to cell return values somehow, but not sure.

@MichaelHatherly
Copy link
Collaborator

The mimetype wrapper mechanism might be suitable for this kind of thing instead of expand,

value = _mimetype_wrapper(value)
.

@jkrumbiegel
Copy link
Collaborator Author

You mean wrapping it with some object that renders to markdown latex, which is then used by quarto? Sounds good to me.

@MichaelHatherly
Copy link
Collaborator

Yes, something like that.

@MichaelHatherly MichaelHatherly self-assigned this Jun 7, 2024
@MichaelHatherly MichaelHatherly linked a pull request Jun 7, 2024 that will close this issue
MichaelHatherly added a commit that referenced this issue Jun 7, 2024
* Fix #141 and fix #145, LaTeX rendering improvements

* Attempt to resolve PyCall in CI issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants