9
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyter notebookからpdfに変換する[mac]

Last updated at Posted at 2018-06-17

Jupyterからpdfに変換するためにかなり引っかかったのでメモ
画像付きで文書は英語のみのファイルを変換しようとしました

環境

  • macOS High Sierra
  • ver. 10.13.4
  • 環境管理はpyenv-virtualenv

やったこと


$ pip install notebook --upgrade
$ brew install pandoc
$ brew cask install basictex
$ echo "export PATH=/Library/TeX/texbin:$PATH" >> ~/.zshrc
$ source ~/.zshrc  # ここと一つ上はbashの方は.bash_profileやらに変更
$ sudo tlmgr update --self --all
$ sudo tlmgr install adjustbox
$ sudo tlmgr install collectbox
$ sudo tlmgr install ucs
$ sudo tlmgr install collection-langjapanese collection-luatex collection-latexextra  # 日本語のファイルを変換する場合に必要らしい
$ sudo tlmgr install collection-fontsrecommended
$ jupyter nbconvert your_filename.ipynb --to pdf  # pdfに変換する

参考

9
11
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?