我正在帮助使用 sphinx 记录软件项目。我们希望在一个 HTML 文件中涵盖 13 个类。这很方便。
我的问题:某些类具有相同名称的属性(请参阅下面两个类中的“宽度”和“重量”)。在生成的 HTML 文档文件中,单击属性“width”将始终跳转到 HTML 锚点“#width”,而不管我正在查看的类是什么。
有没有办法让 sphinx 生成唯一的锚名称?
:mod:`GSFontMaster`
===============================================================================
Implementation of the master object. This corresponds more or less with the "Masters" pane in the Font Info.
In Glyphs.app the glyphs of each master are reachable not here, but as :class:`Layers <GSLayer>` attached to the :class:`Glyphs <GSGlyph>` attached to the :class:`Font <GSFont>` object. See info graphic on top for better understanding.
.. class:: GSFontMaster
.. autosummary::
name
id
weight
width
weightValue
widthValue
custom
customValue
ascender
capHeight
xHeight
descender
italicAngle
verticalStems
horizontalStems
alignmentZones
guideLines
userData
customParameters
----------
Properties
----------
.. attribute:: id
Used to identify :class:`GSLayer <Layer>` in the Glyph
:type: unicode
.. attribute:: name
:type: string
.. attribute:: weight
:type: string
.. attribute:: width
:type: string
.. attribute:: weightValue
Values for interpolation in design space.
:type: float
.. attribute:: widthValue
Values for interpolation in design space.
:type: float
.. attribute:: custom
:type: string
.. attribute:: customValue
Values for interpolation in design space.
.. attribute:: ascender
:type: float
.. attribute:: capHeight
:type: float
.. attribute:: xHeight
:type: float
.. attribute:: descender
:type: float
.. attribute:: italicAngle
:type: float
.. attribute:: verticalStems
List of vertical stem values
:type: list
.. attribute:: horizontalStems
List of horizontal stem values
:type: list
.. attribute:: alignmentZones
Collection of :class:`GSAlignmentZone <GSAlignmentZone>`.
:type: list
.. attribute:: guideLines
Collection of :class:`GSGuideLine <GSGuideLine>`.
:type: list
.. attribute:: userData
A dictionary to store user data. Use a unique Key and only use object that can be stored in a Property list (string, list, dict, numbers, NSData) otherwise the date will not be recoverable from the saved file.
:type: dict
.. attribute:: customParameters
A dictionary of custom parameters
:type: dict
:mod:`GSInstance`
===============================================================================
Implementation of the instance object. This corresponds more or less with the "Instances" pane in the Font Info.
.. class:: GSInstance
.. autosummary::
active
name
weight
width
weightValue
widthValue
isItalic
isBold
linkStyle
customParameters
----------
Properties
----------
.. attribute:: active
:type: bool
.. attribute:: name
:type: string
.. attribute:: weight
:type: string
.. attribute:: width
:type: string
.. attribute:: weightValue
Values for interpolation in design space.
:type: float
.. attribute:: widthValue
Values for interpolation in design space.
:type: float
.. attribute:: isItalic
Italic flag for style linking
:type: bool
.. attribute:: isBold
Bold flag for style linking
:type: bool
.. attribute:: linkStyle
Linked style
:type: string
.. attribute:: customParameters
A dictionary of custom parameters
:type: dict