commit 6bc791b8656d6059e7574c36e8dfbbc3baf4ae51
parent c0404758eb263369f832e0fe2a83b1afd2747c2c
Author: robert <robertrussell.72001@gmail.com>
Date: Sat, 15 Jan 2022 12:39:50 -0800
Import \strut from plain TeX
The implementation no longer uses \strutbox line in plain, so it need
not be updated when the font size changes. Instead we use new parameters
\lineht and \linedp.
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/param.tex b/param.tex
@@ -224,6 +224,9 @@
\newskip\normallineskip
\newdimen\normallineskiplimit
+\newdimen\lineht
+\newdimen\linedp
+
\newskip\smallskipamount \smallskipamount=3pt plus1pt minus1pt
\newskip\medskipamount \medskipamount=6pt plus2pt minus2pt
\newskip\bigskipamount \bigskipamount=12pt plus4pt minus4pt
diff --git a/text.tex b/text.tex
@@ -98,6 +98,8 @@
\def\@mathsmash#1#2{\setbox0=\hbox{$\m@th\sty#1{#2}$}\@finsmash}
\def\@finsmash{\ht0=0pt \dp0=0pt \box0 }
+\def\strut{\vrule height\lineht depth\linedp width0pt }
+
% TODO: sort through all this; after this, all that remains is line 729 and
% onwards in plain.tex
@@ -115,10 +117,6 @@
% \def\rightline#1{\line{\hss#1}}
% \def\centerline#1{\line{\hss#1\hss}}
-% \newbox\strutbox
-% \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}
-% \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
-
% \def\hidewidth{\hskip\hideskip} % for alignment entries that can stick out
% \def\ialign{\everycr{}\tabskip\z@skip\halign} % initialized \halign
% \newcount\mscount