基本使用
单行注释
% [注释内容]
PS:texstudio中多行注释快捷键
% 注释 ---- Ctrl + T
% 取消注释 ---- Ctrl + U
图片
插入
\begin{figure}[!t]
\centerline{\includegraphics[width=\columnwidth]{fig1.png}}
\caption{edit-caption.}
\label{fig: example1}
\end{figure}
引用
\ref{fig: example1}
备注
『h』当前位置。将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不起作用。
『t』顶部。将图形放置在页面的顶部。
『b』底部。将图形放置在页面的底部。
『p』浮动页。将图形放置在一只允许有浮动对象的页面上。
一般使用[htb]
这样的组合,只用[h]是没有用的。这样组合的意思就是latex会尽量满足排在前面的浮动格式,就是h-t-b这个顺序,让排版的效果尽量好。
[!h]
只是试图放在当前位置。如果页面剩下的部分放不下,还是会跑到下一页的。一般页言,用 [!h]
选项经常会出现不能正确放置的问题,所以常用 [ht]
、[htbp]
等。
如果你确实需要把图片放在当前位置,不容改变,可以用float宏包的[H]选项。不过如果这样做,出现放不下的问题时需要手工调整。使用格式:\usepackage{float}
扩展
LATEX——两张图并列排列/双栏模板中图片通栏并列布局
表格
插入
\begin{table}[!h] \small % 字体大小
\renewcommand\arraystretch{1.2} % 行高1.2倍
\centering
\caption{This is a caption} \label{mult}
\begin{tabular}{c|c|cccccc}
\toprule
\multicolumn{2}{c|}{First} %合并两列,并居中右边加竖线
& 1A & 2A & 3A & 1B & 2B & 3B \\
\hline
\multirow{4}{*}{\rotatebox{90}{Second}} %合并四行
& T1 & a & a & a & a & a & a\\
\cline{2-8}
& T2 & a & a & a & a & a & a\\
\cline{2-8}
& T3 & a & a & a & a & a & a\\
\cline{2-8}
& T4 & a & a & a & a & a & a\\
\hline
\multicolumn{2}{c|}{Third} & a & a & a & a & a & a \\
\hline
\multicolumn{2}{c|}{Forth} & \multicolumn{6}{c}{$2A {\rightarrow} 2B$}\\
\bottomrule
\end{tabular}
\end{table}
引用
\ref{tab: Examples}
推荐工具:【Tables Generator】LaTex 表格生成器
跨栏显示
\begin{table*}[htbp]
...
\end{table*}
扩展:Latex表格宽度设置
公式
插入
\begin{equation}
{edit-latex-equation}
\label{eq: annotation1}
\end{equation}
引用
\ref{eq: annotation1}
推荐插件:Mathpix Snip
文献
创建自有的bib文件,例 myreference.bib
,内容格式如下:
@inproceedings{amon2014evaluation,
title={Evaluation of the spatial resolution accuracy of the face tracking system for kinect for windows v1 and v2},
author={Amon, Clemens and Fuhrmann, Ferdinand and Graf, Franz},
booktitle={Proceedings of the 6th Congress of the Alps Adria Acoustics Association},
pages={16--17},
year={2014},
organization={Australian alps}
}
@article{pagliari2015calibration,
title={Calibration of kinect for xbox one and comparison between the two generations of microsoft sensors},
author={Pagliari, Diana and Pinto, Livio},
journal={Sensors},
volume={15},
number={11},
pages={27569--27589},
year={2015},
publisher={Multidisciplinary Digital Publishing Institute}
}
在{主文件名}.tex
中补充如下语句:
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv, {myreference.bib}}
引用
\cite{pagliari2015calibration, amon2014evaluation}
PS: 编译时 显示 ?
时,删除 同一文件夹内 {主文件名}.bbl
,重新编译即可;
Extension
英文语法检查
强推:Ginger Software | English Grammar & Writing App
写在最后:若本文章对您有帮助,请点个赞啦 ٩(๑•̀ω•́๑)۶