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

Sort out scattered LaTeX preambles #521

Open
utensil opened this issue May 15, 2024 · 1 comment
Open

Sort out scattered LaTeX preambles #521

utensil opened this issue May 15, 2024 · 1 comment
Labels
component: docs Documentation component: printer string, latex, and ansi escape printing

Comments

@utensil
Copy link
Member

utensil commented May 15, 2024

LaTeX preambles are scattered in multiple files, with almost identical contents, some with escaping, some without escaping (in raw string). They are a maintenance nightmare. They should be all put into one place, using raw string.

It would also be nice to figure out how to make LaTeX preambles work for all Sphinx docs, without having to paste them into each doc files, and they will be not-rendered (i.e. shown as raw LaTeX code) at page load, and occupying the majority of the screen, then disappear.

The idea is to remain the ablity to copy-paste from a LaTeX source, then use a light-weight parsing mechanism to make it a JSON that MathJax 3 accepts. There was a preamble plugin in MathJax 2 has the same functionality.

Another nice thing is to ensure they work for all of LaTeX, MathJax 3 and KaTeX. For now, some LaTeX preambles are not rendered correctly in Jupyter Lab but OK on nbviewer (so I settled on whatever makes nbviewer happy). As for KaTeX, \DeclareMathOperator doesn't work and massive error follows, particularly annoying in notebook diff view in VSCode which uses KaTeX and unlikely to change.

@utensil utensil added component: docs Documentation component: printer string, latex, and ansi escape printing labels May 15, 2024
@utensil
Copy link
Member Author

utensil commented May 15, 2024

Supersedes #399 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: docs Documentation component: printer string, latex, and ansi escape printing
Projects
None yet
Development

No branches or pull requests

1 participant