commit bd227aada85da9ce456e18847d684f145bea6c1f parent 0bd1e47fcc23ee18875c27c83893e33bcbfd77f2 Author: robert <robertrussell.72001@gmail.com> Date: Sun, 23 Jan 2022 21:00:37 -0800 Add phantom macros Diffstat:
| M | text.tex | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/text.tex b/text.tex @@ -108,6 +108,21 @@ \def\@mathsmash#1#2{\setbox0=\hbox{$\m@th\sty#1{#2}$}\@finsmash} \def\@finsmash{\ht0=0pt \dp0=0pt \box0 } +% Phantom boxes +\newif\if@v \newif\if@h +\def\vphantom{\@vtrue\@hfalse\@phant} +\def\hphantom{\@vfalse\@htrue\@phant} +\def\phantom{\@vtrue\@htrue\@phant} +\def\@phant{\modechoice{\@textphant}{\@textphant}{\mathpalette\@mathphant}} +\def\@textphant#1{\setbox0=\hbox{#1}\@finphant} +\def\@mathphant#1#2{\setbox0=\hbox{$\m@th\sty#1{#2}$}\@finphant} +\def\@finphant{% + \setbox2=\null + \if@v \ht2=\ht0 \dp2=\dp0 \fi + \if@h \wd2=\wd0 \fi + \box2 +} + \def\strut{\vrule height\lineht depth\linedp width0pt } \def\ialign{\everycr={}\tabskip=0pt\halign}