📄 latex.ctx
字号:
{\large\heiti 第一节\ \ \ 数学排版简介}
\end{center}
1.\ \ 行中数学公式状态命令
所谓行中数学公式,是指行文排版至某有行时,正文中间不换行而直接引用
数学符号、简单函数或方程。进入和退出行中数学公式状态的控制命令是
\verb|\begin{math}|
$<$数学公式$>$
\verb|\end{math}|
简式1:$\backslash$($<$数学公式$>$$\backslash$)
简式2:\$ $<$数学公式$>$ \$
2.\ \ 独立数学公式状态命令
独立数学公式是指正文中所引用的单起一行表述的数学表达式。控制命令是
\verb|\begin{displaymath}|
$<$数学公式$>$
\verb|\end{displaymath}|
简式1:$\backslash$[$<$数学公式$>$$\backslash$]
简式2:\$\$ $<$数学公式$>$ \$\$
3.\ \ 上下标命令(可嵌套使用)
上标命令:\^{}\{上标数学表达式\}
例如象下面这样复杂的式子
$$x^{y^{x^w}}=(1+{\rm e}^x)^{-2xy^w}$$
可由控制程序
\begin{center}
$\backslash [\ x$\^{}\{$y$\^{}\{$x$\^{}$w$\}\}$=
(1+$\{$\backslash$ rm e\}\^{}$x$)\^{}\{$-2xy$\^{}$w$\}$\backslash ]$
\end{center}
下标命令:\_{}\{下标数学表达式\}
4.\ \ 数学符号排版命令
(1)\ \ 希腊字母小写和大写
(2)\ \ 书写体$\cal A$
Choose a function $\cal F$ with ${\cal F}(x)>0$.
(3)\ \ 特殊数学符号:数学运算符,逻辑运算符,箭头符号,花样符号,
否定式逻辑运算符,可变型数学符号,数学公式中的省略号
\begin{center}
\begin{tabular}{ccc}
\hline\hline
省略号形式&控制命令&排版效果\\\hline
中线&$\backslash$cdots&$\cdots$\\
底线&$\backslash$ldots&$\ldots$\\
竖线&$\backslash$vdots&$\vdots$\\
斜线&$\backslash$ddots&$\ddots$\\
\hline\hline
\end{tabular}
\end{center}
行文中的情况
$\sum\limits^{\infty}_{n=1}a_n+\prod\limits^{\infty}_{n=1}a_n
+\int^1_0f(x){\rm d}x$,下面是单独一行时的情况
$$\sum\limits^{\infty}_{n=1}a_n+\prod\limits^{\infty}_{n=1}a_n
+\int^1_0f(x){\rm d}x\ \ \ \bigcap\limits^{\infty}_{i=1} $$
5.\ \ 数学函数的排版命令
$$
\lim\limits_{n\rightarrow\infty}\sin x_n=0
$$
6.\ \ 分式和根式
分式:$\backslash$frac\{分子\}\{分母\}
$$
x=\frac{y+z/2}{y^2+\frac{y}{z+1}}
$$
根式:$\backslash$sqrt[根指数表达式]\{根底数表达式\}
$$x=\sqrt{1+\sqrt{1+\sqrt[n]{1+\sqrt[m]{1+x^p}}}}$$
7.\ \ 界标排版命令
$$(\frac{1}{2})\ \ \ \left(\frac{1}{2}\right)$$
$$
f(a,b,c)=(a+b)+\left\{\frac{a+b}{a-b}\right\}
+\left[\frac{\frac{1}{a+b-c}}{\frac{1}{a-b+c}}\right]
$$
$$
\Psi(x,y,z)=\left|\frac{2(x+y)}{|x|}\right>
$$
$$
\delta_{ij}=\left\{\begin{array}{ll}
y&{\rm if}\ y>0,\\
z+y&{\rm otherwise}
\end{array}\right.
$$
$$
\cases
y&{\rm if}\ y>0,\\
z+y&{\rm otherwise}
\endcases
$$
8.\ \ 矩阵排版命令
设有一个$m$行、$n$列的矩阵,若令$a_{ij}\ (i=1,2,\cdots,n)$为其中第$i$行
第$j$列的矩阵元,\LaTeX{}排版命令为
\verb|\begin{array}|\{列参数1,列参数2,$\cdots$,列参数$n$\}
\$\verb|a_{11}|\$\&\$\verb|a_{12}|\$\&$\cdots$\&\$\verb|a_{1n}|\$
$\backslash$$\backslash$
\$\verb|a_{21}|\$\&\$\verb|a_{22}|\$\&$\cdots$\&\$\verb|a_{2n}|\$
$\backslash$$\backslash$
$\cdots\cdots$
\$\verb|a_{m1}|\$\&\$\verb|a_{m2}|\$\&$\cdots$\&\$\verb|a_{mn}|\$
$\backslash$$\backslash$
\verb|\end{array}|
\begin{center}
数学函数控制命令表
\begin{tabular}{|c|c|c|c|}
\hline
列参数&l&c&r\\\hline
排版功能&左对齐&居中&右对齐\\\hline
\end{tabular}
\end{center}
$$
\begin{array}{clcr}
x+y+z&uv&a-b&8\\
x+y&u+v&a&88\\
x&3u-vw&abc&888
\end{array}
$$
$$
\left|\begin{array}{cc}
1&2\\
3&4
\end{array}\right|=1\times4-2\times3=4-6=-2
$$
$$
\left|\matrix
1&2\\
3&4
\endmatrix\right|=1\times4-2\times3=4-6=-2
$$
9.\ \ 划横线命令\ \ \ 一、上划线命令格式为
\centerline{$\backslash$overline\{数学公式\}}
此命令可以连续嵌套使用. 例如
\centerline{\$ $\backslash$overline\{1+$\backslash$overline
\{1+$\backslash$overline\{$x$\}\^{}3\} \} \$ }
输出结果为
\centerline{$\overline{1+\overline{1+\overline{x}^3}}$}
二、下划线命令格式
\centerline{$\backslash$underline\{数学公式\}}
次命令也可以在行文状态中使用. 例如
The math formula for an $\backslash$underline\{array\}
is denoted as $\backslash$underline\{$A$\}
输出结果为
The math formula for an \underline{array}
is denoted as \underline{$A$}
10.\ \ 表格
\verb|\begin{tabular}|\{列参数1,列参数2,$\cdots$,列参数$n$\}
\$\verb|a_{11}|\$\&\$\verb|a_{12}|\$\&$\cdots$\&\$\verb|a_{1n}|\$
$\backslash$$\backslash$
\$\verb|a_{21}|\$\&\$\verb|a_{22}|\$\&$\cdots$\&\$\verb|a_{2n}|\$
$\backslash$$\backslash$
$\cdots\cdots$
\$\verb|a_{m1}|\$\&\$\verb|a_{m2}|\$\&$\cdots$\&\$\verb|a_{mn}|\$
$\backslash$$\backslash$
\verb|\end{tabular}|
11.\ \ 其它 \ \ \ 1)横向和纵向平均撑满命令\ \ \verb|\hfill \vfill|
This is an example in the \hfill introduction of \LaTeX{}.
This is an example in\hfill the \hfill introduction of \LaTeX{}.
This is an example\hfill in\hfill the \hfill introduction of \LaTeX{}.
2)\ \ 自己定义命令\newcommand{\dd}[2]{{\displaystyle\frac{#1}{#2}}}
This is an example of big fraction.$\dd{1}{2}\frac{1}{2}$
3)\ \ 西文原样显示$\backslash$verb|\ \ \ \ |
4)\ \ 脚注命令 $\setminus$footnot[脚注序码]\{脚注内容\}
This is footnote exaple No.1.
\footnote[20]{This is footnote exaple No.1}
This is footnote exaple No.2.
\footnote{This is footnote exaple No.2}
练习
1.\ \ $\dd{\alpha^{\beta}}{\pi^{\delta}}
+\lim\limits_{\rho\to \varphi}\dd{\partial z}{\partial x}$
\vspace{1cm}
2.\ \ $\overline{x}+\underline{y}+\sqrt{x+y+z_1^2}$
\vspace{1cm}
3.\ \ $\stackrel{\circ}{U}(\delta)$
\newcommand{\AB}[2]
{\hspace{-6mm}
$\begin{array}{lll}
\vspace{-5.8mm}
&\mbox{\hspace{6cm}}&\mbox{\hspace{6cm}}\\
&\mbox{#1}&\mbox{#2}\\
\end{array}$}
\AB{(1)\ \ \ 上海}{(2)\ \ \ 北京}
\AB{(3)\ \ \ $a+b$}{(4)\ \ \ $a-b$}
\end{document}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -