A little hack to get a pdf from your IPython slides
A lot of users of the slides
option in IPython.nbconvert
asked me about how to get a pdf from the generated Reveal.js-based slideshow.
To make the story short, here you have the detailed steps:
-
cd
in the directory where your slideshow lives - add this
custom.css
file: https://gist.github.com/damianavila/6211198 - run this little snippet: https://gist.github.com/damianavila/6211211
- run
python -m SimpleHTTPServer 8001
- open Mozilla Firefox browser and point to
localhost:8001
- add
?print.pdf
to the end of the url (ie,http://127.0.0.1:8001/your-ipynb.slides.html?print-pdf
) - print to pdf (use Landscape orientation)
Do you want to get this little hack integrated to IPython? @fperez, the IPython BDFL does:
@damian_avila @profjsb ultimately we should fold that into master though...
— Fernando Perez (@fperez_org) August 29, 2013
So, time to write some code and do a PR... in the meantime use this hack ;-)
Damián.
Did you like the content? Great!
Or visit my support page for more information.
Btw, don't forget this blog post is an ipynb file itself! So, you can download it from the "Source" link at the top of the post if you want to play with it ;-)
Comments powered by Disqus