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
Prev Previous commit
Next Next commit
Move \tiny,...\Huge to latex class files
  • Loading branch information
brucemiller committed Nov 14, 2024
commit 1640d3ce789ade8aebd640c761e8957ca2263fde
20 changes: 10 additions & 10 deletions lib/LaTeXML/Engine/plain.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -417,16 +417,16 @@ DefPrimitiveI('\cal', undef, sub {

# Ideally, we should set these sizes from class files
AssignValue(NOMINAL_FONT_SIZE => 10);
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 });
# 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 });

DefPrimitiveI('\mit', undef, undef, requireMath => 1, font => { family => 'italic' });

Expand Down
12 changes: 12 additions & 0 deletions lib/LaTeXML/Package/article.cls.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,17 @@ DefMacro('\appendix', '\@appendix');
# Actually we should be using section counter
DefPrimitive('\@appendix', sub { startAppendices('section'); });

#======================================================================
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 });

Comment on lines +104 to +115
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.

#**********************************************************************
1;
11 changes: 11 additions & 0 deletions lib/LaTeXML/Package/book.cls.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,16 @@ DefPrimitive('\backmatter', undef);
# commands for bibliography, indices
# \end{document}

#======================================================================
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 });
#**********************************************************************
1;
11 changes: 11 additions & 0 deletions lib/LaTeXML/Package/report.cls.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,16 @@ Tag('ltx:appendix', autoClose => 1);
DefMacro('\appendix', '\@appendix');
DefPrimitive('\@appendix', sub { startAppendices('chapter'); });

#======================================================================
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 });
#**********************************************************************
1;