How to use the AMS Euler font in plain TeX

eulerfontsplain-tex

I want to use the AMS Euler font designed by Zapf in my document. I looked for packages on CTAN (e.g., the euler package), but they are specifically designed for LaTeX.

I took a look at the gkpmac.tex file Knuth wrote from Concrete Mathematics and it is likely to contain the answer I am looking for, but I can't fully understand it and determine what lines to extract to an eumac.tex or euler.tex file (I don't know what the naming convention is in that case).

Best Answer

I found this document, User's Guide to AMSFonts Version 2, https://texdoc.org/serve/amsfndoc.pdf/0, which helped guide the plain TeX implementation. See section 5.1 on pp. 12-13.

In the MWE, I activate the fraktur and roman euler fonts, in both medium and bold. Other euler font families (eusm, eusb, and euex) should follow the same approach, with different supported sizes for euex.

\input amssym
%\input amssym.def

\font\teneufm=eufm10
\font\seveneufm=eufm7
\font\fiveeufm=eufm5
\newfam\eufmfam
\textfont\eufmfam=\teneufm
\scriptfont\eufmfam=\seveneufm
\scriptscriptfont\eufmfam=\fiveeufm
\def\eufm#1{{\fam\eufmfam\relax#1}}

\font\teneufb=eufb10
\font\seveneufb=eufb7
\font\fiveeufb=eufb5
\newfam\eufbfam
\textfont\eufbfam=\teneufb
\scriptfont\eufbfam=\seveneufb
\scriptscriptfont\eufbfam=\fiveeufb
\def\eufb#1{{\fam\eufbfam\relax#1}}

\font\teneurm=eurm10
\font\seveneurm=eurm7
\font\fiveeurm=eurm5
\newfam\eurmfam
\textfont\eurmfam=\teneurm
\scriptfont\eurmfam=\seveneurm
\scriptscriptfont\eurmfam=\fiveeurm
\def\eurm#1{{\fam\eurmfam\relax#1}}

\font\teneurb=eurb10
\font\seveneurb=eurb7
\font\fiveeurb=eurb5
\newfam\eurbfam
\textfont\eurbfam=\teneurb
\scriptfont\eurbfam=\seveneurb
\scriptscriptfont\eurbfam=\fiveeurb
\def\eurb#1{{\fam\eurbfam\relax#1}}

$$\eufm{XYZ} = \eufb{XYZ} = \eurm{xyz} = \eurb{xyz}$$
\bye

enter image description here