-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF-8 problem during converting to PDF #786
Comments
See my answer here: https://stackoverflow.com/a/49582428/2372611 The problem is Jupyter uses |
Can someone please produce a minimum example notebook.ipynb and/or provide a copy of the latex output from:
If I have a file to work with, then I can investigate this. |
I believe this is relevant. The April 2018 release of LaTeX defaults to utf-8 encoding. If I can get a file and replicate the issue, I may be able to solve this. |
I invensigated the problem a bit, and the main issue seems not to stem from the fact that the UTF8 is not correctly recognized. The actual problem is that the main font does not have the corresponding glyphs. Jupyter uses the The problem is that DejaVu Sans is not exactly pretty, and this would affect all documents, even those who don’t use non-latin scripts. A possible solution seems to be the ucharclasses package. That allows to define separate fonts for different unicode blocks. That way, the main (latin) font could be left as it is, only specifying fallback fonts for other scripts. The Noto fonts might be a viable set of fonts for non-latin blocks. |
I just spent some time exploring If I added the following:
to the bottom of the preamble (It messes with section titles if I put This will also only work in XeLaTeX, so it would be smart to wrap this is some
This way it is still possible to compile the latex file using pdflatex. CC @mpacer |
I just noticed an issue with this solution. |
When using xelatex (or lualatex) the preamble correctly loads the If we replace See my StackExchange answer for more detail. |
Hey there,
I have jupyter notebook from anaconda on Ubuntu 16.04 with installed xetex. I tried to convert it to PDF and it fetched successfully all english words and formulas, but there were some utf-8 symbols and it ignored it. Some logs here:
It generated valid tex file, but no multilanguage support in it.
The text was updated successfully, but these errors were encountered: