jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.75k stars 568 forks source link

Export to PDF with foreign language failed #243

Open ivanychev opened 8 years ago

ivanychev commented 8 years ago

Hey there. I've experienced some issues with PDF export on Jupiter Notebook (v 4.1.0) recently. jupiter nbconvert fails to convert

nbconvert failed: PDF creating failed

Being interested what's the matter, I've converted notebook to latex and compiled it using pdflatex. The error was that initiate packages imported in the preamble do not support russian language at all. Don't know anything about other languages.

Problem solved by adding

    \usepackage[T1,T2A]{fontenc}
    \usepackage[russian,english]{babel}

after

    \usepackage[utf8x]{inputenc}

and it finally worked in this case. Will it be native support for other languages for this type of export?

eignatenkov commented 8 years ago

same here. Thanks for this temp solution, btw.

ivanychev commented 8 years ago

@eignatenkov, I wrote a script to convert notebook to pdf via terminal. Maybe you find it useful :)

ipynb2pdf

It's easy to change the output language by simple editing the code.