2

I'd like to use the upper integral symbol \upint. Since by default this symbol is not defined, I'd like to use the XITS font in a LaTeX document. When using the STIX font one could simply

 \usepackage{stix}

but

 \usepackage{xits}

doesn't work. I tried using unicode-math but it doesn't work with pdflatex.

/edit: I found \upint in the mathop section of this document: http://mirrors.ctan.org/macros/unicodetex/latex/unicode-math/unimath-symbols.pdf Does it mean that I can use the \upint unicode symbol without an explicit usepackage?

Marijn
  • 37,699
marmistrz
  • 489
  • 3
  • 14

1 Answers1

6

You can use the upint option for stix:

\documentclass{article}
\usepackage[upint]{stix}

\begin{document}

With the \texttt{upint} option, the integral is not
slanted
\[
\int f(x)\,dx
\]
There are \verb|\intup| and \verb|\intsl|, but the
package documentation recommends sticking to
\verb|\int|
\[
\intsl f(x)\,dx
\]

\end{document}

enter image description here

If you just want the symbols while keeping the fonts, you can do like this:

\documentclass{article}
\usepackage{amsmath}

\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}

\DeclareSymbolFont{integrals}{LS2}{stixcal}{m}{n}
\DeclareMathSymbol{\intop}  {\mathop}{integrals}{"AF}
\DeclareMathSymbol{\iintop} {\mathop}{integrals}{"B0}
\DeclareMathSymbol{\iiintop}{\mathop}{integrals}{"B1}

\makeatletter
\renewcommand*{\iint}{\DOTSI\iintop\ilimits@}
\renewcommand*{\iiint}{\DOTSI\iiintop\ilimits@}
\makeatother


\begin{document}

\[
\int f(x)\,dx + \int_a^b f(x)\,dx + \iint\limits_D f(x,y)\,dx\,dy
\]

\end{document}

enter image description here

egreg
  • 1,121,712
  • Yes but this option changes the whole font of my document which I'd like to avoid. Or at least try another font – marmistrz Apr 16 '16 at 18:00
  • @marmistrz You didn't say so: \usepackage{stix} chooses Times. I added the code for importing just the integrals. – egreg Apr 16 '16 at 19:20
  • what do the extra commands mean? Can you comment them please? – marmistrz Apr 16 '16 at 20:22
  • @marmistrz See http://tex.stackexchange.com/questions/14386/importing-a-single-symbol-from-a-different-font – egreg Apr 16 '16 at 21:00
  • How would you adapt the code if you wanted a symbol 'X' from 'New PX with Euler math' font? Where can I read the basics of how to do it? – Peluche Dec 06 '22 at 15:05