我正在使用 amsmath 包和字体,但想从 stix 导入一些分隔符。请按照此处的说明操作:如何仅使用 STIX 字体的选定数学符号?
我可以导入所需的分隔符。但是,我想根据内部数学表达式的大小自动缩放这些分隔符(我想到命令 \left{ 和 \right})。我知道我可以使用 \bigl\lBrace 等命令手动更改它们的大小,但重要的是它可以自动发生(就像使用 \left 和 \right 命令一样)。
梅威瑟:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbolstix}{LS2}{stixex}{m} {n}
\DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbolstix}{"E8}{largesymbols}{"0E}
\DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbolstix}{"E9}{largesymbols}{"0F}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolstix}{"EE}{largesymbols}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolstix}{"EF}{largesymbols}{"15}
\DeclareMathDelimiter{\lParen}{\mathopen}{largesymbolstix}{"DE}{largesymbols}{"02}
\DeclareMathDelimiter{\rParen}{\mathclose}{largesymbolstix}{"DF}{largesymbols}{"03}
\begin{document}
$\left\lBrace \begin{array}{cc}x & y\\y& z\end{array} \right\rBrace$
\end{document}
如果我删除 \left 和 \right 命令,我的输出会有正确的括号,但大小不合适。有什么想法吗?
答案1
您必须参考largesymbolstix
这两个地方。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\makeatletter % <---- Don't forget
\DeclareFontEncoding{LS2}{}{\noaccents@}
\makeatother
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbolstix}{LS2}{stixex}{m} {n}
\DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbolstix}{"E8}{largesymbolstix}{"0E}
\DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbolstix}{"E9}{largesymbolstix}{"0F}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolstix}{"EE}{largesymbolstix}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolstix}{"EF}{largesymbolstix}{"15}
\DeclareMathDelimiter{\lParen}{\mathopen}{largesymbolstix}{"DE}{largesymbolstix}{"02}
\DeclareMathDelimiter{\rParen}{\mathclose}{largesymbolstix}{"DF}{largesymbolstix}{"03}
\begin{document}
$
\left\lBrace \begin{array}{cc}x & y\\y& z\end{array} \right\rBrace
\left\lbrbrak \begin{array}{cc}x & y\\y& z\end{array} \right\rbrbrak
\left\lParen \begin{array}{cc}x & y\\y& z\end{array} \right\rParen
$
\end{document}