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

When I am running pdflatex, I am not getting the output of the floor symbol. I am attaching the output here enter image description here Please help.

2 Answers 2

5

You get

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

because you have a typo: symbols instead of largesymbols. That is, assuming you want to use the glyphs from STIX2. Don't forget \makeatletter because of \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}

enter image description here

With also \lbrace and \rbrace (but they don't really match with other fonts).

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

enter image description here

Yes, there's a big jump from \Big to \bigg: one has to reduce a bit the factor. Left as exercise.

3
  • Thanks. Can you please add the commands for the \lbrace and \rbrace as well. I still have a problem with that. Thanks a ton for the kind help.
    – C.S.
    Nov 9, 2020 at 3:50
  • 1
    @crskhr I added the necessary parts. The problem with \bigg is for you to solve.
    – egreg
    Nov 9, 2020 at 8:32
  • Thanks a ton for the kind help. Very nice of you to do the needful. :)
    – C.S.
    Nov 9, 2020 at 9:01
2

You don't need to declare \lfloor and \rfloor again. They already exists. Pdflatex is not the problem here.

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

produces enter image description here

By the way you just need:

\documentclass{article}

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

to obtain

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .