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

Escape HTML characters in latex output strings #1278

Merged
merged 3 commits into from
Jun 19, 2020

Conversation

eric-wieser
Copy link
Contributor

@eric-wieser eric-wieser commented May 28, 2020

Without this change, latex like \left<content\right> renders as a <content\right> html tag, which mathjax can't handle.

See https://nbviewer.jupyter.org/urls/galgebra--417.org.readthedocs.build/en/417/tutorials/algebra.ipynb#More-examples for an example of this failing.

This is like #514, but for cell outputs.

Without this change, latex like `\left<content\right>` renders as a `<content\right>` html tag, which mathjax can't handle.
@eric-wieser eric-wieser changed the title Escape HTML characters in latex strings Escape HTML characters in latex output strings May 28, 2020
@eric-wieser
Copy link
Contributor Author

CI failure look unrelated.

@eric-wieser
Copy link
Contributor Author

Restarting CI just to be sure.

@MSeal
Copy link
Contributor

MSeal commented Jun 14, 2020

CI docs build I'm going to try fixing today, don't worry about that one

Copy link
Contributor

@MSeal MSeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in testing, though it needs to be added to the other places with the output.data['text/latex'] (namely the lab template) if you don't mind adding those.

Would you mind if I copy that algebra notebook into our examples to test against? It has a nice set of latex patterns all in one.

@eric-wieser
Copy link
Contributor Author

Coping the notebook is fine, but it depends on galgebra and sympy, which make no guarantees of latex ewuivalence between versions.

I guess if you don't rerun the notebook then it does not matter.

@eric-wieser
Copy link
Contributor Author

Since I'm not really familiar with the structure of this project, would it be ok if I left the lab notebook and other HTML pages to you?

@MSeal
Copy link
Contributor

MSeal commented Jun 15, 2020

Sure, I can push into the PR where else it's obvious the same change needs applying when I get a chance.

@MSeal MSeal merged commit e980b9f into jupyter:master Jun 19, 2020
@MSeal MSeal added this to the 6.0 milestone Sep 8, 2020
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 this pull request may close these issues.

2 participants