Tensorflow-101 icon indicating copy to clipboard operation
Tensorflow-101 copied to clipboard

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

Open xaiomoqing opened this issue 7 years ago • 7 comments

xaiomoqing avatar Mar 07 '18 03:03 xaiomoqing

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

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

tan800630 avatar Mar 08 '18 01:03 tan800630

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

xaiomoqing avatar Mar 12 '18 05:03 xaiomoqing

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

nb5p avatar Jul 02 '18 06:07 nb5p

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

xaiomoqing avatar Jul 02 '18 09:07 xaiomoqing

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

nb5p avatar Jul 03 '18 02:07 nb5p

@xaiomoqing @zhuxiaoxi

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

it works on MacOS

zhiweio avatar Mar 29 '19 02:03 zhiweio

@xaiomoqing @zhuxiaoxi

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

it works on MacOS

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

nb5p avatar Mar 29 '19 12:03 nb5p