Jupyter pdf出口在一页后切断

时间:2017-12-18 17:29:45

标签: jupyter

我试图将3页jupyter笔记本导出为pdf, 但下载的文件只在1页后中断。 打印预览运行正常。 我没有比这更详细的信息,你有没有遇到过这样的错误?

我不知道如何解决这个问题,每一个提示都会受到高度赞赏。

bash文本是(抱歉长篇文章):

This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2017-04-15>
Babel <3.10> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class

....     包inputenc警告:使用基于utf8的引擎忽略inputenc包。

Package hyperref Message: Driver (autodetected): hxetex.


No file notebook.aux.

*geometry* driver: auto-detecting
*geometry* detected driver: xetex
*geometry* verbose mode - [ preamble ] result:
* driver: xetex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes: 
* h-part:(L,W,R)=(72.26999pt, 469.75502pt, 72.26999pt)
* v-part:(T,H,B)=(72.26999pt, 650.43001pt, 72.26999pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=469.75502pt
* \textheight=650.43001pt
* \oddsidemargin=0.0pt
* \evensidemargin=0.0pt
* \topmargin=-37.0pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)



Package hyperref Warning: Rerun to get /PageLabels entry.



LaTeX Warning: No \author given.

(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
(/usr/local/texlive/2017/texmf-dist/tex/latex/lm/t1lmtt.fd)
(/usr/local/texlive/2017/texmf-dist/tex/latex/psnfss/ts1ppl.fd) [1]
! Missing $ inserted.
<inserted text> 
                $
l.341 function for three types of agents, \$\alpha
                                                  - \$, \(\beta-\) type of
? 
! Emergency stop.
<inserted text> 
                $
l.341 function for three types of agents, \$\alpha
                                                  - \$, \(\beta-\) type of
Output written on notebook.pdf (1 page).
Transcript written on notebook.log.

1 个答案:

答案 0 :(得分:0)

您可能在编译中出错。参见Issue 893。我今天在Windows计算机上运行时遇到了类似的问题。五页文档中只有一个pdf页。

我选择了“下载为LaTex / Tex”(在Jupyter笔记本打开的会话中),然后在我的TeX编辑器(TeXworks)中打开了该tex文件。如果您有图像,它可能会被压缩,如果有,请解压缩文件。

然后,我使用Xelatex进行编译,该错误因出错而跳闸,并显示了该错误(在编译日志中),这是我在内联LaTex“ $”分隔符和某些LaTex开头之间留下的空白。我删除了空格,所以使用的是“ $ \ mathrm {MeV}”而不是“ $ \ mathrm {MeV}”,它可以很好地编译。

随后,我在Jupyter笔记本中对更正后的ipnyb文件测试了直接的“从LaTex下载PDF格式”,并且运行良好。