Latex模板
自己学LATEX的一个实验品。大家可以拿来党模板用。
%不是中文的,中文不显示
\documentclass{article}
%\documentclass{ctexart} %中文文档(不完善)(这两个任选一个用)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath} %宏包声明(编辑数学公式的宏包)
\usepackage{amssymb} %宏包声明(编辑数学公式的宏包)
\usepackage{amsthm} %宏包声明(编辑数学定理和证明过程的宏包)
\usepackage{graphicx} %宏包声明(插入图片的宏包)
\usepackage{multirow} %宏包声明(复杂表格的宏包)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%标题在这里设置
\title{Maybe it is my Fist Paper}
\author{Cui Xin}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} %文档开始
\maketitle %显示标题
\tableofcontents %自动建立目录
\section{Section 1} Text in Section 1. %正文开始
\subsection{Subsection 1.1} Subsection 1.1. %结构测试
\subsubsection{Subsubsection 1.1.1} %空格不敏感
\paragraph{paragraph 1}Text in paragraph 1 %段落内容从第一个字符开始,空格、换行不敏感
\paragraph{paragraph 2} %与上面一行比较
Text in paragraph 2
\subparagraph{subparagraph 1.1} Text in subparagraph 1.1
\subparagraph{subparagraph 1.1}Text in subparagraph 1.2 %与上面一行比较
\subsection{Subsection 1.2} %长段落测试
Beijing is the capital of China.New York is the capital of America.Amsterdam is the capital\
of Netherlands. Amsterdam is the capital of Netherlands.
\subsection{Subsection 1.3} %换行测试
Beijing is %换行(换一行)不影响内容
the capital
of China.
New York is %换两行及以上,输出内容会换行(有缩进的换行)
the capital %注释不能插在换行上,插在换行上相当于没换行
of America.
Amsterdam is \\ the capital \\ %“\\”符号可以手动换行(对齐到文档最左边的换行)
of Netherlands.
Amsterdam is \ %单行放不下文字时,“\”可以让文档连续
the capital \\of Netherlands.
\subsection{Subsection 1.4} %数学公式测试
The Newton's second law is F=ma.
\\The Newton's second law is $F=ma$. %$***$.括起的部分变为斜体
\\Greek Letters $\eta$ and $\mu$ %“$\eta$”“$\partial$”“$\mu$” 转义字符,$必须加
\\Fraction $\frac{a}{b}$ %“$\frac{a}{b}$”分数表示,$必须加
\\Power $a^b$ %“$a^b$”上标表示,$必须加
\\Subscript $a_b$ %“$a_b$”下标表示,$必须加
\\Derivate $\frac{\partial y}{\partial t} $ %“$”套“$”出现,里面的省略
\\Vector $\vec{n}$ %“$\vec{n}$”右箭头上标
\\Bold $\mathbf{n}$ %“$\mathbf{n}$”加粗内容
\\To time differential $\dot{F}$ %“$\dot{F}$”上标点
Matrix (lcr here means left, center or right for each column) %矩阵测试
\[
\left[
\begin{array}{lccr} %lc,lcr数量只能比列数多不能少,它指明了对齐方式
a1 & b22 & c333 & d4444 \\
e55555 & f666666 & g7777777 & h88888888
\end{array}
\right]
\]
Equations ONE(here \& is the symbol for aligning different rows) %方程式测试1
\begin{align}
a+b&=c\\ %“&”符号用来让等号对齐
d&=e+f+g
\end{align}
Equations TWO %方程式测试1
\[
\left\{
\begin{aligned}
&a+b=c\\
&d=e+f+g
\end{aligned}
\right.
\]
\subsection{Subsection 1.6} %表格测试
\begin{tabular}{|c|c|}
a & b \\
c & d\\
\end{tabular}
\begin{tabular}{|c|c|}
\hline
a & b \\
\hline
c & d\\
\hline
\end{tabular}
\begin{center} %表格外面套一个center使它居中
\begin{tabular}{|c|c|}
\hline
a & b \\ \hline
c & d\\
\hline
\end{tabular}
\end{center}
\end{document}

微信扫一扫,打赏作者吧~