Python sphinx Sphinx/reStructuredText:是否可以有一个html文档树,但将其拆分为单独的latex/pdf文档
我正在使用Python Sphinx进行一个更大的文档项目。我刚刚开始,并设法克服了第一个障碍,创建了一个文件夹结构,该文件夹结构面向对整个项目有贡献的各个子项目:Python sphinx Sphinx/reStructuredText:是否可以有一个html文档树,但将其拆分为单独的latex/pdf文档,python-sphinx,restructuredtext,Python Sphinx,Restructuredtext,我正在使用Python Sphinx进行一个更大的文档项目。我刚刚开始,并设法克服了第一个障碍,创建了一个文件夹结构,该文件夹结构面向对整个项目有贡献的各个子项目: .../source/ conf.py index.rst (braket file for everything) /OverViewDocumentation/ overview.rst /Subprojects/ /sub1/ index.
.../source/
conf.py
index.rst (braket file for everything)
/OverViewDocumentation/
overview.rst
/Subprojects/
/sub1/
index.rst
sub1Docu.rst
/sub2/
indexfile.rst
sub2Docu.rst
我想看到的是,这个结构可以通过一个html结构访问,但是叶子文档变成了单独的LaTeX/PDF文档
这能实现吗
我的conf.py如下所示:
latex_documents = [
(master_doc,
'TexDoc1.tex',
'Title1',
'author1',
'Custom docclass'),
('abolute\\path\\to\\other\\indexfile.rst',
'TexDoc2.tex',
'Title2',
'author2',
'Custom docclass'),
]
但我总是收到错误信息:
WARNING: "latex_documents" config value references unknown document <pathto>\indexfile
警告:“latex\u documents”配置值引用未知文档\indexfile
请注意,无论我使用绝对路径还是相对路径,都会出现错误。多亏了mzjn的提示,我找到了解决方案 错误在conf.py文件中。工作文件如下所示:
latex_documents = [
(master_doc,
'TexDoc1.tex',
'Title1',
'author1',
'Custom docclass'),
('relative/path/to/other/indexfile',
'TexDoc2.tex',
'Title2',
'author2',
'Custom docclass'),
]
在上面的文件中,我有以下问题
- 使用反斜杠而不是斜杠(我正在使用窗口系统)
- 绝对路径的使用
- 对indexfile使用显式文件扩展名
- 多亏了mzjn的提示,我找到了解决方案
错误在conf.py文件中。工作文件如下所示:
latex_documents = [
(master_doc,
'TexDoc1.tex',
'Title1',
'author1',
'Custom docclass'),
('relative/path/to/other/indexfile',
'TexDoc2.tex',
'Title2',
'author2',
'Custom docclass'),
]
在上面的文件中,我有以下问题
- 使用反斜杠而不是斜杠(我正在使用窗口系统)
- 绝对路径的使用
- 对indexfile使用显式文件扩展名
'Subprojects/sub1/index'
。看,我也尝试了一个相对路径没有工作这是你要找的吗。。。可能-我试图调整conf.py,但总是收到错误消息,表明Sphinx没有找到我想要从主文档中分离出来的文档。“startdocname”项应该是一个相对路径。类似于'Subprojects/sub1/index'
。看,我也尝试了一个相对路径,但不起作用