1

I tried to load this packages:

\usepackage{stix}
\usepackage[notext, nomath, not1, notextcomp, upint]{stix2}

with the hope that pdfLatex on Overleaf (that I use) creates only STIX2's integrals and the the remain with STIX (NOT STIX2). But the result is that Overleaf doesn't make the STIX2's Integrals. WHY??

My code:

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{stix}
\usepackage[notext, nomath, not1, notextcomp, upint]{stix2}
\usepackage{mathtools}
%\usepackage{amsmath}

\title{STIX vs STIX2}

\begin{document}

\maketitle

\Large

\section{Introduction}

\begin{equation}
\oint,\:\oiint,\:\oiiint,\:\intcup,\:\intcap,\:\sumint,\:\idotsint,\:\ointctrclockwise
\end{equation}

\end{document}

I'm using book-option. If there are no strongly solutions that immediately solv my problem, Could I load all STIX2's integrals that serve me, one at once? If so, how had I to do? Thank you so much

3
  • 1
    "Why does Overleaf not use STIX2's integrals?" I guess because you specified the nomath option.
    – user263192
    Commented May 14, 2022 at 18:06
  • Ok thank you, but now when I write greek letter, the output is STIX2's one. But I'd like the STIX's output one. How have I to do? Thx again
    – Puck
    Commented May 14, 2022 at 18:18
  • 1
    What's your reason for not wanting to use either XeLaTeX or LualLaTeX along with the unicode-math package?
    – Mico
    Commented May 14, 2022 at 19:35

2 Answers 2

5

The unicode-math package provides a standard way to do this. It requires LuaLaTeX or XeLaTeX.

\documentclass{book}
\usepackage{mathtools}
\usepackage{unicode-math}

\setmainfont{XITS}
\setmathfont{XITS Math}
\setmathfont{STIX Two Math}[
  Scale=MatchUppercase,
  %StylisticSet=8, % Uncomment for upright integrals.
  range={"222B-"2233,"2A0B-"2A1C} ] % Integrals

\title{STIX vs STIX2}

\begin{document}

\maketitle

\Large

\section{Introduction}

\begin{equation}
\oint,\:\oiint,\:\oiiint,\:\intcup,\:\intcap,\:\sumint,\:\idotsint,\:\ointctrclockwise
\end{equation}

\end{document}

STIX Two Math sample

There’s no way to do this with standard package options that’s compatible with PDFTeX. So far as I know, you would need to load the math symbol alphabet containing the stix2 integrals and redefine all their commands.

My advice is to use LuaLaTeX with Unicode when you can, and PDFTeX with legacy 8-bit fonts when you have to.

4

Your setup essentially replaces most of stix actions with the corresponding ones of stix2.

You can replace the symbol like stix2 does, using the right font.

\documentclass{book}

\usepackage{mathtools}
\usepackage{stix}

