浅浅记录一下方便以后使用
一、公式
在线公式编辑器:https://www.latexlive.com/
1.简单公式
\begin{equation*}
f(x,key)=\begin{cases}
1 & \text{ if } key=1 \\
0 & \text{ if } key=0
\end{cases}
\end{equation*}
2.条件公式
\begin{equation*}
f(x,key)=\begin{cases}
1 & \text{ if } key=1 \\
0 & \text{ if } key=0
\end{cases}
\end{equation*}
3.规划类问题
\begin{equation}
\max \quad m_2=m_1-\frac{\int Fdt}{v_e}
\label{111}
\nonumber
\end{equation}
\begin{equation}%多目标规划
s.t.\left\{\begin{array}{l}
a_r=\frac{dv_r}{dt}=-\frac{Fsin\psi}{m}+\frac{GM}{r^2}+\omega^2r\\
a_\tau=\frac{dv_\tau}{dt}=\frac{Fcos\psi}{m}+2\omega v_\tau\\
s_2=\int v_{2r}dt\\
\frac{d\omega}{dt}=\frac{a_\tau}{r}\\
v_{2r}=v_1+\int a_r dt\\
w_2=w_1-\int \frac{a_{\tau}}{r} dt\\
w_2=0\\
s_2=600
\end{array} \right.
\label{duoyueshuguihua1}
\end{equation}
二、表格
1.实验表格
\begin{table}[H]
\begin{center}
\setlength{\tabcolsep}{0.17cm}{
\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|l|l|}
\hline
探头衰减 & \multicolumn{3}{|c|}{幅度} & \multicolumn{3}{|c|}{高电平电压} & \multicolumn{3}{|c|}{低电平电压} & \multicolumn{3}{|c|}{周期} & 频率 \\
\hline
\multirow{2}*{$\times$1} & 档位& 格数 &计数值 & 档位& 格数 &计数值& 档位& 格数 &计数值& 档位& 格数 &计数值 &频率\\
\cline{2-14}
& 500 & 6 & 3.0 & 500 & 6 & 3.0 &500 & 0&0 &200 & 5 &$10^3$ & $10^3$ \\
\hline
\end{tabular}}
\end{center}
\caption{示波器补偿(校准)信号测量}
\label{fig:dist}
\end{table}
三、图片
1.单图
\begin{figure}[H]
\centering
\includegraphics[width=0.6\linewidth]{figure/figure1.png}
\caption{补偿信号测量}
\label{fig:dist}
\end{figure}
2.双图
\begin{figure}[H]
\centering
\subfigure[峰峰值]{
\label{fig:subfig:onefunction}
\includegraphics[width=0.4\linewidth]{figure/figure1.png}}
\hspace{0.5in} % 两图片之间的距离
\subfigure[周期]{
\label{fig:subfig:twofunction}
\includegraphics[width=0.4\linewidth]{figure/figure1.png}}
\label{fig:dist}
\end{figure}
四、列举
1.符号列举
\begin{itemize}
\item[$\blacksquare$] 代价一致(UCS)
\begin{itemize}
\item 边缘为优先队列
\item 优先探索路径成本最低的结点
\begin{equation*}
g(n)=g(n.parent)+c(n.parent.status->n.status)
\end{equation*}
\end{itemize}
\item[$\blacksquare$] 贪婪算法
\begin{itemize}
\item 算法框架与代价一致算法完全相同,也是优先选择成本低的节点进行搜索。只是评估节点成本的函数不相同。
\begin{equation*}
f(n)=h(n)
\end{equation*}
\end{itemize}
\item[$\blacksquare$] A*算法
\begin{itemize}
\item 算法框架与代价一致算法完全相同,也是优先选择成本低的节点进行搜索。只是评估节点成本的函数不相同。
\begin{equation*}
f(n)=h(n)+g(n)
\end{equation*}
\end{itemize}
\item[$\blacksquare$] 图搜素与树搜索
\begin{itemize}
\item 树搜索允许重复探索同一个状态。
\item 图搜索必须保证一个状态只能被探索一次。
\end{itemize}
\end{itemize}
2.(num)列举
\begin{enumerate}
\renewcommand{\labelenumi}{(\theenumi)}
\item 工作原理:
\item 设定任务环境:
\item 求出决策函数:
\end{enumerate}
五、生僻字的处理
之前用overleaf写一篇报告时,赵孟頫的頫字一直打不出来。在CSDN上面搜了一些解决办法,比如从电脑的字库里面导入simsum.ttf包,逐个字替换。但是我尝试了我电脑C盘里面的所有的中文包,都没有解决问题。最后感觉是我电脑的包可能还是和overleaf不适配,就另外找了个包,解决了问题。
下载链接:https://www.overleaf.com/project/6354b2954269fe75fc6ccf5c/file/6372225385dfc479312a9ffb
然后直接在需要的地方,比如赵孟頫,变成赵孟{\CJKfontspec{SimSun.ttf}頫}即可。
六、加入目录
直接在需要插入目录的位置加入以下代码。
\tableofcontents
有时候连接会标称红色,如下图:
此时在begin{document}前面加入以下代码即可:
\hypersetup{
colorlinks=true,
linkcolor=black
}