Skip to content

New spx2html features for Tectonopedia - #1016

Merged
pkgw merged 39 commits into
tectonic-typesetting:masterfrom
pkgw:pedia-features
Mar 29, 2023
Merged

New spx2html features for Tectonopedia#1016
pkgw merged 39 commits into
tectonic-typesetting:masterfrom
pkgw:pedia-features

Conversation

@pkgw

@pkgw pkgw commented Mar 29, 2023

Copy link
Copy Markdown
Collaborator

These are various major changes and improvements needed for the Tectonopedia project to do its fancy HTML emission.

pkgw added 30 commits January 28, 2023 17:03
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.
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.
pkgw added 8 commits January 28, 2023 17:06
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

codecov Bot commented Mar 29, 2023

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@40214f0). Click here to learn what that means.
The diff coverage is 0.83%.

❗ Current head 0b9a085 differs from pull request most recent head 887e8e1. Consider uploading reports for the commit 887e8e1 to get more accurate results

@@            Coverage Diff            @@
##             master    #1016   +/-   ##
=========================================
  Coverage          ?   44.77%           
=========================================
  Files             ?      155           
  Lines             ?    62698           
  Branches          ?        0           
=========================================
  Hits              ?    28076           
  Misses            ?    34622           
  Partials          ?        0           
Impacted Files Coverage Δ
crates/engine_spx2html/src/assets.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/emission.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/finalization.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/fontfile.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/fonts.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/initialization.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/lib.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/specials.rs 0.00% <0.00%> (ø)
crates/engine_spx2html/src/templating.rs 0.00% <0.00%> (ø)
crates/engine_xetex/xetex/xetex-xetex0.c 78.79% <ø> (ø)
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pkgw
pkgw merged commit cd1733f into tectonic-typesetting:master Mar 29, 2023
@pkgw
pkgw deleted the pedia-features branch March 29, 2023 17:35
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