天天看點

CTEX裡的函數、符号及特殊字元

CTEX裡的函數、符号及特殊字元

聲調

文法

效果

\bar{a}

\acute{a}

\check{a}

\grave{a}

\tilde{a}

\hat{a}

\breve{a}

\dot{a}

\ddot{a}

函數

\sin a

sina

\cos b

cosb

\tan c

tanc

\arcsin d

arcsind

\arccos e

arccose

\arctan f

arctanf

\sinh g

sinhg

\cosh h

coshh

\tanh i

tanhi

\operatorname{sh}\,j

\operatorname{argsh}\,k

\operatorname{ch}\,h

\operatorname{argch}\,l

\operatorname{th}\,i

\operatorname{argth}\,m

\lim n

\limsup o

\liminf p

\min q

minq

\max r

maxr

\inf s

\sup t

\exp u

expu

\ln v

lnv

\lg w

lgw

\log x

logx

\log_{10} y

log10y

\ker x

kerx

\deg x

degx

\gcd x

gcdx

\Pr x

\det x

detx

\hom x

homx

\arg x

argx

\dim x

dimx

\lim_{a \to b}n

同餘

\pmod{m}

(mod m)

a \bmod b

amod b

微分

\nabla

\partial x

dx

\dot x

\ddot y

集合

\forall

\exists

\empty

\emptyset

\varnothing

\in

\ni

\not\in

\notin

\subset

\subseteq

\supset

\supseteq

\cap

\bigcap

\cup

\bigcup

\biguplus

\sqsubset

\sqsubseteq

\sqsupset

\sqsupseteq

\sqcap

\sqcup

\bigsqcup

邏輯

p

\land

\wedge

\bigwedge

\bar{q} \to p

\lor

\vee

\bigvee

\lnot

\neg q

\setminus

\smallsetminus

根号

\sqrt{3}

\sqrt[n]{3}

關系符号

\sim

˜

\approx

\simeq

\cong

\dot=

\le

< 

<

\ll

\gg

\ge

> 

>

\equiv

\not\equiv

\ne

\neq

\propto

\pm

\mp

幾何符号

\Diamond

\Box

\triangle

\angle

\perp

\mid

\nmid

\

45^\circ

箭頭符号

\leftarrow

\gets

\rightarrow

\to

\leftrightarrow

\longleftarrow

\longrightarrow

\mapsto

\longmapsto

\hookrightarrow

\hookleftarrow

\nearrow

\searrow

\swarrow

\nwarrow

\uparrow

\downarrow

\updownarrow

\rightharpoonup

\rightharpoondown

\leftharpoonup

\leftharpoondown

\upharpoonleft

\upharpoonright

\downharpoonleft

\downharpoonright

\Leftarrow

\Rightarrow

\Leftrightarrow

\Longleftarrow

\Longrightarrow

\Longleftrightarrow (or \iff)

\Uparrow

\Downarrow

\Updownarrow

特殊符号

\eth

\S

\P

\%

\dagger

\ddagger

\star

*

\ldots

\smile

\frown

\wr

\oplus

\bigoplus

\otimes

\bigotimes

\times

\cdot

\div

\circ

\bullet

\bigodot

\boxtimes

\boxplus

\triangleleft

\triangleright

\infty

\bot

\top

\vdash

\vDash

\Vdash

\models

\lVert

\rVert

\imath

\hbar

\ell

\mho

\Finv

\Re

\Im

\wp

\complement

\diamondsuit

\heartsuit

\clubsuit

\spadesuit

\Game

\flat

\natural

\sharp

上标、下标及積分等

功能

上标

a^2

a2

下标

a_2

組合

a^{2+2}

a2 + 2

a_{i,j}

ai,j

結合上下标

x_2^3

前置上下标

{}_1^2\!X_3^4

導數

(HTML)

x'

(PNG)

x^\prime

(錯誤)

x\prime

導數點

\dot{x}

\ddot{y}

向量

\vec{c}

\overleftarrow{a b}

\overrightarrow{c d}

\widehat{e f g}

上劃線

\overline{h i j}

下劃線

\underline{k l m}

上括号

\overbrace{1+2+\cdots+100}

\begin{matrix} 5050 \\

