Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在一个HTML文件中重复类属性_Python_Python Sphinx - Fatal编程技术网

Python 在一个HTML文件中重复类属性

Python 在一个HTML文件中重复类属性,python,python-sphinx,Python,Python Sphinx,我正在用sphinx帮助记录一个软件项目。我们希望在一个HTML文件中涵盖13个类。它很方便 我的问题是:有些类具有相同名称的属性(请参见下面两个类中的“宽度”和“重量”)。 在生成的HTML文档文件中,单击属性“width”将始终跳转到HTML锚定“#width”,而不管我正在查看哪个类 有没有办法让sphinx生成唯一的锚点名称 :mod:`GSFontMaster` ==============================================================

我正在用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
:mod:`GSFontMaster`
===============================================================================
主对象的实现。这或多或少与字体信息中的“主控”窗格相对应。
在Glyphs.app中,每个主控形状的轮廓不是在这里,而是作为:class:`Layers`附加到:class:`Glyphs`附加到:class:`Font`对象。请参见顶部的信息图,以便更好地理解。
.. 类::GSFontMaster
.. 自动摘要::
名称
身份证件
重量
宽度
权重值
宽度值
风俗
顾客价值
上升者
帽高
xHeight
后裔
意大利
垂直茎
水平茎
路线带
指导方针
用户数据
自定义参数
----------
性质
----------
.. 属性::id
用于标识:Glyph中的class:`GSLayer`
:类型:unicode
.. 属性::名称
:type:string
.. 属性::权重
:type:string
.. 属性::宽度
:type:string
.. 属性::权重值
设计空间中的插值值。
:类型:浮动
.. 属性::宽度值
设计空间中的插值值。
:类型:浮动
.. 属性::自定义
:type:string
.. 属性::自定义值
设计空间中的插值值。
.. 属性::上升器
:类型:浮动
.. 属性::capHeight
:类型:浮动
.. 属性::xHeight
:类型:浮动
.. 属性::下降器
:类型:浮动
.. 属性::italicAngle
:类型:浮动
.. 属性::垂直茎
垂直杆值列表
:类型:列表
.. 属性::水平茎
水平杆值列表
:类型:列表
.. 属性::alignmentZones
集合:类:`GSAlignmentZone`。
:类型:列表
.. 属性::指南
集合:类:`GSGuideLine`。
:类型:列表
.. 属性::用户数据
存储用户数据的字典。请使用唯一键,并仅使用可存储在属性列表中的对象(字符串、列表、dict、数字、NSData),否则无法从保存的文件中恢复日期。
:类型:dict
.. 属性::自定义参数
自定义参数字典
:类型:dict
:mod:`GSInstance`
===============================================================================
实例对象的实现。这或多或少与字体信息中的“实例”窗格相对应。
.. 类::GSInstance
.. 自动摘要::
忙碌的
名称
重量
宽度
权重值
宽度值
伊斯兰的
伊斯波尔德
链接样式
自定义参数
----------
性质
----------
.. 属性::活动
:类型:bool
.. 属性::名称
:type:string
.. 属性::权重
:type:string
.. 属性::宽度
:type:string
.. 属性::权重值
设计空间中的插值值。
:类型:浮动
.. 属性::宽度值
设计空间中的插值值。
:类型:浮动
.. 属性::isItalic
用于样式链接的斜体标志
:类型:bool
.. 属性::isBold
用于样式链接的粗体标志
:类型:bool
.. 属性::链接样式
链接样式
:type:string
.. 属性::自定义参数
自定义参数字典
:类型:dict

您必须添加类名:
GSFontMaster
width
属性应该如下所示:

.. attribute:: GSFontMaster.width

    :type: string
(必须根据完整属性名调整自动摘要条目。)