![平均能量损失](https://linux22.com/image/378703/%E5%B9%B3%E5%9D%87%E8%83%BD%E9%87%8F%E6%8D%9F%E5%A4%B1.png)
平均能量损失
在 3 个不同的位置绘制全角文字框数学样式使比较更容易:
\documentclass{article}
\usepackage[scaled=1.1]{newtxtext}
\usepackage[scaled=1.1]{newtxmath}
% newtxmath loads amsmath internally, so \text can be used
% It also does \DeclareMathSizes{10}{10}{7.3}{5.5}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{graphicx}
\newcommand{\opticalsizes}[1]{%
\begin{center}
$\null$%
\scalebox{4.015}{%
\rlap{%
\color{red}%
\setlength{\fboxrule}{0.0996264pt}%
\setlength{\fboxsep}{-\fboxrule}%
\fbox{\rule[\dimexpr\the\fontdimen22\textfont2-.5\fontdimen6\textfont2\relax]{0pt}{\the\fontdimen6\textfont2\relax}%
\rule{\the\fontdimen6\textfont2\relax}{0pt}}}%
\rlap{$\textstyle#1$}}%
\hspace{6.0225em}%
\scalebox{5.5}{%
\rlap{%
\color{red}%
\setlength{\fboxrule}{0.0727273pt}%
\setlength{\fboxsep}{-\fboxrule}%
\fbox{\rule[\dimexpr\the\fontdimen22\scriptfont2-.5\fontdimen6\scriptfont2\relax]{0pt}{\the\fontdimen6\scriptfont2\relax}%
\rule{\the\fontdimen6\scriptfont2\relax}{0pt}}}%
\rlap{$\scriptstyle#1$}}%
\hspace{6.0225em}%
\scalebox{7.3}{%
\rlap{%
\color{red}%
\setlength{\fboxrule}{0.0547945pt}%
\setlength{\fboxsep}{-\fboxrule}%
\fbox{\rule[\dimexpr\the\fontdimen22\scriptscriptfont2-.5\fontdimen6\scriptscriptfont2\relax]{0pt}{\the\fontdimen6\scriptscriptfont2\relax}%
\rule{\the\fontdimen6\scriptscriptfont2\relax}{0pt}}}%
\rlap{$\scriptscriptstyle#1$}}%
\hspace{4.015em}\strut%
\end{center}
}
\begin{document}
\section{There are optical sizes for \texttt{\$M\$}}
\opticalsizes{\textit{M}}
\opticalsizes{M}
\section{But none for digits like \texttt{\$1\$}}
\opticalsizes{\text{1}}
\opticalsizes{1}
\end{document}
输出
我的观察
看起来newtxmath
尝试使用newtxtext
字体声明数学数字:
% \iftx@minion
% \else % newtxtext
%% \DeclareMathSymbol{0}{\mathalpha}{letters}{48}
%% \DeclareMathSymbol{1}{\mathalpha}{letters}{49}
%% \DeclareMathSymbol{2}{\mathalpha}{letters}{50}
%% \DeclareMathSymbol{3}{\mathalpha}{letters}{51}
%% \DeclareMathSymbol{4}{\mathalpha}{letters}{52}
%% \DeclareMathSymbol{5}{\mathalpha}{letters}{53}
%% \DeclareMathSymbol{6}{\mathalpha}{letters}{54}
%% \DeclareMathSymbol{7}{\mathalpha}{letters}{55}
%% \DeclareMathSymbol{8}{\mathalpha}{letters}{56}
%% \DeclareMathSymbol{9}{\mathalpha}{letters}{57}
% \fi
我的问题
我还能使用数学数字的光学尺寸吗,或者它们只是缺失了newtxmath
?
答案1
是的,OML 字体newtxmath
有光学尺寸(5、7 和 10)。传统上不从此字体中取出数字,因为原始 OML 编码在相关位置有“小写数字”(旧式)。
您可以使用注释声明来获取数字的光学尺寸:
\DeclareMathSymbol{0}{\mathalpha}{letters}{48}
\DeclareMathSymbol{1}{\mathalpha}{letters}{49}
\DeclareMathSymbol{2}{\mathalpha}{letters}{50}
\DeclareMathSymbol{3}{\mathalpha}{letters}{51}
\DeclareMathSymbol{4}{\mathalpha}{letters}{52}
\DeclareMathSymbol{5}{\mathalpha}{letters}{53}
\DeclareMathSymbol{6}{\mathalpha}{letters}{54}
\DeclareMathSymbol{7}{\mathalpha}{letters}{55}
\DeclareMathSymbol{8}{\mathalpha}{letters}{56}
\DeclareMathSymbol{9}{\mathalpha}{letters}{57}
因为newtxmath
字体在那些位置上确实有正常的直立数字。这是输出,我使用了 2 来更好地查看差异(我没有更改文本,在这种情况下听起来不对)。