简体   繁体   English

在Windows 8.1上将ipython笔记本转换为pdf

[英]Convert ipython notebooks to pdf on windows 8.1

Is there anyway where i can convert ipython notebooks to pdf on windows 8.1? 无论如何,在Windows 8.1上我可以将ipython笔记本转换为pdf吗?

I found solutions, but only for Linux and macOS not for Windows. 我找到了解决方案,但仅适用于Linux和macOS,不适用于Windows。

You could install Latex for Windows ( http://latex-project.org/ftp.html ) and then do the conversion to Latex with a post to PDF that is mentioned in iPython's documentation . 您可以安装Windows版Latex( http://latex-project.org/ftp.html ),然后使用iPython 文档中提到的PDF转换为Latex。 I believe the command is something like this: 我相信命令是这样的:

ipython nbconvert --to latex --post PDF notebook.ipynb

Or you could convert to rst and then use the rst2pdf tool to convert that to PDF. 或者,您可以转换为rst,然后使用rst2pdf工具将其转换为PDF。

ipython nbconvert --to rst notebook.ipynb

Then once you have converted to rst, you can use rst2pdf like this: 然后,一旦您转换为rst,就可以使用rst2pdf,如下所示:

rst2pdf.py notebook.rst -o notebook.pdf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM