Overleaf 版本LaTeX 7天入门(第五天)

明天学习如何输入数学公式,详细的内容参考overleaf官网。
latex主要优点之一是易于编写数学表达式。Latex中有两种模式用于数学表达式: 内联 (inline) 模式和 显示 (display) 模式。第一种模式(内联)编写的公式是文本中的一部分,第二种模式(显示)编写的公式不在段落中,而是放在单独的行上。让我们看一个内联模式的例子:

In physics, the mass-energy equivalence is stated
by the equation $E=mc^2$, discovered in 1905 by Albert Einstein.

要在内联模式下添加数学表达式,可以使用以下分隔符之一:

\(... \)
$ ... $ 
\begin{math} ... \end{math}

它们作用相同,选择哪个完全取决于个人喜好。而显示模式有两种版本:编号和非编号。

The mass-energy equivalence is described by the famous equation
\[E=mc^2 \]
discovered in 1905 by Albert Einstein.
In natural units ($c = 1$), the formula expresses the identity
\begin{equation}
E=m
\end{equation}

要在显示模式下输出方程式,可以使用以下分隔符之一:\[... \]\begin{displaymath} ... \end{displaymath}\begin{equation} ... \end{equation}不鼓励 使用 $$ ... $$,因为它会产生不一致的间距,而且可能不适用于某些数学软件包。重要说明:equation环境是由外部软件包提供的,请参阅 amsmath 文章
许多数学命令都需要用到 amsmath 包,因此在编写数学表达式时请确保引入了这个包。下面列举了一些基本的数学命令。

Subscripts in math mode are written as $a_b$ and superscripts are written as $a^b$. These can be combined an nested to write expressions such as
% 下标和上标分别用 $a_b$ 和 $a^b$,将它们组合起来使用可以写出下面的表达式。
\[T^{i_1 i_2 \dots i_p}_{j_1 j_2 \dots j_q} = T(x^{i_1},\dots,x^{i_p},e_{j_1},\dots,e_{j_q}) \]
We write integrals using $\int$ and fractions using $\frac{a}{b}$. Limits are placed on integrals using superscripts and subscripts:

% 我们使用 $\int$ 编写积分,使用 $\frac{a}{b}$ 编写分数。积分区间使用上标和下标放置在积分上:
\[\int_0^1 \frac{1}{e^x} =  \frac{e-1}{e} \]

Lower case Greek letters are written as $\omega$ $\delta$ etc. while upper case Greek letters are written as $\Omega$ $\Delta$.
% 小写希腊字母像这样写:$\omega$ $\delta$,大写希腊字母像这样写:$\Omega$ $\Delta$
Mathematical operators are prefixed with a backslash as $\sin(\beta)$, $\cos(\alpha)$, $\log(x)$ etc.

% 数学运算符的前缀为反斜杠,例如 $\sin(\beta)$, $\cos(\alpha)$, $\log(x)$ 等。

latex书写数学表达式的知识无法在这里一一提及, 可以查看下面这些文章

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
禁止转载,如需转载请通过简信或评论联系作者。

推荐阅读更多精彩内容