2

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? enter image description here

Thank you.

satokun
  • 131
  • Did you mean to delete the screenshot? – Mico Aug 14 '17 at 07:41
  • 1
    @satokun Please reupload your screenshot. This question is now pretty much worthless for the community. – Holene Aug 14 '17 at 08:18
  • Saying that you prefer egreg's solution can not be a good reason for deleting the initial screenshot. As @Holene has pointed out, the entire query is worthless -- and should probably be deleted -- without that screenshot. – Mico Aug 14 '17 at 09:19

3 Answers3

6

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}

enter image description here

egreg
  • 1,121,712
4

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).

  • 1
    Thank you for the answer. But this produces a slanted integral sign. How can I make it straight? – satokun Aug 11 '17 at 07:57
  • In this case, check the following question: https://tex.stackexchange.com/questions/222243/how-to-obtain-a-bold-upright-integral-sign – Philipp Imhof Aug 11 '17 at 07:58
  • 1
    \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. – daleif Aug 11 '17 at 07:59
  • 1
    @daleif Thanks for pointing it out, you are completely right. I changed my answer accordingly. – Philipp Imhof Aug 11 '17 at 08:01
  • Thanks again. I somehow missed the comma when reading the comment. Either my eyes are too bad or my screen is too small :) – Philipp Imhof Aug 11 '17 at 08:32
0

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$
Mico
  • 506,678
  • I've taken the liberty of streamlining your answer a bit; feel free to revert if you disagree with the changes. – Mico Aug 14 '17 at 07:48