#1.简介
----宏集(macro):把一些经常用到的功能,事先定义好,到要用的时候只引用一小段代码就可以实现一个相对复杂的功能。
----TeX的宏集:LaTex、CTEX…
---- CTEX组成:WinEdit(文本编辑器)、PostScript(处理软件)、MikTeX(Tex系统,核心)、Yap(打印‘.dvi’文件)、Ghostscript(将‘.dvi’文件转化为‘.ps’文件) 和 GSview(打印‘.ps’文件)等。
#2.CTeX下载安装
[link] (https://blog.csdn.net/muzhicihe/article/details/80326090)
#3.LaTeX命令和代码
----《一份不太简短的 LATEX 2ε 介绍》
#4.新手实例
[http://blog.sina.com.cn/s/blog_90444ed201016iq6.html]
- 前期准备
打开WinEdit>>new file, 文件保存类型为UTF-8.
备注:用PDFTeXify, PDFLaTeX, LaTeX, XeLaTeX时不会出现编译问题。(编译按钮:L或T(各种形式)) - eg.1----Hello World
\documentclass{article}
\begin{document}
'Hello World'
\end{document}
- eg.2----标题、作者
\documentclass{article}
\author{My name}
\title{The Title}
\begin{document}
\maketitle
hello word
\end{document}
- eg.3----章节、段落
\documentclass{article}
\title{Hello World}
\begin{document}
\maketitle
\section{Hello World} China is in East Asia.
\subsection{Hello Beijing} Beijing is the capital of China.
\paragraph {Tian'anmen Square} is in the center of Beijing.
\subparagraph{Chairman Mao} is in the center of Tian'anmen Square
\subsection{Hello Guangzhou}
\paragraph{Sun Yat-sen University} is the best university in Guangzhou.
\end{document}
5. eg.4----加入目录
\documentclass{article}
\begin{document}
\tableofcontents
\section{Hello World} China is in East Asia.
\subsection{Hello Beijing} Beijing is the capital of China.
\paragraph {Tian'anmen Square} is in the center of Beijing.
\subparagraph{Chairman Mao} is in the center of Tian'anmen Square
\end{document}
- eg.5----换行
\documentclass{article}
\begin{document}
Beijing is the capital of China.
New York is the capital of America.
America is \\ the capital \\ of Netherlands.
\end{document}
7. eq.6----数学公式
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
The Newton's second law is F=ma.
The Newton's second law is $F=ma$.
The Newton's second law is $$F=ma$$.
The Newton's second law is \[F=ma\].
Greek Letters $\eta$ and $\mu$
Fraction $\frac{a}{b}$
Power $a^b$
Subscript $a_b$
Derivate $\frac{\partial y} {\partial t} $
Vector $\vec{n}$
Bold $\mathbf{n}$
To time differential $\dot{F}$
Matrix (lcr here means left, center or right for each column)
\[
\left[
\begin{array}{lcr}
a1 & b22 & c333\\
\end{array}
\right]
\]
Equations(here \& is the symbol for aligning different rows)
\begin{align}
a+b&=c\\
d&=e+f+g
\end{align}
\[
\left[
\begin{aligned}
&a+b=c\\
&d = e+f+g
\end{aligned}
\right]
\]
\end{document}