跳到主要内容

Integrals_sums_and_limits

积分

Integral \(\int_{a}^{b} x^2 \,dx\) inside text	
\[ \int_{a}^{b} x^2 \,dx \]

多重积分

\begin{gather*}
\iint_V \mu(u,v) \,du\,dv
\\
\iiint_V \mu(u,v,w) \,du\,dv\,dw
\\
\iiiint_V \mu(t,u,v,w) \,dt\,du\,dv\,dw
\\
\idotsint_V \mu(u_1,\dots,u_k) \,du_1 \dots du_k
\end{gather*}

\[
\oint_V f(s) \,ds
\]

累加和累乘

Sum $\sum_{n=1}^{\infty} 2^{-n} = 1$ inside text

\[ \sum_{n=1}^{\infty} 2^{-n} = 1 \]

Product $\prod_{i=a}^{b} f(i)$ inside text

\[ \prod_{i=a}^{b} f(i) \]

极限

Limit $\lim_{x\to\infty} f(x)$ inside text
\[ \lim_{x\to\infty} f(x) \]

示例:

\documentclass{article}
\title{Integrals, Sums and Limits}
\author{Overleaf}
\date{}
\usepackage{amsmath}

\begin{document}

\maketitle

\section{Integrals}

Integral \(\int_{a}^{b} x^2 dx\) inside text.

\medskip

The same integral on display:
\[
\int_{a}^{b} x^2 \,dx
\]
and multiple integrals:
\begin{gather*}
\iint_V \mu(u,v) \,du\,dv
\\
\iiint_V \mu(u,v,w) \,du\,dv\,dw
\\
\iiiint_V \mu(t,u,v,w) \,dt\,du\,dv\,dw
\\
\idotsint_V \mu(u_1,\dots,u_k) \,du_1 \dots du_k
\\
\oint_V f(s) \,ds
\end{gather*}

\section{Sums and products}

Sum \(\sum_{n=1}^{\infty} 2^{-n} = 1\) inside text.

The same sum on display:
\[
\sum_{n=1}^{\infty} 2^{-n} = 1
\]

Product \(\prod_{i=a}^{b} f(i)\) inside text.

The same product on display:
\[
\prod_{i=a}^{b} f(i)
\]

\section{Limits}

Limit \(\lim_{x\to\infty} f(x)\) inside text.

The same limit on display:
\[
\lim_{x\to\infty} f(x)
\]

\end{document}

数学模式下的间距

调整(La)TeX的默认数学模式间距在某些情况下是有用的,让我们看一个例子:

\documentclass{article}
\usepackage{amssymb}
\begin{document}
Assume we have the next sets
\[
S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S}
\]
\end{document}

编译结果如下:

下面的例子包含了使用各种命令插入的空格的完整列表,并演示了它们对排版数学公式的影响:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Spaces in mathematical mode.

\begin{align*}
f(x) &= x^2\! +3x\! +2 \\
f(x) &= x^2+3x+2 \\
f(x) &= x^2\, +3x\, +2 \\
f(x) &= x^2\: +3x\: +2 \\
f(x) &= x^2\; +3x\; +2 \\
f(x) &= x^2\ +3x\ +2 \\
f(x) &= x^2\quad +3x\quad +2 \\
f(x) &= x^2\qquad +3x\qquad +2
\end{align*}
\end{document}

编译结果如下:

运算符的间距:

在数学模式下,运算符和关系周围的间距由特定的跳过宽度控制:

\thinmuskip (默认情况下,它等于 3 mu)

\medmuskip (默认情况下,它等于4 mu)

\Thickmuskip (默认情况下等于 5 mu)

\begin{align*}
3ax+4by=5cz\\
3ax<4by+5cz
\end{align*}

用户自定义间距

\begin{align*}
34x^2a \mathbin{\#} 13bc \\
34x^2a \mathrel{\#} 13bc
\end{align*}

速查:

\quad	space equal to the current font size (= 18 mu)
\, 3/18 of \quad (= 3 mu)
\: 4/18 of \quad (= 4 mu)
\; 5/18 of \quad (= 5 mu)
\! -3/18 of \quad (= -3 mu)
\ (space after backslash!) equivalent of space in normal text
\qquad twice of \quad (= 36 mu)