地板支架 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}

在此輸入影像描述

也與\lbraceand \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。它們已經存在了。 Pdlatex 不是這裡的問題。

\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}

獲得

在此輸入影像描述

相關內容