2012-07-27 140 views
3

我正在編寫一些python項目的文檔。我在連接兩個或多個文檔時遇到問題 - 我有三個Sphinx項目(文檔),我希望能夠在常規文檔中添加指向詳細文檔的鏈接。兩個文檔之間的獅身人面像連接

我有這樣一個項目結構:

project/ 
|  doc/       # this is my general doc 
|  | source/     # sphinx general doc .rst files are here 
|  |  build/ 
|  | _static/ 
|  | _templates/ 
|  | CVS/ 
| 
| 
|  forms/ 
|  | doc/ 
|  | | source/    # sphinx forms doc .rst files are here 
|  | |  build/ 
|  | | _static/ 
|  | | _templates/ 
|  | | CVS/  
|  |  
|  | src/      # forms source .py files are here 
| 
|  tables/ 
|  | doc/ 
|  | | source/    # sphinx tables doc .rst files are here 
|  | |  build/ 
|  | | _static/ 
|  | | _templates/ 
|  | | CVS/  
|  |  
|  | src/      # tables source .py files are here 

兩種形式的文檔和表格文檔包含從源文件生成與使用

文檔.. automodule ::指令。

如何在我的通用文檔中創建表單和表格文檔的鏈接?

也許我需要重新組織一些東西?

我已經讀了一些關於intersphinx,但到目前爲止,我已經找到了例子,僅說明如何通過specifing在這樣的獅身人面像項目的conf.py文件的URL鏈接到

Python標準庫文件:

intersphinx_mapping = {'python': ('http://docs.python.org/3.2', None)} 

我不知道如何創建這樣的事情比標準庫的東西不同勢和我 想

的相對路徑,而不是UR指定其位置L - 有什麼想法?

回答

2

intersphinx配置中的位置(在您的示例中爲'http://docs.python.org/3.2')實際上可以是任何URI或路徑到存在名爲objects.inv的文件的目錄由HTML構建器創建幷包含名稱和鏈接的註冊表。嘗試使用'../forms/_build/html'之類的東西。