04 LaTeX 的數學公式

GitHub:https://github.com/qinnian/LaTeX

微信公衆號【欽念博客】:[LaTeX 教程資源彙總(推薦)]

一、公式排版

  • 行內公式:數學公式與文字混排

  • 行間公式:數學公式單獨列爲一行


 

\documentclass[UTF8]{ctexart} \begin{document}  % 行內公式由一對 $ 符號包裹 The Pythagorean theorem is $a^2 + b^2 = c^2$.  %行間公式由 equation 環境包裹 The Pythagorean theorem is: \begin{equation} a^2 + b^2 = c^2 \end{equation}  \end{document}

 

二、數學符號
希臘字母符號的名稱就是其英文名稱,如 α (\alpha)、β (\beta) 等等

\documentclass[UTF8]{ctexart}
\begin{document}
$a_1, a_2, \dots, a_n$ \\$a_1 + a_2 + \cdots + a_n$
\end{document}

用 ^ 和 _ 標明上下標,上下標的內容一般需要用花括號包裹,否則上下標只對後面的一個符號起作用。

\documentclass[UTF8]{ctexart}
\begin{document}
$p^3_{ij} \qquadm_\mathrm{Knuth}\qquad\sum_{k=1}^3 k $\\[5pt]$a^x+y \neq a^{x+y}\qquade^{x^2} \neq {e^x}^2$
\end{document}

導數符號'(′) 是一類特殊的上標,可以適當連用表示多階導數,也可以在其後連用上標

\documentclass[UTF8]{ctexart}
\begin{document}
$f(x) = x^2 \quad f'(x)= 2x \quad f''^{2}(x) = 4$
\end{document}

分式使用 \frac{分子}{分母} 來書寫。分式的大小在行間公式中是正常大小,而在行內被極度壓縮。

 

\documentclass[UTF8]{ctexart}
\begin{document} \[\frac{3}{8}\]\end{document}

 

三、普通符號

推薦閱讀

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章