Skip to content
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

您好,我想问一下,juputer notebook转成pdf,中文不显示,怎么解决啊? #4

Open
xaiomoqing opened this issue Mar 7, 2018 · 7 comments

Comments

@xaiomoqing
Copy link

No description provided.

@tan800630
Copy link

It seems that others also stuck in this issue, and I find some information that might be helpful.

issue: jupyter/notebook#2848
solution posted on the issue: http://www.cnblogs.com/xuanyuyt/p/7471316.html

@xaiomoqing
Copy link
Author

修改 \Anaconda3\Lib\site-packages\nbconvert\templates\latex\article.tplx 文件
把 \documentclass[11pt]{article}
替换为
\documentclass{article}
\usepackage{ctex}
ctex为中文编译包

@nb5p
Copy link

nb5p commented Jul 2, 2018

@xaiomoqing 你好,我通过同样的方法修改过模板后,可以解决文档中的中文。但是标题中含有的中文字符在导出TeX文件时,显示为\title{??}。当然编译出的pdf,标题也是???

@xaiomoqing
Copy link
Author

标题的中文显示问题我也没有解决

@nb5p
Copy link

nb5p commented Jul 3, 2018

@xaiomoqing 我认为是nbconvert的问题,导致导出时标题中文无法显示

@zhiweio
Copy link

zhiweio commented Mar 29, 2019

@xaiomoqing @zhuxiaoxi

solution posted on the issue:
jupyter notebook导出包含中文的PDF并正常显示pandas表格

it works on MacOS

@nb5p
Copy link

nb5p commented Mar 29, 2019

@xaiomoqing @zhuxiaoxi

solution posted on the issue:
jupyter notebook导出包含中文的PDF并正常显示pandas表格

it works on MacOS

谢谢你的方法。这里还有一种解决方法 https://www.jianshu.com/p/49a0c9f74d59 亲测可用的
问题的根源在于nbconvert不支持也没有对 CJK 支持的计划。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants