2019.11.26
1.求和公式使用$p = \sum\limits_{n=1}^Na_n$,\sum为求和公式,\limits为取消限制在单行中。
2.多行对齐使用align,例如:
\begin{align}
1. \quad & g(X) = x_1 - x_2 + 1 \
2.\quad & g(X) = -x_1 + x_2 + 1
\end{align}
3.梯度符号为\nabla多数符号详见 https://blog.csdn.net/caiandyong/article/details/53351737
4.在gather环境中可以使用pmatrix生成矩阵。注意:在gather环境中不会自动换行。
\begin{gather}
X_1 = \begin{pmatrix}
2 \ 2
\end{pmatrix}
\text{,}X_2 = \begin{pmatrix}
-1 \ -1
\end{pmatrix}
\text{,}X_3 = \begin{pmatrix}
1 \ 1
\end{pmatrix}
\text{,}X_4 = \begin{pmatrix}
2 \ 2
\end{pmatrix}
\end{gather}
5.使用TiKz宏包可以实现画图功能。(未学习)https://logiclife.wordpress.com/2011/03/28/latex-%E4%BD%9C%E5%9B%BE%E5%B7%A5%E5%85%B7%E4%BB%8B%E7%BB%8D/
6.在latex中输出向量。
默认情况下,在Latex中输入向量
\vec{x},向量x上头会出现一个箭头而非加粗。
解决办法:
在Tex文件头加入如下两行即可:
\usepackage{amsmath} % used for boldsymbol. \renewcommand{\vec}[1]{\boldsymbol{#1}} % Uncomment for BOLD vectors.
7.预定义字符:\newcommand{\vecx}{\vec{x}} % 向量x
8.换行使用\\类似于<br>的作用,次行不会缩进; 使用\par则类似于<p>的作用,重新一段,依旧存在缩进。