![从 txfonts 导入“u”和“v”](https://linux22.com/image/414977/%E4%BB%8E%20txfonts%20%E5%AF%BC%E5%85%A5%E2%80%9Cu%E2%80%9D%E5%92%8C%E2%80%9Cv%E2%80%9D.png)
不幸的是,我不太擅长从其他字体中提取单个字符,所以我想寻求一些帮助。
我需要从中导入数学模式中使用的“u”和“v” txfonts
我知道这个答案,但那里的解决方案对我来说破坏了其他数学字符。我猜那是因为那里没有\DeclareFontFamily
和\DeclareFontShape
可以排除。
这是我正在使用的代码
\documentclass{article}
\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}
\usepackage{mathabx}
\usepackage{polynom}
\usepackage{xparse}
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
<-6> MnSymbolE5
<6-7> MnSymbolE6
<7-8> MnSymbolE7
<8-9> MnSymbolE8
<9-10> MnSymbolE9
<10-12> MnSymbolE10
<12-> MnSymbolE12}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
<-6> MnSymbolE-Bold5
<6-7> MnSymbolE-Bold6
<7-8> MnSymbolE-Bold7
<8-9> MnSymbolE-Bold8
<9-10> MnSymbolE-Bold9
<10-12> MnSymbolE-Bold10
<12-> MnSymbolE-Bold12}{}
\DeclareSymbolFont{mnlargesymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{largesymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareMathDelimiter{\lwavy}{\mathopen}{mnlargesymbols}{'136}{mnlargesymbols}{'136}
\DeclareMathDelimiter{\rwavy}{\mathclose}{mnlargesymbols}{'136}{mnlargesymbols}{'136}
% --- Get fancy 'u' and 'v' --- %
\DeclareSymbolFont{matha}{OML}{txmi}{m}{it}
\DeclareMathSymbol{\varru}{\mathord}{matha}{117}
\DeclareMathSymbol{\varrv}{\mathord}{matha}{118}
\begin{document}
\begin{gather*}
\lambda^3-\lambda^2-5\lambda-3 = 0,\\
(\lambda+1)(\lambda^2-2\lambda-3) = 0,\\
(\lambda+1)(\lambda+1)(\lambda-3) = (\lambda+1)^2(\lambda-3) = 0,\\
\lambda_{1\,[2]}=-1, \qquad \lambda_{2\,[1]} = 3
\\
\\
f(u) = u^2+3u
\end{gather*}
\end{document}
而且我也想在本地使用它们,这样我就不需要像 这样的命令了\varu
,\varv
只需直接使用它即可f(u) = u^2 + 3u
答案1
你得到非常奇怪的符号,因为你重新声明了符号字体matha
,它是使用的名称mathabx
。
您可以通过以下方式更改“u”和“v”的形状
\DeclareSymbolFont{mathtx}{OML}{txmi}{m}{it}
\DeclareMathSymbol{u}{\mathalpha}{mathtx}{117}
\DeclareMathSymbol{v}{\mathalpha}{mathtx}{118}
(请注意字体系列名称的变化),但结果将是非常有争议的。
\documentclass{article}
%\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}
\usepackage{mathabx}
\usepackage{polynom}
\usepackage{xparse}
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
<-6> MnSymbolE5
<6-7> MnSymbolE6
<7-8> MnSymbolE7
<8-9> MnSymbolE8
<9-10> MnSymbolE9
<10-12> MnSymbolE10
<12-> MnSymbolE12}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
<-6> MnSymbolE-Bold5
<6-7> MnSymbolE-Bold6
<7-8> MnSymbolE-Bold7
<8-9> MnSymbolE-Bold8
<9-10> MnSymbolE-Bold9
<10-12> MnSymbolE-Bold10
<12-> MnSymbolE-Bold12}{}
\DeclareSymbolFont{mnlargesymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{mnlargesymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareMathDelimiter{\lwavy}{\mathopen}{mnlargesymbols}{'136}{mnlargesymbols}{'136}
\DeclareMathDelimiter{\rwavy}{\mathclose}{mnlargesymbols}{'136}{mnlargesymbols}{'136}
% --- Get fancy 'u' and 'v' --- %
\DeclareSymbolFont{mathtx}{OML}{txmi}{m}{it}
\DeclareMathSymbol{u}{\mathalpha}{mathtx}{117}
\DeclareMathSymbol{v}{\mathalpha}{mathtx}{118}
\begin{document}
\[
r+u+v+w=\mathrm{horrible}
\]
\begin{gather*}
\lambda^3-\lambda^2-5\lambda-3 = 0,\\
(\lambda+1)(\lambda^2-2\lambda-3) = 0,\\
(\lambda+1)(\lambda+1)(\lambda-3) = (\lambda+1)^2(\lambda-3) = 0,\\
\lambda_{1\,[2]}=-1, \qquad \lambda_{2\,[1]} = 3
\end{gather*}
\end{document}