-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial version of glTF spec in asciidoctor format #1901
Conversation
Significant remaining TBD: Math markup Greek letter attributes - define & expand in [source] Tables Links (https references) Internal xrefs/anchors Citations/references Appendix titles / formats Odd bit-packing diagrams Figure out how to dynamically? incorporate REFERENCE.adoc (would be by far easiest to statically generate it from wetzel repository and commit here - can't imagine it will often change).
Add anchors to sections, matching titles (might also match Asciidoc default behavior if no explicit anchor). Remove some extraneous
github, rather than the local repository branch (since there may not be a local branch, depending on how the spec is built and viewed - and the master branch registry should be canonical, as well).
Makefile for building and intermediate generated files, and tweakups markup of the math-rendering URLs to work properly with asciidoctor.
For reference, here are a couple ways of viewing the document: (edit 2020-11-20: latest PDF/HTML are in CI artifacts, see top of PR comments above for how to access). |
@oddhack If you get a chance can you regenerate the PDF and HTML zips here? Also are there remaining problems in the wetzel-generated output that you can see? Thanks! |
… numbers Use npx to invoke wetzel now that it's in npm (@donmccurdy)
Regenerated PDF and HTML (zipped) outputs. Latest updates are now linked from the top of the issue description. Appendices are all now "numbered" as appendices. Now that wetzel is in npm, uses 'npx wetzel' rather than needing the wetzel repo installed (thanks @donmccurdy @emackey !) |
@emackey should wetzel be running against the canonical schema in master branch on github, or against the locally checked-out schema? It's doing the former in the Makefile now but that seems suboptimal if anyone plans to evolve the schema :-) |
@emackey you asked in email if the Makefile can be run on Windows. TBH I have no idea. It will certainly run in Debian installed under WSL, though. If people want to experiment building the spec themselves, I can also provide instructions on using our Docker image with asciidoctor toolchain pre-installed. I don't know how running Docker images under Windows works since I can't nest a Docker container runtime inside a Windows 10 VM on my Linux desktop, but I expect it works when running under native Windows. |
Notes on running our Docker image and building the spec now in the PR header. |
It looks fine to me from a markup POV, so if the formatting is as you wish it, we should be good now. |
That's not quite what wetzel is doing. From the Makefile, wetzel's arguments look something like this: (abbreviated)
That last argument The
Of course, it's possible for a branch to differ from the master schema. This would result in a document that showed the branch's reference material, while linking back to GitHub master as the source. Worst case, a whole new section could be added on a branch, and wetzel would write a broken link to something that doesn't exist in master. This won't happen within glTF 2.0's timeframe of course, but could happen on the road to some future version. Two thoughts:
|
One more thought:
I didn't test this but I think it would work. Of course one would need to define |
Got it, thanks. I just saw the URL and assumed it was pulling from there, my bad.
For my confusion, I think a clarifying comment in the Makefile where the variable is set might have been more useful - something like "# Links to schema are generated to these URLs, which may not match the ones imbedded in the document"
Yes.
It can - in this case it would probably make sense to put it on the Makefile command line for asciidoctor as well as wetzel:
|
Following up a bit - for imbedding JSON in an appendix, perhaps wetzel could be invoked with different options that expand the schema name into the corresponding include directive rather than generating the properties descriptions, then that second generated file be included as an appendix? So output could look something like this:
and so on for the other classes. The Properties Reference section could then potentially link to the json-schema anchors, instead of or in addition to the repository URLs, to make the document more self-contained for ISO. |
Flip credits & copyrights
|
I found one that works: |
Checkmarks are working now. The whole document is starting to look very presentable with all of the recent changes. |
Co-authored-by: Ed Mackey <[email protected]>
* Integrate latest updates * More typography fixes * Apply suggestions from code review Co-authored-by: Gary Hsu <[email protected]> * Address feedback * Address feedback & add more clarifications * Address feedback Co-authored-by: Gary Hsu <[email protected]>
@lexaknyazev When this is ready, can we do a full merge instead of squash? |
* Add license text of all licenses used under LICENSES/. * Add copyright statements that are readable by REUSE where reasonably possible. * Add .reuse/dep5 entry as fallback licenses for images etc. where explicit copyrights not possible. * Add 'reuse lint' check to github Actions CI * Use 'TBD' license on vendor extensions, none of which seem to have explicit licenses and may not be owned by Khronos. * Some minor whitespace / EOL convention changes. * Add boilerplate files missing from repo such as CONTRIBUTING and COPYING.
For Working Group review. Specs built from the latest commit can be viewed by:
Building the spec yourself
To generate the specs locally, we recommend using a Khronos-supported Docker image as follows:
If you want to install the toolchain components yourself, refer to the vulkan-docs-base Dockerfile, which shows the steps needed to layer the toolchain components onto a base Ruby installation in a Debian or Ubuntu environment. We do not provide instructions for installing the components natively on other OS platforms.
Open issues
To decide: now that the properties reference is being generated from the schema, it raises an issue with github's asciidoctor renderer. They do not support the asciidoctor include:: directive and aren't likely to. So when viewing README.adoc via github, the properties reference shows up as an external link, rather than expanding inline. There are a couple of possible workarounds:Publish the spec in this two-part form.Check in a single-file spec source built by generating the properties reference, then editing that into the README. That's what the Makefile does with the SingleSpec.* targets.To decide: the generated properties reference comes with its own TOC. As a standalone document that is appropriate, but the automatically generated TOC of the asciidoctor outputs already includes every section in this chapter, so the extra one may be redundant.(Ed has added an option to wetzel to remove the extra TOC).To do: there are some minor issues with the generated properties reference (it should be using asciidoctor xrefs, rather than link: directives) - should be straightforward to correct and mostly affects just the PDF output.offlinelocal consumption outside a local repository and seems appropriate for canonical external references, as well.To be fixed: the Burley2012 link in the References section is dead.To be fixed: the Pharr2018 reference text says "2016" when referring to the 3rd edition, which is actually 2018 AFAICT(edit: the 2018 date was wrong, 3rd ed. published in 2016).The 'MIME Type' and 'File Extension' sections under 'GLB File Format Specification' appear to be one level too deep (skipped from # to ### Markdown level). I moved them up in the asciidoctor document.Get checkmarks (from wetzel-generated content) rendering properly, which see Adding support for more math characters asciidoctor/asciidoctor-pdf#1832 - there are several options to pursue.Consider migrating to builtin stem math processing instead of images - comparison available in Compare latexmath to image math rendering in asciidoctor branch #1909 along with some pros/cons of converting.