I am fairly new to TeX, and I am currently using TexStudio.
I am wondering how I can exactly replicate the typesetting of the integral below, including the font and the upright integral sign? What packages, what font?
Thank you.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI am fairly new to TeX, and I am currently using TexStudio.
I am wondering how I can exactly replicate the typesetting of the integral below, including the font and the upright integral sign? What packages, what font?
Thank you.
This seems quite similar to newtxmath
with the upint
option:
\documentclass{article}
\usepackage{newtxtext}
\usepackage[upint]{newtxmath}
\newcommand{\diff}{\mathop{}\!d}
\begin{document}
\[
\int x^n\diff x
\]
\end{document}
Basic math is included in LaTeX without any additional packages. I would write:
\documentclass{article}
\begin{document}
\[ \int x^n\, \mathrm{d}x \]
\end{document}
If you just type dx
instead of \mathrm{d}x
, the d
will be put in italic (like in your example).
\text
is completely wrong here. There are so many people misusing \text
in this way. Here \mathrm
should be used, not \text
. \text
has one and one use only (except for siunitx
which "misuses" it a bit): textual comments in displayed math. This is clearly not such a case.
Ok, you are new to \LaTeX. Here is your answer. I am also teaching you how to specify the limits of integration:
$\displaystyle \int_a^b x^n \, dx$
The \,
directive inserts a thinspace between the integrand and the variable of integration; this is commonly done in (good) math typography.
If you need an expression without limits of integration:
$\displaystyle \int x^n \, dx$