在文档中间禁用 mathastext

在文档中间禁用 mathastext

是否可以mathastext在文档中间禁用和启用某一行或某一段落?

答案1

是的,如果它加载了选项subdued。以下是一个例子:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
% font packages
\usepackage{newcent}
\usepackage[subdued, defaultmathsizes]{mathastext}

% define a math version to use NewCentury font
\Mathastext[newcent]

% now define another one to have letter italic
% (but not digits or operator names)
\MTlettershape{it}
\Mathastext[newcentit]

\DeclareMathOperator\per{per}

\begin{document}
% At start mathastext is unactivated.

Text in NewCentury but math is as in default
\begin{multline}
\biggl(\sum_{\,i\in\mathbf{n}}a_{l_i}x_i\biggr)
\det\mathbf{K}(t=1,x_1,\dots,x_n;l |l )\\
=\biggl(\prod_{\,i\in\mathbf{n}}\hat x_i\biggr)
\sum_{I\subseteq\mathbf{n}-\{l \}}
(-1)^{|I|}\per\mathbf{A}^{(\lambda)}(I|I)
\det\mathbf{A}^{(\lambda)}
(\overline I\cup\{l \}|\overline I\cup\{l \}).
\end{multline}

Now with \verb|mathastext| active in math using upright letters.
\MTversion{newcent}
\begin{multline}
\biggl(\sum_{\,i\in\mathbf{n}}a_{l_i}x_i\biggr)
\det\mathbf{K}(t=1,x_1,\dots,x_n;l |l )\\
=\biggl(\prod_{\,i\in\mathbf{n}}\hat x_i\biggr)
\sum_{I\subseteq\mathbf{n}-\{l \}}
(-1)^{|I|}\per\mathbf{A}^{(\lambda)}(I|I)
\det\mathbf{A}^{(\lambda)}
(\overline I\cup\{l \}|\overline I\cup\{l \}).
\end{multline}

Now with italic letters again from New Century font.
\MTversion{newcentit}
\begin{multline}
\biggl(\sum_{\,i\in\mathbf{n}}a_{l_i}x_i\biggr)
\det\mathbf{K}(t=1,x_1,\dots,x_n;l |l )\\
=\biggl(\prod_{\,i\in\mathbf{n}}\hat x_i\biggr)
\sum_{I\subseteq\mathbf{n}-\{l \}}
(-1)^{|I|}\per\mathbf{A}^{(\lambda)}(I|I)
\det\mathbf{A}^{(\lambda)}
(\overline I\cup\{l \}|\overline I\cup\{l \}).
\end{multline}
\end{document}

enter image description here

在上面的例子中,\MTversion{normal}再次“停用” mathastext。但正如文档中解释的那样,这个“停用”只能达到 99%。它的某些操作是不可逆的,因为它最初不是为可逆性设计的。

相关内容