nbconvert

Combine 'toc' and 'hide input' when using nbconvert html export

允我心安 提交于 2020-06-27 09:07:50
问题 I would like to export my Jupyter notebook to html displaying the table of contents (toc2) AND hiding the input cells at the same time in the export. I use a template to hide the code (https://github.com/ihuston/jupyter-hide-code-html), which works fine for itself. For displaying the table of contents I run the command jupyter nbconvert --to html_toc FILE.ipynb , which works as well. As soon as I try to combine both by jupyter nbconvert --to html_toc --template HIDE_CELL FILE.ipynb , only

Jupyter Notebook nbconvert without magic commands/ w/o markdown

て烟熏妆下的殇ゞ 提交于 2020-04-11 15:27:01
问题 I have a Jupyter notebook and I'd like to convert it into a Python script using the nbconvert command from within the Jupyter notebook. I have included the following line at the end of the notebook: !jupyter nbconvert --to script <filename>.ipynb This creates a Python script. However, I'd like the resulting .py file to have the following properties: No input statements, such as: # In[27]: No markdown, including statements such as: # coding: utf-8 Ignore %magic commands such as: %matplotlib

Convert jupyter notebook to pdf: Error encounters when install pandoc

一个人想着一个人 提交于 2020-01-16 12:09:46
问题 I was trying to convert .ipynb to a pdf. I'm on Windows and use Jupyter via IE browser. I'm following the link http://pandoc.org/installing.html to install Pandoc. Here's what I have done: Any suggestions? Install MikTex: http://miktex.org/download Install pandoc Install stack: -got to cmd from pandoc folder, run stack setup -stack init -stack install---->ERRORS!! 回答1: If you would like an alternative to it instead of using nbconvert what you can do is : Download your ipynb file as HTML from

Best way to print Jupyter notebook slides? How to put a page break?

依然范特西╮ 提交于 2019-12-30 05:03:32
问题 I want to print my jupyter notebook and share the hardcopy with non-programmer coworkers. What I have done so far: I've figured out the way to hide the code :How to hide code from cells in ipython notebook visualized with nbviewer? I've figre out the way to convert the notebook to slides(html) Is there a way to print a jupyter/ipython notebook slide presentation? This post also suggests how to convert the html to pdf. My question: How to put a page break to specify the contents on each pdf

Convert Jupyter notebook to PDF - pdflatex not found on PATH

筅森魡賤 提交于 2019-12-21 05:32:15
问题 I'm trying to download my Jupyter notebook as a PDF from the web interface by going to: File -> Download as -> PDF via LaTeX However, I get this error: nbconvert failed: pdflatex not found on PATH I have both pandoc and MacTex installed. Additionally, in the terminal the pdflatex is set. $ which pdflatex /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin/pdflatex I'm running on Mac OS X El Capitan using Jupyter 4.2.0 with Python 2.7.11 回答1: Print it to pdf using your browser

ignore markdown cells in `jupyter nbconvert` with `--to script`

女生的网名这么多〃 提交于 2019-12-20 04:22:54
问题 Is it possible to have jupyter nbconvert ... --to script ignore markdown cells rather than convert them to comments? I'm asking because I want to use flake8 to check the Python code that's generated but I don't want to include the markdown cells (for example, because they are often long lines, and I don't want flake8 to complain about them). 回答1: There is the command line argument PythonExporter.exclude_markdown that does what you want. To get a list of pep8 errors that just look at the code

convert json ipython notebook(.ipynb) to .py file

若如初见. 提交于 2019-12-17 10:25:41
问题 How do you convert an IPython notebook file (json with .ipynb extension) into a regular .py module? 回答1: From the notebook menu you can save the file directly as a python script. Go to the 'File' option of the menu, then select 'Download as' and there you would see a 'Python (.py)' option. Another option would be to use nbconvert from the command line: jupyter nbconvert --to script 'my-notebook.ipynb' Have a look here. 回答2: According to https://ipython.org/ipython-doc/3/notebook/nbconvert

Jupyter and Bokeh: workaround for exporting bokeh plots when exporting Jupyter notebook to pdf

做~自己de王妃 提交于 2019-12-13 04:08:35
问题 I was hoping some heavy Jupyter and bokeh users might have a workaround for this. So I have a bunch of bokeh plots in my Jupyter notebook and I want to export the notebook to pdf . In the Jupyter Notebook file menu there is an option to download a notebook as a pdf . Also--and my preferred route--is to use nbconvert. The problem is that the bokeh plots are not exported into the final pdf file. Bokeh does not export its plots to a format that is caught by Latex to compile the pdf. In constrast

Error in Converting iPython Notebook file to PDF

家住魔仙堡 提交于 2019-12-12 03:44:50
问题 I am using linux and trying to convert .ipynb file to .pdf by following instructions from here but I am getting following error ipython nbconvert notebook_file.ipynb --to latex --post PDF but I am getting following error [NbConvertApp] Using existing profile dir: u'/home/user/.ipython/profile_default' Traceback (most recent call last): File "/usr/bin/ipython", line 5, in <module> start_ipython() File "/usr/lib/python2.7/dist-packages/IPython/__init__.py", line 120, in start_ipython return

jupyter nbconvert --to notebook not excluding raw cells

无人久伴 提交于 2019-12-11 05:41:59
问题 I'm trying to export notebooks from a ./doc folder to a `./notebook/ folder in the root of my project, but remove all the raw cells where I have rst. I tried the following: jupyter nbconvert --to notebook $< --output=$@ --TemplateExporter.exclude_raw=True I'm doing this in a Makefile (so the $< and $@ are the name of the local notebooks and the name of the notebook once it is moved to the top-level ./notebook dir, respectively). It runs, but the raw cells are still there in the copies of the