Giter Club home page Giter Club logo

Comments (5)

astrojuanlu avatar astrojuanlu commented on July 2, 2024 7

For those still getting this issue, this is the prefix that worked for me as of today:

jupyter nbconvert "file.ipynb" --to slides --reveal-prefix "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.1.0"

No need of --post serve after this.

from nbconvert.

damianavila avatar damianavila commented on July 2, 2024

Which version of IPython/Jupyter or nbconvert are you using? the problem with Reveal.js > 3 is that now the library is loaded in a different way... so it would not work with our previous implementations... we have fix that in this repo and if you use Jupyter 4.0 you will be using Reveal.js 3.1 by default... BUT, you need to be aware that darkish themes do not work well with the notebook css, so probably using a theme like "black" will not work without further customization on the css...

from nbconvert.

agilly avatar agilly commented on July 2, 2024

I'm using python 2.7.10 / Anaconda 2.3.0 (x86_64), and IPython 4.0.0 (nbconvert the same).
I'm not sure which version of reveal.js is used when I don't specify a prefix, I think it is still 2.6.2:
[NbConvertApp] Redirecting reveal.js requests to https://cdn.jsdelivr.net/reveal.js/2.6.2

When I select the black theme, I get:

ERROR:tornado.application:Uncaught exception GET /reveal.js/css/theme/black.css (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8000', method='GET', uri='/reveal.js/css/theme/black.css', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6', 'Accept-Encoding': 'gzip, deflate, lzma, sdch', 'Host': '127.0.0.1:8000', 'Accept': 'text/css,*/*;q=0.1', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174', 'Dnt': '1', 'Connection': 'keep-alive', 'Referer': 'http://127.0.0.1:8000/Untitled6.slides.html?theme=black'})
Traceback (most recent call last):
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/tornado/web.py", line 1369, in _stack_context_handle_exception
    raise_exc_info((type, value, traceback))
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/tornado/stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/nbconvert/postprocessors/serve.py", line 31, in finish_get
    response.rethrow()
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/tornado/httpclient.py", line 583, in rethrow
    raise self.error
HTTPError: HTTP 404: Not Found
ERROR:tornado.access:500 GET /reveal.js/css/theme/black.css (127.0.0.1) 743.77ms

When I select the "night" one, there is no error but the background refuses to change (stays white). Which css file should I change to fix that?

from nbconvert.

damianavila avatar damianavila commented on July 2, 2024

Here is the commit changing the url for reveal 3.1: aecc6c2
but the change is not released yet... it is on master... so you need to run master or wait for the next release.
About the css fixes, I have not explored yet which changes are needed (I have done some exploration in the past with the default theme which is also dark)... you probably need to investigate further... essentially the more important fix is probably deal with the notebook white background... but I guess there are some others as well.
I will try to take a look later and give you some input above what to change...

from nbconvert.

damianavila avatar damianavila commented on July 2, 2024

Current version of nbconvert 5.2.1 is loading reveal.js 3.1.0 when you are using --post serve.
As @Juanlu001 said above, you can use a remote reveal.js to bypass the --post serve or a local reveal.
Closing here.

from nbconvert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.