0

So, as the title say, i'm having a little trouble saving my notebooks as PDF, when i try:

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

i get the error:

File "<ipython-input-4-329ffed1c22e>", line 1
ipython nbconvert --to latex --post PDF Presentacion.ipynb
                ^
SyntaxError: invalid syntax

and i have no idea how to solve this, plus i also want to save it as a slide, but i get same error, does anyone know how to solve this problem?

Isak Baizley
  • 1,722
  • 4
  • 16
  • 21
  • 1
    Try running `ipython nbconvert --to latex --post PDF Presentacion.ipynb` from command line. You cannot use this command in the interpreter. – cel Feb 24 '15 at 08:16
  • Still doesn't work, i get: C:\Anaconda>"ipython" is not recognized as an internal or external command, operable program or batch file. – Isak Baizley Feb 25 '15 at 03:58
  • This means that `ipython` is not in your `PATH` variable, therefore it cannot be found. There could be multiple reasons for that. Unfortunately, I don't have a windows to test. – cel Feb 25 '15 at 07:22
  • I fix that, so i dont get that error anymore, insted when i try the nbconvert command i get this message: ` nknl` – Isak Baizley Feb 25 '15 at 20:15
  • Please refer to:https://stackoverflow.com/questions/29156653/ipython-jupyter-problems-saving-notebook-as-pdf – Behrouz Beheshti Jul 06 '19 at 09:33
  • Please refer to: https://stackoverflow.com/questions/29156653/ipython-jupyter-problems-saving-notebook-as-pdf I hope it helps. Behrouz – Behrouz Beheshti Jul 06 '19 at 09:35

2 Answers2

5

On PC, in Jupyter, you can choose 'File > print preview' instead of converting or 'Download as' it. Then you can right lick on the print preview and choose print. From here, you can choose to 'Save as PDF'. Here is the process:

Print Preview

Print

Save as PDF

I hope it helps.

Behrouz

Behrouz Beheshti
  • 1,053
  • 1
  • 10
  • 14
0

If you are using sagemath cloud version, you can simply go to the left corner,
select File --> Download as --> Pdf via LaTeX (.pdf)
Check the screenshot if you want.

Screenshot Convert ipynb to pdf

If it dosn't work for any reason, you can try another way.
select File --> Print Preview and then on the preview
right click --> Print and then select save as pdf.

Lefteris Xris
  • 900
  • 1
  • 11
  • 21