-
Notifications
You must be signed in to change notification settings - Fork 162
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
New spx2html features for Tectonopedia #1016
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transport the code that deals with a document's ensemble of font families into its own file. There is a lot of code churn here, but I've compared the before-and-after HTML output with the tt-weave documents weave.web and xetex.web, and there are no changes besides some places where `/` and `'` become `/` and `'`. This is motivated by my plan to serialize the "assets" generated/used by a spx2html runs, but it also helps with some of the algorithms. By separating the "fonts" and "content" into separate substructures of the state, we can tidy up some of the algorithms with regards to simultaneous mutability.
After the literal split, we can go back and tidy up this stuff. This mostly adds docstrings but also homogenizes things a bit.
Which is the sensible thing to do.
This is the obviously sensible way to do things. It was just difficult to implement before refactoring the shared behavior into individual data structures.
Still need to figure out API and whether our serialization actually works.
…set specifications
This isn't yet complete, but should provide the first part of the "precomputed assets" mode that we'll use to be able to process lots of separate inputs to a standardized HTML output format.
I think that serde tries to work around this, but it appears to be a common issue that its workarounds can fail.
Try to have the important internal state linked to the "inner" Font state, not the TeX font. We'll need this to be able to load precomputed fonts that don't actually show up in the SPX file.
…t loaded We need to do this to ensure that we can output all of the font assets at the end of the run, if needed. This depends on a bunch of the internal reorganizations that I've been doing with font loading. It still feels pretty messy to me, but I think it's now working.
We'll see if this becomes a long-term choice, but it's looking like it is going to be better to handle paragraph tags at the LaTeX level with the new 2022 paragraph hook features.
Not 100% sure about the positioning here but in my one test, it's looking good!
…ification This is a quasi-hack to support the Tectonopedia build framework.
We have to jump through some annoying hoops to serialize all of our hashmaps with sorted keys, but we need this so that we're not always rebuilding everything in Pass 2 in Tectonopedia whenever anything changes, since without the explicit sorting, the order of everything in the maps will change from one invocation to the next.
Codecov Report
@@ Coverage Diff @@
## master #1016 +/- ##
=========================================
Coverage ? 44.77%
=========================================
Files ? 155
Lines ? 62698
Branches ? 0
=========================================
Hits ? 28076
Misses ? 34622
Partials ? 0
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are various major changes and improvements needed for the Tectonopedia project to do its fancy HTML emission.