opmac 中的 Baskerville 和 MathTime Pro 与 xetex

opmac 中的 Baskerville 和 MathTime Pro 与 xetex

我正在使用opmacxetex,我想使用 Monotype Baskerville 作为文本字体,使用 MathTime Pro 2 作为数学字体。我想到了以下内容:

\input opmac    


% roman 
\font\tenrm="BaskervilleMTPro-Regular:mapping=tex-text"
% bold
\font\tenbf="BaskervilleMTPro-Semibold:mapping=tex-text, extend=.86"
% italic
\font\tenit="BaskervilleMTPro-Italic:mapping=tex-text, extend=1.13"
% bold-italic
\font\tenbi="BaskervilleMTPro-SemiboldIt:mapping=tex-text, extend=.89
% 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]

它似乎工作得很好,但我认为这是不是正确的设置方法opmac正确的做法是什么?

此外,我还想将打字机字体排版为与 Baskerville 字体(或等效于数学字体)相同的 x 高度,但我的“解决方案”无法实现。

答案1

OPmac 包含ams-math.tex来自 csplain 包以便设置数学(因为纯 TeX 的默认数学设置非常差并且它不允许简单地改变字体大小)。

在我看来,如果您调用 OPmac,然后调用另一个宏进行数学设置(在此示例中),这没有什么不好mtp2.tex。当然,默认数学设置(由 OPmac 重写)是由 重写的mtp2.tex,但这可以解决问题。此外,您重写了\typosizeOPmac\typoscale中的宏,以便从新的数学环境中设置文本字体和数学字体的正确字体大小。

当然,如果我有 MTpro 字体,那么我会将 复制到tx-math.tex文件mtpro-math.tex并修改此文件,以使 MTpro 字体以与使用*-math.texcsplain 中的其他文件相同的方式工作。原因:*-math.tex文件中的宏更紧凑且更易于理解。然后我会使用mtpro-math.tex文件而从不使用mtp2.tex。但这是额外的(可能并非微不足道的)工作,当您的解决方案被使用和工作时,它并不是明确需要的。

对于你的第二个问题:你可以使用以下方法均衡普通字体和打字机字体的 x 高度OPmac 技巧 0001,即:

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

对 Baskerville Math 的评论:我目前正在与 Štorm 先生合作开发真正的 Baskerville Math 字体风暴字体铸造厂。但该项目目前处于初始 alpha 状态,尚未准备好供一般公众使用。您可以查看本文档,其中使用了我们项目中的 Baskerville Math 字体。括号的尺寸更加多样,并且还有更多附加功能。

相关内容