# Baskerville and MathTime Pro in opmac with xetex

I am using opmac with xetex, and I would like to have Monotype Baskerville as text font and MathTime Pro 2 as math font. I came up writing the following:

\input opmac

% roman
% bold
% italic
% bold-italic
% typewriter
\font\tentt=cmtt10

\let\sevenrm\undefined
\let\fiverm\undefined
\let\teni\undefined
\let\seveni\undefined
\let\fivei\undefined
\let\tensy\undefined
\let\sevensy\undefined
\let\fivesy\undefined
\let\tenex\undefined
\let\sevenbf\undefined
\let\fivebf\undefined
\let\tesl\undefined

% Substitutes \slfam with \bifam
\let\bifam=\slfam
\def\bi{\fam\bifam\tenbi}
\textfont\bifam=\tenbi

\input mtp2

\catcode\@=11

\let\typ@size=\typosize
\let\typ@scale=\typoscale

\def\typosize[#1/#2]{%
\typ@size[#1/#2]
% Scaling to make text x' and math x' have about the same height
\tmpdim=.913242\fontdim % .913242 = 1000 divided by \magstephalf
\MTP{\tmpdim}{.7\tmpdim}{.55\tmpdim}
\textfont0=\tenrm
}

\def\typoscale[#1/#2]{%
\typ@scale[#1/#2]
\tmpdim=.913242\fontdim % .913242 = 1000 divided by \magstephalf
\MTP{\tmpdim}{.7\tmpdim}{.55\tmpdim}
\textfont0=\tenrm
}

\catcode\@=\active

\rm % default roman
\typosize[11/13]


It seems to work quite well, but I think this is not the proper way to set up things in opmac. What is the proper way to do it?

In addition, I would like to have also the typewriter font typeset with the same x-height as the Baskerville font (or, equivalently, the math font), which is not achieved with my "solution".

OPmac includes ams-math.tex from csplain package in order to set math (because the default math setting from plain TeX is very poor and it doesn't allow the font size changing simply).

IMHO, there is nothing bad, if you call OPmac and then another macro for math setting (mtp2.tex in this example). Of course, the default math setting (by OPmac) is re-written by mtp2.tex, but this does the trick. Moreover, you rewrote \typosize and \typoscale macros from OPmac in order to set right font sizes of text fonts and of math fonts from new math environment too.

Of course, if I had the MTpro fonts then I would copy the tx-math.tex to mtpro-math.tex file and would do a modification of this file in order to make MTpro fonts work in the same way as with using another *-math.tex files from csplain. The reason: the macros from *-math.tex files are more compact and understandable. And then I would use mtpro-math.tex file and never use mtp2.tex. But this is additional (and maybe non trivial) work which is not explicitly needed when your solution is used and working.

To your second question: You can equalize the x-height of normal font and typewriter font using OPmac trick 0001, i.e. by:

\def\tt{\tentt\thefontscale[1120]}


Comment to Baskerville Math: I am working right now in a project of developing real Baskerville Math font with Mr. Štorm from Storm Type Foundry. But the project is in the initial alpha state now, not ready to general and public use. You can look at this documentation, where Baskerville Math font from our project is used. There are much more various sizes of brackets and more additional specialities.

• By now I'm quite satisfied by the combination of Monotype Baskerville and MathTime fonts. But, anyway, thank you for having let me know about your project (and thank you for the answer too). – User Nov 17 '15 at 12:10
• I was reading some other answers from you, and I have noticed that, according to me, you use the expression "in order to" in a wrong way. I'm not an english expert (I'm Italian), but I'm quite sure that the way you use it is wrong. For example you shouldn't put the 'ing' form at the verb following it. Take this comment as a suggestion, not as a criticism ;) – User Nov 17 '15 at 23:01
• @User Please, correct the phrases directly in my answers. I hope that everybody can do this. It will be welcomed by me because my English is very bad and I will be able to learn from my faults. – wipet Nov 18 '15 at 7:11