這是部分答案,以我的知識爲限。我希望它能讓你更進一步。
默認情況下,轉換將粗體樣式應用於術語,並且該術語的定義與術語和換行的內聯換行在後續行中包含縮進。請參閱下面的屏幕截圖,瞭解Pyramid文檔的PDF輸出示例。
當你做make latexpdf
調用兩個處理器連續,轉換的reST文件到一個LaTeX文件,然後通過pdflatex
運行這些文件來生成PDF。
下面是在pyramid.tex
第一步的第一項詞彙出現什麼:
\item[{ACE\index{ACE|textbf}}] \leavevmode\phantomsection\label{\detokenize{glossary:term-ace}}
An \sphinxstyleemphasis{access control entry}. An access control entry is one element
in an {\hyperref[\detokenize{glossary:term-acl}]{\sphinxtermref{ACL}}}. An access control entry is a three-tuple that
describes three things: an \sphinxstyleemphasis{action} (one of either \sphinxcode{Allow} or
\sphinxcode{Deny}), a {\hyperref[\detokenize{glossary:term-principal}]{\sphinxtermref{principal}}} (a string describing a user or
group), and a {\hyperref[\detokenize{glossary:term-permission}]{\sphinxtermref{permission}}}. For example the ACE, \sphinxcode{(Allow,
'bob', 'read')} is a member of an ACL that indicates that the
principal \sphinxcode{bob} is allowed the permission \sphinxcode{read} against the
resource the ACL is attached to.
現在的問題歸結爲如何更改輸出,以便它可以根據您的需要的樣式。爲此,您需要解析LaTeX customization上的Sphinx文檔。如何做到這一點超出了我的理解。