stix
我按照给出的指令从包中导入符号(特别是括号)在 tex.stackexchange 上这时发生了一些非常奇怪的事情,我猜测这与字体编码有关LS2
。特别是我成功导入了连续的符号
\DeclareFontEncoding{LS2}{}{}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbols}{LS2}{stixex}{m}{n}
\DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbols}{"E8}{largesymbols}{"0E}
\DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbols}{"E9}{largesymbols}{"0F}
\DeclareMathDelimiter{\lBrack}{\mathopen}{largesymbols}{"E0}{largesymbols}{"06}
\DeclareMathDelimiter{\rBrack}{\mathclose}{largesymbols}{"E1}{largesymbols}{"07}
\DeclareSymbolFont{largesymbolsstix}{LS2}{stixex}{m}{n}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolsstix}{"EE}{largesymbolsstix}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolsstix}{"EF}{largesymbolsstix}{"15}
这正是我想要的。但问题是所有基本的乳胶符号似乎都消失了;例如,一个简单的代码,带有一个总和和一些偏导数,就会产生这种糟糕的结果
现在正确的符号只有两个导入的括号\lBrace
和\rBrace
。现在,如果我注释掉声明符号的部分
\DeclareFontEncoding{LS2}{}{}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
% \DeclareSymbolFont{largesymbols}{LS2}{stixex}{m}{n}
% \DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbols}{"E8}{largesymbols}{"0E}
% \DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbols}{"E9}{largesymbols}{"0F}
% \DeclareMathDelimiter{\lBrack}{\mathopen}{largesymbols}{"E0}{largesymbols}{"06}
% \DeclareMathDelimiter{\rBrack}{\mathclose}{largesymbols}{"E1}{largesymbols}{"07}
% \DeclareSymbolFont{largesymbolsstix}{LS2}{stixex}{m}{n}
% \DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolsstix}{"EE}{largesymbolsstix}{"14}
% \DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolsstix}{"EF}{largesymbolsstix}{"15}
一切都恢复正常,但不再有stix
包中所需的两个括号(我手动替换了两个括号,否则它将无法编译):
有人知道该怎么修复吗?谢谢!
编辑:
我发现真正的问题在于\DeclareSymbolFont{largesymbols}{LS2}{stixex}{m}{n}
,因为类已经有一个默认设置largesymbols
,即\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
。但问题仍然存在,因为一个排除另一个。我如何将这些符号与标准乳胶符号一起使用?
答案1
这里,我替换了你的largesymbols
,largesymbolsstix
然后试了一下。这样够了吗?
(正如 OP 的编辑中指出的,largesymbols
已被 LaTeX 采用)
\documentclass{amsart}
\makeatletter
\DeclareFontEncoding{LS2}{}{\@noaccents}
\makeatother
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbolsstix}{LS2}{stixex}{m}{n}
\DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbolsstix}{"E8}{largesymbolsstix}{"0E}
\DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbolsstix}{"E9}{largesymbolsstix}{"0F}
\DeclareMathDelimiter{\lBrack}{\mathopen}{largesymbolsstix}{"E0}{largesymbolsstix}{"06}
\DeclareMathDelimiter{\rBrack}{\mathclose}{largesymbolsstix}{"E1}{largesymbolsstix}{"07}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolsstix}{"EE}{largesymbolsstix}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolsstix}{"EF}{largesymbolsstix}{"15}
\newcommand{\newbrak}[2]{\genfrac{\lbrbrak}{\rbrbrak}{0pt}{}{#1}{#2}}
\begin{document}
\[
\newbrak{k}{m} =
\lBrace A, B \rBrace = \sum_{k=1}^3
\biggl\lBrack \frac{\partial A}{\partial q_k}\biggr\rBrack
\]
\end{document}