【问题标题】:jupyter nbconvert --to slides generates blank pagejupyter nbconvert --to slides 生成空白页
【发布时间】:2016-06-22 15:15:12
【问题描述】:

我正在尝试使用 Reveal.js 库将我的 IPython/Jupyter Notebook 导出到 HTML 幻灯片,但结果是一个空白页。

我已经看到提出的问题,但没有一个解决我的问题(使用本地 Reveal librayr,使用 Reveal.js v2 或 v3)。

我使用的是 Jupyter 版本 4.0.6 和 Python 2.7。

请在下面找到命令和服务器日志。

jupyter nbconvert --to slides --ServePostProcessor.port=8910 --post serve pricing.ipynb

[NbConvertApp] 将笔记本定价.ipynb 转换为幻灯片

[NbConvertApp] 将 1725694 字节写入 price.slides.html

[NbConvertApp] 服务本地reveal.js

http://127.0.0.1:8910/pricing.slides.html提供您的幻灯片

使用 Control-C 停止此服务器

警告:tornado.access:404 GET /custom.css (127.0.0.1) 3.00ms

【问题讨论】:

    标签: python python-2.7 jupyter reveal.js jupyter-notebook


    【解决方案1】:

    尝试从本地路径中删除reveal.js并运行以下命令。

    jupyter nbconvert Slide.ipynb --to slides --post serve
    

    在网络上查找 js: . . . 将reveal.js请求重定向到https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.1.0

    我还发现了一些可能有帮助的东西。

    http://www.damian.oquanta.info/posts/using-a-local-revealjs-library-with-your-ipython-slides.html

    【讨论】:

    • 它生成一个纯html。不过,它尊重我选择要跳过的单元格。但情节图表也没有呈现。