日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

latex数学公式(行内(间)公式标注/希腊字母/数学函数/配对括号/定理环境

發布時間:2023/12/9 编程问答 67 豆豆
生活随笔 收集整理的這篇文章主要介紹了 latex数学公式(行内(间)公式标注/希腊字母/数学函数/配对括号/定理环境 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本博文源于Latex,主要對Latex的數學公式進行學習,Latex的核心莫過于它的數學公式的宏包,宏包過于強大,以致于數學公式編輯起來非常優美。本博文分為:

  • 行內行間兩種公式的編寫
  • 各種字母的數學
  • 數學函數的使用
  • 配對括號的使用
  • 多行公式的編輯
  • 定理環境的輸入

實驗效果


實驗內容

行內與行間

行內代碼與行間代碼csdn都是支持的,這一部分可以參加博主的博文
Latex歐拉公式編輯-最美的數學公式
因此在使用的時候記住常用的符號即可。

打的都會被markdown析構掉,因此直接看代碼即可。

%開始行內公式學習 From $ a+b>c $,we have..\par From \(a+b>c\),we have.... %結束行內公式學習 %開始行間公式學習 Since $$ x^n+y^n=z^n, $$ \[x^n+y^n=z^n,\] \begin{displaymath} x^n+y^n=z^n, e^{i\pi} + 1 =0, \end{displaymath} we have... %結束行間公式學習

公式標注

這個公式標注,csdn里好像運行的不怎么友好,不過,可以肯定的是標注是\begin{equation}到\end{equation}之間是公式編輯,然后會被加標注

$$x_1+y_1>z_1 \eqno{(1)} $$ \begin{equation} x^n+y^n=z^n \end{equation} \begin{equation} x^n+y^n=z^n \end{equation} \begin{equation} x^n+y^n=z^n \end{equation}

因此運行結果如下:

希臘字母學習

一連串的希臘字母還包含黑板體和花體的英文字母,都是非常炫酷的。引入黑板體和花體的時候要特別注意引入包\usepackage{amssymb}

%開始對希臘字母進行學習 \[ \alpha\beta\delta\eta\gamma\iota \lambda\kappa\omega\sigma\zeta \] \[\Delta\Gamma\Lambda\Phi\Pi\Psi \Sigma\Theta\Omega\Upsilon\Xi \] %結束對希臘字母進行學習 %開始對黑板體或者花體進行輸出 $$ \mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ} $$ %結束對黑板體learning

結果為

數學函數

數學函數充次整個高等數學的半壁江山,這些我用matlab跑了一遍其實也都是函數調用的問題。在latex中以下有特殊的作用:

  • \int:積分
  • \lim極限
  • \sqrt根號
  • \sin \cos \tan是三角函數
  • \frac是分式

因此理解之后,然后再去看latex代碼就會發現有點眉目,積分和極限的趨向根據代碼中照貓畫虎即可。

%開始數學函數學習 \[ \frac{1}{2}+\frac{1}{3}=\frac{5}{6} \] \[ \sqrt{2}\cdot\sqrt[4]{2}=\sqrt[4]{8}\] \[ 2\sin x \cos x = \sin 2x \] \[ \lim_{n\to\infty}\frac{1}{n}=0 \] \[ \int\frac{1}{x} dx=\ln|x|+C \] \[ \int_0^\infty\frac{1}{x} dx=\ln|x|+C \]%結束對數學函數學習

配對括號

括號沒配對之前,應該是這樣子的,配對之后就更加美觀了

在latex中\left和\right就是掌握配對的。

%開始配對括號的學習 \[\lim_{x\to\infty}(1+\frac{1}{x})^x=\mathrm{e}\] \[\lim_{x\to\infty}\left(1+\frac{1}{x}\right)^x=\mathrm{e}\] \[\Bigg< \bigg\{ \Big[ \big( xyz \big) \Big] \bigg\} \Bigg> \] %結束配對括號的學習

第三行代碼可以根據自己想要的括號進行相應的調整進行配對。

公式拆分進多行

公式拆分多行是latex防止數學公式過長的一種設置,公式的對齊和編號是更加美觀好看的再表現。因此就分成了:

  • 對齊加編號\begin{align}%對齊
  • 對齊不加編號\begin{align*}
  • 不對齊加編號\begin{gather}%不對齊
  • 不對齊不加編號\begin{gather*}

外加上每個都好關門,因此代碼就變成這樣子了

%開始多行公式學習\begin{gather}%不對齊 x+y=5\\ 2x+2y=8 \end{gather} \begin{align}%對齊 x + y &= 5 \\ 2x + 3y &= 8 \end{align} \begin{gather*}%不對齊不編號 x+y=5\\ 2x+2y=8 \end{gather*} \begin{align*}%對齊不編號 x + y &= 5 \\ 2x + 3y &= 8 \end{align*} \begin{equation} \begin{split} (2+3)\cdot5 &= 2\cdot5 + 3\cdot5 \\&=25 \end{split} \end{equation} \begin{equation} \left. \begin{aligned} x+y &> 5 \\ y-y &> 11 \end{aligned} \ \right\}\Rightarrow x^2 - y^2 > 55 \end{equation} \begin{eqnarray*} a x + b y &=& u \\ c x + d y &=& v \end{eqnarray*}%結束多行公式學習

