是否可以将图像 title/caption 定位在 Asciidoctor 中的图像上方
Is it possible to position image title/caption above the image in Asciidoctor
目前,尽管我在代码中将标题放在图像之前,但我使用的所有图像标题都会自动放在图像之前。
例如,
[caption=]
.Simple diagram of data storage
image::user-guide/data-storage.png[width="600"]
有什么办法可以 re-position 标题,使其显示 above/before 图像,就像 table 标题位于 table 上方一样?
我假设您使用的是 Asciidoctor 的标准 HTML5 输出。这不能参数化; HTML 将始终首先呈现图像,然后呈现标题元素。
您可以覆盖 HTML5 后端中的图像渲染,或者创建您自己的后端以根据需要构建输出。
除了@ahus1 的回答之外,您还可以通过 docinfo 文件应用自定义样式表来实现您想要的演示。参见 https://asciidoctor.org/docs/user-manual/#docinfo-file
目前,尽管我在代码中将标题放在图像之前,但我使用的所有图像标题都会自动放在图像之前。
例如,
[caption=]
.Simple diagram of data storage
image::user-guide/data-storage.png[width="600"]
有什么办法可以 re-position 标题,使其显示 above/before 图像,就像 table 标题位于 table 上方一样?
我假设您使用的是 Asciidoctor 的标准 HTML5 输出。这不能参数化; HTML 将始终首先呈现图像,然后呈现标题元素。
您可以覆盖 HTML5 后端中的图像渲染,或者创建您自己的后端以根据需要构建输出。
除了@ahus1 的回答之外,您还可以通过 docinfo 文件应用自定义样式表来实现您想要的演示。参见 https://asciidoctor.org/docs/user-manual/#docinfo-file