Julia DataFrame输出在nbconvert中的Jupyter错误

时间:2016-05-19 01:48:37

标签: julia jupyter-notebook ijulia-notebook

Julia的DataFrame包的输出在Jupyter笔记本中看起来不错,但是使用nbconvert转换为pdf会导致以下错误。

! Package ucs Error: Unknown Unicode character 9474 = U+2502,
(ucs)                possibly declared in uni-37.def.
(ucs)                Type H to see if it is available with options.

See the ucs package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.410 │ Row │ A │ B       │ C    │

? 
! Emergency stop.
 ...                                              

l.410 │ Row │ A │ B       │ C    │

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on notebook.log.

unicode字符U + 2502是“BOX图纸LIGHT VERTICAL”,它是DataFrames包用于分隔表格列的垂直管道。

有关如何阻止此事的任何建议?

1 个答案:

答案 0 :(得分:2)

感谢Thomas Kminrk github,以下问题解决了这个问题。

在与包含以下内容的笔记本相同的目录中设置配置文件,例如nbConvertConfig.py

c = get_config()
c.PDFExporter.latex_command = ['xelatex', '{filename}']

然后从控制台运行jupyter nbconvert --to pdf --config nbConvertConfig.py Example.ipynb