From 7f25d25860c8eef63c0fe551ba7d775ca1a7b913 Mon Sep 17 00:00:00 2001 From: estomm Date: Sun, 29 Sep 2019 10:45:29 +0800 Subject: [PATCH] latex learning --- Latex/01latex编译原理.md | 31 ++++++++++++++ Latex/02latex文件结构.md | 48 +++++++++++++++++++++ Latex/03latex字体设置.md | 76 ++++++++++++++++++++++++++++++++++ Latex/04latex文档提纲.md | 24 +++++++++++ Latex/05latex特殊字符.md | 24 +++++++++++ Latex/06latex插图.md | 18 ++++++++ Latex/07latex表格.md | 19 +++++++++ Latex/08latex浮动体管理.md | 24 +++++++++++ Latex/09latex数学公式.md | 29 +++++++++++++ Latex/10latex矩阵排版.md | 65 +++++++++++++++++++++++++++++ Latex/11latex多行公式.md | 35 ++++++++++++++++ Latex/12latex参考文献.md | 0 Latex/13latex命令与环境定义.md | 0 Latex/latex概念 | 20 --------- 文献/无人系统可靠性检索.md | 1 - 15 files changed, 393 insertions(+), 21 deletions(-) create mode 100644 Latex/01latex编译原理.md create mode 100644 Latex/02latex文件结构.md create mode 100644 Latex/03latex字体设置.md create mode 100644 Latex/04latex文档提纲.md create mode 100644 Latex/05latex特殊字符.md create mode 100644 Latex/06latex插图.md create mode 100644 Latex/07latex表格.md create mode 100644 Latex/08latex浮动体管理.md create mode 100644 Latex/09latex数学公式.md create mode 100644 Latex/10latex矩阵排版.md create mode 100644 Latex/11latex多行公式.md create mode 100644 Latex/12latex参考文献.md create mode 100644 Latex/13latex命令与环境定义.md delete mode 100644 Latex/latex概念 delete mode 100644 文献/无人系统可靠性检索.md diff --git a/Latex/01latex编译原理.md b/Latex/01latex编译原理.md new file mode 100644 index 00000000..3bc46175 --- /dev/null +++ b/Latex/01latex编译原理.md @@ -0,0 +1,31 @@ +# latex 概念 +Tex是一种语言类型。 + +## tex语言使用流程 +> 语言格式.tex -> 编译程序tex/etex/latex -> .dvi -> 排版程序pdfTex/PdfLatex -> .Pdf + +## tex语言格式分类 + +Plain Tex是一种语言格式。 +LaTeX也是一种语言格式。 +分别由Tex语言中不同的宏包定义的语言格式 + +## tex语言编译工具 + +tex命令是用来编译Plain Tex书写的.tex文件生成.dvi文件程序。 +etex命令是用来编译Plain Tex书写的.tex文件生成.dvi文件程序。 +latex命令用来编译使用LaTeX语言写的.tex文件生成为.dvi文件程序。 + +## tex语言排版工具 + +dvipdfmx程序用来对dvi文件进行排版生成pdf文件。 + +## tex语言编译排版工具 + +> 用来将tex文件直接变异成pdf文件。 + +xetex命令用来编译Plain TeX格式写的dvi文件。使用操作系统字符集,支持Unicode字符集。 +xeLatex命令用来编译LaTeX格式写的dvi文件。使用操作系统字符集,支持Unicode字符集。 +PdfTex是用来排版Plain Tex语言格式的dvi文件,生成PDF文档。 +PdfLaTeX是用来排版LaTeX语言格式的dvi文件,生成PDF文档。 + diff --git a/Latex/02latex文件结构.md b/Latex/02latex文件结构.md new file mode 100644 index 00000000..23eeeb83 --- /dev/null +++ b/Latex/02latex文件结构.md @@ -0,0 +1,48 @@ +# latex文件结构 + +``` +\documentclass{article} +\title{hello} +\author{estom} +\usepackage{ctex} +\newcommad\degree{^\circ} +\begin{document} + +\maketitle + +\section{hello} +hello world殷康龙 +\end{document} +``` + +## 具体结构 + +### 导言区 +* 用来声明文档类型\documentclass{article} +* 文档的基础信息\title{hello} +* 导入的宏包\usepackage{ctex} +* 定义新的latex命令\newcommad\degree{^\circ} + + +### 正文区 + +* 用来完成文档主体。\begin{document} +* 能够设置不同的环境\begin{equation} + +> 不同的环境下能够编写不同形式的命令。 + + + +## 设置中文文档 + +* 使用\usepackage{ctex}宏包 +* 使用ctex提供的\documentclass{ctexarticle}文档类 +* 然后使用xelatex命令进行编译。 + +> ctex宏包主要提供中文字体的排版。xelatex命令主要实现utf8字体的编译。 + + +## 查看帮助手册 +* texdoc ctex可以查看帮助手册。 +* texdoc lshot-zh可以查看一个简单的教程 + diff --git a/Latex/03latex字体设置.md b/Latex/03latex字体设置.md new file mode 100644 index 00000000..f331076c --- /dev/null +++ b/Latex/03latex字体设置.md @@ -0,0 +1,76 @@ +# latex字体设置 + +## 字体属性 + +### 字体编码 + +* 正文字体编码 +* 数学字体编码 + + +### 字体族 + +* 罗马字体 +* 无衬线字体 +* 打字机字体 + +字体族命令,作用于参数。 +\textrm{罗马字体} \textsf{无衬线字体} \texttt{打字机字体} + +字体族声明,作用于后续文本 +\rmfamliy \sffamily \ttfamily +hello world + +可以使用大括号进行分组,限定字体声明的范围。 + +### 字体系列 + +* 粗细\textmd{Medium series} \mdseries +* 宽度\textbf{boldface series} \bfseries + + + + + +### 字体形状 + +* 直立\textup{} \upshape +* 斜体\textit{} \itshape +* 伪斜体\textsl{} \slshape +* 小型大写\textsc{} \sctext + +### 字体类型 +> 中文字体设置在ctex宏包当中。 + +* 宋体\songti{} +* 黑体\heiti{} +* 仿宋\fangsong{} +* 楷书\kaishu{} + + +### 字体大小 +> 基于文档类型的normalsize大小设置\document[12pt]{article},对于英文字体的normalsize只有10,11,12pt。字体大小由一系列声明(无参数命令)控制。 + +* \tiny +* \scriptsize +* \footnotesize +* \small +* \normalsize +* \large +* \Large +* \LARGE +* \huge +* \Huge + +* ctex红包提供了中文字体大小设置基础字体大小。\zihao{5}或者\zihao{-4}表示基础字体为五号或者小四。 + +> 尽量使用\newcommand命令完成新命令的定义。 + + + + +## 命令类型 + +* 有参数命令\usepackage{ctex} +* 无参数命令\rmfamily +* 环境命令:\begin \end成对出现,在不同环境下有不同的latex命令。 \ No newline at end of file diff --git a/Latex/04latex文档提纲.md b/Latex/04latex文档提纲.md new file mode 100644 index 00000000..b1a77fcb --- /dev/null +++ b/Latex/04latex文档提纲.md @@ -0,0 +1,24 @@ +# latex文档提纲 + +## 构建文章提纲 + +\section{} +\subseciton{} +\subsubsection{} + +### ctex文章结构 + +* 使用ctex宏包不改变section结构 +* 使用ctexarticle文档类,section居中,可以通过\ctexset{}命令修改ctex中关于section的基础设置。 +* 能够使用\ctexset{}命令设置大量关于section的细节,包括编号形式与位置。 +### 产生目录 + +\tableofcontents + +### 换行方法 + +* 插入空行 +* \\ +* \par命令 + +> 养成内容与格式分离的习惯。 \ No newline at end of file diff --git a/Latex/05latex特殊字符.md b/Latex/05latex特殊字符.md new file mode 100644 index 00000000..052ec553 --- /dev/null +++ b/Latex/05latex特殊字符.md @@ -0,0 +1,24 @@ +# latex 特殊字符 + +## 特殊符号 + +### 空白符 + +* 空行产生分段,多个空行等同一个 +* 空格产生空格,多个空格等于一个,中文中没有空格 +* 自动缩进,不需要空格实现缩进,禁止使用全角空格 +* 使用\quad\qquad\空格a~b硬空格\kern\hskip\hspace{}\hphantom{}\hfill实现空格。 +### 控制符 + +\# \% \$ \textbackslash\{\} +### 排版符号 + +### 标志符号 + +### 引号 + +### 连字符 + +### 非英文字符 + +### 重音符号 \ No newline at end of file diff --git a/Latex/06latex插图.md b/Latex/06latex插图.md new file mode 100644 index 00000000..6405eb16 --- /dev/null +++ b/Latex/06latex插图.md @@ -0,0 +1,18 @@ +# latex 插图 + +## 插图 + +### 引入宏包 +\usepackage{graphicx} + +### 指定图片搜索路径 +\graphicspath{{figures/},{pics/}} + +### 导入图片 +\includegraphics[选项]{文件名} +* scale指定缩放比例 +* height指定高度 +* width指定宽度 +* angle旋转角度 +格式PDF、EPS、PNG、JPEG、BMP + diff --git a/Latex/07latex表格.md b/Latex/07latex表格.md new file mode 100644 index 00000000..72790fb9 --- /dev/null +++ b/Latex/07latex表格.md @@ -0,0 +1,19 @@ +# latex 表格 + +## 生成表格 +使用tabular 环境生成表格 +/begin{tabular}{l | c || c |p{0.5cm}| r} +a & b & c & d & e\\ +\hline 横线 +/end{tabular} + +## 三线表 + +## 长跨页表格 + + +## 说明文档 + +textdoc booktab + +textdoc longtab \ No newline at end of file diff --git a/Latex/08latex浮动体管理.md b/Latex/08latex浮动体管理.md new file mode 100644 index 00000000..57a071b5 --- /dev/null +++ b/Latex/08latex浮动体管理.md @@ -0,0 +1,24 @@ +# latex浮动体管理 + +## 浮动体管理 + +### figure 浮动体环境 + +\ref{}命令能够引用标签 + +\begin{figure}[htbp]指定排版位置,实现灵活分页 +\centering 居中排版文职 + +\caption{} 设置标题 +\label{}设置浮动体标签 +\end{figure} + +### table 浮动体环境 +\ref{}命令实现表格交叉应用 + +\begin{table} +\centering + +\captiong{}设置标题 +\label{}设置浮动体标签 +\end{table} \ No newline at end of file diff --git a/Latex/09latex数学公式.md b/Latex/09latex数学公式.md new file mode 100644 index 00000000..e9c3240f --- /dev/null +++ b/Latex/09latex数学公式.md @@ -0,0 +1,29 @@ +# latex数学公式 + +## 数学公式 + +### 行内公式 +* $ $ +* \( \) +* begin{math} end{math} + + +### 行间公式 + +* $$ $$ +* \[ \] +* begin{displaymath} end{displaymath} + +### 行间公式自动编号 +\usepackage{asmath} + + +\ref{} +begin{equation} + +\label{}设置标签进行交叉引用 +end{equation} + +不需要的自动编号 +\begin{equation*} +\end{equation*} \ No newline at end of file diff --git a/Latex/10latex矩阵排版.md b/Latex/10latex矩阵排版.md new file mode 100644 index 00000000..3480ec32 --- /dev/null +++ b/Latex/10latex矩阵排版.md @@ -0,0 +1,65 @@ +# latex矩阵排版 + + +## matrix环境 + +### 导入amsmath宏包 + +/usepackage{smsmath} + +### matrix环境 + +begin{matrix} +end{matrix} + + +begin{bmatrix} +中括号 +end{bmatrix} + + +begin{Bmatrix} +大括号 +end{Bmatrix} + +begin{vmatrix} +单竖线 +end{vmatrix} + + +begin{Vmatrix} +双竖线 +end{Vmatrix} + +### 省略号实现 + +\dots + +\vdots + +\ddots + +### 分块矩阵 + +begin{pmatrix} +分块矩阵 +end{pmatrix} + +### 行内矩阵 +begin{smallmatrix} +end{smallmatrix} + +### 行列合并 + +\multicolumn{2}{c}\raisebox{调整高度} + +### 跨行括号 +\left( \right) + +### array环境实现矩阵 + +同tabular环境 +begin{array} +end{array} + +可以使用array环境的嵌套实现更高级的矩阵。 \ No newline at end of file diff --git a/Latex/11latex多行公式.md b/Latex/11latex多行公式.md new file mode 100644 index 00000000..ba7ee095 --- /dev/null +++ b/Latex/11latex多行公式.md @@ -0,0 +1,35 @@ +# latex 多行公式 + +## 多行公式 + +\begin{gather} +每一行都带编号\\ +\notag阻止公式编号 +\end{gather} + +\begin{gather*} +不带编号的多行公式\\ +\end{gather*} + +begin{align} +代编号的对齐公式 +end{align} + +begin{align*} +不带编号的对齐公式 +end{align*} + +begin{equation} +begin{split} +一个公式的分行排版 +end{split} +end{equation} + + +begin{equation} +begin{case} +分段函数的排版 +end{case} +end{equation} + + diff --git a/Latex/12latex参考文献.md b/Latex/12latex参考文献.md new file mode 100644 index 00000000..e69de29b diff --git a/Latex/13latex命令与环境定义.md b/Latex/13latex命令与环境定义.md new file mode 100644 index 00000000..e69de29b diff --git a/Latex/latex概念 b/Latex/latex概念 deleted file mode 100644 index d34cb11d..00000000 --- a/Latex/latex概念 +++ /dev/null @@ -1,20 +0,0 @@ -Tex是一种语言类型。 - -语言格式.tex -> 编译程序tex/etex -> .dvi -> 排版程序pdfTex/PdfLatex -> Pdf - - - -Plain Tex是一种语言格式。 -LaTeX也是一种语言格式。 -分别由Tex语言中不同的宏包定义的语言格式 - -tex命令是用来编译Plain Tex书写的.tex文件生成.dvi文件程序。 -etex命令是用来编译Plain Tex书写的.tex文件生成.dvi文件程序。 -tex -latex命令用来编译使用LaTeX语言写的.tex文件生成为.dvi文件程序。 - - -xetex命令用来编译Plain TeX格式写的.tex文件。使用操作系统字符集,支持Unicode字符集。 -xeLatex命令用来编译LaTeX格式写的.tex文件。使用操作系统字符集,支持Unicode字符集。 -PdfTex是用来排版Plain Tex语言格式的.tex文件,生成PDF文档。 -PdfLaTeX是用来排版LaTeX语言格式的.tex文件,生成PDF文档。 - diff --git a/文献/无人系统可靠性检索.md b/文献/无人系统可靠性检索.md deleted file mode 100644 index 8ea8dc6d..00000000 --- a/文献/无人系统可靠性检索.md +++ /dev/null @@ -1 +0,0 @@ -## 关于总是的格式说明