目前在学习Latex,做一下随笔记录一下(可能什么时候就会断了吧)
好了,可以开始了
\documentclass{xxxx}
一般来说documentclass有article、book、report、beamer(这个好像是可以做presentation,slide)、amsart(类似article,但是二者之间还有一些不同,比如公式编号的位置)
今天刚刚学习了beamer这个命令:
\documentclass[leqno]{beamer}------创建一个slide
\usetheme{Warsaw}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
顺便记录一下如何创建一个matrix
\begin{matrix}
a & b & c\\
c & d & e\\
\end{matrix}
其中{matrix}是不带括号的,{bmatrix}是带方括号,{pmatrix}是一个圆括号
其中 &是保持上下两列元素的之间的对应,\\是分列的意思
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
对于tex中的公式进行编号有两个方法
方法1:
\begin{equation}
\int_{a}^{b}f(x)\ dx
\label{name of the equation}-------下文如果要引用公式的话,就需要在此加入label;后文使用\ref{name of equation}(标识引用该公式的编号),\pageref{name of equation}(表示引用该公式所在页)
\end{equation}
方法2:
\numberwithin{equation}{section}
在一个section的开头使用,后文的equation就会加入序号,序号的格式是section.number.equation
例子:
\section{number}
\numberwithin{section}{equation}
$\frac{x+1}{x-1}$
-------------------------------------------------------------------------------------------------------------------------------------------------------------
公式所用的大括号如何编写?
\[
f(x)=
\begin{cases}
x=1 &&\text{if $x=1$}\\
x=2 &&\text{if $x=2$}\\
x=\infty &&\text{otherwise}
\end{cases}
\]
如何列些公式的纵向展开?
(需要amsmath包)
\begin{align}
\vec{A} &=\sum_{x \to 0}{x \to n}+y\\
&=\sum_{0}{\infty}
\end{align}
-------------------------------------------------------------------------------------------------------------------------------------------------
在PPT里面写公式时可以使用命令{theorem}
\begin{theorem}\label{T:Technical}
L is Latex
\end{theorem}
该命令目前在 article 和 beamer两种文件格式下测试,只有beamer可以编译
--------------------------------------------------------------------------------------------------------------------------------------------------
Latex成段的注释可以使用命令
\iffalse
\fi
----------------------------------------------------------------------------------------------------------------------------------------------------
Latex中的数学公式的表达需要加$$
eg
$\infty$
$\delta$
----------------------------------------------------------------------------------------------------------------------------------------------------
latex比较常用的包
1 \usepackage{amsmath}
2 \usepackage{graphicx}
3\usepackage{amsthm}

浙公网安备 33010602011771号