在 Arev Math 中使用“原始”而不是“变体”字形

在 Arev Math 中使用“原始”而不是“变体”字形

请考虑以下示例:

\documentclass[20pt]{scrartcl}

\usepackage{sansmath}
\usepackage[origletters]{arevmath}

\begin{document}
$afuvwx$
\end{document}

其中我使用的是arevmath(Arev Math) 字体包。使用 进行编译时latexmk -xelatex arev_test.tex,渲染的输出如下所示:

Arev Math afuvwx

然而,根据手动的origletters,如果在加载时提供该选项,字形应该看起来与左侧的字形类似arevmath

Arev 字母表

我检查了一下,如果我明确输入\origa,它确实会给我预期的字形。但是,如果我\renewcommand{\vara}{\origa}在序言中输入 ,这并不能修复a正文中的字形。我怎样才能让“原始”字母像手册中宣传的那样工作?

答案1

部分问题似乎是,只有当变体条件为假时,包才会更改符号,而不是只有当变体条件为真时才更改符号。也就是说,包确实

\ifthenelse{\equal{\var@a}  {true}}{}{\DeclareMathSymbol{a}{\mathalpha}{extraitalic}{139}}
\ifthenelse{\equal{\var@i}  {true}}{}{\DeclareMathSymbol{i}{\mathalpha}{extraitalic}{140}
                                      \DeclareMathSymbol{\imath}{\mathalpha}{extraitalic}{111}}
\ifthenelse{\equal{\var@I}  {true}}{}{\DeclareMathSymbol{I}{\mathalpha}{extraitalic}{138}}
\ifthenelse{\equal{\var@f}  {true}}{}{\DeclareMathSymbol{f}{\mathalpha}{extraitalic}{154}}
\ifthenelse{\equal{\var@l}  {true}}{}{\DeclareMathSymbol{l}{\mathalpha}{extraitalic}{141}}
\ifthenelse{\equal{\var@u}  {true}}{}{\DeclareMathSymbol{u}{\mathalpha}{extraitalic}{142}}
\ifthenelse{\equal{\var@v}  {true}}{}{\DeclareMathSymbol{v}{\mathalpha}{extraitalic}{143}}
\ifthenelse{\equal{\var@w}  {true}}{}{\DeclareMathSymbol{w}{\mathalpha}{extraitalic}{144}}
\ifthenelse{\equal{\var@x}  {true}}{}{\DeclareMathSymbol{x}{\mathalpha}{extraitalic}{145}}
\ifthenelse{\equal{\var@Gamma} {true}}{}{\DeclareMathSymbol{\varGamma}{\mathord}{extraup}{93}}
\ifthenelse{\equal{\var@Xi} {true}}{}{\DeclareMathSymbol{\varXi}{\mathord}{extraup}{94}}
\ifthenelse{\equal{\var@Pi} {true}}{}{\DeclareMathSymbol{\varPi}{\mathord}{extraup}{95}}
\ifthenelse{\equal{\var@Sigma} {true}}{}{\DeclareMathSymbol{\varSigma}{\mathord}{extraup}{96}}
\ifthenelse{\equal{\var@Phi}{true}}{}{\DeclareMathSymbol{\varPhi}{\mathord}{extraup}{97}}

而不是

\ifthenelse{\equal{\var@a}  {true}}{\DeclareMathSymbol{a}{\mathalpha}{extraitalic}{139}}{}
\ifthenelse{\equal{\var@i}  {true}}{\DeclareMathSymbol{i}{\mathalpha}{extraitalic}{140}
                                      \DeclareMathSymbol{\imath}{\mathalpha}{extraitalic}{111}}{}
