Inserting a single space in integral

I'm trying to type up my homework, and I can't seem to figure out how to insert a blank horizontal space in this integral like my professor did...

His:

Mine:

I'm using

 $$\iint_S \left(\nabla \times \vec{F}\right) \cdot \vec{n} d\sigma,$$


You have a good eye for the details! So let's look at them more carefully.

\documentclass{article}
\usepackage{amsmath}

\renewcommand{\vec}[1]{\mathbf{#1}}
\newcommand{\diff}{\mathop{}\!d}

\begin{document}

\begin{align}
%
\iint_S \left(\nabla \times \vec{F}\right) \cdot \vec{n} d\sigma
%
\\
%
\iint_S \left(\nabla \times \vec{F}\right) \cdot \vec{n}\,d\sigma
%
\\
%
\iint_S (\nabla \times \vec{F}) \cdot \vec{n}\,d\sigma
%
\\
%
\iint_S (\nabla \times \vec{F}) \cdot \vec{n}\diff\sigma
%
\\
\end{align}

\end{document}


Attempt 1 is your original code; attempt 2 has the suggested \,.

Can you spot the difference with attempt 3? Look at the centered dot: in attempt 2 it is not midway from the operands. Why is that? Note I removed \left and \right, which should not generally be used.

Attempt 4 uses \diff\sigma instead of \,d\sigma. This is better not only because you won't forget \,, but also because it allows to change all of your italic “d” for the differential into an upright one, should the need arise, by just modifying the definition.

The last two lines are just for ensuring \diff doesn't add unwanted spaces in other situations: the two fractions are exactly the same.
Don't use $$ in LaTeX under any circumstances, see Why is $...$ preferable to$$ ... $$? You can use this code, borrowed from an answer on this site (I don't remember which one): \documentclass[12pt,a4paper]{article} \usepackage{mathtools} \newcommand*{\dd}{\mathop{\kern0pt\mathrm{d}}\!{}} \begin{document} $\iint_S (\nabla \times \mathbf{F}) \cdot \mathbf{n} \dd\sigma$% \end{document}  Note: Don't use $$ …  for displayed equations. It's plain TeX syntax, and it can give bad spacings. Use $…$ instead.
• \mathop{}\!d seems easier; with \mathrm or not, according to one's preferences. As you see, the OP has an italic d. – egreg May 5 '17 at 7:03