微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

狮身人面像交叉引用尖括号中的内容?

如何解决狮身人面像交叉引用尖括号中的内容?

我看到很多这样的例子

════════ Exception caught by image resource service ════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: car_android.png

When the exception was thrown,this was the stack
#0      PlatformAssetBundle.load (package:Flutter/src/services/asset_bundle.dart:224:7)
<asynchronous suspension>
#1      AssetBundleImageProvider._loadAsync (package:Flutter/src/painting/image_provider.dart:672:14)
<asynchronous suspension>
Image provider: Assetimage(bundle: null,name: "car_android.png")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#243b1(),name: "car_android.png",scale: 1.0)

在 Sphinx 文档中,但我找不到它定义 :ref:`code <target to code>` code 含义的位置。也许其中一个是隐式或显式目标,另一个文件路径??

如果有人能给我提供如何交叉引用特定 .rst 文件中的标题的示例?

Adding a cross-reference to a subheading or anchor in another page 我知道如何使用 <target to code> 角色,但不知道如何对特定文件执行 :any

解决方法

来自 Cross-referencing syntax 的文档:

交叉引用由许多语义解释文本角色生成。基本上你只需要写

:role:`target`

并且将创建一个链接到名为 target 的项目,其类型由 role 指示。链接的文本将与 target 相同。

不过,还有一些额外的工具可以使交叉引用角色更加通用:

  • 您可以提供明确的标题和参考目标,例如在 reST 直接超链接中:

    :role:`title <target>`
    

    将引用target,但链接文本将是title

请注意,有时 title 也称为 label,具体取决于上下文。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。