定理環境

定理環境是將理論與結論相融合,比如一條定理可以推出相應的結論。比如:一條定理加一條結論、一條定理加兩三條結論等等
如果要對其編號的話,加上[section]。沒特殊要求默認就行了。

%開始對定理環境的學習 \newtheorem{theorem}{Theorem}%一定理加推論 \newtheorem{corollary}{Corollary} \begin{theorem} This is a theorem. \end{theorem} \begin{corollary} This is a corollary. \end{corollary}\newtheorem{thrm}{Theorem} \newtheorem{corl}[thrm]{Corollary} \begin{thrm} This is a theorem. \end{thrm} \begin{corl} This is a corollary1. \end{corl} \begin{corl} This is a corollary2. \end{corl}\newtheorem{thm}{Theorem}[subsection] \newtheorem{cor}[thm]{Corollary} \begin{thm} This is a theorem. \end{thm} \begin{cor} This is a corollary. \end{cor}%結束對定理環境的學習

實驗完整源碼

\documentclass[UTF8]{article}\usepackage{amssymb} %引入黑板體或者花體 \usepackage{amsmath} \usepackage{titletoc} \usepackage{ctexcap}\begin{document} %開始行內公式學習 From $ a+b>c $,we have..\par From \(a+b>c\),we have.... %結束行內公式學習 %開始行間公式學習 Since $$ x^n+y^n=z^n, $$ \[x^n+y^n=z^n,\] \begin{displaymath} x^n+y^n=z^n, e^{i\pi} + 1 =0, \end{displaymath} we have... %結束行間公式學習 %開始對行間公式進行標注 $$x_1+y_1>z_1 \eqno{(1)} $$ \begin{equation} x^n+y^n=z^n \end{equation} \begin{equation} x^n+y^n=z^n \end{equation} \begin{equation} x^n+y^n=z^n \end{equation} %結束對行間公式進行標注 %開始對希臘字母進行學習 \[ \alpha\beta\delta\eta\gamma\iota \lambda\kappa\omega\sigma\zeta \] \[\Delta\Gamma\Lambda\Phi\Pi\Psi \Sigma\Theta\Omega\Upsilon\Xi \] %結束對希臘字母進行學習 %開始對黑板體或者花體進行輸出 $$ \mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ} $$ %結束對黑板體或者話題的輸出 %開始數學函數學習 \[ \frac{1}{2}+\frac{1}{3}=\frac{5}{6} \] \[ \sqrt{2}\cdot\sqrt[4]{2}=\sqrt[4]{8}\] \[ 2\sin x \cos x = \sin 2x \] \[ \lim_{n\to\infty}\frac{1}{n}=0 \] \[ \int\frac{1}{x} dx=\ln|x|+C \] \[ \int_0^\infty\frac{1}{x} dx=\ln|x|+C \]%結束對數學函數學習 %開始配對括號的學習 \[\lim_{x\to\infty}(1+\frac{1}{x})^x=\mathrm{e}\] \[\lim_{x\to\infty}\left(1+\frac{1}{x}\right)^x=\mathrm{e}\] \[\Bigg< \bigg\{ \Big[ \big( xyz \big) \Big] \bigg\} \Bigg> \] %結束配對括號的學習 %開始多行公式學習\begin{gather}%不對齊 x+y=5\\ 2x+2y=8 \end{gather} \begin{align}%對齊 x + y &= 5 \\ 2x + 3y &= 8 \end{align} \begin{gather*}%不對齊不編號 x+y=5\\ 2x+2y=8 \end{gather*} \begin{align*}%對齊不編號 x + y &= 5 \\ 2x + 3y &= 8 \end{align*} \begin{equation} \begin{split} (2+3)\cdot5 &= 2\cdot5 + 3\cdot5 \\&=25 \end{split} \end{equation} \begin{equation} \left. \begin{aligned} x+y &> 5 \\ y-y &> 11 \end{aligned} \ \right\}\Rightarrow x^2 - y^2 > 55 \end{equation} \begin{eqnarray*} a x + b y &=& u \\ c x + d y &=& v \end{eqnarray*}%結束多行公式學習 %開始對定理環境的學習 \newtheorem{theorem}{Theorem}%一定理加推論 \newtheorem{corollary}{Corollary} \begin{theorem} This is a theorem. \end{theorem} \begin{corollary} This is a corollary. \end{corollary}\newtheorem{thrm}{Theorem} \newtheorem{corl}[thrm]{Corollary} \begin{thrm} This is a theorem. \end{thrm} \begin{corl} This is a corollary1. \end{corl} \begin{corl} This is a corollary2. \end{corl}\newtheorem{thm}{Theorem}[subsection] \newtheorem{cor}[thm]{Corollary} \begin{thm} This is a theorem. \end{thm} \begin{cor} This is a corollary. \end{cor}%結束對定理環境的學習 \end{document}

實驗心得

在學習的時候開門和關門的匹配一定要做好,不然結果很難出來。

總結

以上是生活随笔為你收集整理的latex数学公式(行内(间)公式标注/希腊字母/数学函数/配对括号/定理环境的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。