nbviewer-app icon indicating copy to clipboard operation
nbviewer-app copied to clipboard

No Latex support

Open alexisgaziello opened this issue 5 years ago • 3 comments

The title is pretty descriptive.

When latex is inserted in the notebook, the app is unable to render it.

alexisgaziello avatar Oct 25 '20 03:10 alexisgaziello

I have overviewed the project and this issue is probably related to the nbv.js script, which comes from this repo https://github.com/kokes/nbviewer.js/issues right?

I looked around and the template.html file seems to be rendered similarly as they do in this repo: https://github.com/jsvine/notebookjs

In the repo they say that to render latex you need 3 links, and template.html is missing one of them:

OK --> https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.js.
OK --> https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css MISSING --> https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/contrib/auto-render.min.js

Could that be the issue?

I tried to clone the repo to check if this solution would work, but I couldn't compile it because the file nbs.js was missing.

alexisgaziello avatar Oct 25 '20 04:10 alexisgaziello

There is basic LaTeX support in version 0.1.4. The support was added in https://github.com/tuxu/ipynb-quicklook/pull/7 (issue #12 in this repo), which updated the nbviewer.js code.

Could you please provide an example notebook where LaTeX rendering does not work?

tuxu avatar Oct 25 '20 21:10 tuxu

There is basic LaTeX support in version 0.1.4. The support was added in tuxu/ipynb-quicklook#7 (issue #12 in this repo), which updated the nbviewer.js code.

Could you please provide an example notebook where LaTeX rendering does not work?

Hey @tuxu,

Sure. I am taking a class in ML and I am using a notebook that doesn't properly render LaTeX.

Here is a sample of the notebook.

Here is a pdf of what the rendered version looks like.

alexisgaziello avatar Oct 31 '20 22:10 alexisgaziello