有什么可行的策略可以从 mathtime 字体中获取积分符号 (\int、\oint、\iint 等) 和求和符号,但除此之外还要使用 unicode 字体和 unicode-math?应该有办法,但我搞不清楚。有什么想法吗?
答案1
您可以执行以下操作:
\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\DeclareFontEncoding{LMP3}{}{}
\DeclareFontSubstitution{LMP3}{mtt}{m}{n}
\DeclareFontFamily{LMP3}{mtt}{}
\DeclareFontShape{LMP3}{mtt}{m}{n}{<->mt2exa}{}
\DeclareSymbolFont{mtprolargesymbols}{LMP3}{mtt}{m}{n}
\makeatletter
\AtBeginDocument{%
\renewcommand{\sum}{\DOTSB\sum@\slimits@}%
\renewcommand{\prod}{\DOTSB\prod@\slimits@}%
\DeclareMathSymbol{\intop}{\mathop}{mtprolargesymbols}{"52}%
\DeclareMathSymbol{\iintop}{\mathop}{mtprolargesymbols}{"92}%
\DeclareMathSymbol{\iiintop}{\mathop}{mtprolargesymbols}{"94}%
\DeclareMathSymbol{\ointop}{\mathop}{mtprolargesymbols}{"48}%
\DeclareMathSymbol{\oiintop}{\mathop}{mtprolargesymbols}{"96}%
\DeclareMathSymbol{\oiiintop}{\mathop}{mtprolargesymbols}{"98}%
\DeclareMathSymbol{\cwointop}{\mathop}{mtprolargesymbols}{"9A}%
\DeclareMathSymbol{\awointop}{\mathop}{mtprolargesymbols}{"9C}%
\DeclareMathSymbol{\cwintop}{\mathop}{mtprolargesymbols}{"9E}%
\DeclareMathSymbol{\barintop}{\mathop}{mtprolargesymbols}{170}%
\DeclareMathSymbol{\slashintop}{\mathop}{mtprolargesymbols}{172}%
\DeclareMathSymbol{\sum@}{\mathop}{mtprolargesymbols}{"50}%
\DeclareMathSymbol{\prod@}{\mathop}{mtprolargesymbols}{"51}%
\def\iint{\DOTSI\iintop\ilimits@}%
\def\iiint{\DOTSI\iiintop\ilimits@}%
\def\oiint{\DOTSI\oiintop\ilimits@}%
\def\oiiint{\DOTSI\oiiintop\ilimits@}%
\def\cwoint{\DOTSI\cwointop\ilimits@}%
\def\awoint{\DOTSI\awointop\ilimits@}%
\def\cwint{\DOTSI\cwintop\ilimits@}%
\def\barint{\DOTSI\barintop\ilimits@}%
\def\slashint{\DOTSI\slashintop\ilimits@}%
\def\slsum{\DOTSB\slsumop\slimits@}%
\def\slprod{\DOTSB\slprodop\slimits@}%
\def\slcoprod{\DOTSB\slcoprodop\slimits@}%
\def\upsum{\DOTSB\upsumop\slimits@}%
\def\upprod{\DOTSB\upprodop\slimits@}%
\def\upcoprod{\DOTSB\upcoprodop\slimits@}%
}
\makeatother
\begin{document}
$\int\oint\iint\sum\prod$
\[\int\oint\iint\sum\prod\]
\end{document}
为了测试,我实际上使用了
\documentclass{article}
\usepackage{iftex}
\usepackage{amsmath}
\ifluatex
\usepackage{unicode-math}
\usepackage{kpfonts-otf}
\DeclareFontEncoding{LMP3}{}{}
\DeclareFontSubstitution{LMP3}{mtt}{m}{n}
\DeclareFontFamily{LMP3}{mtt}{}
\DeclareFontShape{LMP3}{mtt}{m}{n}{<->mt2exa}{}
\DeclareSymbolFont{mtprolargesymbols}{LMP3}{mtt}{m}{n}
\makeatletter
\AtBeginDocument{%
\renewcommand{\sum}{\DOTSB\sum@\slimits@}%
\renewcommand{\prod}{\DOTSB\prod@\slimits@}%
\DeclareMathSymbol{\intop}{\mathop}{mtprolargesymbols}{"52}%
\DeclareMathSymbol{\iintop}{\mathop}{mtprolargesymbols}{"92}%
\DeclareMathSymbol{\iiintop}{\mathop}{mtprolargesymbols}{"94}%
\DeclareMathSymbol{\ointop}{\mathop}{mtprolargesymbols}{"48}%
\DeclareMathSymbol{\oiintop}{\mathop}{mtprolargesymbols}{"96}%
\DeclareMathSymbol{\oiiintop}{\mathop}{mtprolargesymbols}{"98}%
\DeclareMathSymbol{\cwointop}{\mathop}{mtprolargesymbols}{"9A}%
\DeclareMathSymbol{\awointop}{\mathop}{mtprolargesymbols}{"9C}%
\DeclareMathSymbol{\cwintop}{\mathop}{mtprolargesymbols}{"9E}%
\DeclareMathSymbol{\barintop}{\mathop}{mtprolargesymbols}{170}%
\DeclareMathSymbol{\slashintop}{\mathop}{mtprolargesymbols}{172}%
\DeclareMathSymbol{\sum@}{\mathop}{mtprolargesymbols}{"50}%
\DeclareMathSymbol{\prod@}{\mathop}{mtprolargesymbols}{"51}%
\def\iint{\DOTSI\iintop\ilimits@}%
\def\iiint{\DOTSI\iiintop\ilimits@}%
\def\oiint{\DOTSI\oiintop\ilimits@}%
\def\oiiint{\DOTSI\oiiintop\ilimits@}%
\def\cwoint{\DOTSI\cwointop\ilimits@}%
\def\awoint{\DOTSI\awointop\ilimits@}%
\def\cwint{\DOTSI\cwintop\ilimits@}%
\def\barint{\DOTSI\barintop\ilimits@}%
\def\slashint{\DOTSI\slashintop\ilimits@}%
\def\slsum{\DOTSB\slsumop\slimits@}%
\def\slprod{\DOTSB\slprodop\slimits@}%
\def\slcoprod{\DOTSB\slcoprodop\slimits@}%
\def\upsum{\DOTSB\upsumop\slimits@}%
\def\upprod{\DOTSB\upprodop\slimits@}%
\def\upcoprod{\DOTSB\upcoprodop\slimits@}%
}
\makeatother
\else
\usepackage[lite]{mtpro2}
\fi
\begin{document}
$\int\oint\iint\sum\prod$
\[\int\oint\iint\sum\prod\]
\end{document}
pdflatex
所以我可以使用或排版相同的lualatex
内容并比较输出,它们似乎是相同的(检查时使用了独特的数学字体)。
警告。其他一些符号可能需要处理。