1

I'm trying to use the stix2 package, but for some reason it isn't rendering vertical bars (e.g., absolute value, etc.) using \lvert and \rvert correctly.

Using:

\documentclass[letterpaper,12pt]{article}

\usepackage[T1]{fontenc}
\usepackage{stix2}
\usepackage{amsmath,amsfonts}

\begin{document}

Consider the equation
\begin{equation*}
    y = \lvert x \rvert
\end{equation*}

\end{document}

gives me this:

enter image description here

I'm using Overleaf if that matters.

4
  • Welcome to TeX.SX! Your document compiles fine for me, both on my computer and on Overleaf.
    – Vincent
    May 9 '20 at 21:01
  • 1
    I confirm the good result on my machine.
    – egreg
    May 9 '20 at 21:05
  • Interesting, thank you both. I'm perplexed, though. Does that mean I have to separately install the font somehow on my computer? I'm afraid I'm new to using anything other than the default CM font in LaTex.
    – bmclaurin
    May 9 '20 at 21:13
  • Never mind. I solved my problem by loading stix2 package after amsmath/amsfonts
    – bmclaurin
    May 9 '20 at 21:27
0

It seems I just answered my own question. The solution for me was to load the stix2 package after amsmath, as in

\documentclass[letterpaper,12pt]{article}

\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{stix2} %load this *after* amsmath

\begin{document}

Consider the equation
\begin{equation*}
    y = \lvert x \rvert
\end{equation*}

\end{document}
2
  • Actually, stix2 already contains the symbols covered by amsfonts. So technically you should only load one of the two. Either stix2 or amsfonts, but not both. May 10 '20 at 0:13
  • Thanks @RuixiZhang. I have removed.
    – bmclaurin
    May 10 '20 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.