2014年11月2日日曜日

IPython notebook でプレゼンテーション用スライドを作る

プレゼンテーションを作るときに困ることがある。

  1. 手軽に書きたい
  2. Texで数式
  3. 図を入れたい。
  4. プログラムを入れたい。
  5. かっこ良くしたい。
  6. PDFにしたい。
  7. 個人で使う分はフリーで済ませたい。
ざっと思いついたままに書くとこうなる。
いろいろ探していたら、最近IPython notebookからスライドが作成できることが判明した!
しかもreveal.jsを使っているのでいかにもギークっぽいかっこいいスライドが作れる。
こんな感じのやつ→http://lab.hakim.se/reveal-js/#/

まえからreveal.jsは使ってみたかったけど、jsとかHTMLとかよく分からんし、Web上で使えるやつもあったけど、PDFにするのに有料会員にならんといけんとかで挫折した。


スライドの作り方

1. IPython Notebookをインストールする。

IPython NotebookはAnacondaをつかってインストールするのがおすすめ。一式全部はいるし、アップデートも
conda update anaconda
で完了する。

2. 新しいNotebookを開いて設定する。

New Notebookを作成したら以下の図のところをSlideに設定する。

右のタブはSlide、Sub-Slideとか選べる。これはreveal.jsでいう横にスライドか、縦にスライドかを指定できる。いろいろ試してみて。

3. スライドへ変換する

IPython Notebookの編集が終わったら、NotebookからSlideへの変換をする。スライドの作成はここにあるとおりのコマンドを実行するとできる。--postでHTMLサーバーを指定する必要があるらしい。

ipython nbconvert notebook.ipynb --to slides --post serve

IPythonのバージョンが古いと文字がものすごく小さいので最新版にアップデートするのをおすすめ。
※Chromeで開くと数式がレンダリングされなかったのでmathjaxのプラグインをいれた。
ちなみにPDFにするときは
ipython nbconvert notebook.ipynb --to latex --post pdf


問題は記録用にPDFとかHTMLにしたらちょっとダサくなってしまうことか。
まぁよい。


4 件のコメント:

  1. aol customer care phone number is a Technical Support Number which assist you in technical questions while using aol email services And
    facing any issues related to Aol login,emails issues, are answered by Aol Technical Support team.
    Please contact us at +1800-284-6979. our customer support officer are available 24x7 round o clock.
    feel free to contact. aol customer care phone number

    返信削除

  2. In case you confront any kind of technical hitches and unable to fix the problem by the own, then give single ring on +1 800-684-5649 epson printer service. These whole procedures would be taken just only a plenty of 10 minutes. So, stop being worrying and keep continue read this article as here you will get the desired steps at an ease manner. After performing the above tasks, you should be now good to go for the print job.
    epson printer service

    返信削除
  3. How to Fix HP DeskJet Printer Offline Problem? Try these 7 fixes to troubleshoot the offline error.If in any case you still have issues. you can call HP Printer technical support team by 1 888-309-0939 at any time.
    Fix HP DeskJet Printer Offline issue
    hp deskjet printer offline error

    返信削除
  4. Roku remote to TV,is a hassle-free task with Roku.com/link experts. We have experienced experts to help you with Connect Roku Remote.If in any case you still have issues with Roku connected but not working, you can call Roku technical support team by 1 888-309-0939 at any time.
    Roku remote to TV
    How to Connect Roku Remote

    返信削除