\ifthenelse{\equal{\var@I}  {true}}{\DeclareMathSymbol{I}{\mathalpha}{extraitalic}{138}}{}
\ifthenelse{\equal{\var@f}  {true}}{\DeclareMathSymbol{f}{\mathalpha}{extraitalic}{154}}{}
\ifthenelse{\equal{\var@l}  {true}}{\DeclareMathSymbol{l}{\mathalpha}{extraitalic}{141}}{}
\ifthenelse{\equal{\var@u}  {true}}{\DeclareMathSymbol{u}{\mathalpha}{extraitalic}{142}}{}
\ifthenelse{\equal{\var@v}  {true}}{\DeclareMathSymbol{v}{\mathalpha}{extraitalic}{143}}{}
\ifthenelse{\equal{\var@w}  {true}}{\DeclareMathSymbol{w}{\mathalpha}{extraitalic}{144}}{}
\ifthenelse{\equal{\var@x}  {true}}{\DeclareMathSymbol{x}{\mathalpha}{extraitalic}{145}}{}
\ifthenelse{\equal{\var@Gamma} {true}}{\DeclareMathSymbol{\varGamma}{\mathord}{extraup}{93}}{}
\ifthenelse{\equal{\var@Xi} {true}}{\DeclareMathSymbol{\varXi}{\mathord}{extraup}{94}}{}
\ifthenelse{\equal{\var@Pi} {true}}{\DeclareMathSymbol{\varPi}{\mathord}{extraup}{95}}{}
\ifthenelse{\equal{\var@Sigma} {true}}{\DeclareMathSymbol{\varSigma}{\mathord}{extraup}{96}}{}
\ifthenelse{\equal{\var@Phi}{true}}{\DeclareMathSymbol{\varPhi}{\mathord}{extraup}{97}}{}

但是,这不可能是全部问题,否则省略origletters应该会产生您想要通过使用它获得的效果,但显然不会。

该包将基本数学字体配置视为包含原始字体而非变体形式,但事实似乎并非如此。\origa等工作的原因是,这些字体(如\vara)完全来自extraitalic而不是来自基本字体集。

您应该向维护人员报告此问题。不过,这里有一个解决方法:

\documentclass{article}
\usepackage[origletters]{arevmath}
\makeatletter
\ifthenelse{\equal{\var@a}  {true}}{\DeclareMathSymbol{a}{\mathalpha}{extraitalic}{139}}{\DeclareMathSymbol{a}{\mathalpha}{extraitalic}{50}}
\ifthenelse{\equal{\var@i}  {true}}{\DeclareMathSymbol{i}{\mathalpha}{extraitalic}{140}
                                      \DeclareMathSymbol{\imath}{\mathalpha}{extraitalic}{111}}{\DeclareMathSymbol{i}{\mathalpha}{extraitalic}{58}\DeclareMathSymbol{\imath}{\mathalpha}{extraitalic}{76}}
\ifthenelse{\equal{\var@I}  {true}}{\DeclareMathSymbol{I}{\mathalpha}{extraitalic}{138}}{\DeclareMathSymbol{I}{\mathalpha}{extraitalic}{30}}
\ifthenelse{\equal{\var@f}  {true}}{\DeclareMathSymbol{f}{\mathalpha}{extraitalic}{154}}{\DeclareMathSymbol{f}{\mathalpha}{extraitalic}{55}}
\ifthenelse{\equal{\var@l}  {true}}{\DeclareMathSymbol{l}{\mathalpha}{extraitalic}{141}}{\DeclareMathSymbol{l}{\mathalpha}{extraitalic}{61}}
\ifthenelse{\equal{\var@u}  {true}}{\DeclareMathSymbol{u}{\mathalpha}{extraitalic}{142}}{\DeclareMathSymbol{u}{\mathalpha}{extraitalic}{70} }
\ifthenelse{\equal{\var@v}  {true}}{\DeclareMathSymbol{v}{\mathalpha}{extraitalic}{143}}{\DeclareMathSymbol{v}{\mathalpha}{extraitalic}{71}}
\ifthenelse{\equal{\var@w}  {true}}{\DeclareMathSymbol{w}{\mathalpha}{extraitalic}{144}}{\DeclareMathSymbol{w}{\mathalpha}{extraitalic}{72}}
\ifthenelse{\equal{\var@x}  {true}}{\DeclareMathSymbol{x}{\mathalpha}{extraitalic}{145}}{\DeclareMathSymbol{x}{\mathalpha}{extraitalic}{73}}
\makeatother
\begin{document}
$afuvwx \origa\vara$


\end{document}

解决方法

答案2

另一种选择是使用包mathastext。如果您不介意在所有方程式中丢失斜体样式。既然您要求了,mathrm我认为它可能会对您有所帮助。

\documentclass[]{article}
\usepackage{amsmath}
\usepackage{arev}
\usepackage{mathastext}
\begin{document}
\[ab+xy=\dfrac{vw}{f(x)}\]
\end{document}

公式1

享受!

相关内容