1. 插入图片
添加图片
使用福昕编辑器进行裁剪,然后(将图片统一放入picture文件夹):
\begin{figure} (双栏占一栏)
\begin{figure}[h] % 可选,h这里;t顶部;b底部。
\centering
\includegraphics[scale=0.6]{picture/model} % [width=\textwidth][width=\linewidth]
\caption{This is a caption}
\Description{This is Description}
\label{fig1} % label用于后续引用
\end{figure}
其中方括号[]中的内容为可选项,width=\textwidth
和width=\linewidth
在单双栏会有些不同。
\begin{teaserfigure}(双栏占两栏)
\begin{teaserfigure}
\includegraphics[width=\textwidth]{pic/model}
\caption{This is a caption}
\Description{This is Description}
\label{fig1}
\end{teaserfigure}
在正文中,
引用该图片的时候:~\ref{fig1}
Note:
- 如果是两栏,上述显示的图片只占其中一栏;将
\begin{}
和\end{}
中的figure
改为figure*
后,会占据两栏。 - 其中
\includegraphics
后的[]
可以根据情况进行更改。
[scale=0.6]
,指按原始图片0.6比例进行缩小。
[width=\linewidth]
,宽度按照页面宽度进行。
[width=0.4\textwidth,height=0.3\textwidth]
,分别对宽度、高度进行缩小。
2. 插入表格
\begin{table}[h] % 可选,h这里;t顶部;b底部。
\caption{This is a caption}
\label{tab1}
\begin{tabular}{c|cc} % 有多少列就有多少个c,c|c表示列之间有竖列。(c居中;l左;r右)
\toprule % 上部线
1 & 2 & 3 \\
\midrule % 中间线
1 & 2 & 3 \\
\bottomrule % 底部线
\end{tabular}
\end{table}
有多少列就有多少个c,c|c表示列之间有竖列。
3. 符号、文本粗体
\boldsymbol % 给符号加粗体(向量、矩阵)
\mathbf % 给符号加粗体(向量、矩阵)
\textbf % 给文本加粗体
4. 单栏、双栏添加行号
单栏
\usepackage{lineno}
\begin{document}
\linenumbers % 开始编号
(文章内容)
\nolinenumbers % 结束编号,若要全文编号,该条命令可不加(表示一直编号到最后)
(通常.bib文件放在这里,因为参考文献不必编号)
\end{document}
双栏
\usepackage[switch]{lineno}
\begin{document}
\linenumbers
(文章内容)
\nolinenumbers % 结束编号,若要全文编号,该条命令可不加
\end{document}
每一页都重新编号
\usepackage{lineno}
\begin{document}
\pagewiselinenumbers % 按页重新编号
\switchlinenumbers
5. 添加空格
\qquad % 2m
\quad % m
\ % 1/3m
\; % 2/7m
\, % 1/6m
\! % 紧贴
6. 注释快捷键
ctrl+T
7. 维度
\mathbb{R}^{d}
8. 脚注
\footnote{}
9. 公式
单个公式
\begin{equation}
(公式)
\end{equation}
多个公式
\begin{equation}
\begin{aligned}
(公式1) % 中间的=用&=
(公式2) % 中间的=用&=
\end{aligned}
\end{equation}
10. 分点
\begin{itemize}
\item
\item
\end{itemize}
补充
1)\noindent 顶格
2)\sum\nolimits_{} 在正文实现上下标在右侧
3)\textsc 大写字母,首字母再大写
4) \clearpage 重新起一页,通常使用在添加附录页时
5)特殊符号
\blacktriangle
,\blacktriangledown
,分别为实心正三角和实心倒三角。
参考:
- Latex中插入图片:https://blog.csdn.net/qq_35091353/article/details/111403178
- 【Latex】latex导入svg图片:https://blog.csdn.net/dl962454/article/details/114479159
- 【InkScape+LaTeX】如何绘制矢量图并优雅地用在LaTeX文档中?:https://www.bilibili.com/video/BV1V7411u7cg?p=2
- latex在论文中添加行号:https://blog.csdn.net/weixin_38314865/article/details/111031001
- 关于LaTeX空格命令的心得分享:https://zhuanlan.zhihu.com/p/411399241
另:添加svg矢量图
将.svg图片转为.pdf图片,下载并安装:https://inkscape.org/release/all/windows/64-bit/exe/
记得选择,添加到PATH,否则后续要手动添加:
在需要转换的svg图片(demo.svg)下进入cmd,输入:
inkscape -D --export-type=pdf --export-latex demo.svg