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

Mathjax / Latex rendering issues with formulas , spacing issue #244

Open
hugokoopmans opened this issue Jun 15, 2022 · 7 comments
Open

Mathjax / Latex rendering issues with formulas , spacing issue #244

hugokoopmans opened this issue Jun 15, 2022 · 7 comments

Comments

@hugokoopmans
Copy link

Hi there,

Love your work really usefull, I have several jupyter notebooks that worj great render fine. Now I have some new ones that have issues with rendering the mathjax formulas. It seems the space after formula is indented so the text after the formula and the formula itself are printed over each other.

CLI output:

$(npm bin)/decktape rise -s 1920x1080 --load-pause=20000 http://localhost:8888/notebooks/programma/P11-statistics-tests-regression-matrices/P11-statistical-tests.ipynb?token=3ce5f5dd615cdbdec7526adfcdb70acc6c25228748f79bca P11-statistical-tests.pdf
Loading page http://localhost:8888/notebooks/programma/P11-statistics-tests-regression-matrices/P11-statistical-tests.ipynb?token=3ce5f5dd615cdbdec7526adfcdb70acc6c25228748f79bca ...
actions jupyter-notebook:find-and-replace does not exist, still binding it in case it will be defined later...
load_extensions { '0': 'rise/main',
  '1': 'nbextensions_configurator/config_menu/main',
  '2': 'contrib_nbextensions_help_item/main',
  '3': 'hide_input/main',
  '4': 'python-markdown/main',
  '5': 'spellchecker/main' }
Loaded moment locale en
Loading extension: nbextensions_configurator/config_menu/main
Session: kernel_created (ba1f17b0-0f54-41e3-965a-cfdee7c6fa7e)
Starting WebSockets: ws://localhost:8888/api/kernels/f1d30021-f182-49a6-8cf9-e79823b091d3
Loading extension: rise/main
Loading extension: contrib_nbextensions_help_item/main
Loading extension: hide_input/main
Loading extension: python-markdown/main
Kernel: kernel_connected (f1d30021-f182-49a6-8cf9-e79823b091d3)
Refused to apply style from 'http://localhost:8888/nbextensions/rise/reveal.js/css/theme/simpel.css?v=20220613085410' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Refused to apply style from 'http://localhost:8888/notebooks/programma/P11-statistics-tests-regression-matrices/P11-statistical-tests.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Kernel: kernel_ready (f1d30021-f182-49a6-8cf9-e79823b091d3)
Loading extension: spellchecker/main
[spellchecker] toggled on
Access to font at 'about:blank' from origin 'http://localhost:8888' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.

Unable to load resource from URL: about:blank
Failed to load resource: net::ERR_FAILED
Failed to load resource: the server responded with a status of 404 (Not Found)
Widgets are not available.  Please install widgetsnbextension or ipywidgets 4.0
Loading page finished with status: 200
RISE plugin activated
Printing slide #/slide-23-0 (24/24) ...
Printed 24 slides

Strange thing is it is not happening all the time and even on one slide sometimes yes sometimes not...
image

@hugokoopmans
Copy link
Author

ANalysis Of VAriance : ANOVA

Assumption:
$ \overline{X} $ follows a normal distribution with mean $ \mu $ and variance $ \frac{\sigma^2}{n} $

The ANOVA is based on the law of total variance, where the observed variance in a particular variable is partitioned into components attributable to different sources of variation. In its simplest form, ANOVA provides a statistical test of whether two or more population means are equal, and therefore ANOVA generalizes the t-test beyond two means.

@hugokoopmans
Copy link
Author

the jupyter notebook renders fine the issue is when converting to PDF

@hugokoopmans
Copy link
Author

decktape version 3.4.0

@astefanutti
Copy link
Owner

It's possible that Decktape starts converting a slide to PDF while MathJax hasn't completed updating it.

I drafted a while back using MathJax signals, but it has to be revived, if that is the actual root cause of the issue.

@hugokoopmans
Copy link
Author

That's why i added this option : --load-pause=20000 ? I will review your link asap

@astefanutti
Copy link
Owner

That's why i added this option : --load-pause=20000 ?

The --load-pause option adds an initial delay, and I'm not sure that's enough to guarantee everything is loaded, depending on how RISE works. Maybe increasing the pause for each slide, with the --pause option, would help.

Another test that would help to identify the root cause would be to export screenshots, with the --screenshots option, and see if the issue also affects the image export.

@keflavich
Copy link

Thanks for the --load-pause tip; that solved a problem I was facing (same error).

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

No branches or pull requests

3 participants