在 asciidoctor 中交叉引用元素及其标签
Cross-referencing elements with their label in asciidoctor
我目前正在使用 asciidoctor 编写文档,我需要 link 文档中的图像和部分。虽然我了解 asciidoctor 中的交叉引用是如何工作的,但我想知道是否有一种方法可以让 link 元素(如部分和图像)显示 asciidoctor 使用 :sectnums: 属性生成的元素编号。在此示例中,您无需手动输入即可更好地了解我希望实现的目标:
我认为这还不可能...参见问题:#858: Add possibility to use figure number or text in link text
#1381: Attributes reference is not replaced in anchors中讨论了一种方法:
[#system_overview,reftext='{figure-caption} {counter:refnum}']
image::system_overview.png[]
我目前使用的解决方案是post-用一些基于JSoup 的java 代码处理生成的HTML。当然这不适用于 PDF 后端。
我目前正在使用 asciidoctor 编写文档,我需要 link 文档中的图像和部分。虽然我了解 asciidoctor 中的交叉引用是如何工作的,但我想知道是否有一种方法可以让 link 元素(如部分和图像)显示 asciidoctor 使用 :sectnums: 属性生成的元素编号。在此示例中,您无需手动输入即可更好地了解我希望实现的目标:
我认为这还不可能...参见问题:#858: Add possibility to use figure number or text in link text
#1381: Attributes reference is not replaced in anchors中讨论了一种方法:
[#system_overview,reftext='{figure-caption} {counter:refnum}']
image::system_overview.png[]
我目前使用的解决方案是post-用一些基于JSoup 的java 代码处理生成的HTML。当然这不适用于 PDF 后端。