如何解决如何使用Sphinx生成PDF
我正在尝试学习Sphinx文档创建工具。我能够生成html文档。现在,为了创建(html)文档的脱机版本,我一直在尝试从我的项目中生成pdf文件。
为了实现这一目标,到目前为止,我已经尝试了以下方法(使用包括 Sphinx 文档在内的网络上的可用资源)
在 conf.py 中添加了以下内容:
# conf.py options for Latex
latex_engine = 'pdflatex'
latex_elements = {
'papersize': 'a4paper','pointsize': '10pt',}
随后在终端中使用了命令make latexpdf
,随后我在终端中收到以下消息:
/Users/.../.../.../.../.../urls.py:docstring of lead.urls:5: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/.../urls.py:docstring of lead.urls:7: WARNING: Unexpected indentation.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing lead.tex... index modules/...
resolving references...
done
writing... done
copying TeX support files... copying TeX support files...
done
build succeeded,() warnings.
The LaTeX files are in _build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
latexmk -pdf -dvi- -ps- 'lead.tex'
make[1]: latexmk: No such file or directory
make[1]: *** [lead.pdf] Error 1
make: *** [latexpdf] Error 2
创建了一个新文件夹latex
,其中包含许多文件,其中一个文件名为<project_name>.tex
(上面的错误日志中为lead.tex
)和一个批处理文件{{1} }。
但是,运行命令make.bat
仅会产生以下错误:
make
遵循latexmk -pdf -dvi- -ps- 'lead.tex'
make: latexmk: No such file or directory
make: *** [lead.pdf] Error 1
上的一些线索(网上有资料),试图从Tex site安装latexmk
软件包。
但是,可用的软件包仅适用于macO 10.13和更高版本。我在BasicTex
上。
所以我被困住了。有人可以让我知道是否可以解决我的困境吗?
解决方法
https://www.tug.org/mactex/faq/3-4.html在macOS 10.12.6上为我工作。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。