CTex网址
插图指南
数学公式
$\alpha, \beta, \delta, \epsilon, \varepsilon, \eta,\gamma,\Gamma,\lambda,\mu,\nu,\tau,\theta,\xi,\zeta,\aleph$
α , β , δ , ϵ , ε , η , γ , Γ , λ , μ , ν , τ , θ , ξ , ζ , ℵ \alpha, \beta, \delta, \epsilon, \varepsilon, \eta,\gamma,\Gamma,\lambda,\mu,\nu,\tau,\theta,\xi,\zeta,\aleph α,β,δ,ϵ,ε,η,γ,Γ,λ,μ,ν,τ,θ,ξ,ζ,ℵ
$ \emptyset , \varnothing, \phi$
$ \emptyset , \varnothing, \phi$
$\mathcal{L},\mathcal{N}, \mathcal{D}, \mathcal{C}, \ell$
L , N , D , C , ℓ \mathcal{ L}, \mathcal {N}, \mathcal {D}, \mathcal {C} , \ell L,N,D,C,ℓ
$\surd, \times$,\square,\circ,\dots,\cdots,\ast
√ , × , □ , ∘ , … , ⋯   , ∗ \surd, \times,\square,\circ,\dots,\cdots,\ast √,×,□,∘,…,⋯,∗
$``双引号”,
单引号’$$``双引号”,
单引号’$
$\hat{N},\dot{a}$
N ^ , a ˙ \hat{N},\dot{a} N^,a˙
$x \times y, 2_{-3}^{3x}, \sqrt {x + y}, x \div y, \frac{x}{y}, x \leq y, x \geq y, x \neq y, x \cong y$
$\lfloor x \rfloor \\ %向下取整$ $\lceil x \rceil \\ %向上取整$
$\sum\limits_{x = 1}^{n} 7x$
x × y , 2 − 3 3 x , x + y , x ÷ y , x y , x ≤ y , x ≥ y , x ≠ y , x ≅ y x \times y, 2_{-3}^{3x}, \sqrt {x + y}, x \div y, \frac{x}{y}, x \leq y, x \geq y, x \neq y, x \cong y x×y,2−33x,x+y,x÷y,yx,x≤y,x≥y,x̸=y,x≅y
⌊ x ⌋ \lfloor x \rfloor \\ %向下取整 ⌊x⌋ ⌈ x ⌉ \lceil x \rceil \\ %向上取整 ⌈x⌉
∑ x = 1 n 7 x \sum\limits_{x = 1}^{n} 7x x=1∑n7x
$\bar{x}, \dot{x}, a\pmod{m}, a \bmod b$
x ˉ , x ˙ , a ( m o d m ) , a   m o d   b \bar{x}, \dot{x}, a\pmod{m}, a \bmod b xˉ,x˙,a(modm),amodb
$\overline{x}=\{x^\prime\in X|x^\prime\equiv x^\prime\bmod E\}$
x ‾ = { x ′ ∈ X ∣ x ′ ≡ x ′   m o d   E } \overline{x}=\{x^\prime\in X|x^\prime\equiv x^\prime\bmod E\} x={x′∈X∣x′≡x′modE}
$a^{i,j}, a_{i,j}, a_{-1}^{+1}$
a i , j , a i , j , a − 1 + 1 a^{i,j}, a_{i,j}, a_{-1}^{+1} ai,j,ai,j,a−1+1
$\vec{ab}, \overleftarrow{cd}$
a b ⃗ , c d ← \vec{ab}, \overleftarrow{cd} ab,cd
$\mbox{保持公式中文字间的空格a b c d}$
KaTeX parse error: Expected 'EOF', got '\mbox' at position 1: \̲m̲b̲o̲x̲{保持公式中文字间的空格a b…
$\text{保持公式中文字间的空格a b c d}$
保持公式中文字间的空格a b c d \text{保持公式中文字间的空格a b c d} 保持公式中文字间的空格a b c d
$单空格\quad一个空格\qquad双空格$
单 空 格 一 个 空 格 双 空 格 单空格\quad一个空格\qquad双空格 单空格一个空格双空格
$\overline{x_{+1}^{-1}}, \bar{x}$
x + 1 − 1 ‾ , x ˉ \overline{x_{+1}^{-1}}, \bar{x} x+1−1,xˉ
$\underline{abcd}$
a b c d ‾ \underline{abcd} abcd
$\underline{abcd}$ %双下划线
KaTeX parse error: Expected 'EOF', got '\uuline' at position 1: \̲u̲u̲l̲i̲n̲e̲{abcd}
$\textcircled{\small{1}}$ %圈1
KaTeX parse error: Can't use function '\textcircled' in math mode at position 1: \̲t̲e̲x̲t̲c̲i̲r̲c̲l̲e̲d̲{\small{1}}
$\left( \frac{a}{b} \right)$
( a b ) \left( \frac{a}{b} \right) (ba)
$\left[ \frac{a}{b} \right]$
[ a b ] \left[ \frac{a}{b} \right] [ba]
$\left\{ \frac{a}{b} \right\}$
{ a b } \left\{ \frac{a}{b} \right\} {ba}
$\left| \frac{a}{b} \right|$
∣ a b ∣ \left| \frac{a}{b} \right| ∣∣ba∣∣
$\left \| \frac{a}{b} \right \|$
∥ a b ∥ \left \| \frac{a}{b} \right \| ∥∥ba∥∥
$\left \{ \frac{a}{b} \right .$
{ a b \left \{ \frac{a}{b} \right . {ba
$\left . \frac{a}{b} \right \}$
a b } \left . \frac{a}{b} \right \} ba}
${\color{red} {FACT}}$
F A C T {\color{red} {FACT}} FACT
${\color{Blue}x^2}+{\color{Brown}2x} -{\color{OliveGreen}1}$
x 2 + 2 x − 1 {\color{Blue}{x^2}}+{\color{Brown}{2x}} -{\color{OliveGreen}{1}} x2+2x−1
$\textcolor[rgb]{1.00,0.00,0.00}{``meet" does not work here.}$
KaTeX parse error: Expected '{', got '[' at position 11: \textcolor[̲rgb]{1.00,0.00,…
$\textbf{Mutual exclusion}$
Mutual exclusion \textbf{Mutual exclusion} Mutual exclusion
$\cdot and \cdots$
⋅ a n d ⋯ \cdot and \cdots ⋅and⋯
$\uparrow,\downarrow,\leftarrow,\nleftarrow,\rightarrow,\nrightarrow,\to,\leftrightarrow$
↑ , ↓ , ← , ↚ , → , ↛ , → , ↔ \uparrow,\downarrow,\leftarrow,\nleftarrow,\rightarrow,\nrightarrow,\to,\leftrightarrow ↑,↓,←,↚,→,↛,→,↔
$\Leftarrow,\Rightarrow,\iff$
⇐ , ⇒ ,    ⟺    \Leftarrow,\Rightarrow,\iff ⇐,⇒,⟺
$\Longleftarrow,\Longrightarrow$
⟸ , ⟹ \Longleftarrow,\Longrightarrow ⟸,⟹
$\longleftarrow,\longrightarrow,\longleftrightarrow$
⟵ , ⟶ , ⟷ \longleftarrow,\longrightarrow,\longleftrightarrow ⟵,⟶,⟷
$\implies,\impliedby,\iff$
   ⟹    ,    ⟸    ,    ⟺    \implies,\impliedby,\iff ⟹,⟸,⟺
$\Sigma = \{ \emptyset, \{ a,b\},\{c,d\},\{a,b,c,d\} \}$
Σ = { ∅ , { a , b } , { c , d } , { a , b , c , d } } \Sigma = \{ \emptyset, \{ a,b\},\{c,d\},\{a,b,c,d\} \} Σ={ ∅,{a,b},{c,d},{a,b,c,d}}
$\forall a, \exists a, \emptyset , \varnothing, \phi$
$ A \in B, A \notin B, A \subset B, A \subseteq B$
$ A \supset B, A \supseteq B, A \cap B, A \bigcap B, A \cup B, A \bigcup B$
∀ a , ∃ a , ∅ , ∅ , ϕ \forall a, \exists a, \emptyset , \varnothing, \phi ∀a,∃a,∅,∅,ϕ
A ∈ B , A ∉ B , A ⊂ B , A ⊆ B A \in B, A \notin B, A \subset B, A \subseteq B A∈B,A∈/B,A⊂B,A⊆B
A ⊃ B , A ⊇ B , A ∩ B , A ⋂ B , A ∪ B , A ⋃ B A \supset B, A \supseteq B, A \cap B, A \bigcap B, A \cup B, A \bigcup B A⊃B,A⊇B,A∩B,A⋂B,A∪B,A⋃B
$x \ge y, x \geqq y, x = y, x \le y, x \leq y, x \ne y$
x ≥ y , x ≧ y , x = y , x ≤ y , x ≤ y , x ≠ y x \ge y, x \geqq y, x = y, x \le y, x \leq y, x \ne y x≥y,x≧y,x=y,x≤y,x≤y,x̸=y
$a \land b, a \lor b, \lnot q, \neg q, a \bigwedge b, a \bigvee b$
$\bar{q} \to p, \setminus, \smallsetminus$
a ∧ b , a ∨ b , ¬ q , ¬ q , a ⋀ b , a ⋁ b a \land b, a \lor b, \lnot q, \neg q, a \bigwedge b, a \bigvee b a∧b,a∨b,¬q,¬q,a⋀b,a⋁b
q ˉ → p , ∖ , ∖ \bar{q} \to p, \setminus, \smallsetminus qˉ→p,∖,∖
\begin{minipage}[htbp]{0.65\linewidth}
\includegraphics[scale=0.9]{p21-1}
\end{minipage}
\hfill
\begin{minipage}[htbp]{0.35\linewidth}
text line1 \\
text line2
\end{minipage}
\begin{minipage}[htbp]{0.65\linewidth}
\begin{tabular}{c|c|c|c}
p & q & $\neg p$ & $p \Rightarrow q$ \\
\hline
T & F & F & F \\
\hline
T & T & F & T \\
\hline
F & F & T & T \\
\hline
F & T & T & T \\
\end{tabular}
\hfill
\end{minipage}
\begin{minipage}[htbp]{0.35\linewidth}
$p \Rightarrow q$ is false only if \\
\text{其中的文字不会两端对齐}
\end{minipage}
\begin{figure}[htbp]
\begin{minipage}[htbp]{0.3\textwidth}
\includegraphics[width=\textwidth]{p12-2}
\centering
\caption{$A_{1,co},A_{2,co}$}
\label{p12-2}
\end{minipage}
\begin{minipage}[htbp]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{p12-3}
\caption{$A_{1,co} \times A_{2,co}$}
\label{p12-3}
\end{minipage}
\end{figure}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.5]{p36-3} \\
\caption *{fig1} % *表示不显示默认图形编号
\includegraphics[scale=0.4]{p37-1} \\
\caption *{fig2} % *表示不显示默认图形编号
\includegraphics[scale=0.4]{p37-2}
\caption *{fig3}
\end{figure}
\begin{wrapfigure}{l}[0cm]{0pt} %{l},{r}表示在左右侧
\includegraphics[scale=0.9]{p21-1}
\caption*{NEWCAR is not nonblocking} % *表示不显示默认图形编号
\label{p21-1}
\end{wrapfigure}
\begin{center}
\fbox{\color{red}$L(V/G)$ is prefix-closed}
\end{center}
\[
V(s) =
\begin{cases}
-x,& x \leq 0 \\
x,& x>0
\end{cases}
\] %&分列
V ( s ) = { − x , x ≤ 0 x , x > 0 V(s) = \begin{cases} -x,& x \leq 0 \\ x,& x>0 \end{cases} V(s)={−x,x,x≤0x>0
\left.
\begin{array}{ll}
\text{$\eta_{ext}(y,\varepsilon)=y$}\\
\text{$\eta_{ext}(y,\sigma)=\eta(y,\sigma)$} & \text{$\sigma \in \Sigma$}
\end{array}
\right\}\text{one-step transition}
η e x t ( y , ε ) = y η e x t ( y , σ ) = η ( y , σ ) σ ∈ Σ } one-step transition \left. \begin{array}{ll} \text{$\eta_{ext}(y,\varepsilon)=y$}\\ \text{$\eta_{ext}(y,\sigma)=\eta(y,\sigma)$} & \text{$\sigma \in \Sigma$} \end{array} \right\}\text{one-step transition} ηext(y,ε)=yηext(y,σ)=η(y,σ)σ∈Σ}one-step transition
%公式居中且左对齐,align带上*号,表示省略掉公式后的编号
\begin{align*}
& {{x}_{k}}=f({{x}_{k-1}},{{v}_{k-1}}) \\
& {{z}_{k}}=h({{x}_{k}},{{n}_{k}})
\end{align*}
\begin{align*}
& {{x}{k}}=f({{x}{k-1}},{{v}{k-1}}) \
& {{z}{k}}=h({{x}{k}},{{n}{k}})
\end{align*}
\begin{enumerate}[i.]
\setlength{\itemsep}{0pt} %行间距
\setlength{\parsep}{0pt} %段落间距
\setlength{\parskip}{0pt}
\item {s can be generated by G.}
\item {s is not in $\overline{L_m(G)}$, i.e. $s \notin \overline{L_m(G)}$}
\end{enumerate}
\begin{tabular}{c|c|c|c} % lcr: 分别是left对齐,center对齐和right对齐
p & q & $\neg p$ & $p \Rightarrow q$ \\
\hline
T & F & F & F \\
\end{tabular}
\begin{array}{|c|c||c|} % lcr: 分别是left对齐,center对齐和right对齐
a & b & S \\
\hline
0&0&1\\
0&1&1\\
1&0&1\\
1&1&0\\
\end{array}
\begin{array}{|c|c||c|} % lcr: 分别是left对齐,center对齐和right对齐
a & b & S \
\hline
0&0&1\
0&1&1\
1&0&1\
1&1&0\
\end{array}
$\overline{m+n}$ \qquad
$\underline{m+n}$
m + n ‾ m + n ‾ \overline{m+n} \qquad \underline{m+n} m+nm+n
$\underbrace{a+b+\cdots+z}_{26}$
a + b + ⋯ + z ⎵ 26 \underbrace{a+b+\cdots+z}_{26} 26 a+b+⋯+z
\begin{align}
f(x) & = (m+n)^2 \\
& = m^2+2mn+n^2 \\
\end{align}
KaTeX parse error: No such environment: align at position 8: \begin{̲a̲l̲i̲g̲n̲}̲ f(x) & = (m+n)…
\begin{pro} \end{pro}
\begin{thm} \end{thm}
\begin{proof} \end{proof}
\begin{exa} \end{exa}
##分行,分段,分页,对齐
%\documentclass{book} %或
\documentclass{article}
\usepackage{CJK}
\begin{document}
\begin{CJK}{GBK}{song}
宋体宋体
\end{CJK}
\begin{CJK}{GBK}{fs}
仿宋体!
\end{CJK}
\begin{CJK}{GBK}{kai}
楷体!
\end{CJK}
\begin{CJK}{GBK}{hei}
黑体!
\end{CJK}
\begin{CJK}{GBK}{li}
隶书!
\end{CJK}
\begin{CJK}{GBK}{you}
幼圆体!
\end{CJK}
\end{document}
LaTeX有许多分级标题:由大到小分别是\part、\chapter、\section、\subsection、\subsubsection、\paragraph、\subparagraph,其中\part和\chapter是只有book文档类才有。
%\documentclass{book} %或
\documentclass{article}
\usepackage{CJK}
\begin{document}
\begin{CJK}{GBK}{fs} %仿宋体
\title{关于补码} %———总标题
\maketitle % —— 显示标题
\tableofcontents %—— 制作目录(目录是根据标题自动生成的)
\section{第一节} % *{ }不自动编号
第一节内容
\subsection{1.1节}
1.1节内容
\subsection{1.2节}
1.2节内容\\
第二行\\
第三行
第二段
第三段
\section{第二节}
\noindent 无缩进 普通文字 \\
第二行\\
第三行
\end{CJK}
\end{document}
{\begin{}…\end{ }
flushleft:环境中的内容居左。
flushright:环境中的内容居右。
center:环境中的内容居中。
itemize:无编号列表
enumerate:有编号列表
description:带描述列表
quote:引用,使得整段缩进
verse:诗歌专用,\\可以断行,两个空行的分段则生成一个空行。