\overbrace{ 1+2+\cdots+100 } \end{matrix}

下括号

\underbrace{a+b+\cdots+z}

\begin{matrix} \underbrace{

a+b+\cdots+z } \\ 26 \end{matrix}

求和

\sum_{k=1}^N k^2

\begin{matrix} \sum_{k=1}^N k^2

\end{matrix}

求積

\prod_{i=1}^N x_i

\begin{matrix} \prod_{i=1}^N

x_i \end{matrix}

上積

\coprod_{i=1}^N x_i

\begin{matrix}

\coprod_{i=1}^N x_i \end{matrix}

極限

\lim_{n \to \infty}x_n

\begin{matrix} \lim_{n \to

\infty}x_n \end{matrix}

積分

\int_{-N}^{N} e^x\, dx

\begin{matrix} \int_{-N}^{N}

e^x\, dx \end{matrix}

雙重積分

\iint_{D}^{W} \, dx\,dy

三重積分

\iiint_{E}^{V} \, dx\,dy\,dz

四重積分

\iiiint_{F}^{U} \,

dx\,dy\,dz\,dt

路徑積分

\oint_{C} x^3\, dx + 4y^2\, dy

交集

\bigcap_1^{n} p

并集

\bigcup_1^{k} p

分數、矩陣和多行列示

分數

\frac{2}{4}=0.5

小型分數

\tfrac{2}{4} = 0.5

大型分數(一般)

\dfrac{2}{4} = 0.5 \qquad

\dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a

大型分數(嵌套)

\cfrac{2}{c + \cfrac{2}{d +

\cfrac{2}{4}}} = a

二項式系數

\binom{n}{k}

小型二項式系數

\tbinom{n}{k}

大型二項式系數(一般)

\dbinom{n}{k}

矩陣

x & y \\

z & v

\begin{vmatrix}

\end{vmatrix}

\begin{Vmatrix}

\end{Vmatrix}

\begin{bmatrix}

0      &

\cdots & 0      \\

\vdots & \ddots & \vdots \\

\cdots & 0

\end{bmatrix}

\begin{Bmatrix}

\end{Bmatrix}

\begin{pmatrix}

\end{pmatrix}

\bigl( \begin{smallmatrix}

a&b\\ c&d

\end{smallmatrix} \bigr)

條件定義

f(n) =

\begin{cases}

n/2,  &

\mbox{if }n\mbox{ is even} \\

3n+1, & \mbox{if }n\mbox{ is odd}

\end{cases}

多行等式

\begin{align}

f(x) & = (a+b)^2 \\

& = a^2+2ab+b^2 \\

\end{align}

\begin{alignat}{2}

f(x) & = (a-b)^2 \\

& = a^2-2ab+b^2 \\

\end{alignat}

多行等式(左對齊)</small>

\begin{array}{lcl}

z        & =

& a \\

f(x,y,z) & = & x + y + z

\end{array}

多行等式(右對齊)

\begin{array}{lcr}

f(x,y,z) & = & x + y + z   

長公式換行

<math>f(x) \,\!</math>

<math>= \sum_{n=0}^\infty a_n x^n </math>

<math>= a_0+a_1x+a_2x^2+\cdots</math>

聯立方程

3x + 5y +  z \\

7x - 2y + 4z \\

-6x + 3y + 2z

數組

\begin{array}{|c|c||c|} a & b & S \\

\hline

0&0&1\\

0&1&1\\

1&0&1\\

1&1&0\\

字型

希臘字母

大寫希臘字母

語法

\Alpha

Α

\Beta

Β

\Gamma

Γ

\Delta

Δ

\Epsilon

Ε

\Zeta

Ζ

\Eta

Η

\Theta

Θ

\Iota

Ι

\Kappa

Κ

\Lambda

Λ

\Mu

Μ

\Nu

Ν

\Xi

Ξ

O1

O

\Pi

Π

\Rho

Ρ

\Sigma

Σ

\Tau

Τ

\Upsilon

Υ

\Phi

Φ

\Chi

Χ

\Psi

Ψ

\Omega

Ω

小寫希臘字母

\alpha

α

\beta

β

\gamma

γ

\delta

δ

\epsilon

