Skip to content

Convert markup and build to asciidoctor#23

Open
oddhack wants to merge 13 commits into
mainfrom
adoc
Open

Convert markup and build to asciidoctor#23
oddhack wants to merge 13 commits into
mainfrom
adoc

Conversation

@oddhack

@oddhack oddhack commented Aug 14, 2024

Copy link
Copy Markdown
Contributor

asciidoc.py is long obsolete and this gets on a path to incorporate the DF spec into Antora builds and use the current asciidoctor. The changes were pretty extensive and include markup conversions to modern asciidoc syntax, toolchain conversions from the old asciidoc style and converter paths, filename changes (.txt->.adoc) in anticipation of use in Antora, incorporation of repository boilerplate (REUSE etc.) common to many Khronos repos, and more.
The spec build works for both HTML and PDF targets, but there are many instances of a few formatting issues, mostly:

  • Image sizes tend to be too small in HTML build - probably needs updating image width attributes for modern asciidoc
  • Tables with many columns tend to overflow the HTML browser window, which is probably a CSS issue
  • There is one broken table in chapters/bptc.adoc:[[table-bptcmodes]] which I commented out because it was producing 'table cell too wide' hard errors from asciidoctor-pdf and I wanted to get this working
  • CI needs some tweaks

Finally, this is not up to date with the default branch. I did most of this work several years and just tweaked the branch tonight to be able to build PDF successfully, so the 1.4 changes are not included. That's a big delta because there were many changes in the formatting while 1.4 also did significant changes. @fluppeteer we should discuss offline if you try this out and want to proceed down this path. While you can still do a meaningful 'git diff' against main, it is enormous and conflict resolution will take considerable effort - I had originally hoped to get this in before major updates to the default branch occurred.

To build if you do not have the Vulkan spec toolchain already installed:

scripts/runDocker (or runPodman should work if you have podman)
cd /spec
npm install
make html pdf
exit

oddhack added 10 commits August 11, 2024 08:14
Plus minor Makefile fix for a file whose name changed
Add boilerplate metafiles, asciidoctor config files, scripts, etc. based
on Vulkan.
latexmath macros, and one excess trailing table cell separator that
caused an error.
Remove latexmath-like attribute shorthand from inline (already in attribs.adoc)
Remove extra top-level headings that only appeared in PDF
Modify anchor names that were invalid XML IDs
oddhack added 3 commits June 6, 2026 04:38
{align*} environments around multiple-line expressions in latexmath
blocks.

Use asciidoc attributes instead of HTML entities for special symbols,
which works for both HTML and PDF builds.

Remove some a2xhtml conditionals that are irrelevant, replace some
others (which may be irrelevant) with backend-html5 conditionals.
Use modern quote style everywhere.
Remove lunr module dependency, which is not needed in this repo.
@oddhack

oddhack commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

One more comment - most of the math errors with the PDF build were due to latexmath blocks where there were multiline expressions (line ending in \ followed by another line) but no surrounding {align*} environment. With that added they stopped causing errors. I don't know if those were actual LaTeX math errors that just happened to work in the older math path, or problems in the new math path. Also, there were some places where \ needed to be added so multiple unrelated expressions did not get rendered on the same line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant