\documentclass[a4paper, 12pt, UTF8]{ctexart}
\usepackage{matnoble-doc-cn}
\begin{document}
\title{\bf \LaTeX 中文文档模板} \author{\bf
\href{https://matnoble.github.io/about/}{马诺布尔}} \date{}
\maketitle
\tableofcontents
\footnote{\noindent \createtext{2019 年 12 月 5 日} \newline
\updatetext{\today}}.
\clearpage
\listoflistings
\clearpage
\section{随机文本}
\zhlipsum[2-3]
\clearpage
\section{通常环境}
\subsection{列表}
\subsubsection{无序列表}
\begin{itemize}
\item Sth
\item Sth
\item $\cdots$
\end{itemize}
\subsubsection{有序列表}
\begin{enumerate}
\item sth
\item sth
\item $\cdots$
\end{enumerate}
或者
\begin{itemize}
\item[(1)] Sth
\item[(2)] Sth
\item[(3)] $\cdots$
\end{itemize}
\bigskip
\noindent {\bf 使用 \autoref{mybox} 得到更漂亮列表环境 }
\medskip
\begin{mybox}{无序列表}
\begin{itemize}[leftmargin = 10pt]
\item Sth
\item Sth
\item $\cdots$
\end{itemize}
\end{mybox}
\begin{listing}[ht]
\begin{minted}[ frame=single, framesep=2mm, baselinestretch=1.2,
bgcolor=MaterialBlue50, rulecolor=MaterialBlue,
fontsize=\footnotesize, mathescape, autogobble ]{tex}
无序
\begin{itemize}
\item Sth
\item Sth
\item $\cdots$
\end{itemize}
有序
\begin{enumerate}
\item sth
\item sth
\item $\cdots$
\end{enumerate}
带边框
\begin{mybox}{列表}
\begin{itemize}[leftmargin = 10pt]
\item Sth
\item Sth
\item $\cdots$
\end{itemize}
\end{mybox}
\end{minted}
\caption{\em mybox}
\label{mybox}
\end{listing}
\clearpage
\subsection{表格}
\begin{table}[ht]
\centering
\caption{\em 这是表格}
\vskip 0.1in
\label{table}
\begin{tabular}{c|cccc}
\hline
\hline
\rule{0pt}{3ex}
序号 & 姓名 & 年龄 & 学号 & 性别
\rule[-1.2ex]{0pt}{0pt} \\\hline
001 & * & * & * & * \\
002 & * & * & * & * \\
003 & * & * & * & * \\
004 & * & * & * & * \\
\hline
\hline
\end{tabular}
\end{table}
\begin{listing}[ht]
\begin{minted}[ frame=single, framesep=2mm, baselinestretch=1.2,
bgcolor=MaterialBlue50, rulecolor=MaterialBlue,
fontsize=\footnotesize, mathescape, autogobble ]{tex}
\begin{table}[ht]
\centering
\caption{\em 这是表格}
\vskip 0.1in
\label{table}
\begin{tabular}{c|cccc}
\hline
\hline
\rule{0pt}{3ex}
序号 & 姓名 & 年龄 & 学号 & 性别
\rule[-1.2ex]{0pt}{0pt} \\\hline
001 & * & * & * & * \\
002 & * & * & * & * \\
003 & * & * & * & * \\
004 & * & * & * & * \\
\hline
\hline
\end{tabular}
\end{table}
\end{minted}
\caption{\em 表格}
\label{table}
\end{listing}
\clearpage
\subsection{图}
\subsubsection{单张图}
\begin{figure}[H]
\centering \includegraphics[width=0.15\textwidth]{google.png}
\caption{\em 单张图}
\label{fig:mesh}
\end{figure}
\subsubsection{两张图并列}
\begin{figure}[H]
\centering
\begin{subfigure}{.48\textwidth}
\centering
% include first image
\includegraphics[width=.3\linewidth]{google.png}
\caption{\em 子图 1}
\label{fig:v21}
\end{subfigure}
\begin{subfigure}{.48\textwidth}
\centering
% include second image
\includegraphics[width=.3\linewidth]{google.png}
\caption{\em 子图 2}
\label{fig:v22}
\end{subfigure}
\caption{\em 并列两张图}
\label{fig:v2}
\end{figure}
\begin{listing}[ht]
\begin{minted}[ frame=single, framesep=2mm, baselinestretch=1.2,
bgcolor=MaterialBlue50, rulecolor=MaterialBlue,
fontsize=\footnotesize, mathescape, autogobble ]{tex}
\begin{figure}[H]
\centering
\begin{subfigure}{.48\textwidth}
\centering
\includegraphics[width=.5\linewidth]{google.png}
\caption{\em 子图 1}
\label{fig:v21}
\end{subfigure}
\begin{subfigure}{.48\textwidth}
\centering
\includegraphics[width=.5\linewidth]{google.png}
\caption{\em 子图 2}
\label{fig:v22}
\end{subfigure}
\caption{\em 并列两张图}
\label{fig:v2}
\end{figure}
\end{minted}
\caption{\em 并列图}
\label{subfigure}
\end{listing}
\clearpage
\section{定理类环境}
\begin{defn}{}{}
\end{defn}
\begin{lem}{}{}
\end{lem}
\begin{thm}{}{}
\begin{case}
\end{case}
\begin{case}
\end{case}
\end{thm}
\begin{rem}
\end{rem}
\begin{cor}{}{}
\end{cor}
\begin{exa}
\end{exa}
\begin{proof}
\end{proof}
\clearpage
\section{数学公式}
\begin{itemize}
\item 积分符号使用 $\backslash$dif
\[
\int x^{2} \dif x
\]
\item 为证 $a = b$, 需要证明
{\bf 无标号}
\[
a < b + \epsilon \wedge b < a + \epsilon.
\]
{\bf 有标号}
\begin{equation}
\label{eq:1}
a < b + \epsilon \land b < a + \epsilon.
\end{equation}
\item PNP/Stokes 方程组
\begin{empheq}[left=\empheqlbrace]{align}
& \partial_{t} - \nabla\cdot[D_{i}(\nabla C_{i} + q_{i} \nabla
\Phi C_{i}) - \bmu C_{i}] = F_{i},
\\[3pt]
& -\nabla \cdot (\epsilon \nabla \Phi) = (C_{1} - C_{2}) + F_{3},
\\[3pt]
& \partial_{t}\bmu - \Delta \bmu + \nabla p = -(C_{1} -
C_{2})\nabla \Phi + F_{4},
\\[3pt]
& \nabla \cdot \bmu = 0.
\end{empheq}
\item 带虚线的矩阵
\[
\left[
\begin{array}{c;{2pt/2pt}c}
\begin{matrix}
1 & 12 & 3 & 8 \\
14 & 5 & 16 &21\\
7 & 18 & 9 &7 \\ \hdashline[2pt/2pt]
23 & 0 & -1 &8\\
\end{matrix} &
\begin{matrix}
1 & 4 \\
2 & 5 \\
3 & 6 \\ \hdashline[2pt/2pt]
13 & 26 \\
\end{matrix}
\end{array}
\right]
\]
\item 分块矩阵
\[
\begin{bmatrix}
\begin{array}{c | c}
\boldsymbol{A} & \symbf{\beta} \\ \hline
\symbf{\alpha}^{\mathsf T} & 0
\end{array}
\end{bmatrix}
\]
\end{itemize}
\S 更多相关知识请访问 \href{https://matnoble.github.io/series/latex/}{\LaTeX{} 排版“冷”知识}
\clearpage
\begin{thebibliography}{99}
\bibitem{1}
\bibitem{2}
\bibitem{3}
\end{thebibliography}
\clearpage
\begin{appendices}
\section{代码}
\begin{listing}[ht]
\begin{minted}[ frame=single, framesep=2mm,
baselinestretch=1.2, bgcolor=MaterialBlue50,
rulecolor=MaterialBlue, fontsize=\footnotesize,
linenos, mathescape, autogobble ]{python}
import matplotlib.pyplot as plt import numpy as np
plt.figure(num = 1, figsize=(8, 6)) n =
np.linspace(1,100,100) plt.plot(n, 1/n, 'bx')
plt.xlabel(r'$ n $') plt.ylabel(r'$ \frac{1}{n} $')
plt.figure(num = 2, figsize=(8, 6)) n =
np.linspace(1,100,100) plt.plot(n, np.sin(n)/n, 'bx')
plt.xlabel(r'$ n $')
plt.ylabel(r'$ \frac{\sin(n)}{n} $')
plt.show()
\end{minted}
\caption{\em Python}
\end{listing}
\begin{listing}[ht]
\begin{minted}[ frame=single, framesep=2mm,
baselinestretch=1.2, bgcolor=MaterialBlue50,
rulecolor=MaterialBlue, fontsize=\footnotesize,
linenos, mathescape, autogobble, breaklines ]{matlab}
figure() plot(XX,YY,'k-'),hold on plot(XX',YY','k-'),
hold on B= plot(boundary(3,:), boundary(4,:), 'b.',
'markersize', 25); hold on I = plot(index(:,1),
index(:,2), 'r.', 'markersize',25); hold off axis
equal set(gca,'xtick',[],'ytick',[]) xlim(X) ylim(Y)
set(gca,'looseInset',[0 0.01 0 0.01]) h = legend([B,
I], 'boundary nodes', 'inside nodes',
'Location','bestoutside'); set(h, 'Fontsize', 10)
\end{minted}
\caption{\em Matlab}
\end{listing}
\end{appendices}
\end{document}

PDF Preview
Create an account to compile and preview