Skip to content
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

Rearrange2 #2436

Merged
merged 8 commits into from
Nov 15, 2024
Merged

Rearrange2 #2436

merged 8 commits into from
Nov 15, 2024

Conversation

brucemiller
Copy link
Owner

This PR rearranges a bit of code to more appropriate modules; more consistent utilities and naming. Improves the tracing and debugging commands.

@brucemiller brucemiller requested a review from dginev November 14, 2024 23:58
Copy link
Collaborator

@dginev dginev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great overall, but now that you have raised awareness to \tiny ... \Huge having moved out of TeX.pool.ltxml in #2358, I worry they will quietly disappear in cases they used to work in before. Ideally, we would like to make them widely available to all .cls cases in latexml that used to work in the past.

So at the least we should add them to OmniBus.cls.ltxml?

But I also wonder if they wouldn't be a reasonable fit in the font-related block of LaTeX.pool.ltxml itself for now, until the next evolution of .cls support.

On a closer look, the bindings that don't use LoadClass, and are hence top-level class definitions, are:

  • report.cls.ltxml, article.cls.ltxml, slides.cls.ltxml, standalone.cls.ltxml,book.cls.ltxml

And possibly some third-party definitions external to the LaTeXML repository, but we don't have full visibility there. I see standalone loads its raw variant which loads article, so that is OK.

So there is a remaining change of behavior only in the slides.cls.ltxml case, for the in-repo bindings.

Comment on lines +104 to +115
#======================================================================
DefPrimitiveI('\tiny', undef, undef, font => { size => 5 });
DefPrimitiveI('\scriptsize', undef, undef, font => { size => 7 });
DefPrimitiveI('\footnotesize', undef, undef, font => { size => 8 });
DefPrimitiveI('\small', undef, undef, font => { size => 9 });
DefPrimitiveI('\normalsize', undef, undef, font => { size => 10 });
DefPrimitiveI('\large', undef, undef, font => { size => 12 });
DefPrimitiveI('\Large', undef, undef, font => { size => 14.4 });
DefPrimitiveI('\LARGE', undef, undef, font => { size => 17.28 });
DefPrimitiveI('\huge', undef, undef, font => { size => 20.74 });
DefPrimitiveI('\Huge', undef, undef, font => { size => 29.8 });

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should flag that I plan to open a related issue: \tiny, ..., \Huge are responsible for changing \baselineskip, and the fact that LaTeXML does not do that has very visible side effects with TikZ.

@dginev dginev self-requested a review November 15, 2024 19:25
@brucemiller
Copy link
Owner Author

Good catch! slides is the only one not based on LoadClass. I kinda hated the duplication, but theoretically classes define these differently; and having them defined when the "shouldn't" be causes confusion to the (eventual) latex.ltx loader.
@xworld21 I'm looking forward to further tikz refinements; there's going to be a big push on all that stuff in the future.

@brucemiller brucemiller merged commit f2b2a7e into master Nov 15, 2024
26 checks passed
@brucemiller brucemiller deleted the rearrange2 branch November 15, 2024 19:38
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.

3 participants