damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 416 forks source link

Jupytext breaks RISE! #509

Closed cecilialee closed 3 years ago

cecilialee commented 5 years ago

After I've installed the extension Jupyter extension Jupytext, RISE is broken with its css style.

I placed a custom css file with the same name as the .ipynb in the same directory. And with the RISE presentation button, the slides rendered perfectly with custom styles.

Screenshot 2019-09-06 at 5 29 57 PM

I installed Jupytext through conda,

conda install -c conda-forge jupytext

When I relaunch the Jupyter Notebook, and click the presentation button again. The style of the slides is broken. The css is broken and the custom css could not render successfully.

I got the error as such:

[W 17:35:20.509 NotebookApp] 403 GET /files//Documents/projects/my_github/notes/presentations/introducing-jupytext/rise.css (::1): /Documents/projects/my_github/notes/presentations/introducing-jupytext/rise.css is not in root static directory
[W 17:35:20.518 NotebookApp] 403 GET /files//Documents/projects/my_github/notes/presentations/introducing-jupytext/rise.css (::1) 9.49ms referer=http://localhost:8888/notebooks/Documents/projects/my_github/notes/presentations/introducing-jupytext/introducing-jupytext.ipynb
[W 17:35:20.519 NotebookApp] 403 GET /files//Documents/projects/my_github/notes/presentations/introducing-jupytext/introducing-jupytext.css (::1): /Documents/projects/my_github/notes/presentations/introducing-jupytext/introducing-jupytext.css is not in root static directory
[W 17:35:20.520 NotebookApp] 403 GET /files//Documents/projects/my_github/notes/presentations/introducing-jupytext/introducing-jupytext.css (::1) 1.93ms referer=http://localhost:8888/notebooks/Documents/projects/my_github/notes/presentations/introducing-jupytext/introducing-jupytext.ipynb
damianavila commented 5 years ago

Certainly, I do not see how Jupytext could break RISE. AFAIK, Jupytext is not playing with CSS files at all (I could be missing something). Can you give us more details about versions of notebook, RISE, jupytext, browser, etc.

parmentelat commented 4 years ago

Hey there I'm facing something similar, although maybe not quite exactly the same

my issue is that when using a jupytext-enabled notebook whose name is not a .ipynb - say it is called myslideshow.md - then neither rise.css nor myslideshow.css get loaded

obviously this code here was written in a pre-jupytext era: https://github.com/damianavila/RISE/blob/f235facf867a288d406731ce1081bee82280d5b8/rise/static/main.js#L499-L513

that looks like an easy enough fix; I'll try to tackle that shortly

parmentelat commented 4 years ago

people interested in trying this out can use the prerelease 5.6.1.dev1 of rise with

pip install -U --pre rise
damianavila commented 4 years ago

@parmentelat we should have a 5.6.1 release soon, IMHO. Is there any other fix you want to include? I will revisit the latest issues and PRs soon and it will be great if you have any thoughts about what we should include in the next point release.

parmentelat commented 4 years ago

@damianavila there has been some hiccups with the feature about keybindings, which caused me to iterate a couple times; as you may have seen I have released 5.6.1.dev3 that works for me at this point

however this keybindings thing would clearly prompt for some testing before we ship an official release IMHO

apart from that, all the small fixes that I thought were belonging in a 5.6 have been integrated in maint-5.6

mikhail-ict commented 4 years ago

Just to confirm that I am facing the same issue:

The only quick fix for both issues is to inject the required css code into the notebook through using .../static/custom/custom.css. The exact path for customs.css varies in different Jupyter Notebook versions:

https://stackoverflow.com/questions/32156248/how-do-i-set-custom-css-for-my-ipython-ihaskell-jupyter-notebook/33570738

kurtmckee commented 3 years ago

I recommend closing this ticket. Original poster has not responded with the requested info.