3

I just recently switched from Windows 7 tu Ubuntu 18.04. Bevor i was working on a TeX document which worked all fine. But after i changed the OS and set MikTeX up again the stix2 package was causing troubles, by displaying wrong symbols. I changed nothing on my TeX-file, just using a new OS and a new MikTeX installation.

The following code

\documentclass[ngerman]{standalone}

\usepackage{stix2}
\usepackage{amsmath,amsthm,amsfonts,amscd,amsbsy,amsxtra}
\usepackage{mathtools}

\DeclarePairedDelimiter {\norm} {\lVert} {\rVert}

\begin{document}
    $\norm{\cdot}$
\end{document}

delivers enter image description here. Obviously it should deliver something like || . ||, but instead of the ||-symbol the \mathscr{k}-symbol is displayed.

I already saw the question Wrong symbols with STIX2 and LuaLaTeX. It seems to be the same problem, but i don't use LuaLaTeX.

0
9

You need to load the stix2 package after, not before, packages such as mathtools. I.e., instead of

\usepackage{stix2}
\usepackage{amsmath,amsthm,amsfonts,amscd,amsbsy,amsxtra}
\usepackage{mathtools}
\DeclarePairedDelimiter {\norm} {\lVert} {\rVert}

give

\usepackage{amsmath,amsthm,amsfonts,amscd,amsbsy,amsxtra}
\usepackage{mathtools}
\DeclarePairedDelimiter {\norm} {\lVert} {\rVert}
\usepackage{stix2}

a try.

4
  • This worked for me. If you want to add the bm package as well, put it at the end, or there will be to many symbol fonts declared. – moro11 Jan 15 '20 at 17:07
  • Nevertheless, i am still wondering, why it worked previously in exact that loading order. But at least i got the problem fixed and can now continue working on my old file. Thanks! – moro11 Jan 15 '20 at 17:12
  • 1
    @moro11 - Glad a solution was found. About too many symbol fonts being declared: The amsxtra package is pretty much obsolete by now -- I wouldn't load it. For sure, replace amsbsy with bm, and do load amssymb, since that package loads amsfonts automatically -- which therefore wouldn't need to be loaded separately. And, since mathtools loads amsmath automatically, you need not load amsmath separately either. You should check whether or not your document truly needs amscd. – Mico Jan 15 '20 at 23:17
  • @moro11 - Not having ready access to older (much older?) versions of stix2 and mathtools, I'm afraid I'm not in a position to provide a meaningful discussion of why some package loading ordering which "worked" at some time in the past no longer "works". – Mico Jan 15 '20 at 23:19
6

Some of the font packages you loaded overwrote definitions from stix2 in an incompatible way. You almost certainly don’t want to load both amsfonts, amsbsy or amsxtra if you are also loading stix2. If you want more legacy 8-bit math fonts, you might look at mathalpha, isomath and bm.

You could also switch to unicode-math for a single, standard encoding. This avoids the problem of 8-bit fonts putting symbols in different unused slots of math alphabets like bold, italic or calligraphic, which legacy LaTeX forced font packages to do.

2
  • Just removing the packages amsfonts, amsbsy and amsxtra doesn't help. I didn't tryed the tip with unicode-math since it seems to be a bigger change and requires the cange to LuaLaTeX... as my document is already pritty big i try to avoid major changes which could cause other problems. – moro11 Jan 15 '20 at 17:19
  • 1
    @moro11 Mico’s correct about the order you have to load them in. – Davislor Jan 15 '20 at 21:31

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.