Files
Latex_learning/__latexindent_temp.tex
2020-05-04 21:57:30 +08:00

770 lines
41 KiB
TeX
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
%!TEX program = xelatex
%表示用xelatex编译文件
\documentclass[a4paper]{ctexart}
\usepackage{array}
\usepackage{tabularx}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{latexsym}
\begin{document}
\title{标题页}
\author{Ryan\thanks{注脚}%
\and Fan\thanks{注脚}%
}
\date{\today}
\maketitle
\abstract
一般用于紧跟\textbackslash maketitle 命令之后介绍文档的摘要\par
中文\LaTeX{}排版。
\section{\LaTeX 排版文字}
{}分段\\换行\textbackslash\textbackslash\par
冒号``please press the `x' key.''\par
连字符-用来组成复合词,\\%
短破折号--用来连接数字表示范围,\\%
长破折号---用来连接单词\par
省略号\dots{}\ldots\par
波浪号~\par
强调\underline{文字,但是无法换行,}%
\uline{ulem 宏包解决了这一问题,它提供的 uline 命令能够轻松生成自动换行的下划线。}%
\emph{emph 命令用来将文字变为斜体以示强调。%
\emph{如果在本身已经用 emph 命令强调的文字内部嵌套使用 emph 命令,}%
内部则使用直立体文字。%
}\par
在合适的位置插入一个不会断行的空格Fig.~1, Ryan~Fan\par
断行\\[15pt]可以带可选参数 $\langle length\rangle$,用于在换行处向下增加垂直间距%
\newline{}或者newline命令不用带参数\par
\newpage 断页,在在双栏排版中只起到另起一栏的作用\par
断词 I think this is: supercalifragil\-isticexpialidocious. %
And I think this is: supercalifragilisticexpialidocious.\par
\newpage
\tableofcontents
\section[目录和页眉页脚]{章节}
\subsection{子章节}
\subsubsection{子子章节}
\paragraph{段落}
\subparagraph{子段落}
\section*{标题不带编号}
\addcontentsline{toc}{section}{标题不带编号}
\part{分块}
\section{交叉引用}
A reference to this subsection\label{sec:this} looks like: %
``see section~\ref{sec:this} on page~\pageref{sec:this}.''
\section{脚注和边注}
“天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。”\footnote{出自《千字文》。}\par
\begin{tabular}{l}
\hline
有些情况下(比如在表格环境、各种盒子\\
内)使用 footnote 并不能正确生成脚\\
注。我们以分两步进行,先使用 \\
footnotemark 为脚注计数,再在合适\\
的位置用 footnotetext 生成脚注。\footnotemark\\
\hline
\end{tabular}
\footnotetext{出自《千字文》。}
\marginpar{\footnotesize 边注较窄,不要写过多文字,最好设置较小的字号。}
\section{特殊环境}
\subsection{列表}
有序列表
\begin{enumerate}
\item An item.
\begin{enumerate}
\item A nested item.\label{itref}
\item[*] A starred item.
\end{enumerate}
\item Reference(\ref{itref}).
\end{enumerate}
无序列表
\begin{itemize}
\item An item.
\begin{itemize}
\item A nested item.
\item[+] A `plus' item. + A plus item.
\item Another item. Another item.
\end{itemize}
\item Go back to upper level.
\end{itemize}
关键字环境
\begin{description}
\item[Enumerate] Numbered list.
\item[Itemize] Non-numbered list.
\end{description}
重定义无序列表的符号
\renewcommand{\labelitemi}{\dag}
\renewcommand{\labelitemii}{\ddag}
\begin{itemize}
\item First item
\begin{itemize}
\item Subitem
\item Subitem
\end{itemize}
\item Second item
\end{itemize}
重定义有序列表的符号
\renewcommand{\labelenumi}{\Alph{enumi}>}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
\subsection{对齐环境}
center、flushleft 和 flushright 环境分别用于生成%
居中、左对齐和右对齐的文本环境。
\begin{center}
Centered text using a
\verb|center| environment.
\end{center}
\begin{flushleft}
Left-aligned text using a
\verb|flushleft| environment.
\end{flushleft}
\begin{flushright}
Right-aligned text using a
\verb|flushright| environment.
\end{flushright}
还可以用以下命令直接改变文字的对齐方式:
\centering
Centered text paragraph.\par
\raggedright
Left-aligned text paragraph.\par
\raggedleft
Right-aligned text paragraph.\par
\begin{flushleft}
center 等环境会在上下文产生一个额外间距,%
\textbackslash centering 等命令不产生,只是改变对齐方式。%
\end{flushleft}
\raggedright
比如在浮动体环境 table 或 figure 内实现居中对齐,%
\textbackslash centering 命令即可,没必要再用 center 环境。
\subsection{引用环境}
\begin{description}
\item[quote] 用于引用较短的文字,首行不缩进\\
Francis Bacon says:
\begin{quote}
Knowledge is power.
\end{quote}
\item[quotation] 用于引用若干段文字,首行缩进\\
《木兰诗》:
\begin{quotation}
万里赴戎机,关山度若飞。
朔气传金柝,寒光照铁衣。
将军百战死,壮士十年归。
归来见天子,天子坐明堂。
策勋十二转,赏赐百千强。......
\end{quotation}
\end{description}
\subsection{代码环境}
\begin{verbatim}
#include <iostream>
int main()
{
std::cout << "Hello, world!"
<< std::endl;
return 0;
}
\end{verbatim}
\begin{verbatim*}
for (int i=0; i<4; ++i)
printf("Number %d\n",i);
\end{verbatim*}
要排版简短的代码或关键字\textbackslash verb $\langle delim\rangle\langle code\rangle\langle delim\rangle$\par
$\langle delim\rangle$ 标明代码的分界位置,前后必须一致,除字母、空格或星号外,%
可任意选择使得不与代码本身冲突,习惯上使用 | 符号。\par
\verb|\LaTeX| \\
\verb+(a || b)+ \verb*+(a || b)+
\subsection{表格}
\subsubsection{列表格}
tabular 环境使用 $\langle column-spec\rangle$ 参数指定表格的列数以及每列的格式。\par
\begin{tabular}{lcr|p{6em}}
\hline
left & center & right & par box with fixed width\\
L & C & R & P\\
\hline
\end{tabular}\par
@ 格式可在单元格前后插入任意的文本,%
但同时它也消除了单元格前后额外添加的间距。\par
\begin{tabular}{@{} r@{:}lr @{}}
\hline
1 & 1 & one\\
11 & 3 & eleven\\
\hline
\end{tabular}\par
格式参数重复\par
\begin{tabular}{|*{5}{c|}*{2}{p{3em}|}}
\hline
one & two & three & four & five & Hello! \LaTeX & Hello!\\
1 & 2 & 3 & 4 & 5 & hello! & \LaTeX\\
\hline
\end{tabular}\par
辅助格式 > 和 <,用于给列格式前后加上修饰命令\par
\begin{tabular}{>{\itshape}r<{*}l}
%需要使用array宏包
\hline
italic & normal \\
column & column \\
\hline
\end{tabular}\par
\begin{tabular}{>{\centering\arraybackslash}p{16em}}
\hline
辅助格式甚至支持插入 \textbackslash centering 等%
命令改变 p 列格式的对齐方式,一般还要加额外的命令 %
\textbackslash arraybackslash 以免出错。\\
\hline
\textbackslash centering 等对齐命令会破坏表格环境里 %
\textbackslash\textbackslash 换行命令的定义,%
\textbackslash arraybackslash 用来恢复之。%
如果不加 \textbackslash arraybackslash 命令,%
也可以用 \textbackslash tabularnewline 命令%
代替原来的 \textbackslash\textbackslash 实现表格换行。\\
\hline
\end{tabular}\par
\LaTeX 本身提供了 tabular* 环境用来排版定宽表格,但是不太方便使用,%
比如要用到 @ 格式插入额外命令,令单元格之间的间距为 \textbackslash fill,%
但即使这样仍然有瑕疵:\par
\begin{tabular*}{14em}{@{\extracolsep{\fill}}|c|c|c|c|}
\hline
A & B & C & D \\
\hline
a & b & c & d \\
\hline
\end{tabular*}\par
tabularx 宏包为我们提供了方便的解决方案。它引入了一个 X 列格式,%
类似 p 列格式,不过会根据表格宽度自动计算列宽,多个X列格式平均分配列宽。%
X列格式也可以用 array 里的辅助 格式修饰对齐方式:\par
\begin{tabularx}{14em}{|*{4}{>{\centering\arraybackslash}X|}}
\hline
A & B & C & D \\
\hline
a & b & c & d \\
\hline
\end{tabularx}\par
\subsubsection{横线}
\textbackslash cline\{$\langle i-j\rangle$\} 用来绘制跨越部分单元格的横线:\par
\begin{tabular}{|c|c|c|}
\hline
4 & 9 & 2 \\ \cline{2-3}
3 & 5 & 7 \\ \cline{1-1}
8 & 1 & 6 \\
\hline
\end{tabular}\par
三线表由 booktabs 宏包 支持,它提供了 \textbackslash toprule、%
\textbackslash midrule 和 \textbackslash bottomrule %
命令用以排版三线表的三条线, 以及和 \textbackslash cline 对应的 %
\textbackslash cmidrule。除此之外,最好不要用其它横线以及竖线:\par
\begin{tabular}{cccc}
\toprule
& \multicolumn{3}{c}{Numbers} \\
\cmidrule{2-4}
& 1 & 2 & 3 \\
\midrule
Alphbet & A & B & C \\
Roman & I & II& III \\
\bottomrule
\end{tabular} \par
\subsubsection{合并单元格}
横向合并单元格较为容易,由 \textbackslash multicolumn\{$\langle n\rangle$\}\{$\langle column-spec\rangle$\}\{$\langle item\rangle$\} %
命令实现:\par
其中 $\langle n\rangle$ 为要合并的列数,$\langle column-spec\rangle$ 为合并单元格后的列格式,只允许出现一个 l/c/r 或 p 格式。%
如果合并前的单元格前后带表格线 |,合并后的列格式也要带 | 以使得表格的竖线一致。\par
形如 \textbackslash multicolumn\{1\}\{$\langle column-spec\rangle$\}\{$\langle item\rangle$\} %
的命令可以用来修改某一个单元格的列格式。\par
\begin{tabular}{|c|c|c|}
\hline
1 & 2 & Center \\
\hline
\multicolumn{2}{|c|}{3} & \multicolumn{1}{r|}{Right} \\
\hline
4 & \multicolumn{2}{c|}{C} \\
\hline
\end{tabular}\par
纵向合并单元格需要用到 multirow 宏包提供的 %
\textbackslash multirow\{$\langle n\rangle$\}\{$\langle width\rangle$\}\{$\langle item\rangle$\} 命令:\par
$\langle width\rangle$ 为合并后单元格的宽度,可以填 * 以使用自然宽度。\par
\begin{tabular}{ccc}
\hline
\multirow{2}{*}{Item} & \multicolumn{2}{c}{Value} \\
\cline{2-3}
& First & Second \\
\hline
A & 1 & 2 \\
\hline
\end{tabular}
\subsubsection{嵌套表格}
在单元格中嵌套一个小表格可 以起到``拆分单元格''的效果。\par
注意要用 \textbackslash multicolumn 命令配合 @\{\} %
格式把单元格的额外边距去掉,使得嵌套的表格线能和外层的表格线正确相连:\par
\begin{tabular}{|c|c|c|}
\hline
a & b & c \\
\hline
a & \multicolumn{1}{@{}c@{}|}
{\begin{tabular}{c|c}
e & f \\
\hline
e & f \\
\end{tabular}} & c \\
\hline
a & b & c \\
\hline
\end{tabular}\par
如果不需要为“拆分的单元格”画线,并且只在垂直方向“拆分”的话,makecell 宏包%
提供 的 \textbackslash makecell 命令是一个简单的解决方案:\par
\begin{tabular}{|c|c|}
\hline
a & \makecell{d1 \\ d2} \\
\hline
b & c \\
\hline
\end{tabular}
\subsubsection{行距控制}
\LaTeX 生成的表格看起来通常比较紧凑。%
修改参数 \textbackslash arraystretch 可以得到行距更加宽松 的表格:\par
\renewcommand\arraystretch{1.8}
\begin{tabular}{|c|}
\hline
Really loose \\
\hline
tabular rows. \\
\hline
\end{tabular}\par
另一种增加间距的办法是给换行命令 \textbackslash\textbackslash 添加可选参数,%
在这一行下面加额外的间距,适合用于在行间不加横线的表格:\par
\renewcommand\arraystretch{1}
\begin{tabular}{c}
\hline
Head lines \\[6pt]
tabular lines \\
tabular lines \\
\hline
\end{tabular}
\subsection{图片}
\LaTeX 本身不支持插图功能,需要由 graphicx 宏包辅助支持。\par
使用 \textbackslash includegraphics[$\langle options\rangle$]\{$\langle filename\rangle$\} 命令加载图片了:\par
其中 $\langle filename\rangle$ 为图片文件名,文件名有时需要使用相对路径或绝对路径。\par
\textbackslash graphicspath 命令,用于声明一个或多个图片文件存放的目录,%
使用这些目录里的图片时可不用写路径:\par
\textbackslash includegraphics 命令的可选参数 $\langle options\rangle$ 支持 %
$\langle key\rangle$=$\langle value\rangle$ 形式赋值,常用的参数如下:\par
\begin{tabular}{ll}
\hline
参数 & 含义 \\
\hline
width=$\langle width\rangle$ & 将图片缩放到宽度为$\langle width\rangle$ \\
height=$\langle height\rangle$ & 将图片缩放到高度为$\langle height\rangle$ \\
scale=$\langle scale\rangle$ & 将图片相对于原尺寸缩放$\langle scale\rangle$\\
angle=$\langle angle\rangle$ & 令图片逆时针旋转$\langle angle\rangle$\\
\hline
\end{tabular}
\includegraphics[scale=0.05]{/home/ryan/Pictures/wallpaper/heic2007a}
\graphicspath{{/home/ryan/Pictures/wallpaper/}}
\includegraphics[scale=0.05]{heic1501a}
\subsection{盒子}
\subsubsection{水平盒子}
\textbackslash mbox\{\ldots \}\par
\textbackslash makebox$[\langle width\rangle][\langle align\rangle]\{\ldots \}$\par
\textbackslash mbox 生成一个基本的水平盒子,内容只有一行,不允许分段(除非嵌套其它盒子)
\textbackslash makebox 更进一步,可以加上可选参数用于控制盒子的宽度 $\langle width\rangle$,%
以及内容的对齐方式$\langle align\rangle$,可选居中 c(默认值) 、左对齐 l、右对齐 r 和分散对齐 s\par
|\mbox{Test some words.}|\\
|\makebox[10em]{Test some words.}|\\
|\makebox[10em][l]{Test some words.}|\\
|\makebox[10em][r]{Test some words.}|\\
|\makebox[10em][s]{Test some words.}|\par
\subsubsection{带框的水平盒子}
\textbackslash fbox 和 \textbackslash framebox 让我们可以为水平盒子添加边框。\par
\fbox{Test some words.}\\
\framebox[10em][r]{Test some words.}\par
可以通过 \textbackslash setlength 命令调节边框的宽度 \textbackslash fboxrule %
和内边距 \textbackslash fboxsep:\par
\framebox[10em][r]{Test box.}\\
\setlength{\fboxrule}{1.6pt}
\setlength{\fboxsep}{1em}
\framebox[10em][r]{Test box.}\par
\subsubsection{垂直盒子}
排版一个文字可以换行的盒子:\par
\textbackslash parbox$[\langle align\rangle][\langle height\rangle][\langle inner-align\rangle]\{\langle width\rangle\}\{\ldots \}$
\textbackslash begin\{minipage\}$[\langle align\rangle][\langle height\rangle][\langle inner-align\rangle]\{\langle width\rangle\}$\\
\ldots\\
\textbackslash end\{minipage\}\par
其中 $[\langle align\rangle]$ 为盒子和周围文字的对齐情况(类似 tabular 环境); %
$\langle height\rangle$$\langle inner-align\rangle$设置盒子的高度和内容的对齐方式,%
类似水平盒子 \textbackslash makebox 的设置,不过 $\langle inner-align\rangle$ 接受的%
参数是顶部 t、底部 b、居中 c 和分散对齐 s。\par
三字经:\parbox[t]{3em}{人之初 性本善 性相近 习相远}
\quad
千字文:
\begin{minipage}[b][8ex][t]{4em}
天地玄黄 宇宙洪荒
\end{minipage}\par
如果在 minipage 里使用 \textbackslash footnote 命令,生成的脚注会出现在盒子底部,编号是独立的, %
并且使用小写字母编号。而在 \textbackslash parbox 里无法正常使用 \textbackslash footnote 命令,%
只能在盒子里使用\textbackslash footnotemark,在盒子外使用\textbackslash footnotetext。\par
\fbox{这是一个垂直盒子的测试。\footnotemark}
\footnotetext{注脚来自fbox}
\fbox{\begin{minipage}{15em}%
这是一个垂直盒子的测试。
\footnote{注脚来自minipage.}
\end{minipage}
}\par
\subsubsection{标尺盒子}
\textbackslash rule $[\langle raise\rangle]\{\langle width\rangle\}\{\langle height\rangle\}$%
命令用来画一个实心的矩形盒子,也可适当调整以用来画线(标尺):\par
Black \rule{12pt}{4pt} box.\\
Upper \rule[4pt]{6pt}{8pt} and lower \rule[-4pt]{6pt}{8pt} box.\\
A \rule[-.4pt]{6pt}{.4pt} line.\par
\subsection{浮动体}
\LaTeX 预定义了两类浮动体环境 figure 和 table。习惯上 figure 里放图片,table 里放表格,但并没有严格限制,%
可以在任何一个浮动体里放置文字、公式、表格、图片等等任意内容。\par
\textbackslash begin\{table\}$[\langle placement\rangle]$\\
\ldots\\
\textbackslash end\{table\}\par
$[\langle placement\rangle]$ 参数提供了一些符号用来表示浮动体允许排版的位置,%
如 hbp 允许浮动体排版在当前位置、底部或者单独成页。table 和 figure 浮动体的默认设置为 tbp。\par
双栏排版环境下,\LaTeX 提供了 table* 和 figure* 环境用来排版跨栏的浮动体。它们的用%
法与 table 和 figure 一样,不同之处为双栏的 $[\langle placement\rangle]$ 参数只能用 tp 两个位置。\par
\begin{tabular}{ll}
\toprule
参数 & 含义\\
\midrule
h & 当前位置(代码所处的上下文)\\
t & 顶部\\
b & 底部\\
p & 单独成页\\
! & 在决定位置时忽视限制\\
\bottomrule
\end{tabular}\par
\textbackslash clearpage 命令 会在另起一页之前,先将所有推迟处理的浮动体排版成页,%
此时 htbp 等位置限制被完全忽略。\par
float 宏包为浮动体提供了 H 位置参数,不与 htbp 及 ! 混用。使用 H 位置参数时,%
会取消浮 动机制,将浮动体视为一般的盒子插入当前位置。\par
\subsubsection{浮动体的标题}
图表等浮动体提供了 \textbackslash caption\{\ldots\} 命令加标题,并且自动给浮动体编号:\par
可以用带星号的命令 \textbackslash caption* 生成不带编号 的标题,%
也可以使用带可选参数的形式 \textbackslash caption[\ldots]\{\ldots\},
使得在目录里使用短标题。\textbackslash caption 命令之后还可以紧跟 %
\textbackslash label 命令标记交叉引用。\par
可通过修改 \textbackslash figurename 和 \textbackslash tablename %
的内容来修改标题的前缀。标题样式的 定制功能由 caption 宏包提供.\par
table 和 figure 两种浮动体分别有各自的生成目录的命令:\\
\textbackslash listoftables\\
\textbackslash listoffigures\par
\subsubsection{并排和子图表}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.015]{heic1501a}
\qquad
\includegraphics[scale=0.015]{heic2007a}\\
\includegraphics[scale=0.02]{opo0501a}
\caption{图片标题}
\label{}
\end{figure}
由于标题是横跨一行的,用 \textbackslash caption 命令为每个图片单独生成标题%
就需要借助前文提到的\textbackslash parbox 或者 minipage 环境,将标题限制在盒子内。\par
\begin{figure}[htbp]
\centering
\begin{minipage}[b][120pt][t]{0.45\linewidth}
\centering
\includegraphics[scale=0.025]{heic1501a}
\caption{并排图1}
\end{minipage}
\qquad
\begin{minipage}[b][120pt][t]{0.45\linewidth}
\centering
\includegraphics[scale=0.025]{heic2007a}
\caption{并排图2}
\end{minipage}
\end{figure}
给每个图片定义小标题时,就要用到 subfig 宏包的功能
\begin{figure}[htbp]
\centering
\subfloat[]{%
\begin{minipage}[b][100pt][t]{0.45\linewidth}
\centering
\includegraphics[scale=0.025]{heic2007a}
\end{minipage}
}
\qquad
\subfloat[]{%
\begin{minipage}[b][100pt][t]{0.45\linewidth}
\centering
\includegraphics[scale=0.025]{heic1501a}
\end{minipage}
}
\caption{使用 subfig 宏包的 \textbackslash subfloat 命令排版子图。}
\end{figure}
\section{数学公式}
amsmath 宏 包,对多行公式的排版提供了有力的支持,%
amsfonts 宏包以及基于它的 amssymb 宏包提 供了丰富的数学符号,%
amsthm 宏包扩展了 \LaTeX 定理证明格式。\par
\subsection{公式排版基础}
\subsubsection{行内和行间公式}
行内公式由一对 \$ 符号包裹:\\
The Pythagorean theorem is %
$a^2 + b^2 = c^2$.\par
行间公式在 \LaTeX 里由 equation 环境包裹,equation 环境为公式自动生成一 个编号,%
这个编号可以用 \textbackslash label 和 \textbackslash ref 生成交叉引用。\par
amsmath 的 \textbackslash eqref 命令甚至为引用 自动加上圆括号;%
还可以用 \textbackslash tag 命令手动修改公式的编号,%
或者用 \textbackslash notag 命令取消为公式编 号。\par
The Pythagorean theorem is:
\begin{equation}
a^2 + b^2 = c^2 \label{pythagorean}
\end{equation}
Equation \eqref{pythagorean} is called `Gougu theorem' in Chinese.\par
It's wrong to say
\begin{equation}
1 + 1 = 3 \tag{dumb}
\end{equation}
or
\begin{equation}
1 + 1 = 4 \notag
\end{equation}\par
直接使用不带编号的行间公式:
\begin{equation*}
a^2 + b^2 = c^2
\end{equation*}
For short:
\[a^2 + b^2 = c^2\]
Or if you like the long one:
\begin{displaymath}
a^2 + b^2 = c^2
\end{displaymath}
行内公式和行间公式的对比:\\
In text:
$\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}$\\
In display:
\[\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}\]
\subsection{数学模式}
\renewcommand{\labelenumi}{\arabic{enumi}.}
\begin{enumerate}
\item 数学模式中输入的空格被忽略。
\item 不允许有空行(分段)。
\item 所有的字母被当作数学公式中的变量处理,想在数学公式中输入正体的文本,%
可以用\textbackslash mathrm 或者 amsmath 提供的 \textbackslash text 命令。
\end{enumerate}
$x^2 \geq 0 \qquad
\text{for \textbf{all} } x \in \mathbb{R}$
\subsection{数学符号}
\subsubsection{一般符号}
\centering
文本/数学模式通用符号\\
\begin{tabular}{clclclcl}
\hline
\{ & \textbackslash\{ & \} & \textbackslash\} & \$ & \textbackslash\$ & \% & \textbackslash\% \\
\dag & \textbackslash dag & \S & \textbackslash S & \copyright & \textbackslash copyright & \dots & \textbackslash dots \\
\ddag & \textbackslash ddag & \P & \textbackslash P & \pounds & \textbackslash pounds \\
\hline
\end{tabular}
\newpage
希腊字母\par
\begin{tabular}{clclclcl}
\toprule
$\alpha$ & \textbackslash alpha & $\theta$ & \textbackslash theta &
$o$ & o & $\upsilon$ & \textbackslash upsilon \\
$\beta$ & \textbackslash beta & $\vartheta$ & \textbackslash vartheta &
$\pi$ & \textbackslash pi & $\phi$ & \textbackslash phi \\
$\gamma$ & \textbackslash gamma & $\iota$ & \textbackslash iota &
$\varpi$ & \textbackslash varpi & $\varphi$ & \textbackslash varphi \\
$\delta$ & \textbackslash delta & $\kappa$ & \textbackslash kappa &
$\rho$ & \textbackslash rho & $\chi$ & \textbackslash chi \\
$\epsilon$ & \textbackslash epsilon & $\lambda$ & \textbackslash lambda &
$\varrho$ & \textbackslash varrho & $\psi$ & \textbackslash psi \\
$\varepsilon$ & \textbackslash varepsilon & $\mu$ & \textbackslash mu &
$\sigma$ & \textbackslash sigma & $\omega$ & \textbackslash omega \\
$\zeta$ & \textbackslash zeta & $\nu$ & \textbackslash nu &
$\varsigma$ & \textbackslash varsigma \\
$\eta$ & \textbackslash eta & $\xi$ & \textbackslash xi &
$\tau$ & \textbackslash tau \\
\midrule
$\Gamma$ & \textbackslash Gamma & $\Lambda$ & \textbackslash Lambda &
$\Sigma$ & \textbackslash Sigma & $\Psi$ & \textbackslash Psi \\
$\Delta$ & \textbackslash Delta & $\Xi$ & \textbackslash Xi &
$\Upsilon$ & \textbackslash Upsilon & $\Omega$ & \textbackslash Omega \\
$\Theta$ & \textbackslash Theta & $\Pi$ & \textbackslash Pi &
$\Phi$ & \textbackslash Phi \\
\midrule
\multicolumn{4}{l}{以下命令依赖 amsmath 宏包}\\
$\varGamma$ & \textbackslash varGamma & $\varLambda$ & \textbackslash varLambda &
$\varSigma$ & \textbackslash varSigma & $\varPsi$ & \textbackslash varPsi \\
$\varDelta$ & \textbackslash varDelta & $\varXi$ & \textbackslash varXi &
$\varUpsilon$ & \textbackslash varUpsilon & $\varOmega$ & \textbackslash varOmega \\
$\varTheta$ & \textbackslash varTheta & $\varPi$ & \textbackslash varPi &
$\varPhi$ & \textbackslash varPhi \\
\midrule
\multicolumn{4}{l}{依赖 amssymb 宏包}\\
$\digamma$ & \textbackslash digamma & $\varkappa$ & \textbackslash varkappa &
$\beth$ & \textbackslash beth & $\gimel$ & \textbackslash gimel \\
$\daleth$ & \textbackslash daleth \\
\bottomrule
\end{tabular}\par
其它符号\par
\begin{tabular}{clclclcl}
\toprule
$\dots$ & \textbackslash dots & $\cdots$ & \textbackslash cdots &
$\vdots$ & \textbackslash vdots & $\ddots$ & \textbackslash ddots \\
$\hbar$ & \textbackslash hbar & $\imath$ & \textbackslash imath &
$\jmath$ & \textbackslash jmath & $\ell$ & \textbackslash ell \\
$\Re$ & \textbackslash Re & $\Im$ & \textbackslash Im &
$\aleph$ & \textbackslash aleph & $\wp$ & \textbackslash wp \\
$\forall$ & \textbackslash forall & $\exists$ & \textbackslash exists &
$\partial$ & \textbackslash partial & $'$ & ' \\
$\prime$ & \textbackslash prime & $\emptyset$ & \textbackslash emptyset &
$\infty$ & \textbackslash infty & $\nabla$ & \textbackslash nabla \\
$\triangle$ & \textbackslash triangle & $\bot$ & \textbackslash bot &
$\top$ & \textbackslash top & $\angle$ & \textbackslash angle \\
$\surd$ & \textbackslash surd & $\diamondsuit$ & \textbackslash diamondsuit &
$\heartsuit$ & \textbackslash heartsuit & $\clubsuit$ & \textbackslash clubsuit \\
$\spadesuit$ & \textbackslash spadesuit & $\neg$ & \textbackslash neg or \textbackslash lnot &
$\flat$ & \textbackslash flat & $\natural$ & \textbackslash natural \\
$\sharp$ & \textbackslash sharp \\
\midrule
\multicolumn{4}{l}{以下命令依赖 latexsym 宏包}\\
$\mho$ & \textbackslash mho & $\Box$ & \textbackslash Box &
$\Diamond$ & \textbackslash Diamond \\
\bottomrule
\end{tabular}
\flushleft
$a_1,a_2,\dots,a_n$\\
$a_1 + a_2 + \cdots + a_n$\par
\subsubsection{指数、上下标和导数}
\textasciicircum\_ 标明上下标。%
注意上下标的内容(子公式)一般需要用花括号包裹,否 则上下标只对后面的一个符号起作用:\par
$p^3_{ij} \qquad
m_\mathrm{Kunth} \qquad
\sum_{k=1}^3 k$\\
$a^x +y \neq a^{x+y} \qquad
e^{x^2} \neq {e^x}^2$ \par
导数符号$'$ 是一类特殊的上标,可以适当连用表示多阶导数,也可以在其后连用上标:\par
$f(x) = x^2 \quad
f'(x) = 2x \quad
f''^{2}(x) = 4$ \par
\subsubsection{分式和根式}
分式使用 \textbackslash frac\{分子\}\{分母\} 来书写。%
分式的大小在行间公式中是正常大小,而在行内被 极度压缩。%
amsmath 提供了方便的命令 \textbackslash dfrac 和 \textbackslash tfrac,%
令用户能够在行内使用正常大小的 分式,或是反过来。\par
In display style:
\[
3/8 \qquad
\frac{3}{8} \qquad
\tfrac{3}{8}
\]
In text style:
$1\frac{1}{2}$~hours \qquad
$1\dfrac{1}{2}$~hours\par
一般的根式使用 \textbackslash sqrt\{\dots\};%
表示 n 次方根时写成 \textbackslash sqrt[n]\{\dots\}\par
$\sqrt{x} \Leftrightarrow x^{1/2} \quad
\sqrt[3]{2} \quad
\sqrt{x^{2} + \sqrt{y}}$ \par
特殊的分式形式,如二项式结构,由 amsmath 宏包的 \textbackslash binom 命令生成:\par
Pascal's rule is
\[
\binom{n}{k} = \binom{n - 1}{k} + \binom{n - 1}{k}
\]
\newpage
\subsubsection{关系符}
\centering
二元关系符\par
\begin{table}
\caption{二元关系符}
\begin{tabular}{clclcl}
\toprule
$<$ & < & $>$ & > &
$=$ & = \\
$\equiv$ & \textbackslash equiv & $\leq$ & \textbackslash leq or \textbackslash le &
$\geq$ & \textbackslash geq or \textbackslash ge \\
$\ll$ & \textbackslash ll & $\gg$ & \textbackslash gg &
$\doteq$ & \textbackslash doteq \\
$\prec$ & \textbackslash prec & $\succ$ & \textbackslash succ &
$\sim$ & \textbackslash sim \\
$\preceq$ & \textbackslash preceq & $\succeq$ & \textbackslash succeq &
$\simeq$ & \textbackslash simeq \\
$\subset$ & \textbackslash subset & $\supset$ & \textbackslash supset &
$\approx$ & \textbackslash approx \\
$\subseteq$ & \textbackslash subseteq & $\supseteq$ & \textbackslash supseteq &
$\cong$ & \textbackslash cong \\
$\sqsubseteq$ & \textbackslash sqsubseteq & $\sqsupseteq$ & \textbackslash sqsupseteq &
$\bowtie$ & \textbackslash bowtie \\
$\in$ & \textbackslash in & $\ni$ & \textbackslash ni ,\textbackslash owns &
$\propto$ & \textbackslash propto \\
$\vdash$ & \textbackslash vdash & $\dashv$ & \textbackslash dashv &
$\models$ & \textbackslash models \\
$\mid$ & \textbackslash mid & $\parallel$ & \textbackslash parallel &
$\perp$ & \textbackslash perp \\
$\smile$ & \textbackslash smile & $\frown$ & \textbackslash frown &
$\asymp$ & \textbackslash asymp \\
$:$ & : & $\notin$ & \textbackslash notin &
$\neq$ & \textbackslash neq or \textbackslash ne \\
\midrule
\multicolumn{4}{l}{以下命令依赖 latexsym 宏包}\\
$\sqsubset$ & \textbackslash sqsubset & $\sqsupset$ & \textbackslash sqsupset &
$\Join$ & \textbackslash Join \\
\midrule
\multicolumn{4}{l}{以下命令依赖 amssymb 宏包}\\
$\lessdot$ & \textbackslash lessdot & $\gtrdot$ & \textbackslash gtrdot &
$\doteqdot$ & \textbackslash doteqdot \\
$\leqslant$ & \textbackslash leqslant & $\geqslant$ & \textbackslash geqslant &
$\risingdotseq$ & \textbackslash risingdotseq \\
$\eqslantless$ & \textbackslash eqslantless & $\eqslantgtr$ & \textbackslash eqslantgtr &
$\fallingdotseq$ & \textbackslash fallingdotseq \\
$\leqq$ & \textbackslash leqq & $\geqq$ & \textbackslash geqq &
$\eqcirc$ & \textbackslash eqcirc \\
$\circeq$ & \textbackslash circeq & $\ggg$ & \textbackslash ggg &
$\lll$ & \textbackslash lll or \textbackslash llless \\
$\lesssim$ & \textbackslash lesssim & $\gtrsim$ & \textbackslash gtrsim &
$\triangleq$ & \textbackslash triangle \\
$\lessapprox$ & \textbackslash lessapprox & $\gtrapprox$ & \textbackslash gtrapprox &
$\bumpeq$ & \textbackslash bumpeq \\
$\lessgtr$ & \textbackslash lessgtr & $\gtrless$ & \textbackslash gtrless &
$\Bumpeq$ & \textbackslash Bumpeq \\
$\lesseqgtr$ & \textbackslash lesseqgtr & $\gtreqless$ & \textbackslash gtreqless &
$\thicksim$ & \textbackslash thicksim \\
$\lesseqqgtr$ & \textbackslash lesseqqgtr & $\gtreqqless$ & \textbackslash gtreqqless &
$\thickapprox$ & \textbackslash thickapprox \\
$\preccurlyeq$ & \textbackslash preccurlyeq & $\succcurlyeq$ & \textbackslash succcurlyeq &
$\approxeq$ & \textbackslash approxeq \\
$\curlyeqprec$ & \textbackslash curlyeqprec & $\curlyeqsucc$ & \textbackslash curlyeqsucc &
$\backsim$ & \textbackslash backsim \\
$\precsim$ & \textbackslash precsim & $\succsim$ & \textbackslash succsim &
$\backsimeq$ & \textbackslash backsimeq \\
$\precapprox$ & \textbackslash precapprox & $\succapprox$ & \textbackslash succapprox &
$\vDash$ & \textbackslash vDash \\
$\subseteqq$ & \textbackslash subseteqq & $\supseteqq$ & \textbackslash supseteqq &
$\Vdash$ & \textbackslash Vdash \\
$\shortparallel$ & \textbackslash shortparallel & $\Supset$ & \textbackslash Supset &
$\Vvdash$ & \textbackslash Vvdash \\
$\blacktriangleleft$ & \textbackslash blacktriangleleft & $\sqsupset$ & \textbackslash sqsupset &
$\backepsilon$ & \textbackslash backepsilon \\
$\vartriangleright$ & \textbackslash vartriangleright & $\because$ & \textbackslash because &
$\varpropto$ & \textbackslash varpropto \\
$\blacktriangleright$ & \textbackslash blacktriangleright & $\Subset$ & \textbackslash Subset &
$\between$ & \textbackslash between \\
$\trianglerighteq$ & \textbackslash trianglerighteq & $\smallfrown$ & \textbackslash smallfrown &
$\pitchfork$ & \textbackslash pitchfork \\
$\vartriangleleft$ & \textbackslash vartriangleleft & $\shortmid$ & \textbackslash shortmid &
$\smallsmile$ & \textbackslash smallsmile \\
$\trianglelefteq$ & \textbackslash trianglelefteq & $\therefore$ & \textbackslash therefore &
$\sqsubset$ & \textbackslash sqsubset \\
\bottomrule
\end{tabular}
\end{table}
\flushleft
\LaTeX 还提供了自定义二元关系符的命令 \textbackslash stackrel,用于将一个符号叠加在原有的二元关 系符之上:\par
\[
f_n(x) \stackrel{*}{\approx} 1
\]
\newpage
\appendix
\section{附录}
\end{document}