Skip to content

Commit

Permalink
Avoid total height of strut being 1sp more than baselineskip
Browse files Browse the repository at this point in the history
If baselineskip is odd, then height should ceiling the half and depth should floor the half.
  • Loading branch information
RuixiZhang42 committed Nov 13, 2020
1 parent 255b9e6 commit 417d01b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mtpro2-patch.tex
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,8 @@
{\copy\strutbox}
{\hbox{\vrule\@height\dimexpr\baselineskip/2
+\fontdimen22\textfont\tw@\relax
\@depth \dimexpr\baselineskip/2
\@depth \dimexpr\baselineskip
-\baselineskip/2
-\fontdimen22\textfont\tw@\relax
\@width \z@}}
{\typeout{Fixed strut setup for amsmath.sty}}
Expand All @@ -771,7 +772,8 @@
{\typeout{Couldn't patch \string\@array}}%
\patchcmd\@array
{\arraystretch \dp \strutbox}
{\dimexpr\arraystretch\baselineskip/2
{\dimexpr\arraystretch\baselineskip
-\arraystretch\baselineskip/2
-\fontdimen22\textfont\tw@\relax}
{\typeout{Fixed array strut depth for array.sty}}
{\typeout{Couldn't patch \string\@array}}%
Expand All @@ -785,7 +787,8 @@
{\typeout{Couldn't patch \string\@array}}%
\patchcmd\@array
{\arraystretch \dp\strutbox}
{\dimexpr\arraystretch\baselineskip/2
{\dimexpr\arraystretch\baselineskip
-\arraystretch\baselineskip/2
-\fontdimen22\textfont\tw@\relax}
{\typeout{Fixed array strut depth}}
{\typeout{Couldn't patch \string\@array}}%
Expand Down Expand Up @@ -814,7 +817,8 @@
\fi
\patchcmd\LT@array
{\arraystretch \dp \strutbox}
{\dimexpr\arraystretch\baselineskip/2
{\dimexpr\arraystretch\baselineskip
-\arraystretch\baselineskip/2
-\fontdimen22\textfont\tw@\relax}
{\typeout{Fixed array strut depth for longtable.sty}}
{\typeout{Couldn't patch \string\LT@array}}%
Expand Down

0 comments on commit 417d01b

Please sign in to comment.