anchor - 锚点替换为 '#id1' 、 '#id2' 、 '#id3' ... Sphinx
问题描述
我在 rst 文件中使用数字命名,但在构建它之后,锚点被替换为 '#id1'、'#id2'、'#id3' ....
我只需要使用数字来命名锚点......但我不知道如何......
这是我的第一个文件。
实际代码
*************
Screen(HTS)
*************
Quote
=============
1101
------------------
.. raw:: html
:file: _static/1101.html
1151
------------------
.. raw:: html
:file: _static/1151.html
1152
------------------
.. raw:: html
:file: _static/1152.html
1103
------------------
.. raw:: html
:file: _static/1103.html
解决方案
首先,下划线和上划线必须与文本长度相同。
不幸的是,您想要以数字开头的锚点,但 Sphinx 不支持这一点。您可以改为使用以字符串开头的任意锚点。请参阅使用 .交叉引用任意位置:ref:
的文档。这是一个例子。
***********
Screen(HTS)
***********
Quote
=====
.. _section-1101:
1101
----
推荐阅读
- blob - Oracle Apex如何将图像存储在数据库表中
- blazor - Blazor WebAssembly 新项目不允许选择 .NET 5
- node.js - 如何在 JavaScript 中计算 ruby 哈希?
- flutter - 如何防止 Flutter 多次 Tab Reloads
- typescript - B2C 自定义策略的自动化测试
- javascript - 从动态按钮 Javascript 获取测试
- excel - Excel VBA中的正则表达式执行完全匹配
- angular - 身份服务器 4 使用带有纯 js 客户端的 cookie
- sql - 我在 MSSQL 列中找不到将分组中的总和行数据的任何链接?
- c++ - 在 C++ 中使用 int 作为 void 指针