What I've learned about font sizes so far

Steve Litt slitt at troubleshooters.com
Mon May 1 04:09:12 CEST 2023


Hi all,

Using Philip Taylor's font sizing techniques and Yuri's \therefore,
I've written a short TeX script that prints Philip's math expression,
including \therefore, in all possible magsteps.

==============================================
\input amssym

\global\newcount\magstepnum

\def\printstuff{
  Cool:
  $\forall x \in X, \quad \exists y \leq \epsilon$
  I like it!\vskip 1ex
  $$\therefore\forall x \in X, \quad \exists y \leq \epsilon$$
}

\def\setMathFontSizes{
  \font\tenrm=cmr10   scaled \magstep\magstepnum
  \font\sevenrm=cmr7  scaled \magstep\magstepnum
  \font\fiverm=cmr5   scaled \magstep\magstepnum
  \font\teni=cmmi10   scaled \magstep\magstepnum
  \font\seveni=cmmi7  scaled \magstep\magstepnum
  \font\fivei=cmmi5   scaled \magstep\magstepnum
  \font\tensy=cmsy10  scaled \magstep\magstepnum
  \font\sevensy=cmsy7 scaled \magstep\magstepnum
  \font\fivesy=cmsy5  scaled \magstep\magstepnum
  \font\tenex=cmex10  scaled \magstep\magstepnum
  \font\tenbf=cmbx10  scaled \magstep\magstepnum
  \font\sevenbf=cmbx7 scaled \magstep\magstepnum
  \font\fivebf=cmbx5  scaled \magstep\magstepnum
  \font\tensl=cmsl10  scaled \magstep\magstepnum
  \font\tentt=cmtt10  scaled \magstep\magstepnum
  \font\tenit=cmti10  scaled \magstep\magstepnum

  \textfont1=\teni\scriptfont1=\seveni   \scriptscriptfont1=\fivei
  \textfont2=\tensy\scriptfont2=\sevensy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex  \scriptscriptfont3=\tenex

  \font\tenmsa=msam10 scaled   \magstep\magstepnum
  \font \sevenmsa=msam7 scaled \magstep\magstepnum
  \font \fivemsa=msam5 scaled  \magstep\magstepnum
  
  \textfont\msafam=\tenmsa
  \scriptfont\msafam=\sevenmsa
  \scriptscriptfont\msafam=\fivemsa
  
  \font\tenmsb=msbm10  scaled \magstep\magstepnum
  \font\sevenmsb=msbm7 scaled \magstep\magstepnum
  \font\fivemsb=msbm5  scaled \magstep\magstepnum
  
  \textfont\msbfam=\tenmsb
  \scriptfont\msbfam=\sevenmsb
  \scriptscriptfont\msbfam=\fivemsb

  \tenrm
}


\magstepnum=-1
\loop\ifnum\magstepnum < 5
    \advance\magstepnum by 1
    \setMathFontSizes
    \printstuff\vskip 1ex
    \repeat
\bye
==============================================

Tomorrow I'll need to figure out why it works :-)

Thank you all for helping me get to this point!

SteveT

Steve Litt 
Autumn 2022 featured book: Thriving in Tough Times
http://www.troubleshooters.com/bookstore/thrive.htm


More information about the texhax mailing list.