一、插入单张图片
\begin{figure}[H]
\centering
\includegraphics[scale=0.3]{fig/picture.png}
\caption{图片说明}
\label{fig:1}
\end{figure}
二、插入多张图片
\begin{figure}[H]
\centering
\subfigure[]
{
\centering
\includegraphics[scale=0.3]{fig/picture1.png}
}
\subfigure[]
{
\centering
\includegraphics[scale=0.2]{fig/picture2.png}
}
\caption{图片说明,(a)第一张图片说明,(b)第二章图片说明}
\label{fig:1}
\end{figure}
三、不带序号的公式,且包含换行操作需要加上\begin{gathered}
$$\begin{gathered}
u(0,y,t) = 6u_ry(1-y) ,\quad v(0,y,t) = 0;\\
u(x,0,t) = u(x,1,t) = v(x,0,t) = v(x,1,t) = 0;\\
T(x,0,t) = 1 ,\quad T(x,1,t) = 0 , \quad T(0,y,t) = 1-y;
\end{gathered}
$$
四、四周带框框的表格
\begin{table}[!ht]
\centering
\begin{tabular}{|l|l|l|l|}
\hline
~ & $\Delta T = 5t^*$ & $\Delta T = 10t^*$ & 相对误差 \\ \hline
$\left\langle\overline{N u}_{\mathrm{b}, \mathrm{t}}\right\rangle$ & 2.479 & 2.479 & $0\%$ \\ \hline
$u_{max}$ & 4.3453 & 4.3447 & $0.014\%$ \\ \hline
\end{tabular}
\end{table}
五、常见的三线表格
\begin{table}[!ht]
\centering
\begin{tabular}{cccc cc}%{|l|l|l|l|}
\hline\hline\noalign{\smallskip}
~ & $\Delta T = 5t^*$ & $\Delta T = 10t^*$ & 相对误差 \\ \hline
$\left\langle\overline{N u}_{\mathrm{b}, \mathrm{t}}\right\rangle$ & 2.479 & 2.479 & $0\%$ \\ \hline
$u_{max}$ & 4.3453 & 4.3447 & $0.014\%$ \\ \hline
\end{tabular}
\end{table}
他们的区别在于 \begin{tabular}后面跟的是ccc还是|1|1|
并且对于最顶上的线,要设置成双线,命令为\hline\hline\noalign{\smallskip}
六、添加代码设置命令
%----------------------------------添加代码控制--------------------------------%
\usepackage{listings}
\lstset{
basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\tiny,
numbersep=5pt,
tabsize=4,
extendedchars=true,
breaklines=true,
keywordstyle=\color{blue}\bfseries,
numberstyle=\color{purple},
commentstyle=\color[rgb]{0, 0.4, 0}\bfseries,
stringstyle=\color{violet}\ttfamily\bfseries,
rulesepcolor=\color{red!20!green!20!blue!20},
showspaces=false,
showtabs=false,
frame=shadowbox,
framexrightmargin=5pt,
framexbottommargin=4pt,
showstringspaces=false,
escapeinside=`', %逃逸字符(1左面的键),用于显示中文
}
\renewcommand{\lstlistingname}{CODE}
\lstloadlanguages{% Check Dokumentation for further languages, page 12
Pascal, C++, Java, Ruby, Python, Matlab, R, Haskell
}
%------------------------------------------------------------------------------%
七、如何在文中引用代码
\begin{lstlisting}
print("hello world")
\end{lstlisting}
八、打出花体字母
\mathbb{F} //(对应于空心的花体)
\mathcal{F} //(接近于花体)
九、加粗字母
\boldsymbol{a} //这个命令可以直接用在mathtype中,不需要调包
\mathbf{x} //加粗正体,不需要调包
//(上面两个效果是一致的,在mathtype中进行了测试,所以使用字少的那个就好了)
\text{x} //不需要调包,正体(不加粗)
\bm{x} //加粗斜体,需要调用包\usepackage{bm}
十、数学公式长竖线
\bigg|_{x = x_0}
十一、三横线的等式
\equiv