当我尝试简单的表达式时 sphinx.ext.pngmath 引发错误
我正在使用 Sphinx 创建项目的文档。我想使用扩展 sphinx.ext.pngmath 并通过这个小测试:
Returns the indefinite integral of the polynomial *poly*:
.. math::
\int p(x)dx
我收到错误:
WARNING: inline latex u'\\int p(x)dx\n\n': latex exited with error:
[stderr]
[stdout]
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./math.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size12.clo))
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
! LaTeX Error: File `utf8x.def' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: def)
Enter file name:
! Emergency stop.
<read *>
l.131 \endinput
^^M
No pages of output.
Transcript written on math.log.
我已经安装了软件包 texlive-latex-base。
谢谢你, 鲁比克
I'm using Sphinx to create the documentation of my project. I want to use the extension sphinx.ext.pngmath and with this little test:
Returns the indefinite integral of the polynomial *poly*:
.. math::
\int p(x)dx
I got the error:
WARNING: inline latex u'\\int p(x)dx\n\n': latex exited with error:
[stderr]
[stdout]
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./math.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size12.clo))
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
! LaTeX Error: File `utf8x.def' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: def)
Enter file name:
! Emergency stop.
<read *>
l.131 \endinput
^^M
No pages of output.
Transcript written on math.log.
I have installed the package texlive-latex-base.
Thank you,
rubik
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
texlive-full
将安装所有 texlive 软件包,这确实有点过分了。您只需安装 texlive-latex-extra 即可解决此特定问题。
texlive-full
will install all the texlive packages which is indeed a bit of an overkill.You can install just
texlive-latex-extra
to fix this particular problem.我遇到了同样的问题,并在 ubuntu 上安装了软件包“texlive-full”。这有点矫枉过正,但它解决了问题......
迈克
I had the same problem, and installed the package 'texlive-full' on ubuntu. This is a bit overkill, but it fixed the problem....
Mike
我在 MikTeX 上遇到了同样的问题,发现我需要安装 ucs 包才能获取 utf8x.def。只是分享。
I had the same problem with MikTeX and found I needed to install the ucs package to get utf8x.def. Just sharing.
我遇到了同样的问题,但在 Windows 7 64 位上 MiKTeX ,这些解决方案不是相关的。 MiKTeX 设置为下载所需的软件包,我注意到 stderr 包含“未知的存档文件大小”。接下来是单词:“unicode”,所以我进入 MiKTeX 包管理器并安装了其中包含单词 unicode 的所有内容。但包管理器失败并出现类似的未知存档文件大小错误。然后我切换到另一个存储库镜像并安装了所有 unicode 包。然后...一切正常!
I had this same problem but on Windows 7, 64-bit with MiKTeX and these solutions weren't relevant. MiKTeX is set to download packages as they are required and I noticed that the stderr contained "Unknown archive file size." followed by the word: "unicode" so I went into the MiKTeX package manager and installed everything with the word unicode in it. But the package manager failed with a similar Unknown archive file size error. I then switched to another repository mirror and installed all unicode packages. And then... everything worked!