Open LiberalArtist opened 7 months ago
I've pushed some updates in response to @owaddell's https://github.com/dybvig/stex/pull/7#issuecomment-1820971301
In the process, I found that this repository contains the files:
csug/scheme.sty
csug/scheme.hsty
release_notes/scheme.sty
(n.b. no .hsty
)which are slightly different both from each other and from the versions in stex/inputs/
, which they override.
Well, at least \schemesummarysize
is used: I'll investigate further.
I've force-pushed a rebased commit that more completely addresses @owaddell's https://github.com/dybvig/stex/pull/7#issuecomment-1820971301 and the follow-up issues I described in https://github.com/cisco/ChezScheme/pull/761#issuecomment-1823340240. I've also pushed an un-squashed version of these changes to https://github.com/LiberalArtist/ChezScheme/tree/hist/katex-2.
It worked out to just remove csug/scheme.hsty
and release_notes/scheme.sty
and use the current versions from stex, but csug/scheme.sty
(i.e. the PDF of the user's guide) needed a little more work. It had defined \schemesummarysize
and \schemeindexsize
to get tighter spacing for the summary of forms and the index, respectively, especially to make the entries in the summary of forms fit on a single line. The approach relied on implementation details: in particular, it assumed that redefining \tt
would affect the expansion of \scheme{}
, whereas the stex version of scheme.sty
has instead used \ttfamily
since its initial public release in https://github.com/dybvig/stex/commit/c715b0b70894476b4acdfafe39f29b8555458bb4. It also turned out not to have been entirely successful at avoiding collisions, even before this PR, e.g.:
I inlined the non-dead code from \schemesummarysize
and \schemeindexsize
into the definitions of theindex
and thesummary
in csug8.cls
, allowing me to remove csug/scheme.sty
and use the version from stex. I was able to fix the collisions by tightening \spaceskip
and using a slightly smaller font size for the formal parameters:
After these fixes, the following overfull \hbox
warnings remained and were treated as errors by the logcheck build step:
Overfull \hbox (17.36086pt too wide) in paragraph at lines 2925--2928
Overfull \hbox (16.00319pt too wide) in paragraph at lines 3679--3691
Overfull \hbox (25.58617pt too wide) in paragraph at lines 3861--3872
Overfull \hbox (16.2795pt too wide) in paragraph at lines 5227--5480
Overfull \hbox (19.06062pt too wide) in paragraph at lines 401--404
Overfull \hbox (16.2795pt too wide) in paragraph at lines 3083--3100
I have not managed to find the offending \hbox
es, and I've just about exhausted my LaTeX debugging skills (which I don't feel are particularly strong). Instead, the latest commit increases \hfuzz
(from 16.0pt
to 26.0pt
) to just ignore the problem.
At this point, I think this PR is ready to merge as soon as https://github.com/dybvig/stex/pull/7 is merged (so the stex submodule can point to the merged, and ideally tagged, version).
I've rebased this on the latest main
. I'm marking this PR as "ready for review" to reflect the fact that I think it is complete, but I still think https://github.com/dybvig/stex/pull/7 should be merged first so the submodule can point to the merged, and ideally tagged, commit.
KaTeX renders LaTeX math ahead-of-time to MathML and/or HTML, as an alternative to rendering to GIF images. The most important benefit of using KaTeX is that its output is accessible to screenreaders and other assistive technologies, rather than appearing as
<graphic>
. The output also integrates with CSS, can be copied and pasted as text, can reflow across line breaks as needed, and doesn't suffer from pixelation.Depends on https://github.com/dybvig/stex/pull/7
As an example, here is a comparison of the rendering of:
https://github.com/cisco/ChezScheme/blob/0654a2d8fee32bef7c2f1ff802437fbdc2c42f01/csug/smgmt.stex#L167-L171