Tex学习笔记

最近想学一学Tex,据说可以排出特别好看的排版,比word什么的好用多了,考虑到以后写论文肯定也要用,所以先在这篇文章里做个实验,以后会慢慢更新~

常见用法

博客支持KaTeX\href{https://katex.org/}{\KaTeX},支持的Tex用法见https://katex.org/docs/support_table.html

下面是我留意的用法的整理,顺序比较混乱,用法也不一定保证对(对Tex的认识还比较浅薄)。

名称 关键字 示例(渲染后) 示例(代码)
加粗 \bold AB\bold{AB} \bold{AB}
换行 \\ a=bc=da = b \\ c = d a = b \\ c = d
文本(而非数学)模式 \text notintextmodein text modenot in text mode \\ \text{in text mode} not in text mode \\ \text{in text mode}
下角标 _ aija_{i_j} a_{i_j}
上角标 ^ a1a^{-1} a^{-1}
等号对齐 {aligned}, & A=B+CD+E=F\begin{aligned} A &= B + C \\ D + E &= F \end{aligned} \begin{aligned} A &= B + C \\ D + E &= F \end{aligned}
公式标号 \tag NOTE:只有在使用$$...$$的时候会被渲染 $$\tag{1.1} a = b$$
条件式 {cases} t={aif bcif dt = \begin{cases} a &\text{if } b \\ c & \text{if } d \end{cases} t = \begin{cases} a &\text{if } b \\ c & \text{if } d \end{cases}
求偏导 \partial \partial \partial
根式 \sqrt 2\sqrt{\sqrt{2}} \sqrt{\sqrt{2}}
分式 \frac yx\frac{\partial{y}}{\partial{x}} \frac{\partial{y}}{\partial{x}}
连分式 \cfrac 11+12\cfrac{1}{1+\cfrac{1}{\sqrt{2}}} \cfrac{1}{1+\cfrac{1}{\sqrt{2}}}
矩阵范式 \Vert A2{\Vert\bold{A}\Vert}_2 {\Vert\bold{A}\Vert}_2
方括号矩阵 {bmatrix} A=[A11A12A21A22]\bold{A} = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix} \bold{A} = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix}
括号的大小 \big, \Big, \bigg, \Bigg ((((([[[[[( \big( \Big( \bigg( \Bigg( \\ [ \big[ \Big[ \bigg[ \Bigg[ ( \big( \Big( \bigg( \Bigg( \\ [ \big[ \Big[ \bigg[ \Bigg[
向量的箭头 \overleftharpoon, \overrightharpoon, \overleftarrow, \overrightarrow ab+bcAB+BC\overrightharpoon{ab} + \overleftharpoon{bc} \\ \overrightarrow{AB} + \overleftarrow{BC} \overrightharpoon{ab} + \overleftharpoon{bc} \\ \overrightarrow{AB} + \overleftarrow{BC}
数学花体 \mathcal LF\mathcal{LF} mathcal{LF}
正下标 \underset arg minW,bLobj\underset{\bold{W}, \bold{b}}{\argmin} \mathcal{L}_{obj} \underset{\bold{W}, \bold{b}}{\argmin} \mathcal{L}_{obj}

测试

一个方阵 ACn×n\small{\bold{A}} \in \Complex^{n \times n} A1\small{\bold{A}^{-1}} 的定义使得

(145)AA1=A1A=I,\small{\tag{\small{145}} \bold{A}\bold{A}^{-1} = \bold{A}^{-1}\bold{A} = \bold{I},}

其中 I\small{\bold{I}}n×n\small{n \times n} 单位矩阵。如果 A1\small{\bold{A}^{-1}} 存在, A\small{\bold{A}} 被称为非奇异阵。否则, A\small{\bold{A}} 被称为奇异阵

Author: yym6472
Link: https://yym6472.github.io/2019/05/02/tex学习笔记/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.