7

I am struggling with a font problem that I can't solve by myself. I almost always write my files with pdfLaTeX and the urw-garamond fonts from mathdesign. However I would like to produce the same output with plain TeX or plain XeTeX, but with no success. I tried to read the mathdesign.sty file, and yet I can't really understand what is going on. The point of my question is about mathematical formulae, since I think I could use Garamond with XeTeX with little effort. Can you give me some hints?

1 Answer 1

7

The fonts used by mathdesign are encoded just like the normal Plain TeX fonts, so it's just a matter of reassigning the font names:

% redefine the font descriptors
\font\tenrm=mdugmr7t at 10pt % roman text
\font\sevenrm=mdugmr7t at 7pt
\font\fiverm=mdugmr7t at 5pt

\font\teni=mdugmri7m at 10pt % math italic
\font\seveni=mdugmri7m at 7pt
\font\fivei=mdugmri7m at 5pt

\font\tensy=mdugmr7y at 10pt % math symbols
\font\sevensy=mdugmr7y at 7pt
\font\fivesy=mdugmr7y at 5pt

\font\tenex=mdugmr7v at 10pt % math extension

\font\tenbf=mdugmm7t at 10pt % boldface extended
\font\sevenbf=mdugmm7t at 7pt
\font\fivebf=mdugmm7t at 5pt

\font\tensl=mdugmro7t at 10pt % slanted roman

\font\tenit=mdugmmi7t at 10pt % text italic

% reassign the math font families
\textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
\textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
\textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
\textfont\itfam=\tenit
\textfont\slfam=\tensl
\textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
\scriptscriptfont\bffam=\fivebf
\textfont\ttfam=\tentt

% initialize the roman font
\rm

% start the document

The following facts are {\it well\/} known:
$$
\int_{-\infty}^{\infty}e^{-x^2}\,dx=
\sqrt{\displaystyle 6\sum_{k\ge1}{1\over k^2}}
=\sqrt{\pi}
$$

\bye

enter image description here

3
  • However I just noticed the your file produces a rather different result than the following LaTeX code: \documentclass[10pt]{article}\usepackage[urw-garamond]{mathdesign}\begin{document}The following facts are \textit{well} known:\end{document} For instance, the capital T are completely different on my machine.
    – Siminore
    Aug 30, 2014 at 14:58
  • @Siminore You're right! I forgot \rm. Fixed.
    – egreg
    Aug 30, 2014 at 16:37
  • 1
    @egreg -- just an aside ... notice that here "dx" is spaced out, whereas in computer modern, it's not. the cmmi "d" is the one letter that has either no italic correction or a zero italic correction (i'm not sure which without checking, but the effect is the same). Aug 30, 2014 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .