图片
\begin{figure}[h]
\centering
\includegraphics[scale=1]{graph/loop1.png}
\caption{this is a figure demo}
\label{loop:1}
\end{figure}
参数:
-
图片位置:
h 此处(here)
t 页顶(top)
b 页底(bottom)
p 独立一页(page) -
\centering:表示的是\begin{figure}里面紧跟的内容都居中
-
\includegraphics[]{}:图片的尺寸缩放(eg: width=3cm, height=8 cm scale=0.4),图片路径(绝对、相对都可)
-
\caption:设置图片的一个编号以及为图片添加标题
-
\label:作为其他地方引用的标识
多图片插入:
网上都提供类似下面的方式,引入\usepackage{graphicx} 和 \usepackage{subfigure} 包,但是我在mac上总是报错
\begin{figure}[H]
\centering
\subfigure[场景1]{
\includegraphics[width=0.45\textwidth]{wolf2}
}
\subfigure[场景2]{
\includegraphics[width=0.45\textwidth]{wolf4}
}
\caption{狼伴归途场景}
\label{wolf2}
\end{figure}
所以采用以下方式:引入\usepackage{subfig} (比subfigure要新)
参考1
参考2
\begin{figure}[h]
\centering
\subfloat[发现loop前的车]
{
\begin{minipage}[t]{0.5\linewidth} %小图 宽度是总宽度一半
\includegraphics[width=\textwidth]{graph/loop1.png} %里面的图=小图宽度
\end{minipage}
}
\subfloat[发现loop]
{
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[width=\textwidth]{graph/loop2.png}
\end{minipage}
}
\quad %直接回车换行也行
\subfloat[闭环]
{
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[width=\textwidth]{graph/loop3.png}
\end{minipage}
}
\subfloat[发现多个loop]
{
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[width=\textwidth]{graph/loop4.png}
\end{minipage}
}
\quad
\subfloat[多个loop闭环]
{
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[width=\textwidth]{graph/loop5.png}
\end{minipage}
}
\subfloat[全局位姿图优化]
{
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[width=\textwidth]{graph/loop6.png}
\end{minipage}
}
\caption{多相机回环检测}
\label{loop:1}
\end{figure}
段落
- 顶格(无缩进):
\noindent
,如果失败引入宏包:\usepackage{indentfirst} - 空行:
~\\ 空白行
和\\[5pt]
,后者上面不能有空行 - 空格:
\qquad
\quad
\空格
\;
\,
\!
依次减少
公式
- 大括号换行问题
在换行的时候将\\
变成\right.\\
,在对齐的位置将&
变成&\left.
- 公式中插入中文
使用\mbox{中文}