Val*_*tas 4 reveal.js jupyter-notebook nbconvert
在创建的ipython笔记本(jupyter)幻灯片中
ipython nbconvert presentation.ipynb --to slides --post serve
Run Code Online (Sandbox Code Playgroud)
图像质量差,因为它们似乎缩小到了页面宽度。如何增加页面宽度/在演示文稿中显示更大的图像?
经过长时间的搜索,我自己找到了答案:
从复制模板文件
lib/python2.7/site-packages/nbconvert/templates/html/slides_reveal.tpl
到笔记本的目录。
自定义它,例如在Reveal.initialize({ })
添加中
width: '80%',
height: '100%',
transition: 'concave',
Run Code Online (Sandbox Code Playgroud)跑
jupyter nbconvert presentation.ipynb --to slides --template slides_reveal.tpl --post serve
Run Code Online (Sandbox Code Playgroud)
要不就
jupyter nbconvert presentation.ipynb --to slides --template slides_reveal.tpl
Run Code Online (Sandbox Code Playgroud)
然后presentation.slides.html
直接在浏览器中打开。或者:
python -m SimpleHTTPServer
Run Code Online (Sandbox Code Playgroud)
并浏览到
http://127.0.0.1:8000/presentation.slides.html
Run Code Online (Sandbox Code Playgroud) 归档时间: |
|
查看次数: |
1801 次 |
最近记录: |