6

I've been trying to make the integral symbol "upright", meaning I want it not to be slanted, as in Born's Principles of Optics 7th edition. I've tried the \varint of the wasysym package, but it appears not to be automatically resized.

Can someone help me with this? Thank you for your attention and patience.

Per @Mico's suggestion, here's the preamble of my document:

\documentclass{book} 
\usepackage[utf8]{inputenc} 
\usepackage{amssymb} 
\usepackage[T1]{fontenc} 
\usepackage{amsmath} 
\usepackage{fancyhdr} 
\usepackage{english}{} 
\usepackage{amsthm} 
\usepackage{xfrac} 
\usepackage{makeidx} 
\usepackage{physics} 
\usepackage{commath} 
\usepackage[toc,page]{appendix}
7
  • Welcome to TeX.SE. Please advise whether you use pdfLaTeX, XeLaTeX, or LuaLaTeX. Please also confirm that you use either Computer Modern or Latin Modern as the text and math font family.
    – Mico
    Aug 9, 2019 at 13:18
  • To be honest I'm really an amateur, so I just work with what I've found on the web. In case it can help, I'll list all the packages I'm currently using below. Anyhow, as editor I use TeXstudio, and I visualize everything as a pdf. Aug 9, 2019 at 15:30
  • \documentclass{book} \usepackage[utf8]{inputenc} \usepackage{amssymb} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{fancyhdr} \usepackage{english}{} \usepackage{amsthm} \usepackage{xfrac} \usepackage{makeidx} \usepackage{physics} \usepackage{commath} \usepackage[toc,page]{appendix} Aug 9, 2019 at 15:31
  • 1
    Off-topic: Instead of \usepackage{english}, do please use \usepackage[english]{babel}.
    – Mico
    Aug 9, 2019 at 16:04
  • For example I use the excellent code of @egreg's answer here: tex.stackexchange.com/questions/88281/…
    – Sebastiano
    Aug 9, 2019 at 20:40

4 Answers 4

8

If you can use the modern toolchain with unicode-math, then either the command

\setmathfont[StylisticSet=8]{XITS Math}

or

\setmathfont[StylisticSet=8]{STIX Two Math}

will load a font variant with upright integrals. You could instead load only the upright integrals over another math font with

\setmathfont[range={"222B-"2233,"2A0B-"2A1C},StylisticSet=8]{STIX Two Math}

Several other Unicode math fonts use upright integrals by default, such as TeX Gyre Pagella Math. You can see font samples here.

If you’re mixing and matching fonts, it’s a good idea to add an option such as Scale=MatchUppercase.

If you must use legacy font packages, many of them support an upright-integral option, including \usepackage[upint]{stix}, \usepackage[upint]{newpxmath}, stix2, newtxmath, and so on. Check the documentation. Others have upright integrals by default.

6

If you load the wasysym package with the option integrals, all integral symbols will automatically be rendered in an upright style. Do note, though, that the size difference between text-style and display-style integrals won't be as pronounced as is the case when the default, i.e., Computer Modern-based, integral symbols are employed.

enter image description here

\documentclass{book} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{amssymb,amsmath,amsthm} 
\usepackage{fancyhdr} 
\usepackage[english]{babel} 
\usepackage{xfrac} 
\usepackage{makeidx} 
\usepackage{physics} 
\usepackage{commath} 
\usepackage[toc,page]{appendix}

\usepackage[integrals]{wasysym} % <-- new

\begin{document}
$\int\iint\iiint\oint \quad \displaystyle\int\iint\iiint\oint$
\end{document}
5

A very short example of upintegrals using kpfonts package. Here there is a screenshot.

enter image description here

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{kpfonts}
\begin{document}
$\int f(x)dx,\quad \iint_D f(x,y)dxdy$
\[\int f(x)dx,\quad \iint_D f(x,y)dxdy\]
\[\oint \quad \oiint\]
\end{document}
1
  • 2
    +1 kpfonts is a package created by a Frenchman: Christophe Caignaert :-)
    – AndréC
    Aug 9, 2019 at 20:58
4

You can use cmupint package; it also contains a quite number of upright integral symbols:

\documentclass{article}
\usepackage{cmupint}
\newcommand{\ud}{\,\mathrm{d}}
\begin{document}
$ \int x\ud x \oiint_D y\ud y \sumint z\ud z \npolint a\ud a $
$$ \int x\ud x \oiint_D y\ud y \sumint_0^1 z\ud z \npolint a\ud a $$
\end{document}

cmupint example

1
  • 1
    This is by far the best method out of all proposed here. It does exactly what is required and nothing else. No package conflicts, no broken layouts, etc.
    – ScumCoder
    May 7, 2023 at 22:30

You must log in to answer this question.

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