地板支架 stix 2 显示不正确

地板支架 stix 2 显示不正确
\documentclass[12pt]{article}
\usepackage{amsthm,amsmath,ragged2e,relsize,graphicx,bbm,mathtools}

\DeclareFontEncoding{LS1}{}{}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS1}{stix2}{m}{n}
\DeclareFontSubstitution{LS2}{stix2}{m}{n}
\DeclareSymbolFont{xsymbols}{LS1}{stix2scr}{m}{n}
\DeclareSymbolFont{xlargesymbols}{LS2}{stix2ex}{m}{n}
\DeclareMathDelimiter{\lfloor}{\mathopen}{symbols}{"E2}{xlargesymbols}{"08}
\DeclareMathDelimiter{\rfloor}{\mathclose}{symbols}{"E3}{xlargesymbols}{"09}

\begin{document}
Why am i not getting $\lfloor x\rfloor$ properly?
\end{document}

当我运行 pdflatex 时,我没有得到楼层符号的输出。我在这里附加了输出在此处输入图片描述请帮忙。

答案1

你得到

Missing character: There is no <E2> in font cmsy10!
Missing character: There is no <E3> in font cmsy10!

因为您输入错误:symbols而不是largesymbols。也就是说,假设您想使用 STIX2 中的字形。不要忘记\makeatletter因为\noaccents@

\documentclass[12pt]{article}
\usepackage{amsthm,amsmath,ragged2e,relsize,graphicx,bbm,mathtools}

\makeatletter
%\DeclareFontEncoding{LS1}{}{}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\makeatother
%\DeclareFontSubstitution{LS1}{stix2}{m}{n}
\DeclareFontSubstitution{LS2}{stix2}{m}{n}
%\DeclareSymbolFont{xsymbols}{LS1}{stix2scr}{m}{n}
\DeclareSymbolFont{xlargesymbols}{LS2}{stix2ex}{m}{n}
\DeclareMathDelimiter{\lfloor}{\mathopen}{xlargesymbols}{"E2}{xlargesymbols}{"08}
\DeclareMathDelimiter{\rfloor}{\mathclose}{xlargesymbols}{"E3}{xlargesymbols}{"09}

\begin{document}

I am getting $\lfloor x\rfloor$ properly.

\end{document}

在此处输入图片描述

还有\lbrace\rbrace(但它们与其他字体并不真正匹配)。

\documentclass{article}
\usepackage{amsthm,amsmath,ragged2e,relsize,graphicx,bbm,mathtools}

\makeatletter
\DeclareFontEncoding{LS1}{}{}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\makeatother
\DeclareFontSubstitution{LS1}{stix2}{m}{n}
\DeclareFontSubstitution{LS2}{stix2}{m}{n}
\DeclareSymbolFont{stixoperators}{LS1}{stix2}{m}{n}
%\DeclareSymbolFont{stixsymbols}{LS1}{stix2scr}{m}{n}
\DeclareSymbolFont{stixlargesymbols}{LS2}{stix2ex}{m}{n}
\DeclareMathDelimiter{\lfloor}{\mathopen}{stixlargesymbols}{"E2}{stixlargesymbols}{"08}
\DeclareMathDelimiter{\rfloor}{\mathclose}{stixlargesymbols}{"E3}{stixlargesymbols}{"09}
\DeclareMathDelimiter{\lbrace}{\mathopen} {stixoperators}{"5E}{stixlargesymbols}{"0C}
\DeclareMathDelimiter{\rbrace}{\mathclose}{stixoperators}{"60}{stixlargesymbols}{"0D}

\begin{document}

I am getting $\lfloor x\rfloor$ properly.

I am getting $\lbrace x\rbrace$ properly.

I am getting $\{x\}$ properly.

\bigskip

$
\biggl\{\biggl\lfloor \Bigl\{\Bigl\lfloor \bigl\{\bigl\lfloor \{\lfloor
%
\biggl\rfloor\biggl\} \Bigl\rfloor\Bigl\} \bigl\rfloor\bigl\} \rfloor\}
$

\end{document}

在此处输入图片描述

\Big是的,从到有很大的差距\bigg:必须稍微减少一点这个因素。留作练习。

答案2

您无需再次声明\lfloor\rfloor它们已经存在。Pdflatex 不是这里的问题。

\documentclass[12pt]{article}
\usepackage{amsthm,amsmath,ragged2e,relsize,graphicx,bbm,mathtools}

\DeclareFontEncoding{LS1}{}{}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS1}{stix2}{m}{n}
\DeclareFontSubstitution{LS2}{stix2}{m}{n}
\DeclareSymbolFont{xsymbols}{LS1}{stix2scr}{m}{n}
\DeclareSymbolFont{xlargesymbols}{LS2}{stix2ex}{m}{n}
% \DeclareMathDelimiter{\lfloor}{\mathopen}{symbols}{"E2}{xlargesymbols}{"08} <- Not necessary
% \DeclareMathDelimiter{\rfloor}{\mathclose}{symbols}{"E3}{xlargesymbols}{"09} <- Not necessary

\begin{document}
Why am i not getting $\lfloor x\rfloor$ properly?
\end{document}

生产 在此处输入图片描述

顺便说一下你只需要:

\documentclass{article}

\begin{document}
    You can get $\lfloor x \rfloor$ properly.
\end{document}

获得

在此处输入图片描述

相关内容