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?

6
  • 1
    Try running ipython nbconvert --to latex --post PDF Presentacion.ipynb from command line. You cannot use this command in the interpreter. Commented Feb 24, 2015 at 8:16
  • Still doesn't work, i get: C:\Anaconda>"ipython" is not recognized as an internal or external command, operable program or batch file. Commented Feb 25, 2015 at 3: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. Commented Feb 25, 2015 at 7:22
  • I fix that, so i dont get that error anymore, insted when i try the nbconvert command i get this message: ` nknl` Commented Feb 25, 2015 at 20:15
  • Please refer to:stackoverflow.com/questions/29156653/… Commented Jul 6, 2019 at 9:33

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.