\makeatletter
\DeclareSymbolFont{stixtwointegrals}{LS2}{stix2cal}{m}{n}
\SetSymbolFont{stixtwointegrals}{bold}{LS2}{stix2cal}{b}{n}
\stix@MathSymbol{\smallintsl}             {\mathop}{stixtwointegrals}{"00}
\stix@MathSymbol{\smalliintsl}            {\mathop}{stixtwointegrals}{"01}
\stix@MathSymbol{\smalliiintsl}           {\mathop}{stixtwointegrals}{"02}
\stix@MathSymbol{\smallointsl}            {\mathop}{stixtwointegrals}{"03}
\stix@MathSymbol{\smalloiintsl}           {\mathop}{stixtwointegrals}{"04}
\stix@MathSymbol{\smalloiiintsl}          {\mathop}{stixtwointegrals}{"05}
\stix@MathSymbol{\smallintclockwisesl}    {\mathop}{stixtwointegrals}{"06}
\stix@MathSymbol{\smallvarointclockwisesl}{\mathop}{stixtwointegrals}{"07}
\stix@MathSymbol{\smallointctrclockwisesl}{\mathop}{stixtwointegrals}{"08}
\stix@MathSymbol{\smallsumintsl}          {\mathop}{stixtwointegrals}{"09}
\stix@MathSymbol{\smalliiiintsl}          {\mathop}{stixtwointegrals}{"0A}
\stix@MathSymbol{\smallintbarsl}          {\mathop}{stixtwointegrals}{"0B}
\stix@MathSymbol{\smallintBarsl}          {\mathop}{stixtwointegrals}{"0C}
\stix@MathSymbol{\smallfintsl}            {\mathop}{stixtwointegrals}{"0D}
\stix@MathSymbol{\smallcirfnintsl}        {\mathop}{stixtwointegrals}{"0E}
\stix@MathSymbol{\smallawintsl}           {\mathop}{stixtwointegrals}{"0F}
\stix@MathSymbol{\smallrppolintsl}        {\mathop}{stixtwointegrals}{"10}
\stix@MathSymbol{\smallscpolintsl}        {\mathop}{stixtwointegrals}{"11}
\stix@MathSymbol{\smallnpolintsl}         {\mathop}{stixtwointegrals}{"12}
\stix@MathSymbol{\smallpointintsl}        {\mathop}{stixtwointegrals}{"13}
\stix@MathSymbol{\smallsqintsl}           {\mathop}{stixtwointegrals}{"14}
\stix@MathSymbol{\smallintlarhksl}        {\mathop}{stixtwointegrals}{"15}
\stix@MathSymbol{\smallintxsl}            {\mathop}{stixtwointegrals}{"16}
\stix@MathSymbol{\smallintcapsl}          {\mathop}{stixtwointegrals}{"17}
\stix@MathSymbol{\smallintcupsl}          {\mathop}{stixtwointegrals}{"18}
\stix@MathSymbol{\smallupintsl}           {\mathop}{stixtwointegrals}{"19}
\stix@MathSymbol{\smalllowintsl}          {\mathop}{stixtwointegrals}{"1A}
\stix@MathSymbol{\smallintup}             {\mathop}{stixtwointegrals}{"1B}
\stix@MathSymbol{\smalliintup}            {\mathop}{stixtwointegrals}{"1C}
\stix@MathSymbol{\smalliiintup}           {\mathop}{stixtwointegrals}{"1D}
\stix@MathSymbol{\smallointup}            {\mathop}{stixtwointegrals}{"1E}
\stix@MathSymbol{\smalloiintup}           {\mathop}{stixtwointegrals}{"1F}
\stix@MathSymbol{\smalloiiintup}          {\mathop}{stixtwointegrals}{"20}
\stix@MathSymbol{\smallintclockwiseup}    {\mathop}{stixtwointegrals}{"21}
\stix@MathSymbol{\smallvarointclockwiseup}{\mathop}{stixtwointegrals}{"22}
\stix@MathSymbol{\smallointctrclockwiseup}{\mathop}{stixtwointegrals}{"23}
\stix@MathSymbol{\smallsumintup}          {\mathop}{stixtwointegrals}{"24}
\stix@MathSymbol{\smalliiiintup}          {\mathop}{stixtwointegrals}{"25}
\stix@MathSymbol{\smallintbarup}          {\mathop}{stixtwointegrals}{"26}
\stix@MathSymbol{\smallintBarup}          {\mathop}{stixtwointegrals}{"27}
\stix@MathSymbol{\smallfintup}            {\mathop}{stixtwointegrals}{"28}
\stix@MathSymbol{\smallcirfnintup}        {\mathop}{stixtwointegrals}{"29}
\stix@MathSymbol{\smallawintup}           {\mathop}{stixtwointegrals}{"2A}
\stix@MathSymbol{\smallrppolintup}        {\mathop}{stixtwointegrals}{"2B}
\stix@MathSymbol{\smallscpolintup}        {\mathop}{stixtwointegrals}{"2C}
\stix@MathSymbol{\smallnpolintup}         {\mathop}{stixtwointegrals}{"2D}
\stix@MathSymbol{\smallpointintup}        {\mathop}{stixtwointegrals}{"2E}
\stix@MathSymbol{\smallsqintup}           {\mathop}{stixtwointegrals}{"2F}
\stix@MathSymbol{\smallintlarhkup}        {\mathop}{stixtwointegrals}{"30}
\stix@MathSymbol{\smallintxup}            {\mathop}{stixtwointegrals}{"31}
\stix@MathSymbol{\smallintcapup}          {\mathop}{stixtwointegrals}{"32}
\stix@MathSymbol{\smallintcupup}          {\mathop}{stixtwointegrals}{"33}
\stix@MathSymbol{\smallupintup}           {\mathop}{stixtwointegrals}{"34}
\stix@MathSymbol{\smalllowintup}          {\mathop}{stixtwointegrals}{"35}
\stix@MathSymbol{\intslop}                {\mathop}{stixtwointegrals}{"94}
\stix@MathSymbol{\iintslop}               {\mathop}{stixtwointegrals}{"95}
\stix@MathSymbol{\iiintslop}              {\mathop}{stixtwointegrals}{"96}
\stix@MathSymbol{\ointslop}               {\mathop}{stixtwointegrals}{"97}
\stix@MathSymbol{\oiintslop}              {\mathop}{stixtwointegrals}{"98}
\stix@MathSymbol{\oiiintslop}             {\mathop}{stixtwointegrals}{"99}
\stix@MathSymbol{\intclockwiseslop}       {\mathop}{stixtwointegrals}{"9A}
\stix@MathSymbol{\varointclockwiseslop}   {\mathop}{stixtwointegrals}{"9B}
\stix@MathSymbol{\ointctrclockwiseslop}   {\mathop}{stixtwointegrals}{"9C}
\stix@MathSymbol{\sumintslop}             {\mathop}{stixtwointegrals}{"9D}
\stix@MathSymbol{\iiiintslop}             {\mathop}{stixtwointegrals}{"9E}
\stix@MathSymbol{\intbarslop}             {\mathop}{stixtwointegrals}{"9F}
\stix@MathSymbol{\intBarslop}             {\mathop}{stixtwointegrals}{"A0}
\stix@MathSymbol{\fintslop}               {\mathop}{stixtwointegrals}{"A1}
\stix@MathSymbol{\cirfnintslop}           {\mathop}{stixtwointegrals}{"A2}
\stix@MathSymbol{\awintslop}              {\mathop}{stixtwointegrals}{"A3}
\stix@MathSymbol{\rppolintslop}           {\mathop}{stixtwointegrals}{"A4}
\stix@MathSymbol{\scpolintslop}           {\mathop}{stixtwointegrals}{"A5}
\stix@MathSymbol{\npolintslop}            {\mathop}{stixtwointegrals}{"A6}
\stix@MathSymbol{\pointintslop}           {\mathop}{stixtwointegrals}{"A7}
\stix@MathSymbol{\sqintslop}              {\mathop}{stixtwointegrals}{"A8}
\stix@MathSymbol{\intlarhkslop}           {\mathop}{stixtwointegrals}{"A9}
\stix@MathSymbol{\intxslop}               {\mathop}{stixtwointegrals}{"AA}
\stix@MathSymbol{\intcapslop}             {\mathop}{stixtwointegrals}{"AB}
\stix@MathSymbol{\intcupslop}             {\mathop}{stixtwointegrals}{"AC}
\stix@MathSymbol{\upintslop}              {\mathop}{stixtwointegrals}{"AD}
\stix@MathSymbol{\lowintslop}             {\mathop}{stixtwointegrals}{"AE}
\stix@MathSymbol{\intupop}                {\mathop}{stixtwointegrals}{"AF}
\stix@MathSymbol{\iintupop}               {\mathop}{stixtwointegrals}{"B0}
\stix@MathSymbol{\iiintupop}              {\mathop}{stixtwointegrals}{"B1}
\stix@MathSymbol{\ointupop}               {\mathop}{stixtwointegrals}{"B2}
\stix@MathSymbol{\oiintupop}              {\mathop}{stixtwointegrals}{"B3}
\stix@MathSymbol{\oiiintupop}             {\mathop}{stixtwointegrals}{"B4}
\stix@MathSymbol{\intclockwiseupop}       {\mathop}{stixtwointegrals}{"B5}
\stix@MathSymbol{\varointclockwiseupop}   {\mathop}{stixtwointegrals}{"B6}
\stix@MathSymbol{\ointctrclockwiseupop}   {\mathop}{stixtwointegrals}{"B7}
\stix@MathSymbol{\sumintupop}             {\mathop}{stixtwointegrals}{"B8}
\stix@MathSymbol{\iiiintupop}             {\mathop}{stixtwointegrals}{"B9}
\stix@MathSymbol{\intbarupop}             {\mathop}{stixtwointegrals}{"BA}
\stix@MathSymbol{\intBarupop}             {\mathop}{stixtwointegrals}{"BB}
\stix@MathSymbol{\fintupop}               {\mathop}{stixtwointegrals}{"BC}
\stix@MathSymbol{\cirfnintupop}           {\mathop}{stixtwointegrals}{"BD}
\stix@MathSymbol{\awintupop}              {\mathop}{stixtwointegrals}{"BE}
\stix@MathSymbol{\rppolintupop}           {\mathop}{stixtwointegrals}{"BF}
\stix@MathSymbol{\scpolintupop}           {\mathop}{stixtwointegrals}{"C0}
\stix@MathSymbol{\npolintupop}            {\mathop}{stixtwointegrals}{"C1}
\stix@MathSymbol{\pointintupop}           {\mathop}{stixtwointegrals}{"C2}
\stix@MathSymbol{\sqintupop}              {\mathop}{stixtwointegrals}{"C3}
\stix@MathSymbol{\intlarhkupop}           {\mathop}{stixtwointegrals}{"C4}
\stix@MathSymbol{\intxupop}               {\mathop}{stixtwointegrals}{"C5}
\stix@MathSymbol{\intcapupop}             {\mathop}{stixtwointegrals}{"C6}
\stix@MathSymbol{\intcupupop}             {\mathop}{stixtwointegrals}{"C7}
\stix@MathSymbol{\upintupop}              {\mathop}{stixtwointegrals}{"C8}
\stix@MathSymbol{\lowintupop}             {\mathop}{stixtwointegrals}{"C9}
    \let\smallint=\smallintup
    \let\smalliint=\smalliintup
    \let\smalliiint=\smalliiintup
    \let\smalloint=\smallointup
    \let\smalloiint=\smalloiintup
    \let\smalloiiint=\smalloiiintup
    \let\smallintclockwise=\smallintclockwiseup
    \let\smallvarointclockwise=\smallvarointclockwiseup
    \let\smallointctrclockwise=\smallointctrclockwiseup
    \let\smallsumint=\smallsumintup
    \let\smalliiiint=\smalliiiintup
    \let\smallintbar=\smallintbarup
    \let\smallintBar=\smallintBarup
    \let\smallfint=\smallfintup
    \let\smallcirfnint=\smallcirfnintup
    \let\smallawint=\smallawintup
    \let\smallrppolint=\smallrppolintup
    \let\smallscpolint=\smallscpolintup
    \let\smallnpolint=\smallnpolintup
    \let\smallpointint=\smallpointintup
    \let\smallsqint=\smallsqintup
    \let\smallintlarhk=\smallintlarhkup
    \let\smallintx=\smallintxup
    \let\smallintcap=\smallintcapup
    \let\smallintcup=\smallintcupup
    \let\smallupint=\smallupintup
    \let\smalllowint=\smalllowintup
    \let\intop=\intupop
    \let\iintop=\iintupop
    \let\iiintop=\iiintupop
    \let\ointop=\ointupop
    \let\oiintop=\oiintupop
    \let\oiiintop=\oiiintupop
    \let\intclockwiseop=\intclockwiseupop
    \let\varointclockwiseop=\varointclockwiseupop
    \let\ointctrclockwiseop=\ointctrclockwiseupop
    \let\sumintop=\sumintupop
    \let\iiiintop=\iiiintupop
    \let\intbarop=\intbarupop
    \let\intBarop=\intBarupop
    \let\fintop=\fintupop
    \let\cirfnintop=\cirfnintupop
    \let\awintop=\awintupop
    \let\rppolintop=\rppolintupop
    \let\scpolintop=\scpolintupop
    \let\npolintop=\npolintupop
    \let\pointintop=\pointintupop
    \let\sqintop=\sqintupop
    \let\intlarhkop=\intlarhkupop
    \let\intxop=\intxupop
    \let\intcapop=\intcapupop
    \let\intcupop=\intcupupop
    \let\upintop=\upintupop
    \let\lowintop=\lowintupop
\makeatother

\begin{document}

\section{Introduction}

\begin{equation}
\oint,\:\oiint,\:\oiiint,\:\intcup,\:\intcap,\:\sumint,\:\idotsint,\:\ointctrclockwise
\end{equation}

\end{document}

Of course, you want to put all that code in a separate file.

enter image description here

I just took the block of integrals from stix2.sty and replaced integrals with stixtwointegrals, defining in the same way the symbol font, taking the code from the same file. The rest of the code is what's done in stix2.sty for the upint option.

Still, I can't understand why not using stix2.

1
  • 1
    Thank you for your answer. Now I answer to your question: I don't use STIX2 because I dislike its font, its greek letters, its Big-Operators, but very like its Integrals. Moreover, you told me Of course, you want to put all that code in a separate file, what do you mean, I don't well understand. Thx
    – Puck
    Commented May 14, 2022 at 22:03

You must log in to answer this question.

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