4

I have a problem with the integral symbol. Previously, it was perfectly straight and now it's tilted, even though I haven't changed my code.

Before: enter image description here

Now: enter image description here

Here are the packages I use:

\usepackage[dvipsnames,table,xcdraw]{xcolor}
\usepackage{wrapfig2}%pour mettre des figures à côté de texte
\usepackage{babel}%francisation
\usepackage{mathtools}
\usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math}
\usepackage[default,varnothing]{fontsetup}
\newfontface{\STIXTWO}{STIX Two Math}
\usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}
\usepackage[shortlabels]{enumitem}%pour pouvoir changer les labels des listes
\usepackage{siunitx}%pour les unités
\usepackage{xspace}%pour la gestion des espaces
\usepackage[np,autolanguage]{numprint}%pour la séparation des milliers
\usepackage{autoaligne}%pour les systèmes linéaires
\usepackage{nicematrix}%pour les matrices "évoluées"
\usepackage{tikz}%pour les graphiques et bien d'autres choses
\usetikzlibrary{babel,fit,calc,arrows.meta,positioning,%
decorations.pathreplacing,patterns.meta,angles,matrix,3d,quotes,mindmap,backgrounds}
\usepackage{tkz-tab}
\usepackage{emoji}
\setemojifont{Noto Color Emoji}
\usepackage[most]{tcolorbox}%pour les théorèmes, définitions, etc.
\tcbuselibrary{documentation}

Maybe there is an option in a package I should add?

PS: Sorry for my English (I am French)

Here is a MWE:

\documentclass[10pt,a4paper,french]{book}

\usepackage[dvipsnames,table,xcdraw]{xcolor}
\usepackage{wrapfig2}%pour mettre des figures à côté de texte
\usepackage{babel}%francisation
\usepackage{mathtools}
\usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math}
\usepackage[default,varnothing]{fontsetup}
\newfontface{\STIXTWO}{STIX Two Math}
\usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}
\usepackage[shortlabels]{enumitem}%pour pouvoir changer les labels des listes
\usepackage{siunitx}%pour les unités
\usepackage{xspace}%pour la gestion des espaces
\usepackage[np,autolanguage]{numprint}%pour la séparation des milliers
\usepackage{autoaligne}%pour les systèmes linéaires
\usepackage{nicematrix}%pour les matrices "évoluées"
\usepackage{tikz}%pour les graphiques et bien d'autres choses
\usetikzlibrary{babel,fit,calc,arrows.meta,positioning,%
    decorations.pathreplacing,patterns.meta,angles,matrix,3d,quotes,mindmap,backgrounds}
\usepackage{tkz-tab}
\usepackage{emoji}
\setemojifont{Noto Color Emoji}
\usepackage[most]{tcolorbox}%pour les théorèmes, définitions, etc.
\tcbuselibrary{documentation}

\begin{document}
    \[\int_a^b f\]
\end{document}

And here is the result: enter image description here

I can't reproduce the upright version (and that's what I would want)

Edit: I tried the solution provided by Apporv Potnis with the upint option. It is better but that's not exactlty what I had before:

What I had before: enter image description here

Now with the upint option: enter image description here

As you can see, before it was less straight and more bold.

I remember I recently updated the packages in Miktex. Maybe, it is the reason of the change?

New Edit: In the stix-two package documentation, I see this: enter image description here

I think that is what I had before. So how do I get the Stylistic set 8?

8
  • 1
    I think it would be better if you give an MWE, that is, a minimal working example. Commented Nov 22 at 7:54
  • Please provide the code that produced the two pictures. Also, how long ago was "previously"? Was it an earlier TeX distribution you were using, or different fonts? Obviously something must have been different. Commented Nov 22 at 8:00
  • 1
    You can provide the upint option to fontsetup. It gives upright integrals, I just checked. The spacing of limits is a bit off though. Also check the fontsetup documentation for more options. Commented Nov 22 at 8:00
  • I added a MWE. I hope it helps Commented Nov 22 at 8:12
  • I edited my post twice. I think the solution is in the Stix Two options Commented Nov 22 at 8:35

2 Answers 2

5

You can provide the upint option to fontsetup. It gives upright integrals, I just checked. The spacing of limits is a bit off though. Also check the fontsetup documentation for more options. I have no idea why you would get upright integrals without the upint option before.

If you want upright integrals from Stix Two Math, you've to use the range option of unicode-math. Here, I've loaded the Stix Two Math font as \setmathfont{Stix Two Math}[StylisticSet=08, range=\int] .

\documentclass{article}
\usepackage[dvipsnames,table,xcdraw]{xcolor}
\usepackage{wrapfig2}%pour mettre des figures à côté de texte
\usepackage{babel}%francisation
\usepackage{mathtools}
\usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math}

\usepackage[default,varnothing,upint]{fontsetup} % ADDED THE upint OPTION
\setmathfont{Stix Two Math}[StylisticSet=08, range=\int]

\newfontface{\STIXTWO}{STIX Two Math}
\usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}
\usepackage[shortlabels]{enumitem}%pour pouvoir changer les labels des listes
\usepackage{siunitx}%pour les unités
\usepackage{xspace}%pour la gestion des espaces
\usepackage[np,autolanguage]{numprint}%pour la séparation des milliers
\usepackage{autoaligne}%pour les systèmes linéaires
\usepackage{nicematrix}%pour les matrices "évoluées"
\usepackage{tikz}%pour les graphiques et bien d'autres choses
\usetikzlibrary{babel,fit,calc,arrows.meta,positioning,%
decorations.pathreplacing,patterns.meta,angles,matrix,3d,quotes,mindmap,backgrounds}
\usepackage{tkz-tab}
\usepackage{emoji}
\setemojifont{Noto Color Emoji}
\usepackage[most]{tcolorbox}%pour les théorèmes, définitions, etc.
\tcbuselibrary{documentation}

\begin{document}
    \[\int_a^b f(t) dt\]
\end{document}

enter image description here

3

Your code never uses STIX Two Math, so applying the stylistic set is out of the question.

You get upright integrals with the upint option. Just for information: I tried

\documentclass{article}
\usepackage{fontsetup}

\begin{document}

\[
\int_a^b
\]

\end{document}

with LuaLaTeX and XeLaTeX from 2021 up to now and the integrals are always slanted.

On the other hand, if I do

\usepackage[upint]{fontsetup}

the output is

output

Maybe you were passing upint in the options to \documentclass?

A small note about your code? What's the reason for loading numprint along with siunitx?

9
  • This is the same solution already given by Apoorv Potnis. Commented Nov 22 at 10:09
  • Thank you all for your help. The code provided by Apoorv Potnis works fine. Commented Nov 22 at 10:55
  • For @egreg: I didn't know that with Lualatex (which I use) the integrals have been slanted since 2021. Is there a reason for that? And I am not sure I understand correctly your question about numprint and siunitx. I use siunitx for the units symbols, of course, and numprint because in France, the comma (and not the point, like in the US) is used to write decimal numbers Commented Nov 22 at 10:57
  • 1
    @Didier siunitx has the \num facility for printing numbers, which is actually better than numprint. Commented Nov 22 at 11:39
  • I didn't know that egreg, thank you. But many of my documents use the \np command from the numprint package and I don't want to rewrite these documents Commented Nov 22 at 12:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.