问题描述
我正在为一家IT公司实习,该公司需要为其固件文档(md文件)提供文档应用程序.
I'm doing an internship for an IT company which needs a document application for its firmware docs (md files).
请求是维护这些md文件并将其转换为rst格式(我使用pandoc).因此,现在我有一个仅配置了rst文件的Sphinx应用程序.现在的问题是,第一个具有到SVG图像的链接,我必须使用Sphinx的乳胶生成器将它们转换为PDF.
The request was to maintain these md files and to convert them to rst format (I used pandoc). So now I have a configured Sphinx application with only rst files. The problem now is that some rst have links to SVG images, and I have to use the latex builder of Sphinx to convert them to PDFs.
我进行了搜索,发现了2年前的这个解决方案,这基本上就是我一直在寻找的解决方案: https://sites.google.com/site/nickfolse/home/sphinx-latexpdf-output-with-svg-images .我尝试实现它,但是我不是GNU makefile的专家,我不知道Sphinx的当前版本是否允许它,或者它是否存在简单的解决方法,所以事情没有成功.
I've searched around and I found this solution from 2 years ago, which was essentially what I was looking for: https://sites.google.com/site/nickfolse/home/sphinx-latexpdf-output-with-svg-images. I tried to implement it but I'm not an expert with GNU makefiles and I don't know if the current version of Sphinx allows it or if it is out there an easy workaround, so the thing didn't succeed.
有人对此有可行的解决方案吗?
Does someone have a viable solution for this?
推荐答案
目前,尚不支持SVG.我通过将原始文件(OmniGraffle)导出到SVG和PNG来解决Pyramid文档中的问题.
At this time, SVG is still not supported. I work around it in Pyramid docs by exporting the original file (OmniGraffle) to both SVG and PNG.
.. image:: ../_static/pyramid_request_processing.*
然后将图像放置在 docs/_static 中.
这篇关于Sphinx文档:通过乳胶在PDF中包含svg图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!