KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.73k stars 459 forks source link

Note blocks have duplicate Note markings #2392

Closed SaschaWillems closed 1 month ago

SaschaWillems commented 1 month ago

Most (or maybe all) note blocks in the asciidoc files have a duplicate note marking like this:

[NOTE]
.Note
====
No common format has a single plane containing both R and B components but
does not store these components at reduced horizontal resolution.
====

This results in the following render:

image

Imo the second 'note' (inside the actual asciidoc note block) is redundant and could be removed.

Pretty minor, and probably requires changes in a lot of places though.

oddhack commented 1 month ago

It renders differently in Antora than in the HTML / PDF docs in the registry, where there's an blue circle with an 'i' in it + the "Note" title. So this would best be done as a CSS change in the Antora UI, not a markup change.

oddhack commented 1 month ago

Antora does setup the project to default to icons=font just as the regular HTML build does. However, according to https://gitlab.com/antora/antora-ui-default/-/issues/58 there is no font icon bundled with the default Antora UI. So I think what would have to happen is to bundle Font Awesome 4 (or other icon font) into our fork of the UI.

Edit: there is a prototype MR for doing this in https://gitlab.com/antora/antora-ui-default/-/merge_requests/121 but that specifically does not cover admonition icons. Per https://gitlab.com/antora/antora-ui-default/-/issues/58#note_1997714009, Dan Allen may have another mechanism for doing this, which I have inquired about on that issue.

SaschaWillems commented 1 month ago

Note sure how the PDF is generated, but could this be done using ifdefs? We do this in our samples:

ifdef::site-gen-antora[]
Some Text
endif::[]

And the text between that ifdef and endif only shows up when viewing that page through antora, but not e.g. when viewing it on github.

oddhack commented 1 month ago

The most straightforward thing to do is disable font icons and remove the explicit .Note titles. Then the HTML/PDF outputs will change to replace the 'i' icon with an emboldened "NOTE" to the left of the block, and remove the "Note" above the block. That is more consistent with the Antora docs.

oddhack commented 1 month ago

This should be fixed in the 1.3.291 spec update.