ε

\zeta

ζ

\eta

η

\theta

θ

\iota

ι

\kappa

κ

\lambda

λ

\mu

μ

\nu

ν

\xi

ξ

o1

o

\pi

π

\rho

ρ

\sigma

σ

\tau

τ

\upsilon

υ

\phi

φ

\chi

χ

\psi

ψ

\omega

ω

特殊希臘字母2

\varepsilon

\digamma

\vartheta

\varkappa

\varpi

\varrho

\varsigma

\varphi

備注:

希臘字母Ο(Omicron)與拉丁字母O外形相同,故直接使用拉丁字母O和o而不是文法\Omicron和\omicron顯示希臘字母Omicron。

斜體小寫希臘字母一般用于在方程中顯示變量。

黑闆粗體

\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}

黑闆粗體(Blackboard bold)一般用于表示數學和實體學中的向量或集合的符号。

花括号{}中隻有使用大寫字母才能正常顯示,使用小寫字母或數字會得到其他符号。

正粗體

\mathbf{012…abc…ABC…}

備注

花括号{}内隻能使用拉丁字母和數字,不能使用希臘字母如\alpha等。

斜粗體

\boldsymbol{012…abc…ABC…\alpha \beta \gamma…}

使用\boldsymbol{}可以加粗所有合法的符号。

斜體

\mathit{012456789}

斜體文法僅對數字有效。

羅馬體

\mathrm{012…abc…ABC…} 或 \mbox{}

羅馬體可以使用數字和字母。

哥特體

\mathfrak{012…abc…ABC…}

哥特體可以使用數字和字母。

手寫體

\mathcal{ABC…}

手寫體隻可以使用大寫字母。

希伯來字母

\aleph \beth \gimel \daleth

括号

顯示

不好看

( \frac{1}{2} )

好一點

\left( \frac{1}{2} \right)

您可以使用\left和\right來顯示不同的括号:

圓括号,小括号

\left( \frac{a}{b} \right)

方括号,中括号

\left[ \frac{a}{b} \right]

花括号,大括号

\left\{ \frac{a}{b} \right\}

角括号

\left \langle \frac{a}{b} \right \rangle

單豎線,絕對值

\left| \frac{a}{b} \right|

雙豎線,範

\left \| \frac{a}{b} \right \|

取整函數

(Floor function)

\left \lfloor \frac{a}{b} \right \rfloor

取頂函數

(Ceiling function)

\left \lceil \frac{c}{d} \right \rceil

斜線與反斜線

\left / \frac{a}{b} \right \backslash

上下箭頭

\left \uparrow \frac{a}{b} \right \downarrow

\left \Uparrow \frac{a}{b} \right \Downarrow

\left \updownarrow \frac{a}{b} \right \Updownarrow

混合括号

\left [ 0,1 \right )

\left \langle \psi \right |

單左括号

\left \{ \frac{a}{b} \right .

單右括号

\left .

\frac{a}{b} \right \}

可以使用\big, \Big, \bigg, \Bigg控制括号的大小,比如代碼\Bigg ( \bigg [ \Big \{ \big \langle

\left | \| \frac{a}{b} \| \right | \big \rangle \Big \} \bigg

] \Bigg )顯示

空格

注意TeX能夠自動處理大多數的空格,但是您有時候需要自己來控制。

兩個quad空格

a \qquad b

兩個m的寬度

quad空格

a \quad b

一個m的寬度

大空格

a\ b

1/3m寬度

中等空格

a\;b

2/7m寬度

小空格

a\,b

1/6m寬度

沒有空格

ab

緊貼

a\!b

縮進1/6m寬度

顏色

{\color{顏色名}表達式}

例子

{\color{Blue}x^2}+{\color{Brown}2x} -

{\color{OliveGreen}1}

x_{1,2}=\frac{-b\pm\sqrt{{\color{Red}b^2-4ac}}}{2a}

繁簡轉換

繁簡轉換的BUG,可能會在結尾會多出一個「}-」符號。情況如下:

{\color{Brown}1}-{\color{Green}1}

如出現這情況,可以在減號與括號之間留白白,解決這問題。

{\color{Brown}1} - {\color{Green}1}

繼續閱讀